From 9ef94ad46b3fd90201f445bf0e3b33135d97cc7e Mon Sep 17 00:00:00 2001 From: withchao <48119764+withchao@users.noreply.github.com> Date: Mon, 24 Jul 2023 18:07:31 +0800 Subject: [PATCH 01/61] fix: StringValue When there are double quotes in the string value, serialization and deserialization fail (#646) Signed-off-by: withchao <993506633@qq.com> --- pkg/proto/wrapperspb/wrapperspb.go | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/pkg/proto/wrapperspb/wrapperspb.go b/pkg/proto/wrapperspb/wrapperspb.go index 7579c64f0..b7d4b0c31 100644 --- a/pkg/proto/wrapperspb/wrapperspb.go +++ b/pkg/proto/wrapperspb/wrapperspb.go @@ -16,6 +16,7 @@ package wrapperspb import ( "encoding/base64" + "encoding/json" "errors" "strconv" ) @@ -211,15 +212,11 @@ func (m *BoolValue) MarshalJSON() ([]byte, error) { } func (m *StringValue) UnmarshalJSON(p []byte) error { - if len(p) < 2 || p[0] != '"' || p[len(p)-1] != '"' { - return errors.New("invalid string value") - } - m.Value = string(p[1 : len(p)-1]) - return nil + return json.Unmarshal(p, &m.Value) } func (m *StringValue) MarshalJSON() ([]byte, error) { - return []byte(`"` + m.Value + `"`), nil + return json.Marshal(m.Value) } func (m *BytesValue) UnmarshalJSON(p []byte) error { From f9406108aa7715d8caecdadf7512d6fdfae29bd4 Mon Sep 17 00:00:00 2001 From: Xinwei Xiong <3293172751@qq.com> Date: Mon, 24 Jul 2023 21:06:16 +0800 Subject: [PATCH 02/61] fix: actions milestones auto (#642) * fix: actions milestones auto Signed-off-by: Xinwei Xiong(cubxxw-openim) <3293172751nss@gmail.com> * feat: add org server secret Signed-off-by: Xinwei Xiong(cubxxw-openim) <3293172751nss@gmail.com> * feat: fix scripts Signed-off-by: Xinwei Xiong(cubxxw-openim) <3293172751nss@gmail.com> * feat: add file: Signed-off-by: Xinwei Xiong(cubxxw-openim) <3293172751nss@gmail.com> * feat: add file: Signed-off-by: Xinwei Xiong(cubxxw-openim) <3293172751nss@gmail.com> * feat: add file: Signed-off-by: Xinwei Xiong(cubxxw-openim) <3293172751nss@gmail.com> --------- Signed-off-by: Xinwei Xiong(cubxxw-openim) <3293172751nss@gmail.com> --- .github/sync.yml | 3 - .github/workflows/auto-gh-pr.yml | 57 ++++++++++++++ .github/workflows/auto-release.yml | 2 +- .github/workflows/check-coverage.yml | 78 +++++++++---------- .github/workflows/cla.yml | 4 +- .github/workflows/e2e-test.yml | 2 +- .github/workflows/openimci.yml | 8 ++ .github/workflows/project-progress.yml | 2 +- .github/workflows/pull-request.yml | 39 ++++++++++ .golangci.yml | 1 + docs/CODEOWNERS | 42 +++++----- internal/api/msg.go | 1 - internal/msggateway/hub_server.go | 1 + .../push/offlinepush/offlinepush_interface.go | 6 +- internal/rpc/msg/send.go | 1 + scripts/build.cmd | 23 +++--- scripts/githooks/commit-msg | 2 +- scripts/githooks/pre-commit | 2 +- scripts/start_all.sh | 2 +- 19 files changed, 190 insertions(+), 86 deletions(-) create mode 100644 .github/workflows/auto-gh-pr.yml create mode 100644 .github/workflows/pull-request.yml diff --git a/.github/sync.yml b/.github/sync.yml index 03454c165..4e9f9d17e 100644 --- a/.github/sync.yml +++ b/.github/sync.yml @@ -94,9 +94,6 @@ group: - source: .github/workflows/cla.yml dest: .github/workflows/cla.yml replace: false - - source: .github/workflows/ - dest: .github/workflows/ - replace: false - source: .github/workflows/auto-assign-issue.yml dest: .github/workflows/auto-assign-issue.yml replace: false diff --git a/.github/workflows/auto-gh-pr.yml b/.github/workflows/auto-gh-pr.yml new file mode 100644 index 000000000..efa77ee29 --- /dev/null +++ b/.github/workflows/auto-gh-pr.yml @@ -0,0 +1,57 @@ +name: Auto PR to release + +on: + pull_request: + # types: + # - closed + +env: + GH_TOKEN: ${{ secrets.REDBOT_GITHUB_TOKEN }} + ISSUE: ${{ github.event.issue.html_url }} + OWNER: ${{ github.repository_owner }} + REPO: ${{ github.event.repository.name }} + +jobs: + create-pr: + runs-on: ubuntu-latest + if: github.event.pull_request.merged == true && github.event.pull_request.base.ref == 'main' + steps: + - name: Check out code + uses: actions/checkout@v3 + with: + fetch-depth: 0 + + - name: Setup GitHub CLI + run: | + sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-key C99B11DEB97541F0 + sudo apt-add-repository https://cli.github.com/packages + sudo apt-get update + sudo apt-get install gh + continue-on-error: true + + - name: Configure GitHub CLI + run: | + git config --global user.email "3293172751ysy@gmail.com" + git config --global user.name "kubbot" + echo "${{ secrets.BOT_GITHUB_TOKEN }}" | gh auth login --with-token + - name: Create PR to release branch + run: | + ISSUEID=$(gh pr view 642 --repo $OWNER/$REPO | grep -oP 'Fixes #\K\d+') + echo "===========> $ISSUEID" + ISSUE=$(gh issue view $ISSUEID --repo $OWNER/$REPO --json labels,assignees,milestone,title) + echo "===========> $ISSUE" + + LABELS=$(echo $ISSUE | jq -r '.labels[] | select(.name) | .name' | jq -R -r -s -c 'split("\n")[:-1] | join(",")') + ASSIGNEES=$(echo $ISSUE | jq -r '.assignees[] | select(.login) | .login' | jq -R -s -c 'split("\n")[:-1] | join(",")') + MILESTONE=$(echo $ISSUE | jq -r '.milestone | select(.title) | .title') + TITLE=$(echo $ISSUE | jq -r '.title') + + echo $ISSUE | jq + + gh pr edit ${{ github.event.pull_request.number }} --repo $OWNER/$REPO --add-label "$LABELS" --add-assignee "$ASSIGNEES" --milestone "$MILESTONE" + + git checkout -b bot/merge-to-release-$ISSUEID + git push origin bot/merge-to-release-$ISSUEID + gh pr create --base release --head bot/merge-to-release-$ISSUEID --title "Merge main to release" --body "" + + # gh pr create --base main --head feat/auto-release-pr-624 --title "The bug is fixed" --body "$x" --repo OpenIMSDK/Open-IM-Server --reviewer "cubxxw" \ No newline at end of file diff --git a/.github/workflows/auto-release.yml b/.github/workflows/auto-release.yml index 385a50c23..12234a1ec 100644 --- a/.github/workflows/auto-release.yml +++ b/.github/workflows/auto-release.yml @@ -14,7 +14,7 @@ jobs: - name: Assign the issue run: | - export LETASE_MILESTONES=$(curl 'https://api.github.com/repos/kubecub/github-label-syncer/milestones' | jq -r 'last(.[]).title') + export LETASE_MILESTONES=$(curl 'https://api.github.com/repos/$OWNER/$PEPO/milestones' | jq -r 'last(.[]).title') gh issue edit ${{ github.event.issue.number }} --add-assignee "${{ github.event.comment.user.login }}" gh issue edit ${{ github.event.issue.number }} --add-label "triage/accepted" gh issue edit ${{ github.event.issue.number }} --milestone "$LETASE_MILESTONES" diff --git a/.github/workflows/check-coverage.yml b/.github/workflows/check-coverage.yml index 21c383076..cc596a0e0 100644 --- a/.github/workflows/check-coverage.yml +++ b/.github/workflows/check-coverage.yml @@ -1,45 +1,45 @@ -# name: Check-Coverage +name: Check-Coverage -# on: -# workflow_dispatch: -# push: -# branches: [ "main" ] -# paths-ignore: -# - "docs/**" -# - "**/*.md" -# - "**/*.yaml" -# - "CONTRIBUTORS" -# - "CHANGELOG/**" -# pull_request: -# branches: [ "*" ] -# paths-ignore: -# - "docs/**" -# - "**/*.md" -# - "**/*.yaml" -# - "CONTRIBUTORS" -# - "CHANGELOG/**" -# env: -# # Common versions -# GO_VERSION: "1.20" +on: + workflow_dispatch: + push: + branches: [ "main" ] + paths-ignore: + - "docs/**" + - "**/*.md" + - "**/*.yaml" + - "CONTRIBUTORS" + - "CHANGELOG/**" + pull_request: + branches: [ "*" ] + paths-ignore: + - "docs/**" + - "**/*.md" + - "**/*.yaml" + - "CONTRIBUTORS" + - "CHANGELOG/**" +env: + # Common versions + GO_VERSION: "1.20" -# jobs: -# coverage: -# runs-on: ubuntu-20.04 -# steps: -# - name: Checkout -# uses: actions/checkout@v3 +jobs: + coverage: + runs-on: ubuntu-20.04 + steps: + - name: Checkout + uses: actions/checkout@v3 -# - name: Setup Golang with cache -# uses: magnetikonline/action-golang-cache@v3 -# with: -# go-version: ${{ env.GO_VERSION }} -# token: ${{ secrets.BOT_GITHUB_TOKEN }} + - name: Setup Golang with cache + uses: magnetikonline/action-golang-cache@v3 + with: + go-version: ${{ env.GO_VERSION }} -# - name: Install Dependencies -# run: sudo apt update && sudo apt install -y libgpgme-dev libbtrfs-dev libdevmapper-dev + - name: Install Dependencies + run: sudo apt update && sudo apt install -y libgpgme-dev libbtrfs-dev libdevmapper-dev -# - name: Run Cover -# run: make cover + - name: Run Cover + run: make cover + continue-on-error: true -# - name: Upload Coverage to Codecov -# uses: codecov/codecov-action@v3 + - name: Upload Coverage to Codecov + uses: codecov/codecov-action@v3 diff --git a/.github/workflows/cla.yml b/.github/workflows/cla.yml index 65497a106..603a49399 100644 --- a/.github/workflows/cla.yml +++ b/.github/workflows/cla.yml @@ -41,8 +41,8 @@ jobs: remote-repository-name: ${{ env.REMOTE_REPOSITORY }} create-file-commit-message: '📚 Docs: Creating file for storing ${{ github.event.repository.name }} CLA Signatures' - custom-notsigned-prcomment: '💕 Thank you for your contribution and please kindly read and sign our [🎯https://github.com/openim-sigs/cla/blob/main/README.md](https://github.com/openim-sigs/cla/blob/main/README.md)
' + custom-notsigned-prcomment: '💕 Thank you for your contribution and please kindly read and sign our [🎯https://github.com/openim-sigs/cla/blob/main/README.md](https://github.com/openim-sigs/cla/blob/main/README.md).
If you wish to sign the CRA, **Please copy and comment on the following sentence:**' custom-pr-sign-comment: 'I have read the CLA Document and I hereby sign the CLA' - custom-allsigned-prcomment: '🤖 All Contributors have signed the [${{ github.event.repository.name }} CLA](https://github.com/openim-sigs/cla/blob/main/README.md).
The signed information is recorded [🤖here](https://github.com/openim-sigs/cla/tree/main/signatures/${{ env.OPEN_IM_SERVER_ALLOWLIST }}/cla.json)' + custom-allsigned-prcomment: '🤖 All Contributors have signed the [${{ github.event.repository.name }} CLA](https://github.com/openim-sigs/cla/blob/main/README.md).
The signed information is recorded [🤖here](https://github.com/openim-sigs/cla/tree/main/signatures/${{ github.event.repository.name }}/cla.json)' # lock-pullrequest-aftermerge: false - if you don't want this bot to automatically lock the pull request after merging (default - true) # use-dco-flag: true - If you are using DCO instead of CLA diff --git a/.github/workflows/e2e-test.yml b/.github/workflows/e2e-test.yml index 6b9f79d51..a3451d6aa 100644 --- a/.github/workflows/e2e-test.yml +++ b/.github/workflows/e2e-test.yml @@ -1,2 +1,2 @@ +# name: OpenIM e2e Test -# name: OpenIM e2e Test \ No newline at end of file diff --git a/.github/workflows/openimci.yml b/.github/workflows/openimci.yml index e0546515e..cd055b5b7 100644 --- a/.github/workflows/openimci.yml +++ b/.github/workflows/openimci.yml @@ -90,11 +90,19 @@ jobs: echo "Run unit test and get test coverage successfully" continue-on-error: true + - name: Initialize CodeQL + uses: github/codeql-action/init@v2 + with: + languages: go + - name: Build source code for host platform run: | sudo make build echo "Build source code for host platform successfully" + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v2 + - name: OpenIM verify copyright run: | sudo make verify-copyright diff --git a/.github/workflows/project-progress.yml b/.github/workflows/project-progress.yml index d0cc10604..247404aa0 100644 --- a/.github/workflows/project-progress.yml +++ b/.github/workflows/project-progress.yml @@ -33,4 +33,4 @@ jobs: with: project: OpenIM-V3.1 column: In Progress - repo-token: ${{ secrets.BOT_GITHUB_TOKEN }} \ No newline at end of file + repo-token: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml new file mode 100644 index 000000000..726d57e14 --- /dev/null +++ b/.github/workflows/pull-request.yml @@ -0,0 +1,39 @@ +name: Github Pull Request +on: + push: + branches: [main] + paths-ignore: + - 'README.md' + - 'CONTRIBUTING.md' + + - 'docs/**' + pull_request: + branches: [main] + paths-ignore: + - 'README.md' + - 'CONTRIBUTING.md' + - 'docs/**' + +permissions: + pull-requests: write + contents: write + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + - name: Create Pull Request + uses: peter-evans/create-pull-request@v5 + with: + token: ${{ secrets.BOT_GITHUB_TOKEN }} + commit-message: 'build: update distribution' + title: 'build: update distribution' + body: | + - Updates the distribution for changes on `main` + + Auto-generated by [create-pull-request][1] + + [1]: https://github.com/OpenIMSDK/Open-IM-Sever + branch: 'bot/update-distribution' \ No newline at end of file diff --git a/.golangci.yml b/.golangci.yml index ef7c1f811..296bd0dc0 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -58,6 +58,7 @@ run: skip-files: - ".*\\.my\\.go$" - _test.go + - ".*\\.pb\\.go" # by default isn't set. If set we pass it to "go list -mod={option}". From "go help modules": # If invoked with -mod=readonly, the go command is disallowed from the implicit diff --git a/docs/CODEOWNERS b/docs/CODEOWNERS index 3cfc940e3..a05a1866b 100644 --- a/docs/CODEOWNERS +++ b/docs/CODEOWNERS @@ -2,28 +2,28 @@ # Each line is a file pattern followed by one or more owners. # README files -README.md @cubxxw @kubbot @Bloomingg @FGadvancer @hrxiang @Oliver-WJ @skiffer-git @std-s @wangchuxiao-dev @withchao +README.md @openimsdk/openim @cubxxw @openimsdk/bot @Bloomingg @FGadvancer @skiffer-git @wangchuxiao-dev @withchao # Contributing guidelines -CONTRIBUTING.md @cubxxw @kubbot @Bloomingg @FGadvancer @hrxiang @Oliver-WJ @skiffer-git @std-s @wangchuxiao-dev @withchao +CONTRIBUTING.md @cubxxw @openimsdk/bot @Bloomingg @FGadvancer @skiffer-git @wangchuxiao-dev @withchao # License files -LICENSE @cubxxw @kubbot @Bloomingg @FGadvancer @hrxiang @Oliver-WJ @skiffer-git @std-s @wangchuxiao-dev @withchao +LICENSE @cubxxw @openimsdk/bot @Bloomingg @FGadvancer @skiffer-git @wangchuxiao-dev @withchao # Makefile -Makefile @cubxxw @kubbot @Bloomingg @FGadvancer @hrxiang @Oliver-WJ @skiffer-git @std-s @wangchuxiao-dev @withchao +Makefile @cubxxw @openimsdk/bot @Bloomingg @FGadvancer @skiffer-git @wangchuxiao-dev @withchao # These owners will be the default owners for everything in # the repo. Unless a later match takes precedence, -# @cubxxw and @kubbot will be requested for +# @cubxxw and @openimsdk/bot will be requested for # review when someone opens a pull request. -* @cubxxw @kubbot @Bloomingg @FGadvancer @hrxiang @Oliver-WJ @skiffer-git @std-s @wangchuxiao-dev @withchao +* @openimsdk/openim @cubxxw @openimsdk/bot @Bloomingg @FGadvancer @skiffer-git @wangchuxiao-dev @withchao # Order is important; the last matching pattern takes the most # precedence. When someone opens a pull request that only # modifies JS files, only @js-owner and not the global # owner(s) will be requested for a review. -*.js @cubxxw @kubbot @Bloomingg @FGadvancer @hrxiang @Oliver-WJ @skiffer-git @std-s @wangchuxiao-dev @withchao +*.js @cubxxw @openimsdk/bot @Bloomingg @FGadvancer @skiffer-git @wangchuxiao-dev @withchao # You can also use email addresses if you prefer. They'll be # used to look up users just like we do for commit author @@ -35,16 +35,16 @@ Makefile @cubxxw @kubbot @Bloomingg @FGadvancer @hrxiang @Oliver-WJ @skiffer- # be identified in the format @org/team-name. Teams must have # explicit write access to the repository. In this example, # the OpenIMSDK team in the github organization owns all .txt files. -*.txt @cubxxw @kubbot @Bloomingg @FGadvancer @hrxiang @Oliver-WJ @skiffer-git @std-s @wangchuxiao-dev @withchao +*.txt @cubxxw @openimsdk/bot @Bloomingg @FGadvancer @skiffer-git @wangchuxiao-dev @withchao # The `docs/*` pattern will match files like # `docs/getting-started.md` but not further nested files like # `docs/build-app/troubleshooting.md`. -docs/* 3293172751nss@gmail.com @kubbot @skiffer-git +docs/* 3293172751nss@gmail.com @openimsdk/bot @skiffer-git # In this example, @octocat owns any file in an apps directory # anywhere in your repository. -api/ @cubxxw @IRONICBo @skiffer-git +api/ @openimsdk/openim @cubxxw @skiffer-git # This is a comment. # Each line is a file pattern followed by one or more owners. @@ -65,24 +65,24 @@ cmd/* config/* @skiffer-git # db directory -db/sdk @77caleb @BanTanger @cubxxw @Gordon +db/sdk @BanTanger @cubxxw @Gordon # internal directory -internal/ @skiffer-git @FGadvancer +internal/ @openimsdk/openim @skiffer-git @FGadvancer # logs directory -logs/* @skiffer-git @FGadvancer +logs/* @skiffer-git @FGadvancer # pkg directory -pkg/a2r @skiffer-git +pkg/a2r @openimsdk/openim @skiffer-git @cubxxw @openimsdk/bot # scripts directory -scripts/LICENSE/* @cubxxw @skiffer-git @FGadvancer -scripts/enterprise/* @FGadvancer @cubxxw @skiffer-git @kubbot -scripts/githooks/* @cubxxw @skiffer-git @FGadvancer -scripts/lib/* @FGadvancer @cubxxw @skiffer-git @kubbot -scripts/make-rules/* @FGadvancer @cubxxw @skiffer-git @kubbot +scripts/LICENSE/* @openimsdk/openim @cubxxw @skiffer-git @FGadvancer +scripts/enterprise/* @openimsdk/openim @FGadvancer @cubxxw @skiffer-git @openimsdk/bot +scripts/githooks/* @openimsdk/openim @cubxxw @skiffer-git @FGadvancer +scripts/lib/* @openimsdk/openim @FGadvancer @cubxxw @skiffer-git @openimsdk/bot +scripts/make-rules/* @openimsdk/openim @FGadvancer @cubxxw @skiffer-git @openimsdk/bot # test directory -test/mongo @FGadvancer @cubxxw @skiffer-git @kubbot -test/mysql @FGadvancer @cubxxw @skiffer-git @kubbot +test/mongo @FGadvancer @cubxxw @skiffer-git @openimsdk/bot +test/mysql @FGadvancer @cubxxw @skiffer-git @openimsdk/bot diff --git a/internal/api/msg.go b/internal/api/msg.go index 8ad7943e9..41ab4dc48 100644 --- a/internal/api/msg.go +++ b/internal/api/msg.go @@ -250,7 +250,6 @@ func (m *MessageApi) BatchSendMsg(c *gin.Context) { return } - var recvIDs []string var err error if req.IsSendAll { diff --git a/internal/msggateway/hub_server.go b/internal/msggateway/hub_server.go index deb8c3d77..4e1586969 100644 --- a/internal/msggateway/hub_server.go +++ b/internal/msggateway/hub_server.go @@ -16,6 +16,7 @@ package msggateway import ( "context" + "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/cache" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/tokenverify" "github.com/OpenIMSDK/Open-IM-Server/pkg/errs" diff --git a/internal/push/offlinepush/offlinepush_interface.go b/internal/push/offlinepush/offlinepush_interface.go index 5aa7e089f..a5d4051f9 100644 --- a/internal/push/offlinepush/offlinepush_interface.go +++ b/internal/push/offlinepush/offlinepush_interface.go @@ -18,12 +18,12 @@ import ( "context" ) -// OfflinePusher Offline Pusher +// OfflinePusher Offline Pusher. type OfflinePusher interface { Push(ctx context.Context, userIDs []string, title, content string, opts *Opts) error } -// Opts opts +// Opts opts. type Opts struct { Signal *Signal IOSPushSound string @@ -31,7 +31,7 @@ type Opts struct { Ex string } -// Signal message id +// Signal message id. type Signal struct { ClientMsgID string } diff --git a/internal/rpc/msg/send.go b/internal/rpc/msg/send.go index dd02083fa..a568154c7 100644 --- a/internal/rpc/msg/send.go +++ b/internal/rpc/msg/send.go @@ -16,6 +16,7 @@ package msg import ( "context" + "github.com/OpenIMSDK/Open-IM-Server/pkg/common/constant" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/log" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/mcontext" diff --git a/scripts/build.cmd b/scripts/build.cmd index f0d5475b4..f3c086a32 100644 --- a/scripts/build.cmd +++ b/scripts/build.cmd @@ -1,11 +1,12 @@ -go build -o api.exe ../cmd/openim-api/main.go -go build -o auth.exe ../cmd/openim-rpc/openim-rpc-auth/main.go -go build -o conversation.exe ../cmd/openim-rpc/openim-rpc-conversation/main.go -go build -o friend.exe ../cmd/openim-rpc/openim-rpc-friend/main.go -go build -o group.exe ../cmd/openim-rpc/openim-rpc-group/main.go -go build -o msg.exe ../cmd/openim-rpc/openim-rpc-msg/main.go -go build -o third.exe ../cmd/openim-rpc/openim-rpc-third/main.go -go build -o user.exe ../cmd/openim-rpc/openim-rpc-user/main.go -go build -o push.exe ../cmd/openim-push/main.go -go build -o msgtransfer.exe ../cmd/openim-msgtransfer/main.go -go build -o msggateway.exe ../cmd/openim-msggateway/main.go +set output_dir=%~dp0..\_output\bin\platforms\windows +go build -o %output_dir%\api.exe ../cmd/openim-api/main.go +go build -o %output_dir%\auth.exe ../cmd/openim-rpc/openim-rpc-auth/main.go +go build -o %output_dir%\conversation.exe ../cmd/openim-rpc/openim-rpc-conversation/main.go +go build -o %output_dir%\friend.exe ../cmd/openim-rpc/openim-rpc-friend/main.go +go build -o %output_dir%\group.exe ../cmd/openim-rpc/openim-rpc-group/main.go +go build -o %output_dir%\msg.exe ../cmd/openim-rpc/openim-rpc-msg/main.go +go build -o %output_dir%\third.exe ../cmd/openim-rpc/openim-rpc-third/main.go +go build -o %output_dir%\user.exe ../cmd/openim-rpc/openim-rpc-user/main.go +go build -o %output_dir%\push.exe ../cmd/openim-push/main.go +go build -o %output_dir%\msgtransfer.exe ../cmd/openim-msgtransfer/main.go +go build -o %output_dir%\msggateway.exe ../cmd/openim-msggateway/main.go \ No newline at end of file diff --git a/scripts/githooks/commit-msg b/scripts/githooks/commit-msg index 99f4067b9..efff13fd0 100644 --- a/scripts/githooks/commit-msg +++ b/scripts/githooks/commit-msg @@ -61,7 +61,7 @@ GITLINT_DIR="$OPENIM_ROOT/_output/tools/go-gitlint" $GITLINT_DIR \ --msg-file=$1 \ - --subject-regex="^(build|chore|ci|docs|feat|feature|fix|perf|refactor|revert|style|test)(.*)?:\s?.*" \ + --subject-regex="^(build|chore|ci|docs|feat|feature|fix|perf|refactor|revert|style|bot|test)(.*)?:\s?.*" \ --subject-maxlen=150 \ --subject-minlen=10 \ --body-regex=".*" \ diff --git a/scripts/githooks/pre-commit b/scripts/githooks/pre-commit index cad60e163..91f5ad531 100644 --- a/scripts/githooks/pre-commit +++ b/scripts/githooks/pre-commit @@ -26,7 +26,7 @@ LC_ALL=C local_branch="$(git rev-parse --abbrev-ref HEAD)" -valid_branch_regex="^(main|master|develop|release(-[a-zA-Z0-9._-]+)?)$|(feature|feat|openim|hotfix|test|bug|ci|cicd|style|)\/[a-z0-9._-]+$|^HEAD$" +valid_branch_regex="^(main|master|develop|release(-[a-zA-Z0-9._-]+)?)$|(feature|feat|openim|hotfix|test|bug|bot|ci|cicd|style|)\/[a-z0-9._-]+$|^HEAD$" YELLOW="\e[93m" GREEN="\e[32m" diff --git a/scripts/start_all.sh b/scripts/start_all.sh index b49997aa2..6470ae910 100755 --- a/scripts/start_all.sh +++ b/scripts/start_all.sh @@ -36,7 +36,7 @@ echo -e "${YELLOW_PREFIX}=======>SCRIPTS_ROOT=$SCRIPTS_ROOT${COLOR_SUFFIX}" echo -e "${YELLOW_PREFIX}=======>OPENIM_ROOT=$OPENIM_ROOT${COLOR_SUFFIX}" echo -e "${YELLOW_PREFIX}=======>pwd=$PWD${COLOR_SUFFIX}" -bin_dir="$BIN_DIR" +bin_dir="$OPENIM_ROOT/_output/bin" logs_dir="$OPENIM_ROOT/logs" sdk_db_dir="$OPENIM_ROOT/sdk/db/" From 3cae4e6890fc5ee3bd8c05096d88b910bbd58ec5 Mon Sep 17 00:00:00 2001 From: Xinwei Xiong <3293172751@qq.com> Date: Mon, 24 Jul 2023 21:25:23 +0800 Subject: [PATCH 03/61] feat: add file: (#648) Signed-off-by: Xinwei Xiong(cubxxw-openim) <3293172751nss@gmail.com> --- .github/workflows/auto-release.yml | 7 +++++-- .github/workflows/link-pr.yml | 3 +++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/auto-release.yml b/.github/workflows/auto-release.yml index 12234a1ec..06fee28a1 100644 --- a/.github/workflows/auto-release.yml +++ b/.github/workflows/auto-release.yml @@ -4,7 +4,10 @@ on: types: [created] jobs: assign-issue: - if: contains(github.event.comment.body, '/assign') || contains(github.event.comment.body, '/accept') + if: | + contains(github.event.comment.body, '/assign') || contains(github.event.comment.body, '/accept') && + !contains(github.event.comment.user.login, 'openimbot') && + !contains(github.event.comment.user.login, 'kubbot') runs-on: ubuntu-latest permissions: issues: write @@ -18,7 +21,7 @@ jobs: gh issue edit ${{ github.event.issue.number }} --add-assignee "${{ github.event.comment.user.login }}" gh issue edit ${{ github.event.issue.number }} --add-label "triage/accepted" gh issue edit ${{ github.event.issue.number }} --milestone "$LETASE_MILESTONES" - gh issue comment $ISSUE --body "@${{ github.event.comment.user.login }} Glad to see you accepted this issue🤲, this issue has been assigned to you. I set the milestones for this issue to $LETASE_MILESTONES, We are looking forward to your PR!" + gh issue comment $ISSUE --body "@${{ github.event.comment.user.login }} Glad to see you accepted this issue🤲, this issue has been assigned to you. I set the milestones for this issue to [$LETASE_MILESTONES](https://github.com/$OWNER/$PEPO/milestones), We are looking forward to your PR!" env: GH_TOKEN: ${{ secrets.REDBOT_GITHUB_TOKEN }} ISSUE: ${{ github.event.issue.html_url }} diff --git a/.github/workflows/link-pr.yml b/.github/workflows/link-pr.yml index a3e0ee2de..c6da4cb5f 100644 --- a/.github/workflows/link-pr.yml +++ b/.github/workflows/link-pr.yml @@ -4,6 +4,9 @@ name: Github Rebot for Link check error on: schedule: - cron: '30 12 * * 1' + push: + branches: + - main jobs: linkChecker: From 643e081bb9525d478e6c3adb51dc52e2bd3286e9 Mon Sep 17 00:00:00 2001 From: Xinwei Xiong <3293172751@qq.com> Date: Tue, 25 Jul 2023 09:25:51 +0800 Subject: [PATCH 04/61] feat: add file: (#650) Signed-off-by: Xinwei Xiong(cubxxw-openim) <3293172751nss@gmail.com> --- .github/workflows/auto-assign-issue.yml | 9 +++++--- .github/workflows/auto-release.yml | 29 ------------------------- 2 files changed, 6 insertions(+), 32 deletions(-) delete mode 100644 .github/workflows/auto-release.yml diff --git a/.github/workflows/auto-assign-issue.yml b/.github/workflows/auto-assign-issue.yml index 7afebe028..06fee28a1 100644 --- a/.github/workflows/auto-assign-issue.yml +++ b/.github/workflows/auto-assign-issue.yml @@ -4,7 +4,10 @@ on: types: [created] jobs: assign-issue: - if: contains(github.event.comment.body, '/assign') || contains(github.event.comment.body, '/accept') + if: | + contains(github.event.comment.body, '/assign') || contains(github.event.comment.body, '/accept') && + !contains(github.event.comment.user.login, 'openimbot') && + !contains(github.event.comment.user.login, 'kubbot') runs-on: ubuntu-latest permissions: issues: write @@ -14,11 +17,11 @@ jobs: - name: Assign the issue run: | - export LETASE_MILESTONES=$(curl "https://api.github.com/repos/$OWNER/$REPO/milestones" | jq -r 'last(.[]).title') + export LETASE_MILESTONES=$(curl 'https://api.github.com/repos/$OWNER/$PEPO/milestones' | jq -r 'last(.[]).title') gh issue edit ${{ github.event.issue.number }} --add-assignee "${{ github.event.comment.user.login }}" gh issue edit ${{ github.event.issue.number }} --add-label "triage/accepted" gh issue edit ${{ github.event.issue.number }} --milestone "$LETASE_MILESTONES" - gh issue comment $ISSUE --body "@${{ github.event.comment.user.login }} Glad to see you accepted this issue🤲, this issue has been assigned to you.
I set the milestones for this issue to $LETASE_MILESTONES, we are looking forward to your PR!" + gh issue comment $ISSUE --body "@${{ github.event.comment.user.login }} Glad to see you accepted this issue🤲, this issue has been assigned to you. I set the milestones for this issue to [$LETASE_MILESTONES](https://github.com/$OWNER/$PEPO/milestones), We are looking forward to your PR!" env: GH_TOKEN: ${{ secrets.REDBOT_GITHUB_TOKEN }} ISSUE: ${{ github.event.issue.html_url }} diff --git a/.github/workflows/auto-release.yml b/.github/workflows/auto-release.yml deleted file mode 100644 index 06fee28a1..000000000 --- a/.github/workflows/auto-release.yml +++ /dev/null @@ -1,29 +0,0 @@ -name: Assign issue to comment author -on: - issue_comment: - types: [created] -jobs: - assign-issue: - if: | - contains(github.event.comment.body, '/assign') || contains(github.event.comment.body, '/accept') && - !contains(github.event.comment.user.login, 'openimbot') && - !contains(github.event.comment.user.login, 'kubbot') - runs-on: ubuntu-latest - permissions: - issues: write - steps: - - name: Checkout code - uses: actions/checkout@v3 - - - name: Assign the issue - run: | - export LETASE_MILESTONES=$(curl 'https://api.github.com/repos/$OWNER/$PEPO/milestones' | jq -r 'last(.[]).title') - gh issue edit ${{ github.event.issue.number }} --add-assignee "${{ github.event.comment.user.login }}" - gh issue edit ${{ github.event.issue.number }} --add-label "triage/accepted" - gh issue edit ${{ github.event.issue.number }} --milestone "$LETASE_MILESTONES" - gh issue comment $ISSUE --body "@${{ github.event.comment.user.login }} Glad to see you accepted this issue🤲, this issue has been assigned to you. I set the milestones for this issue to [$LETASE_MILESTONES](https://github.com/$OWNER/$PEPO/milestones), We are looking forward to your PR!" - env: - GH_TOKEN: ${{ secrets.REDBOT_GITHUB_TOKEN }} - ISSUE: ${{ github.event.issue.html_url }} - OWNER: ${{ github.repository_owner }} - REPO: ${{ github.event.repository.name }} \ No newline at end of file From 166fb3ca625a15a1083cfff9f645d94f25351af9 Mon Sep 17 00:00:00 2001 From: withchao <48119764+withchao@users.noreply.github.com> Date: Tue, 25 Jul 2023 15:24:15 +0800 Subject: [PATCH 06/61] fix: http redirect compatibility (#659) * fix: StringValue When there are double quotes in the string value, serialization and deserialization fail Signed-off-by: withchao <993506633@qq.com> * test: StatusTemporaryRedirect -> StatusFound Signed-off-by: withchao <993506633@qq.com> --------- Signed-off-by: withchao <993506633@qq.com> --- internal/api/third.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/api/third.go b/internal/api/third.go index 7de0493e0..5bd38a5e8 100644 --- a/internal/api/third.go +++ b/internal/api/third.go @@ -95,5 +95,5 @@ func (o *ThirdApi) ObjectRedirect(c *gin.Context) { c.String(http.StatusInternalServerError, err.Error()) return } - c.Redirect(http.StatusTemporaryRedirect, resp.Url) + c.Redirect(http.StatusFound, resp.Url) } From 5f6b2b7f9d11ffba5d88c87d257a7bc362a98478 Mon Sep 17 00:00:00 2001 From: withchao <48119764+withchao@users.noreply.github.com> Date: Tue, 25 Jul 2023 20:13:32 +0800 Subject: [PATCH 07/61] chore: tools, pb replaced by public warehouse (#662) * fix: StringValue When there are double quotes in the string value, serialization and deserialization fail Signed-off-by: withchao <993506633@qq.com> * test: StatusTemporaryRedirect -> StatusFound Signed-off-by: withchao <993506633@qq.com> * chore: pb a2r Signed-off-by: withchao <993506633@qq.com> * chore: replacement package Signed-off-by: withchao <993506633@qq.com> * chore: replacement package Signed-off-by: withchao <993506633@qq.com> * chore: replacement package Signed-off-by: withchao <993506633@qq.com> * fix: remove go mod replace Signed-off-by: withchao <993506633@qq.com> * fix: tools version Signed-off-by: withchao <993506633@qq.com> * fix: config.yaml Signed-off-by: withchao <993506633@qq.com> --------- Signed-off-by: withchao <993506633@qq.com> --- cmd/openim-api/main.go | 14 +- cmd/openim-push/main.go | 2 +- cmd/openim-rpc/openim-rpc-auth/main.go | 2 +- .../openim-rpc-conversation/main.go | 2 +- cmd/openim-rpc/openim-rpc-friend/main.go | 2 +- cmd/openim-rpc/openim-rpc-group/main.go | 2 +- cmd/openim-rpc/openim-rpc-msg/main.go | 2 +- cmd/openim-rpc/openim-rpc-third/main.go | 2 +- cmd/openim-rpc/openim-rpc-user/main.go | 2 +- config/config.yaml | 4 +- go.mod | 49 +- go.sum | 415 +- internal/api/auth.go | 4 +- internal/api/conversation.go | 4 +- internal/api/custom_validator.go | 2 +- internal/api/friend.go | 4 +- internal/api/group.go | 4 +- internal/api/msg.go | 18 +- internal/api/route.go | 79 +- internal/api/statistics.go | 4 +- internal/api/third.go | 11 +- internal/api/user.go | 16 +- internal/msggateway/callback.go | 6 +- internal/msggateway/client.go | 12 +- internal/msggateway/compressor.go | 2 +- internal/msggateway/context.go | 4 +- internal/msggateway/encoder.go | 2 +- internal/msggateway/http_error.go | 2 +- internal/msggateway/hub_server.go | 18 +- internal/msggateway/init.go | 2 +- internal/msggateway/message_handler.go | 10 +- internal/msggateway/n_ws_server.go | 14 +- internal/msggateway/user_map.go | 4 +- internal/msgtransfer/init.go | 10 +- .../msgtransfer/online_history_msg_handler.go | 14 +- .../online_msg_to_mongo_handler.go | 6 +- .../msgtransfer/persistent_msg_handler.go | 10 +- internal/push/callback.go | 18 +- internal/push/offlinepush/fcm/push.go | 7 +- internal/push/offlinepush/getui/body.go | 2 +- internal/push/offlinepush/getui/push.go | 12 +- .../offlinepush/jpush/body/notification.go | 2 +- .../push/offlinepush/jpush/body/platform.go | 2 +- internal/push/offlinepush/jpush/push.go | 2 +- internal/push/push_handler.go | 12 +- internal/push/push_rpc_server.go | 8 +- internal/push/push_to_client.go | 16 +- internal/push/tools.go | 18 + internal/rpc/auth/auth.go | 20 +- internal/rpc/conversation/conversaion.go | 14 +- internal/rpc/friend/black.go | 6 +- internal/rpc/friend/callback.go | 10 +- internal/rpc/friend/friend.go | 30 +- internal/rpc/group/cache.go | 2 +- internal/rpc/group/callback.go | 14 +- internal/rpc/group/convert.go | 2 +- internal/rpc/group/db_map.go | 6 +- internal/rpc/group/fill.go | 2 +- internal/rpc/group/group.go | 33 +- internal/rpc/group/statistics.go | 4 +- internal/rpc/group/super_group.go | 10 +- internal/rpc/msg/as_read.go | 10 +- internal/rpc/msg/callback.go | 29 +- internal/rpc/msg/delete.go | 14 +- internal/rpc/msg/message_interceptor.go | 10 +- internal/rpc/msg/msg_status.go | 6 +- internal/rpc/msg/revoke.go | 14 +- internal/rpc/msg/send.go | 18 +- internal/rpc/msg/seq.go | 2 +- internal/rpc/msg/server.go | 8 +- internal/rpc/msg/statistics.go | 6 +- internal/rpc/msg/sync_msg.go | 12 +- internal/rpc/msg/utils.go | 8 +- internal/rpc/msg/verify.go | 12 +- internal/rpc/third/s3.go | 10 +- internal/rpc/third/third.go | 6 +- internal/rpc/third/tool.go | 8 +- internal/rpc/user/statistics.go | 4 +- internal/rpc/user/user.go | 20 +- internal/tools/conversation.go | 6 +- internal/tools/cron_task.go | 4 +- internal/tools/msg.go | 16 +- internal/tools/msg_test.go | 6 +- pkg/a2r/api2rpc.go | 51 - pkg/apiresp/format.go | 19 - pkg/apiresp/gin.go | 29 - pkg/apiresp/http.go | 39 - pkg/apiresp/resp.go | 76 - pkg/apistruct/manage.go | 2 +- pkg/callbackstruct/common.go | 2 +- pkg/callbackstruct/group.go | 2 +- pkg/callbackstruct/message.go | 2 +- pkg/callbackstruct/push.go | 2 +- pkg/checker/check.go | 28 - pkg/common/cmd/msg_gateway.go | 2 +- pkg/common/cmd/root.go | 9 +- pkg/common/cmd/rpc.go | 4 +- pkg/common/config/config.go | 312 - pkg/common/config/parse.go | 59 +- pkg/common/constant/constant.go | 363 - pkg/common/constant/limit.go | 21 - pkg/common/constant/platform_id_to_name.go | 109 - pkg/common/convert/black.go | 4 +- pkg/common/convert/conversation.go | 4 +- pkg/common/convert/friend.go | 4 +- pkg/common/convert/group.go | 4 +- pkg/common/convert/msg.go | 2 +- pkg/common/convert/user.go | 2 +- pkg/common/db/cache/conversation.go | 2 +- pkg/common/db/cache/friend.go | 2 +- pkg/common/db/cache/group.go | 2 +- pkg/common/db/cache/init_redis.go | 6 +- pkg/common/db/cache/init_redis_test.go | 37 - pkg/common/db/cache/meta_cache.go | 6 +- pkg/common/db/cache/msg.go | 12 +- pkg/common/db/controller/auth.go | 6 +- pkg/common/db/controller/black.go | 4 +- pkg/common/db/controller/chatlog.go | 2 +- pkg/common/db/controller/conversation.go | 8 +- pkg/common/db/controller/friend.go | 10 +- pkg/common/db/controller/group.go | 6 +- pkg/common/db/controller/msg.go | 12 +- pkg/common/db/controller/msg_test.go | 4 +- pkg/common/db/controller/user.go | 6 +- pkg/common/db/localcache/conversation.go | 2 +- pkg/common/db/localcache/group.go | 4 +- pkg/common/db/ormutil/utils.go | 73 - pkg/common/db/relation/black_model.go | 4 +- pkg/common/db/relation/chat_log_model.go | 8 +- pkg/common/db/relation/conversation_model.go | 4 +- pkg/common/db/relation/friend_model.go | 2 +- .../db/relation/friend_request_model.go | 2 +- pkg/common/db/relation/group_member_model.go | 6 +- pkg/common/db/relation/group_model.go | 8 +- pkg/common/db/relation/group_request_model.go | 4 +- pkg/common/db/relation/mysql_init.go | 8 +- pkg/common/db/relation/object_model.go | 2 +- pkg/common/db/relation/user_model.go | 4 +- pkg/common/db/s3/cont/controller.go | 4 +- pkg/common/db/s3/cos/cos.go | 2 +- pkg/common/db/s3/minio/minio.go | 2 +- pkg/common/db/s3/oss/oss.go | 2 +- pkg/common/db/table/relation/chatlog.go | 2 +- pkg/common/db/table/relation/utils.go | 2 +- pkg/common/db/table/unrelation/msg.go | 4 +- pkg/common/db/tx/gorm.go | 33 - pkg/common/db/tx/mongo.go | 47 - pkg/common/db/tx/tx.go | 25 - pkg/common/db/unrelation/mongo.go | 18 +- pkg/common/db/unrelation/msg.go | 10 +- pkg/common/db/unrelation/super_group.go | 2 +- pkg/common/http/http_client.go | 8 +- pkg/common/kafka/consumer.go | 2 +- pkg/common/kafka/consumer_group.go | 2 +- pkg/common/kafka/producer.go | 10 +- pkg/common/log/color.go | 64 - pkg/common/log/logger.go | 27 - pkg/common/log/sql_logger.go | 89 - pkg/common/log/zap.go | 302 - pkg/common/log/zk_logger.go | 30 - pkg/common/mcontext/ctx.go | 154 - pkg/common/mw/gin.go | 142 - pkg/common/mw/intercept_chain.go | 41 - pkg/common/mw/rpc_client_interceptor.go | 114 - pkg/common/mw/rpc_server_interceptor.go | 181 - pkg/common/mw/specialerror/error.go | 47 - pkg/common/network/ip.go | 41 - pkg/common/prome/prometheus.go | 2 +- pkg/common/tokenverify/jwt_token.go | 122 - pkg/common/tokenverify/jwt_token_test.go | 39 - pkg/discoveryregistry/discovery_register.go | 39 - pkg/discoveryregistry/zookeeper/conf.go | 41 - pkg/discoveryregistry/zookeeper/discover.go | 136 - pkg/discoveryregistry/zookeeper/register.go | 76 - pkg/discoveryregistry/zookeeper/resolver.go | 93 - pkg/discoveryregistry/zookeeper/zk.go | 226 - pkg/errs/code.go | 92 - pkg/errs/coderr.go | 124 - pkg/errs/predefine.go | 64 - pkg/errs/relation.go | 56 - pkg/proto/auth/auth.go | 47 - pkg/proto/auth/auth.pb.go | 707 -- pkg/proto/auth/auth.proto | 55 - pkg/proto/conversation/conversation.go | 162 - pkg/proto/conversation/conversation.pb.go | 2744 ------- pkg/proto/conversation/conversation.proto | 172 - pkg/proto/errinfo/errinfo.pb.go | 197 - pkg/proto/errinfo/errinfo.proto | 27 - pkg/proto/friend/friend.go | 176 - pkg/proto/friend/friend.pb.go | 2952 -------- pkg/proto/friend/friend.proto | 187 - pkg/proto/gen.cmd | 13 - pkg/proto/gen.sh | 27 - pkg/proto/group/group.go | 352 - pkg/proto/group/group.pb.go | 6376 ---------------- pkg/proto/group/group.proto | 417 -- pkg/proto/msg/msg.go | 217 - pkg/proto/msg/msg.pb.go | 4807 ------------- pkg/proto/msg/msg.proto | 319 - pkg/proto/msggateway/msggateway.go | 73 - pkg/proto/msggateway/msggateway.pb.go | 1724 ----- pkg/proto/msggateway/msggateway.proto | 122 - pkg/proto/push/push.go | 40 - pkg/proto/push/push.pb.go | 489 -- pkg/proto/push/push.proto | 40 - pkg/proto/sdkws/sdkws.go | 46 - pkg/proto/sdkws/sdkws.pb.go | 6399 ----------------- pkg/proto/sdkws/sdkws.proto | 517 -- pkg/proto/statistics/statistics.pb.go | 80 - pkg/proto/statistics/statistics.proto | 18 - pkg/proto/third/third.go | 75 - pkg/proto/third/third.pb.go | 2057 ------ pkg/proto/third/third.proto | 144 - pkg/proto/user/user.go | 161 - pkg/proto/user/user.pb.go | 2763 ------- pkg/proto/user/user.proto | 182 - pkg/proto/wrapperspb/wrapperspb.go | 299 - pkg/proto/wrapperspb/wrapperspb.pb.go | 694 -- pkg/proto/wrapperspb/wrapperspb.proto | 91 - pkg/rpcclient/auth.go | 6 +- pkg/rpcclient/conversation.go | 8 +- pkg/rpcclient/friend.go | 8 +- pkg/rpcclient/group.go | 14 +- pkg/rpcclient/msg.go | 14 +- pkg/rpcclient/notification/conevrsation.go | 4 +- pkg/rpcclient/notification/friend.go | 8 +- pkg/rpcclient/notification/group.go | 14 +- pkg/rpcclient/notification/msg.go | 4 +- pkg/rpcclient/push.go | 6 +- pkg/rpcclient/third.go | 6 +- pkg/rpcclient/user.go | 14 +- pkg/startrpc/start.go | 112 - pkg/statistics/statistics.go | 2 +- pkg/utils/base64.go | 26 - pkg/utils/callback.go | 33 - pkg/utils/encryption.go | 78 - pkg/utils/file.go | 98 - pkg/utils/get_server_ip.go | 39 - pkg/utils/id.go | 42 - pkg/utils/id_test.go | 29 - pkg/utils/image.go | 69 - pkg/utils/image_test.go | 41 - pkg/utils/map.go | 147 - pkg/utils/md5_test.go | 29 - pkg/utils/options.go | 181 - pkg/utils/page.go | 24 - pkg/utils/platform_number_id_to_name_test.go | 61 - pkg/utils/retry/retry.go | 198 - pkg/utils/retry/stratey.go | 70 - pkg/utils/splitter/tools.go | 42 - pkg/utils/strings.go | 141 - pkg/utils/time_format.go | 97 - pkg/utils/utils.go | 393 - pkg/utils/utils_v2.go | 557 -- pkg/utils/utils_v2_test.go | 98 - 255 files changed, 717 insertions(+), 43129 deletions(-) create mode 100644 internal/push/tools.go delete mode 100644 pkg/a2r/api2rpc.go delete mode 100644 pkg/apiresp/format.go delete mode 100644 pkg/apiresp/gin.go delete mode 100644 pkg/apiresp/http.go delete mode 100644 pkg/apiresp/resp.go delete mode 100644 pkg/checker/check.go delete mode 100644 pkg/common/config/config.go delete mode 100644 pkg/common/constant/constant.go delete mode 100644 pkg/common/constant/limit.go delete mode 100644 pkg/common/constant/platform_id_to_name.go delete mode 100644 pkg/common/db/cache/init_redis_test.go delete mode 100644 pkg/common/db/ormutil/utils.go delete mode 100644 pkg/common/db/tx/gorm.go delete mode 100644 pkg/common/db/tx/mongo.go delete mode 100644 pkg/common/db/tx/tx.go delete mode 100644 pkg/common/log/color.go delete mode 100644 pkg/common/log/logger.go delete mode 100644 pkg/common/log/sql_logger.go delete mode 100644 pkg/common/log/zap.go delete mode 100644 pkg/common/log/zk_logger.go delete mode 100644 pkg/common/mcontext/ctx.go delete mode 100644 pkg/common/mw/gin.go delete mode 100644 pkg/common/mw/intercept_chain.go delete mode 100644 pkg/common/mw/rpc_client_interceptor.go delete mode 100644 pkg/common/mw/rpc_server_interceptor.go delete mode 100644 pkg/common/mw/specialerror/error.go delete mode 100644 pkg/common/network/ip.go delete mode 100644 pkg/common/tokenverify/jwt_token.go delete mode 100644 pkg/common/tokenverify/jwt_token_test.go delete mode 100644 pkg/discoveryregistry/discovery_register.go delete mode 100644 pkg/discoveryregistry/zookeeper/conf.go delete mode 100644 pkg/discoveryregistry/zookeeper/discover.go delete mode 100644 pkg/discoveryregistry/zookeeper/register.go delete mode 100644 pkg/discoveryregistry/zookeeper/resolver.go delete mode 100644 pkg/discoveryregistry/zookeeper/zk.go delete mode 100644 pkg/errs/code.go delete mode 100644 pkg/errs/coderr.go delete mode 100644 pkg/errs/predefine.go delete mode 100644 pkg/errs/relation.go delete mode 100644 pkg/proto/auth/auth.go delete mode 100644 pkg/proto/auth/auth.pb.go delete mode 100644 pkg/proto/auth/auth.proto delete mode 100644 pkg/proto/conversation/conversation.go delete mode 100644 pkg/proto/conversation/conversation.pb.go delete mode 100644 pkg/proto/conversation/conversation.proto delete mode 100644 pkg/proto/errinfo/errinfo.pb.go delete mode 100644 pkg/proto/errinfo/errinfo.proto delete mode 100644 pkg/proto/friend/friend.go delete mode 100644 pkg/proto/friend/friend.pb.go delete mode 100644 pkg/proto/friend/friend.proto delete mode 100644 pkg/proto/gen.cmd delete mode 100644 pkg/proto/gen.sh delete mode 100644 pkg/proto/group/group.go delete mode 100644 pkg/proto/group/group.pb.go delete mode 100644 pkg/proto/group/group.proto delete mode 100644 pkg/proto/msg/msg.go delete mode 100644 pkg/proto/msg/msg.pb.go delete mode 100644 pkg/proto/msg/msg.proto delete mode 100644 pkg/proto/msggateway/msggateway.go delete mode 100644 pkg/proto/msggateway/msggateway.pb.go delete mode 100644 pkg/proto/msggateway/msggateway.proto delete mode 100644 pkg/proto/push/push.go delete mode 100644 pkg/proto/push/push.pb.go delete mode 100644 pkg/proto/push/push.proto delete mode 100644 pkg/proto/sdkws/sdkws.go delete mode 100644 pkg/proto/sdkws/sdkws.pb.go delete mode 100644 pkg/proto/sdkws/sdkws.proto delete mode 100644 pkg/proto/statistics/statistics.pb.go delete mode 100644 pkg/proto/statistics/statistics.proto delete mode 100644 pkg/proto/third/third.go delete mode 100644 pkg/proto/third/third.pb.go delete mode 100644 pkg/proto/third/third.proto delete mode 100644 pkg/proto/user/user.go delete mode 100644 pkg/proto/user/user.pb.go delete mode 100644 pkg/proto/user/user.proto delete mode 100644 pkg/proto/wrapperspb/wrapperspb.go delete mode 100644 pkg/proto/wrapperspb/wrapperspb.pb.go delete mode 100644 pkg/proto/wrapperspb/wrapperspb.proto delete mode 100644 pkg/startrpc/start.go delete mode 100644 pkg/utils/base64.go delete mode 100644 pkg/utils/callback.go delete mode 100644 pkg/utils/encryption.go delete mode 100644 pkg/utils/file.go delete mode 100644 pkg/utils/get_server_ip.go delete mode 100644 pkg/utils/id.go delete mode 100644 pkg/utils/id_test.go delete mode 100644 pkg/utils/image.go delete mode 100644 pkg/utils/image_test.go delete mode 100644 pkg/utils/map.go delete mode 100644 pkg/utils/md5_test.go delete mode 100644 pkg/utils/options.go delete mode 100644 pkg/utils/page.go delete mode 100644 pkg/utils/platform_number_id_to_name_test.go delete mode 100644 pkg/utils/retry/retry.go delete mode 100644 pkg/utils/retry/stratey.go delete mode 100644 pkg/utils/splitter/tools.go delete mode 100644 pkg/utils/strings.go delete mode 100644 pkg/utils/time_format.go delete mode 100644 pkg/utils/utils.go delete mode 100644 pkg/utils/utils_v2.go delete mode 100644 pkg/utils/utils_v2_test.go diff --git a/cmd/openim-api/main.go b/cmd/openim-api/main.go index dbc117edf..c967906e9 100644 --- a/cmd/openim-api/main.go +++ b/cmd/openim-api/main.go @@ -28,12 +28,12 @@ import ( "github.com/OpenIMSDK/Open-IM-Server/internal/api" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/cmd" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/config" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/constant" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/cache" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/log" - "github.com/OpenIMSDK/Open-IM-Server/pkg/discoveryregistry" - openKeeper "github.com/OpenIMSDK/Open-IM-Server/pkg/discoveryregistry/zookeeper" + "github.com/OpenIMSDK/tools/config" + "github.com/OpenIMSDK/tools/constant" + "github.com/OpenIMSDK/tools/discoveryregistry" + openKeeper "github.com/OpenIMSDK/tools/discoveryregistry/zookeeper" + "github.com/OpenIMSDK/tools/log" ) func main() { @@ -73,11 +73,11 @@ func run(port int) error { if err != nil { return err } - if err := client.CreateRpcRootNodes(config.GetServiceNames()); err != nil { + if err := client.CreateRpcRootNodes(config.Config.GetServiceNames()); err != nil { return err } fmt.Println("api register public config to discov") - if err := client.RegisterConf2Registry(constant.OpenIMCommonConfigKey, config.EncodeConfig()); err != nil { + if err := client.RegisterConf2Registry(constant.OpenIMCommonConfigKey, config.Config.EncodeConfig()); err != nil { return err } fmt.Println("api register public config to discov success") diff --git a/cmd/openim-push/main.go b/cmd/openim-push/main.go index 03db8ae03..adc3a7cb7 100644 --- a/cmd/openim-push/main.go +++ b/cmd/openim-push/main.go @@ -17,7 +17,7 @@ package main import ( "github.com/OpenIMSDK/Open-IM-Server/internal/push" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/cmd" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/config" + "github.com/OpenIMSDK/tools/config" ) func main() { diff --git a/cmd/openim-rpc/openim-rpc-auth/main.go b/cmd/openim-rpc/openim-rpc-auth/main.go index 524804988..62bb65fab 100644 --- a/cmd/openim-rpc/openim-rpc-auth/main.go +++ b/cmd/openim-rpc/openim-rpc-auth/main.go @@ -17,7 +17,7 @@ package main import ( "github.com/OpenIMSDK/Open-IM-Server/internal/rpc/auth" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/cmd" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/config" + "github.com/OpenIMSDK/tools/config" ) func main() { diff --git a/cmd/openim-rpc/openim-rpc-conversation/main.go b/cmd/openim-rpc/openim-rpc-conversation/main.go index fec8226f8..0465de868 100644 --- a/cmd/openim-rpc/openim-rpc-conversation/main.go +++ b/cmd/openim-rpc/openim-rpc-conversation/main.go @@ -17,7 +17,7 @@ package main import ( "github.com/OpenIMSDK/Open-IM-Server/internal/rpc/conversation" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/cmd" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/config" + "github.com/OpenIMSDK/tools/config" ) func main() { diff --git a/cmd/openim-rpc/openim-rpc-friend/main.go b/cmd/openim-rpc/openim-rpc-friend/main.go index fbd44038e..7a0631a20 100644 --- a/cmd/openim-rpc/openim-rpc-friend/main.go +++ b/cmd/openim-rpc/openim-rpc-friend/main.go @@ -17,7 +17,7 @@ package main import ( "github.com/OpenIMSDK/Open-IM-Server/internal/rpc/friend" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/cmd" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/config" + "github.com/OpenIMSDK/tools/config" ) func main() { diff --git a/cmd/openim-rpc/openim-rpc-group/main.go b/cmd/openim-rpc/openim-rpc-group/main.go index 06baac155..af78868d2 100644 --- a/cmd/openim-rpc/openim-rpc-group/main.go +++ b/cmd/openim-rpc/openim-rpc-group/main.go @@ -17,7 +17,7 @@ package main import ( "github.com/OpenIMSDK/Open-IM-Server/internal/rpc/group" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/cmd" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/config" + "github.com/OpenIMSDK/tools/config" ) func main() { diff --git a/cmd/openim-rpc/openim-rpc-msg/main.go b/cmd/openim-rpc/openim-rpc-msg/main.go index 356081d33..6bdd4842d 100644 --- a/cmd/openim-rpc/openim-rpc-msg/main.go +++ b/cmd/openim-rpc/openim-rpc-msg/main.go @@ -17,7 +17,7 @@ package main import ( "github.com/OpenIMSDK/Open-IM-Server/internal/rpc/msg" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/cmd" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/config" + "github.com/OpenIMSDK/tools/config" ) func main() { diff --git a/cmd/openim-rpc/openim-rpc-third/main.go b/cmd/openim-rpc/openim-rpc-third/main.go index c070e6811..2136bc157 100644 --- a/cmd/openim-rpc/openim-rpc-third/main.go +++ b/cmd/openim-rpc/openim-rpc-third/main.go @@ -17,7 +17,7 @@ package main import ( "github.com/OpenIMSDK/Open-IM-Server/internal/rpc/third" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/cmd" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/config" + "github.com/OpenIMSDK/tools/config" ) func main() { diff --git a/cmd/openim-rpc/openim-rpc-user/main.go b/cmd/openim-rpc/openim-rpc-user/main.go index 6d6d9008d..16a24c812 100644 --- a/cmd/openim-rpc/openim-rpc-user/main.go +++ b/cmd/openim-rpc/openim-rpc-user/main.go @@ -17,7 +17,7 @@ package main import ( "github.com/OpenIMSDK/Open-IM-Server/internal/rpc/user" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/cmd" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/config" + "github.com/OpenIMSDK/tools/config" ) func main() { diff --git a/config/config.yaml b/config/config.yaml index 2d38a5e36..10d43bd3e 100644 --- a/config/config.yaml +++ b/config/config.yaml @@ -77,7 +77,7 @@ object: apiURL: "http://127.0.0.1:10002/object/" #地址需要app能访问到 minio: bucket: "openim" #不建议修改 - endpoint: http://116.30.3.80:10005 + endpoint: http://127.0.0.1:10005 #地址需要app能够访问 accessKeyID: root secretAccessKey: openIM123 sessionToken: "" #token @@ -90,7 +90,7 @@ object: endpoint: "https://oss-cn-chengdu.aliyuncs.com" bucket: "demo-9999999" bucketURL: "https://demo-9999999.oss-cn-chengdu.aliyuncs.com" - accessKeyID: root + accessKeyID: "" accessKeySecret: "" sessionToken: "" diff --git a/go.mod b/go.mod index 21e6e2241..db50056c4 100644 --- a/go.mod +++ b/go.mod @@ -4,45 +4,44 @@ go 1.18 require ( firebase.google.com/go v3.13.0+incompatible - github.com/OpenIMSDK/open_utils v1.0.8 github.com/Shopify/sarama v1.29.0 - github.com/bwmarrin/snowflake v0.3.0 + github.com/bwmarrin/snowflake v0.3.0 // indirect github.com/dtm-labs/rockscache v0.1.1 github.com/gin-gonic/gin v1.9.1 github.com/go-playground/validator/v10 v10.14.0 github.com/gogo/protobuf v1.3.2 - github.com/golang-jwt/jwt/v4 v4.4.2 + github.com/golang-jwt/jwt/v4 v4.5.0 github.com/golang/protobuf v1.5.3 github.com/gorilla/websocket v1.4.2 - github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 + github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 // indirect github.com/jinzhu/copier v0.3.5 - github.com/lestrrat-go/file-rotatelogs v2.4.0+incompatible + github.com/lestrrat-go/file-rotatelogs v2.4.0+incompatible // indirect github.com/minio/minio-go/v7 v7.0.59 github.com/mitchellh/mapstructure v1.5.0 - github.com/nfnt/resize v0.0.0-20180221191011-83c6a9932646 - github.com/pkg/errors v0.9.1 - github.com/prometheus/client_golang v1.13.0 + github.com/nfnt/resize v0.0.0-20180221191011-83c6a9932646 // indirect + github.com/pkg/errors v0.9.1 // indirect + github.com/prometheus/client_golang v1.16.0 github.com/robfig/cron/v3 v3.0.1 github.com/sirupsen/logrus v1.9.2 // indirect github.com/stretchr/testify v1.8.3 - github.com/tencentyun/qcloud-cos-sts-sdk v0.0.0-20210325043845-84a0811633ca - go.mongodb.org/mongo-driver v1.8.3 - golang.org/x/image v0.3.0 + go.mongodb.org/mongo-driver v1.12.0 + golang.org/x/image v0.9.0 // indirect google.golang.org/api v0.114.0 - google.golang.org/grpc v1.54.0 + google.golang.org/grpc v1.56.2 google.golang.org/protobuf v1.31.0 gopkg.in/yaml.v3 v3.0.1 gorm.io/driver/mysql v1.3.5 - gorm.io/gorm v1.23.8 + gorm.io/gorm v1.25.2 ) require github.com/google/uuid v1.3.0 require ( + github.com/OpenIMSDK/protocol v0.0.0-20230725064305-11f0568fe5e9 + github.com/OpenIMSDK/tools v0.0.1 github.com/aliyun/aliyun-oss-go-sdk v2.2.7+incompatible github.com/go-redis/redis v6.15.9+incompatible github.com/go-sql-driver/mysql v1.6.0 - github.com/go-zookeeper/zk v1.0.3 github.com/redis/go-redis/v9 v9.0.5 github.com/tencentyun/cos-go-sdk-v5 v0.7.41 ) @@ -69,7 +68,7 @@ require ( github.com/gabriel-vasile/mimetype v1.4.2 // indirect github.com/gin-contrib/sse v0.1.0 // indirect github.com/go-playground/universal-translator v0.18.1 // indirect - github.com/go-stack/stack v1.8.0 // indirect + github.com/go-zookeeper/zk v1.0.3 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect github.com/golang/snappy v0.0.3 // indirect github.com/google/go-cmp v0.5.9 // indirect @@ -90,27 +89,28 @@ require ( github.com/klauspost/cpuid/v2 v2.2.4 // indirect github.com/leodido/go-urn v1.2.4 // indirect github.com/lithammer/shortuuid v3.0.0+incompatible // indirect - github.com/matttproud/golang_protobuf_extensions v1.0.1 // indirect + github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect github.com/minio/md5-simd v1.1.2 // indirect github.com/minio/sha256-simd v1.0.1 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect + github.com/montanaflynn/stats v0.0.0-20171201202039-1bf9dbcd8cbe // indirect github.com/mozillazg/go-httpheader v0.4.0 // indirect github.com/onsi/ginkgo v1.16.5 // indirect github.com/onsi/gomega v1.18.1 // indirect github.com/pelletier/go-toml/v2 v2.0.8 // indirect github.com/pierrec/lz4 v2.6.0+incompatible // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - github.com/prometheus/client_model v0.2.0 // indirect - github.com/prometheus/common v0.37.0 // indirect - github.com/prometheus/procfs v0.8.0 // indirect + github.com/prometheus/client_model v0.3.0 // indirect + github.com/prometheus/common v0.42.0 // indirect + github.com/prometheus/procfs v0.10.1 // indirect github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect github.com/rs/xid v1.5.0 // indirect github.com/spf13/pflag v1.0.5 // indirect github.com/twitchyliquid64/golang-asm v0.15.1 // indirect github.com/xdg-go/pbkdf2 v1.0.0 // indirect - github.com/xdg-go/scram v1.0.2 // indirect - github.com/xdg-go/stringprep v1.0.2 // indirect + github.com/xdg-go/scram v1.1.2 // indirect + github.com/xdg-go/stringprep v1.0.4 // indirect github.com/youmark/pkcs8 v0.0.0-20181117223130-1be2e3e5546d // indirect go.opencensus.io v0.24.0 // indirect go.uber.org/atomic v1.7.0 // indirect @@ -118,9 +118,9 @@ require ( golang.org/x/arch v0.3.0 // indirect golang.org/x/net v0.11.0 // indirect golang.org/x/oauth2 v0.7.0 // indirect - golang.org/x/sync v0.1.0 // indirect + golang.org/x/sync v0.2.0 // indirect golang.org/x/sys v0.9.0 // indirect - golang.org/x/text v0.10.0 // indirect + golang.org/x/text v0.11.0 // indirect golang.org/x/time v0.1.0 // indirect golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect google.golang.org/appengine v1.6.7 // indirect @@ -131,12 +131,11 @@ require ( require ( github.com/go-playground/locales v0.14.1 // indirect github.com/goccy/go-json v0.10.2 // indirect - github.com/jonboulle/clockwork v0.3.0 // indirect github.com/lestrrat-go/strftime v1.0.6 // indirect github.com/mattn/go-isatty v0.0.19 // indirect github.com/spf13/cobra v1.6.1 github.com/ugorji/go/codec v1.2.11 // indirect - go.uber.org/zap v1.24.0 + go.uber.org/zap v1.24.0 // indirect golang.org/x/crypto v0.10.0 // indirect google.golang.org/genproto v0.0.0-20230525234025-438c736192d0 // indirect gopkg.in/ini.v1 v1.67.0 // indirect diff --git a/go.sum b/go.sum index e95d2e81e..0c585411e 100644 --- a/go.sum +++ b/go.sum @@ -1,71 +1,33 @@ cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= -cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= -cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= -cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= -cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= -cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= -cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4= -cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M= -cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc= -cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKVk= -cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs= -cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc= -cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= cloud.google.com/go v0.110.0 h1:Zc8gqp3+a9/Eyph2KDmcGaPtbKRIoqq4YTlL4NMD0Ys= cloud.google.com/go v0.110.0/go.mod h1:SJnCLqQ0FCFGSZMUNUf84MV3Aia54kn7pi8st7tMzaY= -cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= -cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= -cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= -cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= -cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= -cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= cloud.google.com/go/compute v1.19.1 h1:am86mquDUgjGNWxiGn+5PGLbmgiWXlE/yNWpIpNvuXY= cloud.google.com/go/compute v1.19.1/go.mod h1:6ylj3a05WF8leseCdIf77NK0g1ey+nj5IKd5/kvShxE= cloud.google.com/go/compute/metadata v0.2.3 h1:mg4jlk7mCAj6xXp9UJ4fjI9VUI5rubuGBW5aJ7UnBMY= cloud.google.com/go/compute/metadata v0.2.3/go.mod h1:VAV5nSsACxMJvgaAuX6Pk2AawlZn8kiOGuCv6gTkwuA= -cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= -cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= cloud.google.com/go/firestore v1.9.0 h1:IBlRyxgGySXu5VuW0RgGFlTtLukSnNkpDiEOMkQkmpA= cloud.google.com/go/firestore v1.9.0/go.mod h1:HMkjKHNTtRyZNiMzu7YAsLr9K3X2udY2AMwDaMEQiiE= cloud.google.com/go/iam v0.13.0 h1:+CmB+K0J/33d0zSQ9SlFWUeCCEn5XJA0ZMZ3pHE9u8k= cloud.google.com/go/iam v0.13.0/go.mod h1:ljOg+rcNfzZ5d6f1nAUJ8ZIxOaZUVoS14bKCtaLZ/D0= cloud.google.com/go/longrunning v0.4.1 h1:v+yFJOfKC3yZdY6ZUI933pIYdhyhV8S3NpWrXWmg7jM= cloud.google.com/go/longrunning v0.4.1/go.mod h1:4iWDqhBZ70CvZ6BfETbvam3T8FMvLK+eFj0E6AaRQTo= -cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= -cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= -cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= -cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU= -cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= -cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= -cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= -cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= -cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= cloud.google.com/go/storage v1.28.1 h1:F5QDG5ChchaAVQhINh24U99OWHURqrW8OmQcGKXcbgI= cloud.google.com/go/storage v1.28.1/go.mod h1:Qnisd4CqDdo6BGs2AD5LLnEsmSQ80wQ5ogcBBKhU86Y= -dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= firebase.google.com/go v3.13.0+incompatible h1:3TdYC3DDi6aHn20qoRkxwGqNgdjtblwVAyRLQwGn/+4= firebase.google.com/go v3.13.0+incompatible/go.mod h1:xlah6XbEyW6tbfSklcfe5FHJIwjt8toICdV5Wh9ptHs= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= -github.com/OpenIMSDK/open_utils v1.0.8 h1:IopxWgJwEF5ZAPsRuiZZOfcxNOQOCt/p8VDENcHN9r4= -github.com/OpenIMSDK/open_utils v1.0.8/go.mod h1:FLoaQblWUVKQgqt2LrNzfSZLT6D3DICBn1kcOMDLUOI= +github.com/OpenIMSDK/protocol v0.0.0-20230725064305-11f0568fe5e9 h1:ZtW+z2j2kjk51awH9OFRXbgNI5Vcfq0Lu9//ax86ktc= +github.com/OpenIMSDK/protocol v0.0.0-20230725064305-11f0568fe5e9/go.mod h1:F25dFrwrIx3lkNoiuf6FkCfxuwf8L4Z8UIsdTHP/r0Y= +github.com/OpenIMSDK/tools v0.0.1 h1:lxTzjv0vOCH890K9C5LxMq3UCvioDMw0ZZQQtioauuI= +github.com/OpenIMSDK/tools v0.0.1/go.mod h1:/iSkny1+7i4Z09yddGa4o4fTu9dzJdOLxxe4pWuqI1A= github.com/QcloudApi/qcloud_sign_golang v0.0.0-20141224014652-e4130a326409/go.mod h1:1pk82RBxDY/JZnPQrtqHlUFfCctgdorsd9M06fMynOM= github.com/Shopify/sarama v1.29.0 h1:ARid8o8oieau9XrHI55f/L3EoRAhm9px6sonbD7yuUE= github.com/Shopify/sarama v1.29.0/go.mod h1:2QpgD79wpdAESqNQMxNc0KYMkycd4slxGdV3TWSVqrU= github.com/Shopify/toxiproxy v2.1.4+incompatible h1:TKdv8HiTLgE5wdJuEML90aBgNWsokNbMijUGhmcoBJc= github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI= -github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= -github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= -github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= -github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= -github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= github.com/aliyun/aliyun-oss-go-sdk v2.2.7+incompatible h1:KpbJFXwhVeuxNtBJ74MCGbIoaBok2uZvkD7QXp2+Wis= github.com/aliyun/aliyun-oss-go-sdk v2.2.7+incompatible/go.mod h1:T/Aws4fEfogEE9v+HPhhw+CntffsBHJ8nXQCwKr0/g8= github.com/benbjohnson/clock v1.1.0 h1:Q92kusRqC1XV2MjkWETPvjJVqKetz1OzxZB7mHJLju8= -github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= -github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= 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.7.0 h1:ItPMPH90RbmZJt5GtkcNvIRuGEdwlBItdNVoyzaNQao= @@ -76,8 +38,6 @@ github.com/bytedance/sonic v1.5.0/go.mod h1:ED5hyg4y6t3/9Ku1R6dU/4KyJ48DZ4jPhfY1 github.com/bytedance/sonic v1.9.1 h1:6iJ6NqdoxCDr6mbY8h18oSO+cShGSMRGCEo7F2h0x8s= github.com/bytedance/sonic v1.9.1/go.mod h1:i736AoUSYt75HyZLoJW9ERYxcy6eaN6h4BZXU064P/U= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= -github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/chenzhuoyu/base64x v0.0.0-20211019084208-fb5309c8db06/go.mod h1:DH46F32mSOjUmXrMHnKwZdA8wcEefY7UVqBKYGjpdQY= @@ -124,17 +84,6 @@ 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= github.com/gin-gonic/gin v1.9.1/go.mod h1:hPrL7YrpYKXt5YId3A/Tnip5kqbEAP+KLuI3SUcPTeU= -github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= -github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= -github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= -github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= -github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= -github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY= -github.com/go-kit/log v0.2.0/go.mod h1:NwTd00d/i8cPZ3xOwwiv2PO5MOcx78fFErGNcVmBjv0= -github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= -github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= -github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= -github.com/go-logfmt/logfmt v0.5.1/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= github.com/go-playground/assert/v2 v2.2.0 h1:JvknZsQTYeFEAhQwI4qEt9cyV5ONwRHC+lYKSsYSR8s= 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= @@ -146,36 +95,23 @@ github.com/go-redis/redis v6.15.9+incompatible h1:K0pv1D7EQUjfyoMql+r/jZqCLizCGK github.com/go-redis/redis v6.15.9+incompatible/go.mod h1:NAIEuMOZ/fxfXJIrKDQDz8wamY7mA7PouImQ2Jvg6kA= github.com/go-sql-driver/mysql v1.6.0 h1:BCTh4TKNUYmOmMUcQ3IipzF5prigylS7XXjEkfCHuOE= github.com/go-sql-driver/mysql v1.6.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= -github.com/go-stack/stack v1.8.0 h1:5SgMzNM5HxrEjV0ww2lTmX6E2Izsfxas4+YHWRs3Lsk= -github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= 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/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= -github.com/golang-jwt/jwt/v4 v4.4.2 h1:rcc4lwaZgFMCZ5jxF9ABolDcIHdBytAFgqFPbSJQAYs= -github.com/golang-jwt/jwt/v4 v4.4.2/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0= +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/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= -github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= -github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk= github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= @@ -192,15 +128,11 @@ github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiu github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.3 h1:fHPg5GQYlCeLIPB9BZqMVR5nR9A+IM5zcgeTdjMYmLA= github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= -github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= -github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= @@ -211,27 +143,14 @@ github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO github.com/google/go-querystring v1.1.0 h1:AnCroh3fv4ZBgVIf1Iwtovgjaw/GiKJo8M8yD/fhyJ8= github.com/google/go-querystring v1.1.0/go.mod h1:Kcdr2DB4koayq7X8pmAG4sNG59So17icRSOU623lUBU= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/google/martian v2.1.0+incompatible h1:/CP5g8u/VJHijgedC/Legn3BAbAaWPgecwXBIDzw5no= -github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= -github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= github.com/google/martian/v3 v3.3.2 h1:IqNFLAmvJOgVlpdEBiQbDc2EwKW77amAycfTuWKdfvw= -github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= -github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= -github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/googleapis/enterprise-certificate-proxy v0.2.3 h1:yk9/cqRKtT9wXZSsRH9aurXEpJX+U6FLtpYTdC3R06k= github.com/googleapis/enterprise-certificate-proxy v0.2.3/go.mod h1:AwSRAtLfXpU5Nm3pW+v7rGDHp09LsPtGY9MduiEsR9k= -github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= -github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= github.com/googleapis/gax-go/v2 v2.7.1 h1:gF4c0zjUP2H/s/hEGyLA3I0fA2ZWjzYiONAD6cvPr8A= github.com/googleapis/gax-go/v2 v2.7.1/go.mod h1:4orTrqY6hXxxaUL4LHIPl6lGo8vAE38/qKbhSAKP6QI= github.com/gorilla/securecookie v1.1.1/go.mod h1:ra0sb63/xPlUeL+yeDciTfxMRAA+MP+HVt/4epWDjd4= @@ -242,10 +161,7 @@ github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 h1:Ovs26xHkKqVztRpIrF/92Bcuy github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= github.com/hashicorp/go-uuid v1.0.2 h1:cfejS+Tpcp13yd5nYHWDI6qVCny6wyX2Mt5SGur2IGE= github.com/hashicorp/go-uuid v1.0.2/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= -github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= -github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/inconshreveable/mousetrap v1.0.1 h1:U3uMjPSQEBMNp1lFxmllqCPM6P5u/Xq7Pgzkat/bFNc= github.com/inconshreveable/mousetrap v1.0.1/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= @@ -268,18 +184,9 @@ github.com/jinzhu/inflection v1.0.0/go.mod h1:h+uFLlag+Qp1Va5pdKtLDYj+kHp5pxUVkr github.com/jinzhu/now v1.1.4/go.mod h1:d3SSVoowX0Lcu0IBviAWJpolVfI5UJVZZ7cO71lE/z8= 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.3.0 h1:9BSCMi8C+0qdApAp4auwX0RkLGUjs956h0EkuQymUhg= -github.com/jonboulle/clockwork v0.3.0/go.mod h1:Pkfl5aHPm1nk2H9h0bjmnJD/BcgbGXUBGnn1kMkgxc8= -github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= -github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= -github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/jonboulle/clockwork v0.4.0 h1:p4Cf1aMWXnXAUh8lVfewRBx1zaTSYKrKMF2g3ST4RZ4= 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/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= -github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= -github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= -github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= 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.12.2/go.mod h1:8dP1Hq4DHOhN9w426knH3Rhby4rFm6D8eO+e+Dq5Gzg= @@ -290,12 +197,8 @@ github.com/klauspost/cpuid/v2 v2.0.1/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa02 github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= github.com/klauspost/cpuid/v2 v2.2.4 h1:acbojRNwl3o09bUq+yDCtZFc1aiwaAAxtcn8YkZXnvk= github.com/klauspost/cpuid/v2 v2.2.4/go.mod h1:RVVoqg1df56z8g3pUjL/3lE5UfnlrJX8tyFgg4nqhuY= -github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= -github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= -github.com/kr/pretty v0.2.1 h1:Fmg33tUaq4/8ym9TJN1x7sLJnHVwhP33CNkpYV/7rwI= github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= +github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= 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= @@ -312,8 +215,8 @@ github.com/lithammer/shortuuid v3.0.0+incompatible h1:NcD0xWW/MZYXEHa6ITy6kaXN5n github.com/lithammer/shortuuid v3.0.0+incompatible/go.mod h1:FR74pbAuElzOUuenUHTK2Tciko1/vKuIKS9dSkDrA4w= github.com/mattn/go-isatty v0.0.19 h1:JITubQf0MOLdlGRuRq+jtsDlekdYPia9ZFsB8h/APPA= github.com/mattn/go-isatty v0.0.19/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= -github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU= -github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= +github.com/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zkfA9PSy5pEvNWRP0ET0TIVo= +github.com/matttproud/golang_protobuf_extensions v1.0.4/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= github.com/minio/md5-simd v1.1.2 h1:Gdi1DZK69+ZVMoNHRXJyNcxrMA4dSxoYHZSQbirFg34= github.com/minio/md5-simd v1.1.2/go.mod h1:MzdKDxYpY2BT9XQFocsiZf/NKVtR7nkE4RoEpN+20RM= github.com/minio/minio-go/v7 v7.0.59 h1:lxIXwsTIcQkYoEG25rUJbzpmSB/oWeVDmxFo/uWUUsw= @@ -326,16 +229,13 @@ github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RR github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= -github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= -github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= +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/mozillazg/go-httpheader v0.2.1/go.mod h1:jJ8xECTlalr6ValeXYdOF8fFUISeBAdw6E61aqQma60= github.com/mozillazg/go-httpheader v0.4.0 h1:aBn6aRXtFzyDLZ4VIRLsZbbJloagQfMnCiYgOq6hK4w= github.com/mozillazg/go-httpheader v0.4.0/go.mod h1:PuT8h0pw6efvp8ZeUec1Rs7dwjK08bt6gKSReGMqtdA= -github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= -github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/nfnt/resize v0.0.0-20180221191011-83c6a9932646 h1:zYyBkD/k9seD2A7fsi6Oo2LfFZAehjjQMERAvZLEDnQ= github.com/nfnt/resize v0.0.0-20180221191011-83c6a9932646/go.mod h1:jpp1/29i3P1S/RLdc7JQKbRpFeM1dOBd8T9ki5s+AY8= github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= @@ -356,50 +256,29 @@ github.com/pelletier/go-toml/v2 v2.0.8 h1:0ctb6s9mE31h0/lhu+J6OPmVeDxJn+kYnJc2jZ github.com/pelletier/go-toml/v2 v2.0.8/go.mod h1:vuYfssBdrU2XDZ9bYydBu6t+6a6PYNcZljzZR9VXg+4= github.com/pierrec/lz4 v2.6.0+incompatible h1:Ix9yFKn1nSPBLFl/yZknTp8TU5G4Ps0JDmguYK6iH1A= github.com/pierrec/lz4 v2.6.0+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= -github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= -github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= -github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= -github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= -github.com/prometheus/client_golang v1.12.1/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY= -github.com/prometheus/client_golang v1.13.0 h1:b71QUfeo5M8gq2+evJdTPfZhYMAU0uKPkyPJ7TPsloU= -github.com/prometheus/client_golang v1.13.0/go.mod h1:vTeo+zgvILHsnnj/39Ou/1fPN5nJFOEMgftOUOmlvYQ= -github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= -github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_golang v1.16.0 h1:yk/hx9hDbrGHovbci4BY+pRMfSuuat626eFsHb7tmT8= +github.com/prometheus/client_golang v1.16.0/go.mod h1:Zsulrv/L9oM40tJ7T815tM89lFEugiJ9HzIqaAx4LKc= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.2.0 h1:uq5h0d+GuxiXLJLNABMgp2qUWDPiLvgCzz2dUR+/W/M= -github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= -github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= -github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= -github.com/prometheus/common v0.32.1/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= -github.com/prometheus/common v0.37.0 h1:ccBbHCgIiT9uSoFY0vX8H3zsNR5eLt17/RQLUvn8pXE= -github.com/prometheus/common v0.37.0/go.mod h1:phzohg0JFMnBEFGxTDbfu3QyL5GI8gTQJFhYO5B3mfA= -github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= -github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= -github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= -github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= -github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= -github.com/prometheus/procfs v0.8.0 h1:ODq8ZFEaYeCaZOJlZZdJA2AbQR98dSHSM1KW/You5mo= -github.com/prometheus/procfs v0.8.0/go.mod h1:z7EfXMXOkbkqb9IINtpCn86r/to3BnA0uaxHdg830/4= +github.com/prometheus/client_model v0.3.0 h1:UBgGFHqYdG/TPFD1B1ogZywDqEkwp3fBMvqdiQ7Xew4= +github.com/prometheus/client_model v0.3.0/go.mod h1:LDGWKZIo7rky3hgvBe+caln+Dr3dPggB5dvjtD7w9+w= +github.com/prometheus/common v0.42.0 h1:EKsfXEYo4JpWMHH5cg+KOUWeuJSov1Id8zGR8eeI1YM= +github.com/prometheus/common v0.42.0/go.mod h1:xBwqVerjNdUDjgODMpudtOMwlOwf2SaTr1yjz4b7Zbc= +github.com/prometheus/procfs v0.10.1 h1:kYK1Va/YMlutzCGazswoHKo//tZVlFpKYh+PymziUAg= +github.com/prometheus/procfs v0.10.1/go.mod h1:nwNm2aOCAYw8uTR/9bWRREkZFxAUcWzPHWJq+XBB/FM= github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 h1:N/ElC8H3+5XpJzTSTfLsJV/mx9Q9g7kxmchpfZyxgzM= github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= github.com/redis/go-redis/v9 v9.0.5 h1:CuQcn5HIEeK7BgElubPP8CGtE0KakrnbBSTLjathl5o= github.com/redis/go-redis/v9 v9.0.5/go.mod h1:WqMKv5vnQbRuZstUwxQI195wHy+t4PuXDOjzMvcuQHk= github.com/robfig/cron/v3 v3.0.1 h1:WdRxkvbJztn8LMz/QEvLN5sBU+xKpSqwwUO1Pjr4qDs= github.com/robfig/cron/v3 v3.0.1/go.mod h1:eQICP3HwyT7UooqI/z+Ov+PtYAWygg1TEWWzGIFLtro= -github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= +github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M= github.com/rs/xid v1.5.0 h1:mKX4bl4iPYJtEIxp6CYiUuLQ/8DYMoz0PUdtGgMFRVc= github.com/rs/xid v1.5.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= -github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= -github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= -github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= github.com/sirupsen/logrus v1.9.2 h1:oxx1eChJGI6Uks2ZC4W1zpLlVgqB8ner4EuQwV4Ik1Y= github.com/sirupsen/logrus v1.9.2/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/spf13/cobra v1.6.1 h1:o94oiPyS4KD1mPy2fmcYYHHfCxLqYjJOhGsCHFZtEzA= @@ -407,10 +286,8 @@ github.com/spf13/cobra v1.6.1/go.mod h1:IOw/AERYS7UzyrGinqmz6HLUo219MORXGxhbaJUq github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= -github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= @@ -426,36 +303,25 @@ github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.194/go.mod github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/kms v1.0.194/go.mod h1:yrBKWhChnDqNz1xuXdSbWXG56XawEq0G5j1lg4VwBD4= github.com/tencentyun/cos-go-sdk-v5 v0.7.41 h1:iU0Li/Np78H4SBna0ECQoF3mpgi6ImLXU+doGzPFXGc= github.com/tencentyun/cos-go-sdk-v5 v0.7.41/go.mod h1:4dCEtLHGh8QPxHEkgq+nFaky7yZxQuYwgSJM87icDaw= -github.com/tencentyun/qcloud-cos-sts-sdk v0.0.0-20210325043845-84a0811633ca h1:G/aIr3WiUesWHL2YGYgEqjM5tCAJ43Ml+0C18wDkWWs= -github.com/tencentyun/qcloud-cos-sts-sdk v0.0.0-20210325043845-84a0811633ca/go.mod h1:b18KQa4IxHbxeseW1GcZox53d7J0z39VNONTxvvlkXw= -github.com/tidwall/pretty v1.0.0 h1:HsD+QiTn7sK6flMKIvNmpqz1qrpP3Ps6jOKIKMooyg4= -github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= github.com/twitchyliquid64/golang-asm v0.15.1 h1:SU5vSMR7hnwNxj24w34ZyCi/FmDZTkS4MhqMhdFk5YI= github.com/twitchyliquid64/golang-asm v0.15.1/go.mod h1:a1lVb/DtPvCB8fslRZhAngC2+aY1QWCk3Cedj/Gdt08= github.com/ugorji/go/codec v1.2.11 h1:BMaWp1Bb6fHwEtbplGBGJ498wD+LKlNSl25MjdZY4dU= github.com/ugorji/go/codec v1.2.11/go.mod h1:UNopzCgEMSXjBc6AOMqYvWC1ktqTAfzJZUZgYf6w6lg= github.com/xdg-go/pbkdf2 v1.0.0 h1:Su7DPu48wXMwC3bs7MCNG+z4FhcyEuz5dlvchbq0B0c= github.com/xdg-go/pbkdf2 v1.0.0/go.mod h1:jrpuAogTd400dnrH08LKmI/xc1MbPOebTwRqcT5RDeI= -github.com/xdg-go/scram v1.0.2 h1:akYIkZ28e6A96dkWNJQu3nmCzH3YfwMPQExUYDaRv7w= -github.com/xdg-go/scram v1.0.2/go.mod h1:1WAq6h33pAW+iRreB34OORO2Nf7qel3VV3fjBj+hCSs= -github.com/xdg-go/stringprep v1.0.2 h1:6iq84/ryjjeRmMJwxutI51F2GIPlP5BfTvXHeYjyhBc= -github.com/xdg-go/stringprep v1.0.2/go.mod h1:8F9zXuvzgwmyT5DUm4GUfZGDdT3W+LCvS6+da4O5kxM= +github.com/xdg-go/scram v1.1.2 h1:FHX5I5B4i4hKRVRBCFRxq1iQRej7WO3hhBuJf+UUySY= +github.com/xdg-go/scram v1.1.2/go.mod h1:RT/sEzTbU5y00aCK8UOx6R7YryM0iF1N2MOmC3kKLN4= +github.com/xdg-go/stringprep v1.0.4 h1:XLI/Ng3O1Atzq0oBs3TWm+5ZVgkq2aqdlvP9JtoZ6c8= +github.com/xdg-go/stringprep v1.0.4/go.mod h1:mPGuuIYwz7CmR2bT9j4GbQqutWS1zV24gijq1dTyGkM= github.com/xdg/scram v1.0.3/go.mod h1:lB8K/P019DLNhemzwFU4jHLhdvlE6uDZjXFejJXr49I= github.com/xdg/stringprep v1.0.3/go.mod h1:Jhud4/sHMO4oL310DaZAKk9ZaJ08SJfe+sJh0HrGL1Y= github.com/youmark/pkcs8 v0.0.0-20181117223130-1be2e3e5546d h1:splanxYIlg+5LfHAM6xpdFEAYOk8iySO56hMFq6uLyA= github.com/youmark/pkcs8 v0.0.0-20181117223130-1be2e3e5546d/go.mod h1:rHwXgn7JulP+udvsHwJoVG1YGAP6VLg4y9I5dyZdqmA= -github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= -go.mongodb.org/mongo-driver v1.8.3 h1:TDKlTkGDKm9kkJVUOAXDK5/fkqKHJVwYQSpoRfB43R4= -go.mongodb.org/mongo-driver v1.8.3/go.mod h1:0sQWfOeY63QTntERDJJ/0SuKK0T1uVSgKCuAROlKEPY= -go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= -go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= -go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.mongodb.org/mongo-driver v1.12.0 h1:aPx33jmn/rQuJXPQLZQ8NtfPQG8CaqgLThFtqRb0PiE= +go.mongodb.org/mongo-driver v1.12.0/go.mod h1:AZkxhPnFJUoH7kZlFkVKucV20K387miPfm7oimrSmK0= go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0= go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= go.uber.org/atomic v1.7.0 h1:ADUqmZGgLDDfbSL9ZmPxKTybcoEYHgpYfELNoN+7hsw= @@ -468,291 +334,122 @@ go.uber.org/zap v1.24.0/go.mod h1:2kMP+WWQ8aoFoedH3T2sq6iJ2yDWpHbP0f6MQbS9Gkg= golang.org/x/arch v0.0.0-20210923205945-b76863e36670/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8= golang.org/x/arch v0.3.0 h1:02VY4/ZcO/gBOH6PUaoiptASxtXU10jazRCP865E97k= golang.org/x/arch v0.3.0/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8= -golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20201112155050-0c6587e931a9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20201216223049-8b5274cf687f/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.10.0 h1:LKqV2xt9+kDzSTfOhx4FrkEBcMrAgHSYgzywV9zcGmM= golang.org/x/crypto v0.10.0/go.mod h1:o4eNf7Ede1fv+hwOwZsTHl9EsPFO6q6ZvYR8vYfY45I= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= -golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= -golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= -golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= -golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= -golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= -golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= -golang.org/x/image v0.3.0 h1:HTDXbdK9bjfSWkPzDJIw89W8CAtfFGduujWs33NLLsg= -golang.org/x/image v0.3.0/go.mod h1:fXd9211C/0VTlYuAcOhW8dY/RtEJqODXOWBDpmYBf+A= +golang.org/x/image v0.9.0 h1:QrzfX26snvCM20hIhBwuHI/ThTg18b/+kcKdXHvnR+g= +golang.org/x/image v0.9.0/go.mod h1:jtrku+n79PfroUbvDdeUWMAI+heR786BofxrbiSF+J0= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= -golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= -golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= -golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= -golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= -golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= -golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= -golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.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-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= -golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/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-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210427231257-85d9c07bbe3a/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk= golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk= -golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= +golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/net v0.11.0 h1:Gi2tvZIJyBtO9SDr1q9h5hEQCp/4L2RQ+ar0qjx2oNU= golang.org/x/net v0.11.0/go.mod h1:2L/ixqYpgIVXmeoSA/4Lu7BzTG4KIyPIryS4IsOd1oQ= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= -golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= golang.org/x/oauth2 v0.7.0 h1:qe6s0zUXlPX80/dITx3440hWZ7GwMwgDDyrSGTPJG/g= golang.org/x/oauth2 v0.7.0/go.mod h1:hPLQkd9LyjfXTiRohC/41GhcFqxisoUQ99sCUOHO9x4= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.1.0 h1:wsuoTGHzEhffawBOhz5CYhcrV4IdKZbEyZjBMuTp12o= golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.2.0 h1:PUR+T4wwASmuSTYdKjYHI5TD22Wy5ogLU5qZCOLxBrI= +golang.org/x/sync v0.2.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210112080510-489259a85091/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220704084225-05e143d24a9e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.9.0 h1:KS/R3tvhPqvJvwcKfnBHJwwthS11LRhmM5D59eEXa0s= golang.org/x/sys v0.9.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= -golang.org/x/text v0.6.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -golang.org/x/text v0.10.0 h1:UpjohKhiEgNc0CSauXmwYftY1+LlaC75SJwh0SgCX58= -golang.org/x/text v0.10.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= -golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= +golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= +golang.org/x/text v0.11.0 h1:LAntKIrcmeSKERyiOh0XMV39LXS8IE9UL2yP7+f5ij4= +golang.org/x/text v0.11.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/time v0.1.0 h1:xYY+Bajn2a7VBmTM5GikTmnK8ZuX8YgnQCqZpbBNtmA= golang.org/x/time v0.1.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190531172133-b3315ee88b7d/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= -golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= -golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= -golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.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= golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 h1:H2TDz8ibqkAF6YGhCdN3jS9O0/s90v0rJh3X/OLHEUk= golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= -google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= -google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= -google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= -google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= -google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.17.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.18.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.19.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.22.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= -google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= -google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM= -google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc= google.golang.org/api v0.114.0 h1:1xQPji6cO2E2vLiI+C/XiFAnsn1WV3mjaEwGLhi3grE= google.golang.org/api v0.114.0/go.mod h1:ifYI2ZsFK6/uGddGfAD5BMxlnkBqCmqHSDUVi45N5Yg= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= -google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c= google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= -google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= -google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= -google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA= -google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U= google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= -google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= -google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20230525234025-438c736192d0 h1:x1vNwUhVOcsYoKyEGCZBH694SBmmBjA2EfauFVEI2+M= google.golang.org/genproto v0.0.0-20230525234025-438c736192d0/go.mod h1:9ExIQyXL5hZrHzQceCwuSYwZZ5QZBazOcprJ5rgs3lY= google.golang.org/genproto/googleapis/api v0.0.0-20230525234020-1aefcd67740a h1:HiYVD+FGJkTo+9zj1gqz0anapsa1JxjiSrN+BJKyUmE= @@ -760,20 +457,12 @@ google.golang.org/genproto/googleapis/api v0.0.0-20230525234020-1aefcd67740a/go. google.golang.org/genproto/googleapis/rpc v0.0.0-20230626202813-9b080da550b3 h1:QJuqz7YzNTyKDspkp2lrzqtq4lf2AhUSpXTsGP5SbLw= google.golang.org/genproto/googleapis/rpc v0.0.0-20230626202813-9b080da550b3/go.mod h1:66JfowdXAEgad5O9NnYcsNPLCPZJD++2L9X0PCMODrA= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= -google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= -google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= -google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60= -google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= -google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= -google.golang.org/grpc v1.54.0 h1:EhTqbhiYeixwWQtAEZAxmV9MGqcjEU2mFx52xCzNyag= -google.golang.org/grpc v1.54.0/go.mod h1:PUSEXI6iWghWaB6lXM4knEgpJNu2qUcKfDtNci3EC2g= +google.golang.org/grpc v1.56.2 h1:fVRFRnXvU+x6C4IlHZewvJOVHoOv1TUuQyoRsYnB4bI= +google.golang.org/grpc v1.56.2/go.mod h1:I9bI3vqKfayGqPUAwGdOSu7kt6oIJLixfffKrpXqQ9s= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= @@ -782,28 +471,21 @@ google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzi google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= -gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= 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/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= -gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.3.0/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= @@ -813,16 +495,9 @@ gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gorm.io/driver/mysql v1.3.5 h1:iWBTVW/8Ij5AG4e0G/zqzaJblYkBI1VIL1LG2HUGsvY= gorm.io/driver/mysql v1.3.5/go.mod h1:sSIebwZAVPiT+27jK9HIwvsqOGKx3YMPmrA3mBJR10c= -gorm.io/gorm v1.23.8 h1:h8sGJ+biDgBA1AD1Ha9gFCx7h8npU7AsLdlkX0n2TpE= gorm.io/gorm v1.23.8/go.mod h1:l2lP/RyAtc1ynaTjFksBde/O8v9oOGIApu2/xRitmZk= +gorm.io/gorm v1.25.2 h1:gs1o6Vsa+oVKG/a9ElL3XgyGfghFfkKA2SInQaCyMho= +gorm.io/gorm v1.25.2/go.mod h1:L4uxeKpfBml98NYqVqwAdmV1a2nBtAec/cf3fpucW/k= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= -honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4= -rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= -rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= diff --git a/internal/api/auth.go b/internal/api/auth.go index e4353a5c4..11debbea9 100644 --- a/internal/api/auth.go +++ b/internal/api/auth.go @@ -17,9 +17,9 @@ package api import ( "github.com/gin-gonic/gin" - "github.com/OpenIMSDK/Open-IM-Server/pkg/a2r" - "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/auth" "github.com/OpenIMSDK/Open-IM-Server/pkg/rpcclient" + "github.com/OpenIMSDK/protocol/auth" + "github.com/OpenIMSDK/tools/a2r" ) type AuthApi rpcclient.Auth diff --git a/internal/api/conversation.go b/internal/api/conversation.go index 211ee362b..0d8b41e37 100644 --- a/internal/api/conversation.go +++ b/internal/api/conversation.go @@ -17,9 +17,9 @@ package api import ( "github.com/gin-gonic/gin" - "github.com/OpenIMSDK/Open-IM-Server/pkg/a2r" - "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/conversation" "github.com/OpenIMSDK/Open-IM-Server/pkg/rpcclient" + "github.com/OpenIMSDK/protocol/conversation" + "github.com/OpenIMSDK/tools/a2r" ) type ConversationApi rpcclient.Conversation diff --git a/internal/api/custom_validator.go b/internal/api/custom_validator.go index 42e50647f..7425ecb38 100644 --- a/internal/api/custom_validator.go +++ b/internal/api/custom_validator.go @@ -17,7 +17,7 @@ package api import ( "github.com/go-playground/validator/v10" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/constant" + "github.com/OpenIMSDK/tools/constant" ) func RequiredIf(fl validator.FieldLevel) bool { diff --git a/internal/api/friend.go b/internal/api/friend.go index 90214d899..7af614fa4 100644 --- a/internal/api/friend.go +++ b/internal/api/friend.go @@ -15,9 +15,9 @@ package api import ( - "github.com/OpenIMSDK/Open-IM-Server/pkg/a2r" - "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/friend" "github.com/OpenIMSDK/Open-IM-Server/pkg/rpcclient" + "github.com/OpenIMSDK/protocol/friend" + "github.com/OpenIMSDK/tools/a2r" "github.com/gin-gonic/gin" ) diff --git a/internal/api/group.go b/internal/api/group.go index 00cdebeab..2603bb858 100644 --- a/internal/api/group.go +++ b/internal/api/group.go @@ -15,9 +15,9 @@ package api import ( - "github.com/OpenIMSDK/Open-IM-Server/pkg/a2r" - "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/group" "github.com/OpenIMSDK/Open-IM-Server/pkg/rpcclient" + "github.com/OpenIMSDK/protocol/group" + "github.com/OpenIMSDK/tools/a2r" "github.com/gin-gonic/gin" ) diff --git a/internal/api/msg.go b/internal/api/msg.go index 41ab4dc48..d79be716b 100644 --- a/internal/api/msg.go +++ b/internal/api/msg.go @@ -20,17 +20,17 @@ import ( "github.com/mitchellh/mapstructure" "google.golang.org/protobuf/proto" - "github.com/OpenIMSDK/Open-IM-Server/pkg/a2r" - "github.com/OpenIMSDK/Open-IM-Server/pkg/apiresp" "github.com/OpenIMSDK/Open-IM-Server/pkg/apistruct" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/constant" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/log" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/tokenverify" - "github.com/OpenIMSDK/Open-IM-Server/pkg/errs" - "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/msg" - "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/sdkws" "github.com/OpenIMSDK/Open-IM-Server/pkg/rpcclient" - "github.com/OpenIMSDK/Open-IM-Server/pkg/utils" + "github.com/OpenIMSDK/protocol/msg" + "github.com/OpenIMSDK/protocol/sdkws" + "github.com/OpenIMSDK/tools/a2r" + "github.com/OpenIMSDK/tools/apiresp" + "github.com/OpenIMSDK/tools/constant" + "github.com/OpenIMSDK/tools/errs" + "github.com/OpenIMSDK/tools/log" + "github.com/OpenIMSDK/tools/tokenverify" + "github.com/OpenIMSDK/tools/utils" ) type MessageApi struct { diff --git a/internal/api/route.go b/internal/api/route.go index 2dfb9f6c4..453224263 100644 --- a/internal/api/route.go +++ b/internal/api/route.go @@ -16,6 +16,13 @@ package api import ( "context" + "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/cache" + "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/controller" + "github.com/OpenIMSDK/tools/apiresp" + "github.com/OpenIMSDK/tools/constant" + "github.com/OpenIMSDK/tools/errs" + "github.com/OpenIMSDK/tools/tokenverify" + "net/http" "github.com/gin-gonic/gin" "github.com/gin-gonic/gin/binding" @@ -24,12 +31,12 @@ import ( "google.golang.org/grpc" "google.golang.org/grpc/credentials/insecure" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/config" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/log" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/mw" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/prome" - "github.com/OpenIMSDK/Open-IM-Server/pkg/discoveryregistry" "github.com/OpenIMSDK/Open-IM-Server/pkg/rpcclient" + "github.com/OpenIMSDK/tools/config" + "github.com/OpenIMSDK/tools/discoveryregistry" + "github.com/OpenIMSDK/tools/log" + "github.com/OpenIMSDK/tools/mw" ) func NewGinRouter(discov discoveryregistry.SvcDiscoveryRegistry, rdb redis.UniversalClient) *gin.Engine { @@ -59,7 +66,7 @@ func NewGinRouter(discov discoveryregistry.SvcDiscoveryRegistry, rdb redis.Unive r.Use(prome.PrometheusMiddleware) r.GET("/metrics", prome.PrometheusHandler()) } - ParseToken := mw.GinParseToken(rdb) + ParseToken := GinParseToken(rdb) userRouterGroup := r.Group("/user") { userRouterGroup.POST("/user_register", u.UserRegister) @@ -186,3 +193,65 @@ func NewGinRouter(discov discoveryregistry.SvcDiscoveryRegistry, rdb redis.Unive } return r } + +func GinParseToken(rdb redis.UniversalClient) gin.HandlerFunc { + dataBase := controller.NewAuthDatabase( + cache.NewMsgCacheModel(rdb), + config.Config.Secret, + config.Config.TokenPolicy.Expire, + ) + return func(c *gin.Context) { + switch c.Request.Method { + case http.MethodPost: + token := c.Request.Header.Get(constant.Token) + if token == "" { + log.ZWarn(c, "header get token error", errs.ErrArgs.Wrap("header must have token")) + apiresp.GinError(c, errs.ErrArgs.Wrap("header must have token")) + c.Abort() + return + } + claims, err := tokenverify.GetClaimFromToken(token) + if err != nil { + log.ZWarn(c, "jwt get token error", errs.ErrTokenUnknown.Wrap()) + apiresp.GinError(c, errs.ErrTokenUnknown.Wrap()) + c.Abort() + return + } + m, err := dataBase.GetTokensWithoutError(c, claims.UserID, claims.PlatformID) + if err != nil { + log.ZWarn(c, "cache get token error", errs.ErrTokenNotExist.Wrap()) + apiresp.GinError(c, errs.ErrTokenNotExist.Wrap()) + c.Abort() + return + } + if len(m) == 0 { + log.ZWarn(c, "cache do not exist token error", errs.ErrTokenNotExist.Wrap()) + apiresp.GinError(c, errs.ErrTokenNotExist.Wrap()) + c.Abort() + return + } + if v, ok := m[token]; ok { + switch v { + case constant.NormalToken: + case constant.KickedToken: + log.ZWarn(c, "cache kicked token error", errs.ErrTokenKicked.Wrap()) + apiresp.GinError(c, errs.ErrTokenKicked.Wrap()) + c.Abort() + return + default: + log.ZWarn(c, "cache unknown token error", errs.ErrTokenUnknown.Wrap()) + apiresp.GinError(c, errs.ErrTokenUnknown.Wrap()) + c.Abort() + return + } + } else { + apiresp.GinError(c, errs.ErrTokenNotExist.Wrap()) + c.Abort() + return + } + c.Set(constant.OpUserPlatform, constant.PlatformIDToName(claims.PlatformID)) + c.Set(constant.OpUserID, claims.UserID) + c.Next() + } + } +} diff --git a/internal/api/statistics.go b/internal/api/statistics.go index dd8d01799..f267a0ec1 100644 --- a/internal/api/statistics.go +++ b/internal/api/statistics.go @@ -17,9 +17,9 @@ package api import ( "github.com/gin-gonic/gin" - "github.com/OpenIMSDK/Open-IM-Server/pkg/a2r" - "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/user" "github.com/OpenIMSDK/Open-IM-Server/pkg/rpcclient" + "github.com/OpenIMSDK/protocol/user" + "github.com/OpenIMSDK/tools/a2r" ) type StatisticsApi rpcclient.User diff --git a/internal/api/third.go b/internal/api/third.go index 5bd38a5e8..e480d4c11 100644 --- a/internal/api/third.go +++ b/internal/api/third.go @@ -15,17 +15,16 @@ package api import ( + "github.com/gin-gonic/gin" "math/rand" "net/http" "strconv" - "github.com/gin-gonic/gin" - - "github.com/OpenIMSDK/Open-IM-Server/pkg/a2r" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/mcontext" - "github.com/OpenIMSDK/Open-IM-Server/pkg/errs" - "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/third" "github.com/OpenIMSDK/Open-IM-Server/pkg/rpcclient" + "github.com/OpenIMSDK/protocol/third" + "github.com/OpenIMSDK/tools/a2r" + "github.com/OpenIMSDK/tools/errs" + "github.com/OpenIMSDK/tools/mcontext" ) type ThirdApi rpcclient.Third diff --git a/internal/api/user.go b/internal/api/user.go index 67c042ea4..c7bcf7862 100644 --- a/internal/api/user.go +++ b/internal/api/user.go @@ -17,15 +17,15 @@ package api import ( "github.com/gin-gonic/gin" - "github.com/OpenIMSDK/Open-IM-Server/pkg/a2r" - "github.com/OpenIMSDK/Open-IM-Server/pkg/apiresp" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/config" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/constant" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/log" - "github.com/OpenIMSDK/Open-IM-Server/pkg/errs" - "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/msggateway" - "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/user" "github.com/OpenIMSDK/Open-IM-Server/pkg/rpcclient" + "github.com/OpenIMSDK/protocol/msggateway" + "github.com/OpenIMSDK/protocol/user" + "github.com/OpenIMSDK/tools/a2r" + "github.com/OpenIMSDK/tools/apiresp" + "github.com/OpenIMSDK/tools/config" + "github.com/OpenIMSDK/tools/constant" + "github.com/OpenIMSDK/tools/errs" + "github.com/OpenIMSDK/tools/log" ) type UserApi rpcclient.User diff --git a/internal/msggateway/callback.go b/internal/msggateway/callback.go index d705e25f0..530c18102 100644 --- a/internal/msggateway/callback.go +++ b/internal/msggateway/callback.go @@ -19,10 +19,10 @@ import ( "time" cbapi "github.com/OpenIMSDK/Open-IM-Server/pkg/callbackstruct" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/config" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/constant" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/http" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/mcontext" + "github.com/OpenIMSDK/tools/config" + "github.com/OpenIMSDK/tools/constant" + "github.com/OpenIMSDK/tools/mcontext" ) func url() string { diff --git a/internal/msggateway/client.go b/internal/msggateway/client.go index 03e37fcc6..bc5fa1511 100644 --- a/internal/msggateway/client.go +++ b/internal/msggateway/client.go @@ -23,12 +23,12 @@ import ( "google.golang.org/protobuf/proto" - "github.com/OpenIMSDK/Open-IM-Server/pkg/apiresp" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/constant" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/log" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/mcontext" - "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/sdkws" - "github.com/OpenIMSDK/Open-IM-Server/pkg/utils" + "github.com/OpenIMSDK/protocol/sdkws" + "github.com/OpenIMSDK/tools/apiresp" + "github.com/OpenIMSDK/tools/constant" + "github.com/OpenIMSDK/tools/log" + "github.com/OpenIMSDK/tools/mcontext" + "github.com/OpenIMSDK/tools/utils" ) var ( diff --git a/internal/msggateway/compressor.go b/internal/msggateway/compressor.go index 99b827454..0639fb4f0 100644 --- a/internal/msggateway/compressor.go +++ b/internal/msggateway/compressor.go @@ -19,7 +19,7 @@ import ( "compress/gzip" "io" - "github.com/OpenIMSDK/Open-IM-Server/pkg/utils" + "github.com/OpenIMSDK/tools/utils" ) type Compressor interface { diff --git a/internal/msggateway/context.go b/internal/msggateway/context.go index e1d066467..672ba1dbe 100644 --- a/internal/msggateway/context.go +++ b/internal/msggateway/context.go @@ -19,8 +19,8 @@ import ( "strconv" "time" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/constant" - "github.com/OpenIMSDK/Open-IM-Server/pkg/utils" + "github.com/OpenIMSDK/tools/constant" + "github.com/OpenIMSDK/tools/utils" ) type UserConnContext struct { diff --git a/internal/msggateway/encoder.go b/internal/msggateway/encoder.go index 41ab02d0c..9791acb39 100644 --- a/internal/msggateway/encoder.go +++ b/internal/msggateway/encoder.go @@ -18,7 +18,7 @@ import ( "bytes" "encoding/gob" - "github.com/OpenIMSDK/Open-IM-Server/pkg/utils" + "github.com/OpenIMSDK/tools/utils" ) type Encoder interface { diff --git a/internal/msggateway/http_error.go b/internal/msggateway/http_error.go index 03121aba3..03881cf27 100644 --- a/internal/msggateway/http_error.go +++ b/internal/msggateway/http_error.go @@ -14,7 +14,7 @@ package msggateway -import "github.com/OpenIMSDK/Open-IM-Server/pkg/apiresp" +import "github.com/OpenIMSDK/tools/apiresp" func httpError(ctx *UserConnContext, err error) { apiresp.HttpError(ctx.RespWriter, err) diff --git a/internal/msggateway/hub_server.go b/internal/msggateway/hub_server.go index 4e1586969..dc440a7c8 100644 --- a/internal/msggateway/hub_server.go +++ b/internal/msggateway/hub_server.go @@ -18,19 +18,19 @@ import ( "context" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/cache" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/tokenverify" - "github.com/OpenIMSDK/Open-IM-Server/pkg/errs" + "github.com/OpenIMSDK/tools/errs" + "github.com/OpenIMSDK/tools/tokenverify" "google.golang.org/grpc" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/config" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/constant" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/log" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/prome" - "github.com/OpenIMSDK/Open-IM-Server/pkg/discoveryregistry" - "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/msggateway" - "github.com/OpenIMSDK/Open-IM-Server/pkg/startrpc" - "github.com/OpenIMSDK/Open-IM-Server/pkg/utils" + "github.com/OpenIMSDK/protocol/msggateway" + "github.com/OpenIMSDK/tools/config" + "github.com/OpenIMSDK/tools/constant" + "github.com/OpenIMSDK/tools/discoveryregistry" + "github.com/OpenIMSDK/tools/log" + "github.com/OpenIMSDK/tools/startrpc" + "github.com/OpenIMSDK/tools/utils" ) func (s *Server) InitServer(client discoveryregistry.SvcDiscoveryRegistry, server *grpc.Server) error { diff --git a/internal/msggateway/init.go b/internal/msggateway/init.go index 3ec2a56ac..b6d4d3b58 100644 --- a/internal/msggateway/init.go +++ b/internal/msggateway/init.go @@ -18,7 +18,7 @@ import ( "fmt" "time" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/config" + "github.com/OpenIMSDK/tools/config" ) func RunWsAndServer(rpcPort, wsPort, prometheusPort int) error { diff --git a/internal/msggateway/message_handler.go b/internal/msggateway/message_handler.go index bc650aae6..8e3512238 100644 --- a/internal/msggateway/message_handler.go +++ b/internal/msggateway/message_handler.go @@ -17,16 +17,16 @@ package msggateway import ( "context" - "github.com/OpenIMSDK/Open-IM-Server/pkg/discoveryregistry" - "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/push" + "github.com/OpenIMSDK/protocol/push" + "github.com/OpenIMSDK/tools/discoveryregistry" "github.com/go-playground/validator/v10" "google.golang.org/protobuf/proto" - "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/msg" - "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/sdkws" "github.com/OpenIMSDK/Open-IM-Server/pkg/rpcclient" - "github.com/OpenIMSDK/Open-IM-Server/pkg/utils" + "github.com/OpenIMSDK/protocol/msg" + "github.com/OpenIMSDK/protocol/sdkws" + "github.com/OpenIMSDK/tools/utils" ) type Req struct { diff --git a/internal/msggateway/n_ws_server.go b/internal/msggateway/n_ws_server.go index c2b46cf1f..9715f21b6 100644 --- a/internal/msggateway/n_ws_server.go +++ b/internal/msggateway/n_ws_server.go @@ -23,20 +23,20 @@ import ( "sync/atomic" "time" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/config" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/constant" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/cache" + "github.com/OpenIMSDK/tools/config" + "github.com/OpenIMSDK/tools/constant" "github.com/redis/go-redis/v9" - "github.com/OpenIMSDK/Open-IM-Server/pkg/discoveryregistry" + "github.com/OpenIMSDK/tools/discoveryregistry" "github.com/go-playground/validator/v10" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/log" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/tokenverify" - "github.com/OpenIMSDK/Open-IM-Server/pkg/errs" - "github.com/OpenIMSDK/Open-IM-Server/pkg/utils" + "github.com/OpenIMSDK/tools/errs" + "github.com/OpenIMSDK/tools/log" + "github.com/OpenIMSDK/tools/tokenverify" + "github.com/OpenIMSDK/tools/utils" ) type LongConnServer interface { diff --git a/internal/msggateway/user_map.go b/internal/msggateway/user_map.go index 7e62557b2..052d7de2d 100644 --- a/internal/msggateway/user_map.go +++ b/internal/msggateway/user_map.go @@ -18,8 +18,8 @@ import ( "context" "sync" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/log" - "github.com/OpenIMSDK/Open-IM-Server/pkg/utils" + "github.com/OpenIMSDK/tools/log" + "github.com/OpenIMSDK/tools/utils" ) type UserMap struct { diff --git a/internal/msgtransfer/init.go b/internal/msgtransfer/init.go index 61e154655..037564f7a 100644 --- a/internal/msgtransfer/init.go +++ b/internal/msgtransfer/init.go @@ -22,17 +22,17 @@ import ( "google.golang.org/grpc" "google.golang.org/grpc/credentials/insecure" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/config" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/cache" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/controller" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/relation" relationTb "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/table/relation" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/unrelation" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/log" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/mw" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/prome" - openKeeper "github.com/OpenIMSDK/Open-IM-Server/pkg/discoveryregistry/zookeeper" "github.com/OpenIMSDK/Open-IM-Server/pkg/rpcclient" + "github.com/OpenIMSDK/tools/config" + openKeeper "github.com/OpenIMSDK/tools/discoveryregistry/zookeeper" + "github.com/OpenIMSDK/tools/log" + "github.com/OpenIMSDK/tools/mw" ) type MsgTransfer struct { @@ -67,7 +67,7 @@ func StartTransfer(prometheusPort int) error { if err != nil { return err } - if client.CreateRpcRootNodes(config.GetServiceNames()); err != nil { + if err := client.CreateRpcRootNodes(config.Config.GetServiceNames()); err != nil { return err } client.AddOption(mw.GrpcClient(), grpc.WithTransportCredentials(insecure.NewCredentials())) diff --git a/internal/msgtransfer/online_history_msg_handler.go b/internal/msgtransfer/online_history_msg_handler.go index 2a6f69f1a..19121334a 100644 --- a/internal/msgtransfer/online_history_msg_handler.go +++ b/internal/msgtransfer/online_history_msg_handler.go @@ -21,21 +21,21 @@ import ( "sync" "time" - "github.com/OpenIMSDK/Open-IM-Server/pkg/errs" + "github.com/OpenIMSDK/tools/errs" "github.com/Shopify/sarama" "github.com/go-redis/redis" "google.golang.org/protobuf/proto" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/config" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/constant" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/controller" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/kafka" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/log" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/mcontext" - "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/sdkws" "github.com/OpenIMSDK/Open-IM-Server/pkg/rpcclient" - "github.com/OpenIMSDK/Open-IM-Server/pkg/utils" + "github.com/OpenIMSDK/protocol/sdkws" + "github.com/OpenIMSDK/tools/config" + "github.com/OpenIMSDK/tools/constant" + "github.com/OpenIMSDK/tools/log" + "github.com/OpenIMSDK/tools/mcontext" + "github.com/OpenIMSDK/tools/utils" ) const ( diff --git a/internal/msgtransfer/online_msg_to_mongo_handler.go b/internal/msgtransfer/online_msg_to_mongo_handler.go index f2f14f0ed..9ba4cb7b9 100644 --- a/internal/msgtransfer/online_msg_to_mongo_handler.go +++ b/internal/msgtransfer/online_msg_to_mongo_handler.go @@ -20,11 +20,11 @@ import ( "github.com/Shopify/sarama" "google.golang.org/protobuf/proto" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/config" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/controller" kfk "github.com/OpenIMSDK/Open-IM-Server/pkg/common/kafka" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/log" - pbMsg "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/msg" + pbMsg "github.com/OpenIMSDK/protocol/msg" + "github.com/OpenIMSDK/tools/config" + "github.com/OpenIMSDK/tools/log" ) type OnlineHistoryMongoConsumerHandler struct { diff --git a/internal/msgtransfer/persistent_msg_handler.go b/internal/msgtransfer/persistent_msg_handler.go index debc4905f..7256a3442 100644 --- a/internal/msgtransfer/persistent_msg_handler.go +++ b/internal/msgtransfer/persistent_msg_handler.go @@ -17,13 +17,13 @@ package msgtransfer import ( "context" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/config" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/constant" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/controller" kfk "github.com/OpenIMSDK/Open-IM-Server/pkg/common/kafka" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/log" - pbMsg "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/msg" - "github.com/OpenIMSDK/Open-IM-Server/pkg/utils" + pbMsg "github.com/OpenIMSDK/protocol/msg" + "github.com/OpenIMSDK/tools/config" + "github.com/OpenIMSDK/tools/constant" + "github.com/OpenIMSDK/tools/log" + "github.com/OpenIMSDK/tools/utils" "github.com/Shopify/sarama" "google.golang.org/protobuf/proto" diff --git a/internal/push/callback.go b/internal/push/callback.go index a3387905e..bbc392a6e 100644 --- a/internal/push/callback.go +++ b/internal/push/callback.go @@ -18,13 +18,13 @@ import ( "context" "github.com/OpenIMSDK/Open-IM-Server/pkg/callbackstruct" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/config" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/constant" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/http" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/mcontext" - "github.com/OpenIMSDK/Open-IM-Server/pkg/errs" - "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/sdkws" - "github.com/OpenIMSDK/Open-IM-Server/pkg/utils" + "github.com/OpenIMSDK/protocol/sdkws" + "github.com/OpenIMSDK/tools/config" + "github.com/OpenIMSDK/tools/constant" + "github.com/OpenIMSDK/tools/errs" + "github.com/OpenIMSDK/tools/mcontext" + "github.com/OpenIMSDK/tools/utils" ) func url() string { @@ -57,7 +57,7 @@ func callbackOfflinePush( ContentType: msg.ContentType, SessionType: msg.SessionType, AtUserIDs: msg.AtUserIDList, - Content: utils.GetContent(msg), + Content: GetContent(msg), } resp := &callbackstruct.CallbackBeforePushResp{} if err := http.CallBackPostReturn(ctx, url(), req, resp, config.Config.Callback.CallbackOfflinePush); err != nil { @@ -95,7 +95,7 @@ func callbackOnlinePush(ctx context.Context, userIDs []string, msg *sdkws.MsgDat ContentType: msg.ContentType, SessionType: msg.SessionType, AtUserIDs: msg.AtUserIDList, - Content: utils.GetContent(msg), + Content: GetContent(msg), } resp := &callbackstruct.CallbackBeforePushResp{} return http.CallBackPostReturn(ctx, url(), req, resp, config.Config.Callback.CallbackOnlinePush) @@ -123,7 +123,7 @@ func callbackBeforeSuperGroupOnlinePush( ContentType: msg.ContentType, SessionType: msg.SessionType, AtUserIDs: msg.AtUserIDList, - Content: utils.GetContent(msg), + Content: GetContent(msg), Seq: msg.Seq, } resp := &callbackstruct.CallbackBeforeSuperGroupOnlinePushResp{} diff --git a/internal/push/offlinepush/fcm/push.go b/internal/push/offlinepush/fcm/push.go index a5294961d..8f29f0258 100644 --- a/internal/push/offlinepush/fcm/push.go +++ b/internal/push/offlinepush/fcm/push.go @@ -16,6 +16,7 @@ package fcm import ( "context" + config2 "github.com/OpenIMSDK/Open-IM-Server/pkg/common/config" "path/filepath" firebase "firebase.google.com/go" @@ -24,9 +25,9 @@ import ( "google.golang.org/api/option" "github.com/OpenIMSDK/Open-IM-Server/internal/push/offlinepush" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/config" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/constant" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/cache" + "github.com/OpenIMSDK/tools/config" + "github.com/OpenIMSDK/tools/constant" ) const SinglePushCountLimit = 400 @@ -39,7 +40,7 @@ type Fcm struct { } func NewClient(cache cache.MsgModel) *Fcm { - opt := option.WithCredentialsFile(filepath.Join(config.Root, "config", config.Config.Push.Fcm.ServiceAccount)) + opt := option.WithCredentialsFile(filepath.Join(config2.Root, "config", config.Config.Push.Fcm.ServiceAccount)) fcmApp, err := firebase.NewApp(context.Background(), nil, opt) if err != nil { return nil diff --git a/internal/push/offlinepush/getui/body.go b/internal/push/offlinepush/getui/body.go index 915c6f603..43fcc84cc 100644 --- a/internal/push/offlinepush/getui/body.go +++ b/internal/push/offlinepush/getui/body.go @@ -17,7 +17,7 @@ package getui import ( "fmt" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/config" + "github.com/OpenIMSDK/tools/config" ) type Resp struct { diff --git a/internal/push/offlinepush/getui/push.go b/internal/push/offlinepush/getui/push.go index ada5ac8b6..b440ef71b 100644 --- a/internal/push/offlinepush/getui/push.go +++ b/internal/push/offlinepush/getui/push.go @@ -26,15 +26,15 @@ import ( "github.com/go-redis/redis" "github.com/OpenIMSDK/Open-IM-Server/internal/push/offlinepush" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/config" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/cache" http2 "github.com/OpenIMSDK/Open-IM-Server/pkg/common/http" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/log" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/mcontext" - "github.com/OpenIMSDK/Open-IM-Server/pkg/errs" - "github.com/OpenIMSDK/Open-IM-Server/pkg/utils/splitter" + "github.com/OpenIMSDK/tools/config" + "github.com/OpenIMSDK/tools/errs" + "github.com/OpenIMSDK/tools/log" + "github.com/OpenIMSDK/tools/mcontext" + "github.com/OpenIMSDK/tools/utils/splitter" - "github.com/OpenIMSDK/Open-IM-Server/pkg/utils" + "github.com/OpenIMSDK/tools/utils" ) var ( diff --git a/internal/push/offlinepush/jpush/body/notification.go b/internal/push/offlinepush/jpush/body/notification.go index cec725784..85581cb1f 100644 --- a/internal/push/offlinepush/jpush/body/notification.go +++ b/internal/push/offlinepush/jpush/body/notification.go @@ -15,7 +15,7 @@ package body import ( - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/config" + "github.com/OpenIMSDK/tools/config" ) type Notification struct { diff --git a/internal/push/offlinepush/jpush/body/platform.go b/internal/push/offlinepush/jpush/body/platform.go index a4bc1526c..c779c8bdc 100644 --- a/internal/push/offlinepush/jpush/body/platform.go +++ b/internal/push/offlinepush/jpush/body/platform.go @@ -17,7 +17,7 @@ package body import ( "errors" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/constant" + "github.com/OpenIMSDK/tools/constant" ) const ( diff --git a/internal/push/offlinepush/jpush/push.go b/internal/push/offlinepush/jpush/push.go index 64933db50..d661daee9 100644 --- a/internal/push/offlinepush/jpush/push.go +++ b/internal/push/offlinepush/jpush/push.go @@ -21,8 +21,8 @@ import ( "github.com/OpenIMSDK/Open-IM-Server/internal/push/offlinepush" "github.com/OpenIMSDK/Open-IM-Server/internal/push/offlinepush/jpush/body" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/config" http2 "github.com/OpenIMSDK/Open-IM-Server/pkg/common/http" + "github.com/OpenIMSDK/tools/config" ) type JPush struct{} diff --git a/internal/push/push_handler.go b/internal/push/push_handler.go index 0822c3505..f0a67faac 100644 --- a/internal/push/push_handler.go +++ b/internal/push/push_handler.go @@ -20,13 +20,13 @@ import ( "github.com/Shopify/sarama" "google.golang.org/protobuf/proto" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/config" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/constant" kfk "github.com/OpenIMSDK/Open-IM-Server/pkg/common/kafka" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/log" - pbChat "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/msg" - pbPush "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/push" - "github.com/OpenIMSDK/Open-IM-Server/pkg/utils" + pbChat "github.com/OpenIMSDK/protocol/msg" + pbPush "github.com/OpenIMSDK/protocol/push" + "github.com/OpenIMSDK/tools/config" + "github.com/OpenIMSDK/tools/constant" + "github.com/OpenIMSDK/tools/log" + "github.com/OpenIMSDK/tools/utils" ) type ConsumerHandler struct { diff --git a/internal/push/push_rpc_server.go b/internal/push/push_rpc_server.go index 1b84a1b82..dfcf07469 100644 --- a/internal/push/push_rpc_server.go +++ b/internal/push/push_rpc_server.go @@ -20,14 +20,14 @@ import ( "google.golang.org/grpc" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/constant" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/cache" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/controller" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/localcache" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/log" - "github.com/OpenIMSDK/Open-IM-Server/pkg/discoveryregistry" - pbPush "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/push" "github.com/OpenIMSDK/Open-IM-Server/pkg/rpcclient" + pbPush "github.com/OpenIMSDK/protocol/push" + "github.com/OpenIMSDK/tools/constant" + "github.com/OpenIMSDK/tools/discoveryregistry" + "github.com/OpenIMSDK/tools/log" ) type pushServer struct { diff --git a/internal/push/push_to_client.go b/internal/push/push_to_client.go index 0583b453d..de6b78782 100644 --- a/internal/push/push_to_client.go +++ b/internal/push/push_to_client.go @@ -23,19 +23,19 @@ import ( "github.com/OpenIMSDK/Open-IM-Server/internal/push/offlinepush/fcm" "github.com/OpenIMSDK/Open-IM-Server/internal/push/offlinepush/getui" "github.com/OpenIMSDK/Open-IM-Server/internal/push/offlinepush/jpush" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/config" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/constant" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/cache" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/controller" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/localcache" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/log" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/mcontext" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/prome" - "github.com/OpenIMSDK/Open-IM-Server/pkg/discoveryregistry" - "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/msggateway" - "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/sdkws" "github.com/OpenIMSDK/Open-IM-Server/pkg/rpcclient" - "github.com/OpenIMSDK/Open-IM-Server/pkg/utils" + "github.com/OpenIMSDK/protocol/msggateway" + "github.com/OpenIMSDK/protocol/sdkws" + "github.com/OpenIMSDK/tools/config" + "github.com/OpenIMSDK/tools/constant" + "github.com/OpenIMSDK/tools/discoveryregistry" + "github.com/OpenIMSDK/tools/log" + "github.com/OpenIMSDK/tools/mcontext" + "github.com/OpenIMSDK/tools/utils" ) type Pusher struct { diff --git a/internal/push/tools.go b/internal/push/tools.go new file mode 100644 index 000000000..ea8d160b1 --- /dev/null +++ b/internal/push/tools.go @@ -0,0 +1,18 @@ +package push + +import ( + "github.com/OpenIMSDK/protocol/sdkws" + "github.com/OpenIMSDK/tools/constant" + "google.golang.org/protobuf/proto" +) + +func GetContent(msg *sdkws.MsgData) string { + if msg.ContentType >= constant.NotificationBegin && msg.ContentType <= constant.NotificationEnd { + var tips sdkws.TipsComm + _ = proto.Unmarshal(msg.Content, &tips) + content := tips.JsonDetail + return content + } else { + return string(msg.Content) + } +} diff --git a/internal/rpc/auth/auth.go b/internal/rpc/auth/auth.go index 317754743..48e4e5922 100644 --- a/internal/rpc/auth/auth.go +++ b/internal/rpc/auth/auth.go @@ -19,19 +19,19 @@ import ( "google.golang.org/grpc" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/config" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/constant" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/cache" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/controller" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/log" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/mcontext" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/tokenverify" - "github.com/OpenIMSDK/Open-IM-Server/pkg/discoveryregistry" - "github.com/OpenIMSDK/Open-IM-Server/pkg/errs" - pbAuth "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/auth" - "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/msggateway" "github.com/OpenIMSDK/Open-IM-Server/pkg/rpcclient" - "github.com/OpenIMSDK/Open-IM-Server/pkg/utils" + pbAuth "github.com/OpenIMSDK/protocol/auth" + "github.com/OpenIMSDK/protocol/msggateway" + "github.com/OpenIMSDK/tools/config" + "github.com/OpenIMSDK/tools/constant" + "github.com/OpenIMSDK/tools/discoveryregistry" + "github.com/OpenIMSDK/tools/errs" + "github.com/OpenIMSDK/tools/log" + "github.com/OpenIMSDK/tools/mcontext" + "github.com/OpenIMSDK/tools/tokenverify" + "github.com/OpenIMSDK/tools/utils" ) type authServer struct { diff --git a/internal/rpc/conversation/conversaion.go b/internal/rpc/conversation/conversaion.go index f3745ace1..e27756749 100644 --- a/internal/rpc/conversation/conversaion.go +++ b/internal/rpc/conversation/conversaion.go @@ -19,20 +19,20 @@ import ( "google.golang.org/grpc" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/constant" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/convert" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/cache" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/controller" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/relation" tableRelation "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/table/relation" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/tx" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/log" - "github.com/OpenIMSDK/Open-IM-Server/pkg/discoveryregistry" - "github.com/OpenIMSDK/Open-IM-Server/pkg/errs" - pbConversation "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/conversation" "github.com/OpenIMSDK/Open-IM-Server/pkg/rpcclient" "github.com/OpenIMSDK/Open-IM-Server/pkg/rpcclient/notification" - "github.com/OpenIMSDK/Open-IM-Server/pkg/utils" + pbConversation "github.com/OpenIMSDK/protocol/conversation" + "github.com/OpenIMSDK/tools/constant" + "github.com/OpenIMSDK/tools/discoveryregistry" + "github.com/OpenIMSDK/tools/errs" + "github.com/OpenIMSDK/tools/log" + "github.com/OpenIMSDK/tools/tx" + "github.com/OpenIMSDK/tools/utils" ) type conversationServer struct { diff --git a/internal/rpc/friend/black.go b/internal/rpc/friend/black.go index 23aa8efa3..6f7ed58dd 100644 --- a/internal/rpc/friend/black.go +++ b/internal/rpc/friend/black.go @@ -20,9 +20,9 @@ import ( "github.com/OpenIMSDK/Open-IM-Server/pkg/common/convert" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/table/relation" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/mcontext" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/tokenverify" - pbFriend "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/friend" + pbFriend "github.com/OpenIMSDK/protocol/friend" + "github.com/OpenIMSDK/tools/mcontext" + "github.com/OpenIMSDK/tools/tokenverify" ) func (s *friendServer) GetPaginationBlacks( diff --git a/internal/rpc/friend/callback.go b/internal/rpc/friend/callback.go index 478988f11..d3a793a6f 100644 --- a/internal/rpc/friend/callback.go +++ b/internal/rpc/friend/callback.go @@ -18,12 +18,12 @@ import ( "context" cbapi "github.com/OpenIMSDK/Open-IM-Server/pkg/callbackstruct" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/config" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/constant" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/http" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/mcontext" - "github.com/OpenIMSDK/Open-IM-Server/pkg/errs" - pbfriend "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/friend" + pbfriend "github.com/OpenIMSDK/protocol/friend" + "github.com/OpenIMSDK/tools/config" + "github.com/OpenIMSDK/tools/constant" + "github.com/OpenIMSDK/tools/errs" + "github.com/OpenIMSDK/tools/mcontext" ) func CallbackBeforeAddFriend(ctx context.Context, req *pbfriend.ApplyToAddFriendReq) error { diff --git a/internal/rpc/friend/friend.go b/internal/rpc/friend/friend.go index f511305a4..5792fdb38 100644 --- a/internal/rpc/friend/friend.go +++ b/internal/rpc/friend/friend.go @@ -18,23 +18,23 @@ import ( "context" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/convert" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/log" "github.com/OpenIMSDK/Open-IM-Server/pkg/rpcclient" + "github.com/OpenIMSDK/tools/log" "google.golang.org/grpc" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/constant" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/cache" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/controller" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/relation" tablerelation "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/table/relation" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/tx" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/tokenverify" - registry "github.com/OpenIMSDK/Open-IM-Server/pkg/discoveryregistry" - "github.com/OpenIMSDK/Open-IM-Server/pkg/errs" - pbfriend "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/friend" "github.com/OpenIMSDK/Open-IM-Server/pkg/rpcclient/notification" - "github.com/OpenIMSDK/Open-IM-Server/pkg/utils" + pbfriend "github.com/OpenIMSDK/protocol/friend" + "github.com/OpenIMSDK/tools/constant" + registry "github.com/OpenIMSDK/tools/discoveryregistry" + "github.com/OpenIMSDK/tools/errs" + "github.com/OpenIMSDK/tools/tokenverify" + "github.com/OpenIMSDK/tools/tx" + "github.com/OpenIMSDK/tools/utils" ) type friendServer struct { @@ -83,6 +83,11 @@ func Start(client registry.SvcDiscoveryRegistry, server *grpc.Server) error { return nil } +func (s *friendServer) GetDesignatedFriendsApply(ctx context.Context, req *pbfriend.GetDesignatedFriendsApplyReq) (*pbfriend.GetDesignatedFriendsApplyResp, error) { + //TODO implement me + panic("implement me") +} + // ok. func (s *friendServer) ApplyToAddFriend( ctx context.Context, @@ -249,8 +254,7 @@ func (s *friendServer) GetPaginationFriendsApplyTo( if err := s.userRpcClient.Access(ctx, req.UserID); err != nil { return nil, err } - pageNumber, showNumber := utils.GetPage(req.Pagination) - friendRequests, total, err := s.friendDatabase.PageFriendRequestToMe(ctx, req.UserID, pageNumber, showNumber) + friendRequests, total, err := s.friendDatabase.PageFriendRequestToMe(ctx, req.UserID, req.Pagination.PageNumber, req.Pagination.ShowNumber) if err != nil { return nil, err } @@ -273,8 +277,7 @@ func (s *friendServer) GetPaginationFriendsApplyFrom( if err := s.userRpcClient.Access(ctx, req.UserID); err != nil { return nil, err } - pageNumber, showNumber := utils.GetPage(req.Pagination) - friendRequests, total, err := s.friendDatabase.PageFriendRequestFromMe(ctx, req.UserID, pageNumber, showNumber) + friendRequests, total, err := s.friendDatabase.PageFriendRequestFromMe(ctx, req.UserID, req.Pagination.PageNumber, req.Pagination.ShowNumber) if err != nil { return nil, err } @@ -309,8 +312,7 @@ func (s *friendServer) GetPaginationFriends( if err := s.userRpcClient.Access(ctx, req.UserID); err != nil { return nil, err } - pageNumber, showNumber := utils.GetPage(req.Pagination) - friends, total, err := s.friendDatabase.PageOwnerFriends(ctx, req.UserID, pageNumber, showNumber) + friends, total, err := s.friendDatabase.PageOwnerFriends(ctx, req.UserID, req.Pagination.PageNumber, req.Pagination.ShowNumber) if err != nil { return nil, err } diff --git a/internal/rpc/group/cache.go b/internal/rpc/group/cache.go index 3c71eb2a9..6275292b6 100644 --- a/internal/rpc/group/cache.go +++ b/internal/rpc/group/cache.go @@ -18,7 +18,7 @@ import ( "context" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/convert" - pbGroup "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/group" + pbGroup "github.com/OpenIMSDK/protocol/group" ) func (s *groupServer) GetGroupInfoCache( diff --git a/internal/rpc/group/callback.go b/internal/rpc/group/callback.go index acab0ea0d..2f85a6674 100644 --- a/internal/rpc/group/callback.go +++ b/internal/rpc/group/callback.go @@ -20,15 +20,15 @@ import ( "github.com/OpenIMSDK/Open-IM-Server/pkg/apistruct" "github.com/OpenIMSDK/Open-IM-Server/pkg/callbackstruct" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/config" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/constant" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/table/relation" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/http" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/mcontext" - "github.com/OpenIMSDK/Open-IM-Server/pkg/errs" - "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/group" - "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/wrapperspb" - "github.com/OpenIMSDK/Open-IM-Server/pkg/utils" + "github.com/OpenIMSDK/protocol/group" + "github.com/OpenIMSDK/protocol/wrapperspb" + "github.com/OpenIMSDK/tools/config" + "github.com/OpenIMSDK/tools/constant" + "github.com/OpenIMSDK/tools/errs" + "github.com/OpenIMSDK/tools/mcontext" + "github.com/OpenIMSDK/tools/utils" ) func CallbackBeforeCreateGroup(ctx context.Context, req *group.CreateGroupReq) (err error) { diff --git a/internal/rpc/group/convert.go b/internal/rpc/group/convert.go index c0a03aa4e..22dbfda5f 100644 --- a/internal/rpc/group/convert.go +++ b/internal/rpc/group/convert.go @@ -16,7 +16,7 @@ package group import ( "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/table/relation" - "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/sdkws" + "github.com/OpenIMSDK/protocol/sdkws" ) func (s *groupServer) groupDB2PB(group *relation.GroupModel, ownerUserID string, memberCount uint32) *sdkws.GroupInfo { diff --git a/internal/rpc/group/db_map.go b/internal/rpc/group/db_map.go index 7940635bd..bdb4d41d2 100644 --- a/internal/rpc/group/db_map.go +++ b/internal/rpc/group/db_map.go @@ -18,10 +18,10 @@ import ( "context" "time" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/mcontext" + "github.com/OpenIMSDK/tools/mcontext" - pbGroup "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/group" - "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/sdkws" + pbGroup "github.com/OpenIMSDK/protocol/group" + "github.com/OpenIMSDK/protocol/sdkws" ) func UpdateGroupInfoMap(ctx context.Context, group *sdkws.GroupInfoForSet) map[string]any { diff --git a/internal/rpc/group/fill.go b/internal/rpc/group/fill.go index 47b536301..9cf15f8a2 100644 --- a/internal/rpc/group/fill.go +++ b/internal/rpc/group/fill.go @@ -18,7 +18,7 @@ import ( "context" relationTb "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/table/relation" - "github.com/OpenIMSDK/Open-IM-Server/pkg/utils" + "github.com/OpenIMSDK/tools/utils" ) func (s *groupServer) FindGroupMember( diff --git a/internal/rpc/group/group.go b/internal/rpc/group/group.go index b61170558..4c041e13a 100644 --- a/internal/rpc/group/group.go +++ b/internal/rpc/group/group.go @@ -23,31 +23,31 @@ import ( "strings" "time" - pbConversation "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/conversation" - "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/wrapperspb" + pbConversation "github.com/OpenIMSDK/protocol/conversation" + "github.com/OpenIMSDK/protocol/wrapperspb" "github.com/OpenIMSDK/Open-IM-Server/pkg/rpcclient/notification" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/convert" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/mw/specialerror" "github.com/OpenIMSDK/Open-IM-Server/pkg/rpcclient" + "github.com/OpenIMSDK/tools/mw/specialerror" "google.golang.org/grpc" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/constant" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/cache" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/controller" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/relation" relationTb "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/table/relation" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/unrelation" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/log" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/mcontext" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/tokenverify" - "github.com/OpenIMSDK/Open-IM-Server/pkg/discoveryregistry" - "github.com/OpenIMSDK/Open-IM-Server/pkg/errs" - pbGroup "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/group" - "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/sdkws" - "github.com/OpenIMSDK/Open-IM-Server/pkg/utils" + pbGroup "github.com/OpenIMSDK/protocol/group" + "github.com/OpenIMSDK/protocol/sdkws" + "github.com/OpenIMSDK/tools/constant" + "github.com/OpenIMSDK/tools/discoveryregistry" + "github.com/OpenIMSDK/tools/errs" + "github.com/OpenIMSDK/tools/log" + "github.com/OpenIMSDK/tools/mcontext" + "github.com/OpenIMSDK/tools/tokenverify" + "github.com/OpenIMSDK/tools/utils" ) func Start(client discoveryregistry.SvcDiscoveryRegistry, server *grpc.Server) error { @@ -94,6 +94,11 @@ type groupServer struct { msgRpcClient rpcclient.MessageRpcClient } +func (s *groupServer) GetGroupUsersReqApplicationList(ctx context.Context, req *pbGroup.GetGroupUsersReqApplicationListReq) (*pbGroup.GetGroupUsersReqApplicationListResp, error) { + //TODO implement me + panic("implement me") +} + func (s *groupServer) CheckGroupAdmin(ctx context.Context, groupID string) error { if !tokenverify.IsAppManagerUid(ctx) { groupMember, err := s.GroupDatabase.TakeGroupMember(ctx, groupID, mcontext.GetOpUserID(ctx)) @@ -577,8 +582,6 @@ func (s *groupServer) GetGroupMembersInfo(ctx context.Context, req *pbGroup.GetG } func (s *groupServer) GetGroupApplicationList(ctx context.Context, req *pbGroup.GetGroupApplicationListReq) (*pbGroup.GetGroupApplicationListResp, error) { - pageNumber, showNumber := utils.GetPage(req.Pagination) - groupIDs, err := s.GroupDatabase.FindUserManagedGroupID(ctx, req.FromUserID) if err != nil { return nil, err @@ -587,7 +590,7 @@ func (s *groupServer) GetGroupApplicationList(ctx context.Context, req *pbGroup. if len(groupIDs) == 0 { return resp, nil } - total, groupRequests, err := s.GroupDatabase.PageGroupRequest(ctx, groupIDs, pageNumber, showNumber) + total, groupRequests, err := s.GroupDatabase.PageGroupRequest(ctx, groupIDs, req.Pagination.PageNumber, req.Pagination.ShowNumber) if err != nil { return nil, err } diff --git a/internal/rpc/group/statistics.go b/internal/rpc/group/statistics.go index d638cb6fd..8aeefbee3 100644 --- a/internal/rpc/group/statistics.go +++ b/internal/rpc/group/statistics.go @@ -18,8 +18,8 @@ import ( "context" "time" - "github.com/OpenIMSDK/Open-IM-Server/pkg/errs" - "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/group" + "github.com/OpenIMSDK/protocol/group" + "github.com/OpenIMSDK/tools/errs" ) func (s *groupServer) GroupCreateCount(ctx context.Context, req *group.GroupCreateCountReq) (*group.GroupCreateCountResp, error) { diff --git a/internal/rpc/group/super_group.go b/internal/rpc/group/super_group.go index 2e174f956..bdd810ba9 100644 --- a/internal/rpc/group/super_group.go +++ b/internal/rpc/group/super_group.go @@ -19,14 +19,14 @@ import ( "fmt" "strings" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/constant" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/convert" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/table/relation" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/table/unrelation" - "github.com/OpenIMSDK/Open-IM-Server/pkg/errs" - pbGroup "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/group" - sdkws "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/sdkws" - "github.com/OpenIMSDK/Open-IM-Server/pkg/utils" + pbGroup "github.com/OpenIMSDK/protocol/group" + sdkws "github.com/OpenIMSDK/protocol/sdkws" + "github.com/OpenIMSDK/tools/constant" + "github.com/OpenIMSDK/tools/errs" + "github.com/OpenIMSDK/tools/utils" ) func (s *groupServer) GetJoinedSuperGroupList( diff --git a/internal/rpc/msg/as_read.go b/internal/rpc/msg/as_read.go index f83c2ad80..c2f07bd8e 100644 --- a/internal/rpc/msg/as_read.go +++ b/internal/rpc/msg/as_read.go @@ -19,11 +19,11 @@ import ( "github.com/redis/go-redis/v9" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/constant" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/log" - "github.com/OpenIMSDK/Open-IM-Server/pkg/errs" - "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/msg" - "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/sdkws" + "github.com/OpenIMSDK/protocol/msg" + "github.com/OpenIMSDK/protocol/sdkws" + "github.com/OpenIMSDK/tools/constant" + "github.com/OpenIMSDK/tools/errs" + "github.com/OpenIMSDK/tools/log" ) func (m *msgServer) GetConversationsHasReadAndMaxSeq(ctx context.Context, req *msg.GetConversationsHasReadAndMaxSeqReq) (*msg.GetConversationsHasReadAndMaxSeqResp, error) { diff --git a/internal/rpc/msg/callback.go b/internal/rpc/msg/callback.go index 2d4988adf..47bd1f0f1 100644 --- a/internal/rpc/msg/callback.go +++ b/internal/rpc/msg/callback.go @@ -16,16 +16,18 @@ package msg import ( "context" + "github.com/OpenIMSDK/protocol/sdkws" + "google.golang.org/protobuf/proto" cbapi "github.com/OpenIMSDK/Open-IM-Server/pkg/callbackstruct" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/config" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/constant" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/http" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/log" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/mcontext" - "github.com/OpenIMSDK/Open-IM-Server/pkg/errs" - pbChat "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/msg" - "github.com/OpenIMSDK/Open-IM-Server/pkg/utils" + pbChat "github.com/OpenIMSDK/protocol/msg" + "github.com/OpenIMSDK/tools/config" + "github.com/OpenIMSDK/tools/constant" + "github.com/OpenIMSDK/tools/errs" + "github.com/OpenIMSDK/tools/log" + "github.com/OpenIMSDK/tools/mcontext" + "github.com/OpenIMSDK/tools/utils" ) func cbURL() string { @@ -48,12 +50,23 @@ func toCommonCallback(ctx context.Context, msg *pbChat.SendMsgReq, command strin CreateTime: msg.MsgData.CreateTime, AtUserIDList: msg.MsgData.AtUserIDList, SenderFaceURL: msg.MsgData.SenderFaceURL, - Content: utils.GetContent(msg.MsgData), + Content: GetContent(msg.MsgData), Seq: uint32(msg.MsgData.Seq), Ex: msg.MsgData.Ex, } } +func GetContent(msg *sdkws.MsgData) string { + if msg.ContentType >= constant.NotificationBegin && msg.ContentType <= constant.NotificationEnd { + var tips sdkws.TipsComm + _ = proto.Unmarshal(msg.Content, &tips) + content := tips.JsonDetail + return content + } else { + return string(msg.Content) + } +} + func callbackBeforeSendSingleMsg(ctx context.Context, msg *pbChat.SendMsgReq) error { if !config.Config.Callback.CallbackBeforeSendSingleMsg.Enable { return nil diff --git a/internal/rpc/msg/delete.go b/internal/rpc/msg/delete.go index d2ead459e..8c20a5bc3 100644 --- a/internal/rpc/msg/delete.go +++ b/internal/rpc/msg/delete.go @@ -17,13 +17,13 @@ package msg import ( "context" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/constant" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/log" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/tokenverify" - "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/conversation" - "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/msg" - "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/sdkws" - "github.com/OpenIMSDK/Open-IM-Server/pkg/utils" + "github.com/OpenIMSDK/protocol/conversation" + "github.com/OpenIMSDK/protocol/msg" + "github.com/OpenIMSDK/protocol/sdkws" + "github.com/OpenIMSDK/tools/constant" + "github.com/OpenIMSDK/tools/log" + "github.com/OpenIMSDK/tools/tokenverify" + "github.com/OpenIMSDK/tools/utils" ) func (m *msgServer) getMinSeqs(maxSeqs map[string]int64) map[string]int64 { diff --git a/internal/rpc/msg/message_interceptor.go b/internal/rpc/msg/message_interceptor.go index 49a330d5e..915a04ab1 100644 --- a/internal/rpc/msg/message_interceptor.go +++ b/internal/rpc/msg/message_interceptor.go @@ -17,11 +17,11 @@ package msg import ( "context" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/config" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/constant" - "github.com/OpenIMSDK/Open-IM-Server/pkg/errs" - "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/msg" - "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/sdkws" + "github.com/OpenIMSDK/protocol/msg" + "github.com/OpenIMSDK/protocol/sdkws" + "github.com/OpenIMSDK/tools/config" + "github.com/OpenIMSDK/tools/constant" + "github.com/OpenIMSDK/tools/errs" ) type MessageInterceptorFunc func(ctx context.Context, req *msg.SendMsgReq) (*sdkws.MsgData, error) diff --git a/internal/rpc/msg/msg_status.go b/internal/rpc/msg/msg_status.go index f9ab0d09c..bd89d61f4 100644 --- a/internal/rpc/msg/msg_status.go +++ b/internal/rpc/msg/msg_status.go @@ -17,9 +17,9 @@ package msg import ( "context" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/constant" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/mcontext" - pbMsg "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/msg" + pbMsg "github.com/OpenIMSDK/protocol/msg" + "github.com/OpenIMSDK/tools/constant" + "github.com/OpenIMSDK/tools/mcontext" ) func (m *msgServer) SetSendMsgStatus( diff --git a/internal/rpc/msg/revoke.go b/internal/rpc/msg/revoke.go index c95d347e7..5651e79e0 100644 --- a/internal/rpc/msg/revoke.go +++ b/internal/rpc/msg/revoke.go @@ -19,14 +19,14 @@ import ( "encoding/json" "time" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/constant" unRelationTb "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/table/unrelation" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/log" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/tokenverify" - "github.com/OpenIMSDK/Open-IM-Server/pkg/errs" - "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/msg" - "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/sdkws" - "github.com/OpenIMSDK/Open-IM-Server/pkg/utils" + "github.com/OpenIMSDK/protocol/msg" + "github.com/OpenIMSDK/protocol/sdkws" + "github.com/OpenIMSDK/tools/constant" + "github.com/OpenIMSDK/tools/errs" + "github.com/OpenIMSDK/tools/log" + "github.com/OpenIMSDK/tools/tokenverify" + "github.com/OpenIMSDK/tools/utils" ) func (m *msgServer) RevokeMsg(ctx context.Context, req *msg.RevokeMsgReq) (*msg.RevokeMsgResp, error) { diff --git a/internal/rpc/msg/send.go b/internal/rpc/msg/send.go index a568154c7..2c5df6408 100644 --- a/internal/rpc/msg/send.go +++ b/internal/rpc/msg/send.go @@ -17,16 +17,16 @@ package msg import ( "context" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/constant" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/log" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/mcontext" promePkg "github.com/OpenIMSDK/Open-IM-Server/pkg/common/prome" - "github.com/OpenIMSDK/Open-IM-Server/pkg/errs" - pbConversation "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/conversation" - pbMsg "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/msg" - "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/sdkws" - "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/wrapperspb" - "github.com/OpenIMSDK/Open-IM-Server/pkg/utils" + pbConversation "github.com/OpenIMSDK/protocol/conversation" + pbMsg "github.com/OpenIMSDK/protocol/msg" + "github.com/OpenIMSDK/protocol/sdkws" + "github.com/OpenIMSDK/protocol/wrapperspb" + "github.com/OpenIMSDK/tools/constant" + "github.com/OpenIMSDK/tools/errs" + "github.com/OpenIMSDK/tools/log" + "github.com/OpenIMSDK/tools/mcontext" + "github.com/OpenIMSDK/tools/utils" ) func (m *msgServer) SendMsg(ctx context.Context, req *pbMsg.SendMsgReq) (resp *pbMsg.SendMsgResp, error error) { diff --git a/internal/rpc/msg/seq.go b/internal/rpc/msg/seq.go index ac771d3ee..8dabc7ac4 100644 --- a/internal/rpc/msg/seq.go +++ b/internal/rpc/msg/seq.go @@ -17,7 +17,7 @@ package msg import ( "context" - pbMsg "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/msg" + pbMsg "github.com/OpenIMSDK/protocol/msg" ) func (m *msgServer) GetConversationMaxSeq( diff --git a/internal/rpc/msg/server.go b/internal/rpc/msg/server.go index e88d55bd1..542f59d4b 100644 --- a/internal/rpc/msg/server.go +++ b/internal/rpc/msg/server.go @@ -19,16 +19,16 @@ import ( "google.golang.org/grpc" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/constant" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/cache" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/controller" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/localcache" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/unrelation" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/prome" - "github.com/OpenIMSDK/Open-IM-Server/pkg/discoveryregistry" - "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/conversation" - "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/msg" "github.com/OpenIMSDK/Open-IM-Server/pkg/rpcclient" + "github.com/OpenIMSDK/protocol/conversation" + "github.com/OpenIMSDK/protocol/msg" + "github.com/OpenIMSDK/tools/constant" + "github.com/OpenIMSDK/tools/discoveryregistry" ) type ( diff --git a/internal/rpc/msg/statistics.go b/internal/rpc/msg/statistics.go index c7d04f5ef..c5a4658bb 100644 --- a/internal/rpc/msg/statistics.go +++ b/internal/rpc/msg/statistics.go @@ -19,9 +19,9 @@ import ( "time" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/table/unrelation" - "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/msg" - "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/sdkws" - "github.com/OpenIMSDK/Open-IM-Server/pkg/utils" + "github.com/OpenIMSDK/protocol/msg" + "github.com/OpenIMSDK/protocol/sdkws" + "github.com/OpenIMSDK/tools/utils" ) func (m *msgServer) GetActiveUser(ctx context.Context, req *msg.GetActiveUserReq) (*msg.GetActiveUserResp, error) { diff --git a/internal/rpc/msg/sync_msg.go b/internal/rpc/msg/sync_msg.go index e05bd5644..edcb4ff89 100644 --- a/internal/rpc/msg/sync_msg.go +++ b/internal/rpc/msg/sync_msg.go @@ -17,13 +17,13 @@ package msg import ( "context" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/constant" - "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/msg" + "github.com/OpenIMSDK/protocol/msg" + "github.com/OpenIMSDK/tools/constant" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/log" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/tokenverify" - "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/sdkws" - "github.com/OpenIMSDK/Open-IM-Server/pkg/utils" + "github.com/OpenIMSDK/protocol/sdkws" + "github.com/OpenIMSDK/tools/log" + "github.com/OpenIMSDK/tools/tokenverify" + "github.com/OpenIMSDK/tools/utils" ) func (m *msgServer) PullMessageBySeqs( diff --git a/internal/rpc/msg/utils.go b/internal/rpc/msg/utils.go index 10eccbcff..48f7b03f3 100644 --- a/internal/rpc/msg/utils.go +++ b/internal/rpc/msg/utils.go @@ -18,10 +18,10 @@ import ( "github.com/redis/go-redis/v9" "gorm.io/gorm" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/config" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/constant" - "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/sdkws" - "github.com/OpenIMSDK/Open-IM-Server/pkg/utils" + "github.com/OpenIMSDK/protocol/sdkws" + "github.com/OpenIMSDK/tools/config" + "github.com/OpenIMSDK/tools/constant" + "github.com/OpenIMSDK/tools/utils" ) func isMessageHasReadEnabled(msgData *sdkws.MsgData) bool { diff --git a/internal/rpc/msg/verify.go b/internal/rpc/msg/verify.go index 3a0276e28..32c05ec82 100644 --- a/internal/rpc/msg/verify.go +++ b/internal/rpc/msg/verify.go @@ -20,12 +20,12 @@ import ( "strconv" "time" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/config" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/constant" - "github.com/OpenIMSDK/Open-IM-Server/pkg/errs" - "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/msg" - "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/sdkws" - "github.com/OpenIMSDK/Open-IM-Server/pkg/utils" + "github.com/OpenIMSDK/protocol/msg" + "github.com/OpenIMSDK/protocol/sdkws" + "github.com/OpenIMSDK/tools/config" + "github.com/OpenIMSDK/tools/constant" + "github.com/OpenIMSDK/tools/errs" + "github.com/OpenIMSDK/tools/utils" ) var ExcludeContentType = []int{constant.HasReadReceipt} diff --git a/internal/rpc/third/s3.go b/internal/rpc/third/s3.go index 7873d4c54..38b0eb03c 100644 --- a/internal/rpc/third/s3.go +++ b/internal/rpc/third/s3.go @@ -20,11 +20,11 @@ import ( "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/s3/cont" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/table/relation" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/log" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/mcontext" - "github.com/OpenIMSDK/Open-IM-Server/pkg/errs" - "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/third" - "github.com/OpenIMSDK/Open-IM-Server/pkg/utils" + "github.com/OpenIMSDK/protocol/third" + "github.com/OpenIMSDK/tools/errs" + "github.com/OpenIMSDK/tools/log" + "github.com/OpenIMSDK/tools/mcontext" + "github.com/OpenIMSDK/tools/utils" ) func (t *thirdServer) PartLimit(ctx context.Context, req *third.PartLimitReq) (*third.PartLimitResp, error) { diff --git a/internal/rpc/third/third.go b/internal/rpc/third/third.go index e991be195..5db6c39e4 100644 --- a/internal/rpc/third/third.go +++ b/internal/rpc/third/third.go @@ -27,14 +27,14 @@ import ( "google.golang.org/grpc" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/config" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/cache" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/controller" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/relation" relationTb "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/table/relation" - "github.com/OpenIMSDK/Open-IM-Server/pkg/discoveryregistry" - "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/third" "github.com/OpenIMSDK/Open-IM-Server/pkg/rpcclient" + "github.com/OpenIMSDK/protocol/third" + "github.com/OpenIMSDK/tools/config" + "github.com/OpenIMSDK/tools/discoveryregistry" ) func Start(client discoveryregistry.SvcDiscoveryRegistry, server *grpc.Server) error { diff --git a/internal/rpc/third/tool.go b/internal/rpc/third/tool.go index e6b1f7e17..5a7d1697b 100644 --- a/internal/rpc/third/tool.go +++ b/internal/rpc/third/tool.go @@ -21,10 +21,10 @@ import ( "strings" "unicode/utf8" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/mcontext" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/tokenverify" - "github.com/OpenIMSDK/Open-IM-Server/pkg/errs" - "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/third" + "github.com/OpenIMSDK/protocol/third" + "github.com/OpenIMSDK/tools/errs" + "github.com/OpenIMSDK/tools/mcontext" + "github.com/OpenIMSDK/tools/tokenverify" ) func toPbMapArray(m map[string][]string) []*third.KeyValues { diff --git a/internal/rpc/user/statistics.go b/internal/rpc/user/statistics.go index dc11b8a90..42068f2ce 100644 --- a/internal/rpc/user/statistics.go +++ b/internal/rpc/user/statistics.go @@ -18,8 +18,8 @@ import ( "context" "time" - "github.com/OpenIMSDK/Open-IM-Server/pkg/errs" - pbuser "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/user" + pbuser "github.com/OpenIMSDK/protocol/user" + "github.com/OpenIMSDK/tools/errs" ) func (s *userServer) UserRegisterCount( diff --git a/internal/rpc/user/user.go b/internal/rpc/user/user.go index 3b54d73eb..65e977274 100644 --- a/internal/rpc/user/user.go +++ b/internal/rpc/user/user.go @@ -20,27 +20,27 @@ import ( "strings" "time" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/log" + "github.com/OpenIMSDK/tools/log" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/config" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/constant" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/convert" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/cache" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/controller" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/relation" tablerelation "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/table/relation" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/tx" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/tokenverify" - registry "github.com/OpenIMSDK/Open-IM-Server/pkg/discoveryregistry" - "github.com/OpenIMSDK/Open-IM-Server/pkg/errs" - "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/sdkws" - pbuser "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/user" "github.com/OpenIMSDK/Open-IM-Server/pkg/rpcclient" "github.com/OpenIMSDK/Open-IM-Server/pkg/rpcclient/notification" + "github.com/OpenIMSDK/protocol/sdkws" + pbuser "github.com/OpenIMSDK/protocol/user" + "github.com/OpenIMSDK/tools/config" + "github.com/OpenIMSDK/tools/constant" + registry "github.com/OpenIMSDK/tools/discoveryregistry" + "github.com/OpenIMSDK/tools/errs" + "github.com/OpenIMSDK/tools/tokenverify" + "github.com/OpenIMSDK/tools/tx" "google.golang.org/grpc" - "github.com/OpenIMSDK/Open-IM-Server/pkg/utils" + "github.com/OpenIMSDK/tools/utils" ) type userServer struct { diff --git a/internal/tools/conversation.go b/internal/tools/conversation.go index 2651cf10e..4adec99ee 100644 --- a/internal/tools/conversation.go +++ b/internal/tools/conversation.go @@ -18,9 +18,9 @@ import ( "context" "time" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/log" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/mcontext" - "github.com/OpenIMSDK/Open-IM-Server/pkg/utils" + "github.com/OpenIMSDK/tools/log" + "github.com/OpenIMSDK/tools/mcontext" + "github.com/OpenIMSDK/tools/utils" ) func (c *MsgTool) ConversationsDestructMsgs() { diff --git a/internal/tools/cron_task.go b/internal/tools/cron_task.go index 5e4183615..354682f8e 100644 --- a/internal/tools/cron_task.go +++ b/internal/tools/cron_task.go @@ -21,8 +21,8 @@ import ( "github.com/robfig/cron/v3" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/config" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/log" + "github.com/OpenIMSDK/tools/config" + "github.com/OpenIMSDK/tools/log" ) func StartCronTask() error { diff --git a/internal/tools/msg.go b/internal/tools/msg.go index 76299b6ac..8e67bc350 100644 --- a/internal/tools/msg.go +++ b/internal/tools/msg.go @@ -24,20 +24,20 @@ import ( "google.golang.org/grpc" "google.golang.org/grpc/credentials/insecure" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/config" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/cache" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/controller" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/relation" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/tx" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/unrelation" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/log" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/mcontext" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/mw" - "github.com/OpenIMSDK/Open-IM-Server/pkg/discoveryregistry/zookeeper" - "github.com/OpenIMSDK/Open-IM-Server/pkg/errs" "github.com/OpenIMSDK/Open-IM-Server/pkg/rpcclient" "github.com/OpenIMSDK/Open-IM-Server/pkg/rpcclient/notification" - "github.com/OpenIMSDK/Open-IM-Server/pkg/utils" + "github.com/OpenIMSDK/tools/config" + "github.com/OpenIMSDK/tools/discoveryregistry/zookeeper" + "github.com/OpenIMSDK/tools/errs" + "github.com/OpenIMSDK/tools/log" + "github.com/OpenIMSDK/tools/mcontext" + "github.com/OpenIMSDK/tools/mw" + "github.com/OpenIMSDK/tools/tx" + "github.com/OpenIMSDK/tools/utils" ) type MsgTool struct { diff --git a/internal/tools/msg_test.go b/internal/tools/msg_test.go index 4b1ea0384..f4ce4d054 100644 --- a/internal/tools/msg_test.go +++ b/internal/tools/msg_test.go @@ -20,10 +20,10 @@ import ( "go.mongodb.org/mongo-driver/bson" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/constant" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/cache" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/mcontext" - "github.com/OpenIMSDK/Open-IM-Server/pkg/utils" + "github.com/OpenIMSDK/tools/constant" + "github.com/OpenIMSDK/tools/mcontext" + "github.com/OpenIMSDK/tools/utils" unRelationTb "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/table/unrelation" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/unrelation" diff --git a/pkg/a2r/api2rpc.go b/pkg/a2r/api2rpc.go deleted file mode 100644 index 6a1651a3c..000000000 --- a/pkg/a2r/api2rpc.go +++ /dev/null @@ -1,51 +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. - -package a2r - -import ( - "context" - - "github.com/OpenIMSDK/Open-IM-Server/pkg/checker" - - "github.com/gin-gonic/gin" - "google.golang.org/grpc" - - "github.com/OpenIMSDK/Open-IM-Server/pkg/apiresp" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/log" - "github.com/OpenIMSDK/Open-IM-Server/pkg/errs" -) - -func Call[A, B, C any]( - rpc func(client C, ctx context.Context, req *A, options ...grpc.CallOption) (*B, error), - client C, - c *gin.Context, -) { - var req A - if err := c.BindJSON(&req); err != nil { - log.ZWarn(c, "gin bind json error", err, "req", req) - apiresp.GinError(c, errs.ErrArgs.WithDetail(err.Error()).Wrap()) // 参数错误 - return - } - if err := checker.Validate(&req); err != nil { - apiresp.GinError(c, errs.ErrArgs.Wrap(err.Error())) // 参数校验失败 - return - } - data, err := rpc(client, c, &req) - if err != nil { - apiresp.GinError(c, err) // RPC调用失败 - return - } - apiresp.GinSuccess(c, data) // 成功 -} diff --git a/pkg/apiresp/format.go b/pkg/apiresp/format.go deleted file mode 100644 index b53f31cbd..000000000 --- a/pkg/apiresp/format.go +++ /dev/null @@ -1,19 +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. - -package apiresp - -type ApiFormat interface { - ApiFormat() -} diff --git a/pkg/apiresp/gin.go b/pkg/apiresp/gin.go deleted file mode 100644 index 9d5637bfd..000000000 --- a/pkg/apiresp/gin.go +++ /dev/null @@ -1,29 +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. - -package apiresp - -import ( - "net/http" - - "github.com/gin-gonic/gin" -) - -func GinError(c *gin.Context, err error) { - c.JSON(http.StatusOK, ParseError(err)) -} - -func GinSuccess(c *gin.Context, data any) { - c.JSON(http.StatusOK, ApiSuccess(data)) -} diff --git a/pkg/apiresp/http.go b/pkg/apiresp/http.go deleted file mode 100644 index db1c847cf..000000000 --- a/pkg/apiresp/http.go +++ /dev/null @@ -1,39 +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. - -package apiresp - -import ( - "encoding/json" - "net/http" -) - -func httpJson(w http.ResponseWriter, data any) { - body, err := json.Marshal(data) - if err != nil { - http.Error(w, "json marshal error: "+err.Error(), http.StatusInternalServerError) - return - } - w.Header().Set("Content-Type", "application/json; charset=utf-8") - w.WriteHeader(http.StatusOK) - _, _ = w.Write(body) -} - -func HttpError(w http.ResponseWriter, err error) { - httpJson(w, ParseError(err)) -} - -func HttpSuccess(w http.ResponseWriter, data any) { - httpJson(w, ApiSuccess(data)) -} diff --git a/pkg/apiresp/resp.go b/pkg/apiresp/resp.go deleted file mode 100644 index 638c70dbe..000000000 --- a/pkg/apiresp/resp.go +++ /dev/null @@ -1,76 +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. - -package apiresp - -import ( - "reflect" - - "github.com/OpenIMSDK/Open-IM-Server/pkg/errs" -) - -type ApiResponse struct { - ErrCode int `json:"errCode"` - ErrMsg string `json:"errMsg"` - ErrDlt string `json:"errDlt"` - Data any `json:"data,omitempty"` -} - -func isAllFieldsPrivate(v any) bool { - typeOf := reflect.TypeOf(v) - if typeOf == nil { - return false - } - if typeOf.Kind() == reflect.Ptr { - typeOf = typeOf.Elem() - } - if typeOf.Kind() != reflect.Struct { - return false - } - num := typeOf.NumField() - for i := 0; i < num; i++ { - c := typeOf.Field(i).Name[0] - if c >= 'A' && c <= 'Z' { - return false - } - } - return true -} - -func ApiSuccess(data any) *ApiResponse { - if format, ok := data.(ApiFormat); ok { - format.ApiFormat() - } - if isAllFieldsPrivate(data) { - return &ApiResponse{} - } - return &ApiResponse{ - Data: data, - } -} - -func ParseError(err error) *ApiResponse { - if err == nil { - return ApiSuccess(nil) - } - unwrap := errs.Unwrap(err) - if codeErr, ok := unwrap.(errs.CodeError); ok { - resp := ApiResponse{ErrCode: codeErr.Code(), ErrMsg: codeErr.Msg(), ErrDlt: codeErr.Detail()} - if resp.ErrDlt == "" { - resp.ErrDlt = err.Error() - } - return &resp - } - return &ApiResponse{ErrCode: errs.ServerInternalError, ErrMsg: err.Error()} -} diff --git a/pkg/apistruct/manage.go b/pkg/apistruct/manage.go index 6a92f40aa..3a2945b37 100644 --- a/pkg/apistruct/manage.go +++ b/pkg/apistruct/manage.go @@ -15,7 +15,7 @@ package apistruct import ( - sdkws "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/sdkws" + sdkws "github.com/OpenIMSDK/protocol/sdkws" ) type SendMsg struct { diff --git a/pkg/callbackstruct/common.go b/pkg/callbackstruct/common.go index 4a83bb09f..ef84d52b9 100644 --- a/pkg/callbackstruct/common.go +++ b/pkg/callbackstruct/common.go @@ -15,7 +15,7 @@ package callbackstruct import ( - "github.com/OpenIMSDK/Open-IM-Server/pkg/errs" + "github.com/OpenIMSDK/tools/errs" ) type CommonCallbackReq struct { diff --git a/pkg/callbackstruct/group.go b/pkg/callbackstruct/group.go index 558ad4d23..940356e41 100644 --- a/pkg/callbackstruct/group.go +++ b/pkg/callbackstruct/group.go @@ -16,7 +16,7 @@ package callbackstruct import ( "github.com/OpenIMSDK/Open-IM-Server/pkg/apistruct" - common "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/sdkws" + common "github.com/OpenIMSDK/protocol/sdkws" ) type CallbackCommand string diff --git a/pkg/callbackstruct/message.go b/pkg/callbackstruct/message.go index dabdc1d55..f404088e8 100644 --- a/pkg/callbackstruct/message.go +++ b/pkg/callbackstruct/message.go @@ -15,7 +15,7 @@ package callbackstruct import ( - sdkws "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/sdkws" + sdkws "github.com/OpenIMSDK/protocol/sdkws" ) type CallbackBeforeSendSingleMsgReq struct { diff --git a/pkg/callbackstruct/push.go b/pkg/callbackstruct/push.go index cac37330a..0566c35e2 100644 --- a/pkg/callbackstruct/push.go +++ b/pkg/callbackstruct/push.go @@ -14,7 +14,7 @@ package callbackstruct -import common "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/sdkws" +import common "github.com/OpenIMSDK/protocol/sdkws" type CallbackBeforePushReq struct { UserStatusBatchCallbackReq diff --git a/pkg/checker/check.go b/pkg/checker/check.go deleted file mode 100644 index f3f3811a4..000000000 --- a/pkg/checker/check.go +++ /dev/null @@ -1,28 +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. - -package checker - -type Checker interface { - Check() error -} - -func Validate(args any) error { - if checker, ok := args.(Checker); ok { - if err := checker.Check(); err != nil { - return err - } - } - return nil -} diff --git a/pkg/common/cmd/msg_gateway.go b/pkg/common/cmd/msg_gateway.go index 6629b2d2c..f7b7a03ea 100644 --- a/pkg/common/cmd/msg_gateway.go +++ b/pkg/common/cmd/msg_gateway.go @@ -19,7 +19,7 @@ import ( //"github.com/OpenIMSDK/Open-IM-Server/internal/msggateway". "github.com/spf13/cobra" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/constant" + "github.com/OpenIMSDK/tools/constant" ) type MsgGatewayCmd struct { diff --git a/pkg/common/cmd/root.go b/pkg/common/cmd/root.go index c5fce2c95..718d9bf7b 100644 --- a/pkg/common/cmd/root.go +++ b/pkg/common/cmd/root.go @@ -16,12 +16,13 @@ package cmd import ( "fmt" + config2 "github.com/OpenIMSDK/Open-IM-Server/pkg/common/config" "github.com/spf13/cobra" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/config" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/constant" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/log" + "github.com/OpenIMSDK/tools/config" + "github.com/OpenIMSDK/tools/constant" + "github.com/OpenIMSDK/tools/log" ) type RootCmd struct { @@ -108,7 +109,7 @@ func (r *RootCmd) GetPrometheusPortFlag() int { func (r *RootCmd) getConfFromCmdAndInit(cmdLines *cobra.Command) error { configFolderPath, _ := cmdLines.Flags().GetString(constant.FlagConf) fmt.Println("configFolderPath:", configFolderPath) - return config.InitConfig(configFolderPath) + return config2.InitConfig(configFolderPath) } func (r *RootCmd) Execute() error { diff --git a/pkg/common/cmd/rpc.go b/pkg/common/cmd/rpc.go index 239858764..a2fbea34c 100644 --- a/pkg/common/cmd/rpc.go +++ b/pkg/common/cmd/rpc.go @@ -20,8 +20,8 @@ import ( "github.com/spf13/cobra" "google.golang.org/grpc" - "github.com/OpenIMSDK/Open-IM-Server/pkg/discoveryregistry" - "github.com/OpenIMSDK/Open-IM-Server/pkg/startrpc" + "github.com/OpenIMSDK/tools/discoveryregistry" + "github.com/OpenIMSDK/tools/startrpc" ) type RpcCmd struct { diff --git a/pkg/common/config/config.go b/pkg/common/config/config.go deleted file mode 100644 index f9b2b9783..000000000 --- a/pkg/common/config/config.go +++ /dev/null @@ -1,312 +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. - -package config - -import ( - _ "embed" -) - -//go:embed version -var Version string - -var Config config - -type CallBackConfig struct { - Enable bool `yaml:"enable"` - CallbackTimeOut int `yaml:"timeout"` - CallbackFailedContinue *bool `yaml:"failedContinue"` -} - -type NotificationConf struct { - IsSendMsg bool `yaml:"isSendMsg"` - ReliabilityLevel int `yaml:"reliabilityLevel"` // 1 online 2 persistent - UnreadCount bool `yaml:"unreadCount"` - OfflinePush POfflinePush `yaml:"offlinePush"` -} - -type POfflinePush struct { - Enable bool `yaml:"enable"` - Title string `yaml:"title"` - Desc string `yaml:"desc"` - Ext string `yaml:"ext"` -} - -type config struct { - Zookeeper struct { - Schema string `yaml:"schema"` - ZkAddr []string `yaml:"address"` - Username string `yaml:"username"` - Password string `yaml:"password"` - } `yaml:"zookeeper"` - - Mysql struct { - Address []string `yaml:"address"` - Username string `yaml:"username"` - Password string `yaml:"password"` - Database string `yaml:"database"` - MaxOpenConn int `yaml:"maxOpenConn"` - MaxIdleConn int `yaml:"maxIdleConn"` - MaxLifeTime int `yaml:"maxLifeTime"` - LogLevel int `yaml:"logLevel"` - SlowThreshold int `yaml:"slowThreshold"` - } `yaml:"mysql"` - - Mongo struct { - Uri string `yaml:"uri"` - Address []string `yaml:"address"` - Database string `yaml:"database"` - Username string `yaml:"username"` - Password string `yaml:"password"` - MaxPoolSize int `yaml:"maxPoolSize"` - } `yaml:"mongo"` - - Redis struct { - Address []string `yaml:"address"` - Username string `yaml:"username"` - Password string `yaml:"password"` - } `yaml:"redis"` - - Kafka struct { - Username string `yaml:"username"` - Password string `yaml:"password"` - Addr []string `yaml:"addr"` - LatestMsgToRedis struct { - Topic string `yaml:"topic"` - } `yaml:"latestMsgToRedis"` - MsgToMongo struct { - Topic string `yaml:"topic"` - } `yaml:"offlineMsgToMongo"` - MsgToPush struct { - Topic string `yaml:"topic"` - } `yaml:"msgToPush"` - ConsumerGroupID struct { - MsgToRedis string `yaml:"msgToRedis"` - MsgToMongo string `yaml:"msgToMongo"` - MsgToMySql string `yaml:"msgToMySql"` - MsgToPush string `yaml:"msgToPush"` - } `yaml:"consumerGroupID"` - } `yaml:"kafka"` - - Rpc struct { - RegisterIP string `yaml:"registerIP"` - ListenIP string `yaml:"listenIP"` - } `yaml:"rpc"` - - Api struct { - OpenImApiPort []int `yaml:"openImApiPort"` - ListenIP string `yaml:"listenIP"` - } `yaml:"api"` - - Object struct { - Enable string `yaml:"enable"` - ApiURL string `yaml:"apiURL"` - Minio struct { - Bucket string `yaml:"bucket"` - Endpoint string `yaml:"endpoint"` - AccessKeyID string `yaml:"accessKeyID"` - SecretAccessKey string `yaml:"secretAccessKey"` - SessionToken string `yaml:"sessionToken"` - } `yaml:"minio"` - Cos struct { - BucketURL string `yaml:"bucketURL"` - SecretID string `yaml:"secretID"` - SecretKey string `yaml:"secretKey"` - SessionToken string `yaml:"sessionToken"` - } `yaml:"cos"` - Oss struct { - Endpoint string `yaml:"endpoint"` - Bucket string `yaml:"bucket"` - BucketURL string `yaml:"bucketURL"` - AccessKeyID string `yaml:"accessKeyID"` - AccessKeySecret string `yaml:"accessKeySecret"` - SessionToken string `yaml:"sessionToken"` - } `yaml:"oss"` - } `yaml:"object"` - - RpcPort struct { - OpenImUserPort []int `yaml:"openImUserPort"` - OpenImFriendPort []int `yaml:"openImFriendPort"` - OpenImMessagePort []int `yaml:"openImMessagePort"` - OpenImMessageGatewayPort []int `yaml:"openImMessageGatewayPort"` - OpenImGroupPort []int `yaml:"openImGroupPort"` - OpenImAuthPort []int `yaml:"openImAuthPort"` - OpenImPushPort []int `yaml:"openImPushPort"` - OpenImConversationPort []int `yaml:"openImConversationPort"` - OpenImRtcPort []int `yaml:"openImRtcPort"` - OpenImThirdPort []int `yaml:"openImThirdPort"` - } `yaml:"rpcPort"` - - RpcRegisterName struct { - OpenImUserName string `yaml:"openImUserName"` - OpenImFriendName string `yaml:"openImFriendName"` - OpenImMsgName string `yaml:"openImMsgName"` - OpenImPushName string `yaml:"openImPushName"` - OpenImMessageGatewayName string `yaml:"openImMessageGatewayName"` - OpenImGroupName string `yaml:"openImGroupName"` - OpenImAuthName string `yaml:"openImAuthName"` - OpenImConversationName string `yaml:"openImConversationName"` - OpenImThirdName string `yaml:"openImThirdName"` - } `yaml:"rpcRegisterName"` - - Log struct { - StorageLocation string `yaml:"storageLocation"` - RotationTime int `yaml:"rotationTime"` - RemainRotationCount uint `yaml:"remainRotationCount"` - RemainLogLevel int `yaml:"remainLogLevel"` - IsStdout bool `yaml:"isStdout"` - IsJson bool `yaml:"isJson"` - WithStack bool `yaml:"withStack"` - } `yaml:"log"` - - LongConnSvr struct { - OpenImWsPort []int `yaml:"openImWsPort"` - WebsocketMaxConnNum int `yaml:"websocketMaxConnNum"` - WebsocketMaxMsgLen int `yaml:"websocketMaxMsgLen"` - WebsocketTimeout int `yaml:"websocketTimeout"` - } `yaml:"longConnSvr"` - - Push struct { - Enable string `yaml:"enable"` - GeTui struct { - PushUrl string `yaml:"pushUrl"` - AppKey string `yaml:"appKey"` - Intent string `yaml:"intent"` - MasterSecret string `yaml:"masterSecret"` - ChannelID string `yaml:"channelID"` - ChannelName string `yaml:"channelName"` - } `yaml:"geTui"` - Fcm struct { - ServiceAccount string `yaml:"serviceAccount"` - } `yaml:"fcm"` - Jpns struct { - AppKey string `yaml:"appKey"` - MasterSecret string `yaml:"masterSecret"` - PushUrl string `yaml:"pushUrl"` - PushIntent string `yaml:"pushIntent"` - } `yaml:"jpns"` - } - Manager struct { - UserID []string `yaml:"userID"` - Nickname []string `yaml:"nickname"` - } `yaml:"manager"` - - MultiLoginPolicy int `yaml:"multiLoginPolicy"` - ChatPersistenceMysql bool `yaml:"chatPersistenceMysql"` - MsgCacheTimeout int `yaml:"msgCacheTimeout"` - GroupMessageHasReadReceiptEnable bool `yaml:"groupMessageHasReadReceiptEnable"` - SingleMessageHasReadReceiptEnable bool `yaml:"singleMessageHasReadReceiptEnable"` - RetainChatRecords int `yaml:"retainChatRecords"` - ChatRecordsClearTime string `yaml:"chatRecordsClearTime"` - MsgDestructTime string `yaml:"msgDestructTime"` - Secret string `yaml:"secret"` - TokenPolicy struct { - Expire int64 `yaml:"expire"` - } `yaml:"tokenPolicy"` - MessageVerify struct { - FriendVerify *bool `yaml:"friendVerify"` - } `yaml:"messageVerify"` - - IOSPush struct { - PushSound string `yaml:"pushSound"` - BadgeCount bool `yaml:"badgeCount"` - Production bool `yaml:"production"` - } `yaml:"iosPush"` - Callback struct { - CallbackUrl string `yaml:"url"` - CallbackBeforeSendSingleMsg CallBackConfig `yaml:"beforeSendSingleMsg"` - CallbackAfterSendSingleMsg CallBackConfig `yaml:"afterSendSingleMsg"` - CallbackBeforeSendGroupMsg CallBackConfig `yaml:"beforeSendGroupMsg"` - CallbackAfterSendGroupMsg CallBackConfig `yaml:"afterSendGroupMsg"` - CallbackMsgModify CallBackConfig `yaml:"msgModify"` - CallbackUserOnline CallBackConfig `yaml:"userOnline"` - CallbackUserOffline CallBackConfig `yaml:"userOffline"` - CallbackUserKickOff CallBackConfig `yaml:"userKickOff"` - CallbackOfflinePush CallBackConfig `yaml:"offlinePush"` - CallbackOnlinePush CallBackConfig `yaml:"onlinePush"` - CallbackBeforeSuperGroupOnlinePush CallBackConfig `yaml:"superGroupOnlinePush"` - CallbackBeforeAddFriend CallBackConfig `yaml:"beforeAddFriend"` - CallbackBeforeCreateGroup CallBackConfig `yaml:"beforeCreateGroup"` - CallbackBeforeMemberJoinGroup CallBackConfig `yaml:"beforeMemberJoinGroup"` - CallbackBeforeSetGroupMemberInfo CallBackConfig `yaml:"beforeSetGroupMemberInfo"` - } `yaml:"callback"` - - Prometheus struct { - Enable bool `yaml:"enable"` - UserPrometheusPort []int `yaml:"userPrometheusPort"` - FriendPrometheusPort []int `yaml:"friendPrometheusPort"` - MessagePrometheusPort []int `yaml:"messagePrometheusPort"` - MessageGatewayPrometheusPort []int `yaml:"messageGatewayPrometheusPort"` - GroupPrometheusPort []int `yaml:"groupPrometheusPort"` - AuthPrometheusPort []int `yaml:"authPrometheusPort"` - PushPrometheusPort []int `yaml:"pushPrometheusPort"` - ConversationPrometheusPort []int `yaml:"conversationPrometheusPort"` - RtcPrometheusPort []int `yaml:"rtcPrometheusPort"` - MessageTransferPrometheusPort []int `yaml:"messageTransferPrometheusPort"` - ThirdPrometheusPort []int `yaml:"thirdPrometheusPort"` - } `yaml:"prometheus"` - Notification notification `yaml:"notification"` -} - -type notification struct { - GroupCreated NotificationConf `yaml:"groupCreated"` - GroupInfoSet NotificationConf `yaml:"groupInfoSet"` - JoinGroupApplication NotificationConf `yaml:"joinGroupApplication"` - MemberQuit NotificationConf `yaml:"memberQuit"` - GroupApplicationAccepted NotificationConf `yaml:"groupApplicationAccepted"` - GroupApplicationRejected NotificationConf `yaml:"groupApplicationRejected"` - GroupOwnerTransferred NotificationConf `yaml:"groupOwnerTransferred"` - MemberKicked NotificationConf `yaml:"memberKicked"` - MemberInvited NotificationConf `yaml:"memberInvited"` - MemberEnter NotificationConf `yaml:"memberEnter"` - GroupDismissed NotificationConf `yaml:"groupDismissed"` - GroupMuted NotificationConf `yaml:"groupMuted"` - GroupCancelMuted NotificationConf `yaml:"groupCancelMuted"` - GroupMemberMuted NotificationConf `yaml:"groupMemberMuted"` - GroupMemberCancelMuted NotificationConf `yaml:"groupMemberCancelMuted"` - GroupMemberInfoSet NotificationConf `yaml:"groupMemberInfoSet"` - GroupMemberSetToAdmin NotificationConf `yaml:"groupMemberSetToAdmin"` - GroupMemberSetToOrdinary NotificationConf `yaml:"groupMemberSetToOrdinaryUser"` - GroupInfoSetAnnouncement NotificationConf `yaml:"groupInfoSetAnnouncement"` - GroupInfoSetName NotificationConf `yaml:"groupInfoSetName"` - ////////////////////////user/////////////////////// - UserInfoUpdated NotificationConf `yaml:"userInfoUpdated"` - //////////////////////friend/////////////////////// - FriendApplicationAdded NotificationConf `yaml:"friendApplicationAdded"` - FriendApplicationApproved NotificationConf `yaml:"friendApplicationApproved"` - FriendApplicationRejected NotificationConf `yaml:"friendApplicationRejected"` - FriendAdded NotificationConf `yaml:"friendAdded"` - FriendDeleted NotificationConf `yaml:"friendDeleted"` - FriendRemarkSet NotificationConf `yaml:"friendRemarkSet"` - BlackAdded NotificationConf `yaml:"blackAdded"` - BlackDeleted NotificationConf `yaml:"blackDeleted"` - FriendInfoUpdated NotificationConf `yaml:"friendInfoUpdated"` - //////////////////////conversation/////////////////////// - ConversationChanged NotificationConf `yaml:"conversationChanged"` - ConversationSetPrivate NotificationConf `yaml:"conversationSetPrivate"` -} - -func GetServiceNames() []string { - return []string{ - Config.RpcRegisterName.OpenImUserName, - Config.RpcRegisterName.OpenImFriendName, - Config.RpcRegisterName.OpenImMsgName, - Config.RpcRegisterName.OpenImPushName, - Config.RpcRegisterName.OpenImMessageGatewayName, - Config.RpcRegisterName.OpenImGroupName, - Config.RpcRegisterName.OpenImAuthName, - Config.RpcRegisterName.OpenImConversationName, - Config.RpcRegisterName.OpenImThirdName, - } -} diff --git a/pkg/common/config/parse.go b/pkg/common/config/parse.go index 60c4802a4..f31df39d2 100644 --- a/pkg/common/config/parse.go +++ b/pkg/common/config/parse.go @@ -15,19 +15,26 @@ package config import ( - "bytes" + _ "embed" "fmt" + "github.com/OpenIMSDK/tools/config" "os" "path/filepath" "runtime" "gopkg.in/yaml.v3" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/constant" - "github.com/OpenIMSDK/Open-IM-Server/pkg/discoveryregistry" - "github.com/OpenIMSDK/Open-IM-Server/pkg/utils" + "github.com/OpenIMSDK/tools/constant" + "github.com/OpenIMSDK/tools/utils" ) +//go:embed version +var version string + +func init() { + config.Version = version +} + var ( _, b, _, _ = runtime.Caller(0) // Root folder of this project. @@ -37,12 +44,10 @@ var ( const ( FileName = "config.yaml" NotificationFileName = "notification.yaml" - ENV = "CONFIG_NAME" DefaultFolderPath = "../config/" - ConfKey = "conf" ) -func GetOptionsByNotification(cfg NotificationConf) utils.Options { +func GetOptionsByNotification(cfg config.NotificationConf) utils.Options { opts := utils.NewOptions() if cfg.UnreadCount { opts = utils.WithOptions(opts, utils.WithUnreadCount(true)) @@ -59,18 +64,7 @@ func GetOptionsByNotification(cfg NotificationConf) utils.Options { return opts } -func (c *config) unmarshalConfig(config interface{}, configPath string) error { - bytes, err := os.ReadFile(configPath) - if err != nil { - return err - } - if err = yaml.Unmarshal(bytes, config); err != nil { - return err - } - return nil -} - -func (c *config) initConfig(config interface{}, configName, configFolderPath string) error { +func initConfig(config interface{}, configName, configFolderPath string) error { if configFolderPath == "" { configFolderPath = DefaultFolderPath } @@ -87,37 +81,24 @@ func (c *config) initConfig(config interface{}, configName, configFolderPath str } else { Root = filepath.Dir(configPath) } - return c.unmarshalConfig(config, configPath) -} - -func (c *config) RegisterConf2Registry(registry discoveryregistry.SvcDiscoveryRegistry) error { - bytes, err := yaml.Marshal(Config) + data, err := os.ReadFile(configPath) if err != nil { return err } - return registry.RegisterConf2Registry(ConfKey, bytes) -} - -func (c *config) GetConfFromRegistry(registry discoveryregistry.SvcDiscoveryRegistry) ([]byte, error) { - return registry.GetConfFromRegistry(ConfKey) + if err = yaml.Unmarshal(data, config); err != nil { + return err + } + return nil } func InitConfig(configFolderPath string) error { - err := Config.initConfig(&Config, FileName, configFolderPath) + err := initConfig(&config.Config, FileName, configFolderPath) if err != nil { return err } - err = Config.initConfig(&Config.Notification, NotificationFileName, configFolderPath) + err = initConfig(&config.Config.Notification, NotificationFileName, configFolderPath) if err != nil { return err } return nil } - -func EncodeConfig() []byte { - buf := bytes.NewBuffer(nil) - if err := yaml.NewEncoder(buf).Encode(Config); err != nil { - panic(err) - } - return buf.Bytes() -} diff --git a/pkg/common/constant/constant.go b/pkg/common/constant/constant.go deleted file mode 100644 index 3f34b9734..000000000 --- a/pkg/common/constant/constant.go +++ /dev/null @@ -1,363 +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. - -package constant - -const ( - - ///ContentType - //UserRelated. - ContentTypeBegin = 100 - Text = 101 - Picture = 102 - Voice = 103 - Video = 104 - File = 105 - AtText = 106 - Merger = 107 - Card = 108 - Location = 109 - Custom = 110 - Revoke = 111 - Typing = 113 - Quote = 114 - - AdvancedText = 117 - - CustomNotTriggerConversation = 119 - CustomOnlineOnly = 120 - ReactionMessageModifier = 121 - ReactionMessageDeleter = 122 - - Common = 200 - GroupMsg = 201 - SignalMsg = 202 - CustomNotification = 203 - - // SysRelated. - NotificationBegin = 1000 - - FriendApplicationApprovedNotification = 1201 // add_friend_response - FriendApplicationRejectedNotification = 1202 // add_friend_response - FriendApplicationNotification = 1203 // add_friend - FriendAddedNotification = 1204 - FriendDeletedNotification = 1205 // delete_friend - FriendRemarkSetNotification = 1206 // set_friend_remark? - BlackAddedNotification = 1207 // add_black - BlackDeletedNotification = 1208 // remove_black - FriendInfoUpdatedNotification = 1209 - - ConversationChangeNotification = 1300 // change conversation opt - - UserNotificationBegin = 1301 - UserInfoUpdatedNotification = 1303 // SetSelfInfoTip = 204 - UserNotificationEnd = 1399 - OANotification = 1400 - - GroupNotificationBegin = 1500 - - GroupCreatedNotification = 1501 - GroupInfoSetNotification = 1502 - JoinGroupApplicationNotification = 1503 - MemberQuitNotification = 1504 - GroupApplicationAcceptedNotification = 1505 - GroupApplicationRejectedNotification = 1506 - GroupOwnerTransferredNotification = 1507 - MemberKickedNotification = 1508 - MemberInvitedNotification = 1509 - MemberEnterNotification = 1510 - GroupDismissedNotification = 1511 - GroupMemberMutedNotification = 1512 - GroupMemberCancelMutedNotification = 1513 - GroupMutedNotification = 1514 - GroupCancelMutedNotification = 1515 - GroupMemberInfoSetNotification = 1516 - GroupMemberSetToAdminNotification = 1517 - GroupMemberSetToOrdinaryUserNotification = 1518 - GroupInfoSetAnnouncementNotification = 1519 - GroupInfoSetNameNotification = 1520 - - SignalingNotificationBegin = 1600 - SignalingNotification = 1601 - SignalingNotificationEnd = 1649 - - SuperGroupNotificationBegin = 1650 - SuperGroupUpdateNotification = 1651 - MsgDeleteNotification = 1652 - SuperGroupNotificationEnd = 1699 - - ConversationPrivateChatNotification = 1701 - ConversationUnreadNotification = 1702 - - MsgRevokeNotification = 2101 - - BusinessNotificationBegin = 2000 - BusinessNotification = 2001 - BusinessNotificationEnd = 2099 - - ClearConversationNotification = 2101 - DeleteMsgsNotification = 2102 - - HasReadReceipt = 2200 - - NotificationEnd = 5000 - - // status. - MsgNormal = 1 - MsgDeleted = 4 - - // MsgFrom. - UserMsgType = 100 - SysMsgType = 200 - - // SessionType. - SingleChatType = 1 - GroupChatType = 2 - SuperGroupChatType = 3 - NotificationChatType = 4 - // token. - NormalToken = 0 - InValidToken = 1 - KickedToken = 2 - ExpiredToken = 3 - - // MultiTerminalLogin. - DefalutNotKick = 0 - // Full-end login, but the same end is mutually exclusive. - AllLoginButSameTermKick = 1 - // Only one of the endpoints can log in. - SingleTerminalLogin = 2 - // The web side can be online at the same time, and the other side can only log in at one end. - WebAndOther = 3 - // The PC side is mutually exclusive, and the mobile side is mutually exclusive, but the web side can be online at - // the same time. - PcMobileAndWeb = 4 - // The PC terminal can be online at the same time,but other terminal only one of the endpoints can login. - PCAndOther = 5 - - OnlineStatus = "online" - OfflineStatus = "offline" - Registered = "registered" - UnRegistered = "unregistered" - - // MsgReceiveOpt. - ReceiveMessage = 0 - NotReceiveMessage = 1 - ReceiveNotNotifyMessage = 2 - - // OptionsKey. - IsHistory = "history" - IsPersistent = "persistent" - IsOfflinePush = "offlinePush" - IsUnreadCount = "unreadCount" - IsConversationUpdate = "conversationUpdate" - IsSenderSync = "senderSync" - IsNotPrivate = "notPrivate" - IsSenderConversationUpdate = "senderConversationUpdate" - IsSenderNotificationPush = "senderNotificationPush" - IsReactionFromCache = "reactionFromCache" - IsNotNotification = "isNotNotification" - IsSendMsg = "isSendMsg" - - // GroupStatus. - GroupOk = 0 - GroupBanChat = 1 - GroupStatusDismissed = 2 - GroupStatusMuted = 3 - - // GroupType. - NormalGroup = 0 - SuperGroup = 1 - WorkingGroup = 2 - - GroupBaned = 3 - GroupBanPrivateChat = 4 - - // UserJoinGroupSource. - JoinByAdmin = 1 - - JoinByInvitation = 2 - JoinBySearch = 3 - JoinByQRCode = 4 - - // Minio. - MinioDurationTimes = 3600 - // Aws. - AwsDurationTimes = 3600 - - // callbackCommand. - CallbackBeforeSendSingleMsgCommand = "callbackBeforeSendSingleMsgCommand" - CallbackAfterSendSingleMsgCommand = "callbackAfterSendSingleMsgCommand" - CallbackBeforeSendGroupMsgCommand = "callbackBeforeSendGroupMsgCommand" - CallbackAfterSendGroupMsgCommand = "callbackAfterSendGroupMsgCommand" - CallbackMsgModifyCommand = "callbackMsgModifyCommand" - CallbackUserOnlineCommand = "callbackUserOnlineCommand" - CallbackUserOfflineCommand = "callbackUserOfflineCommand" - CallbackUserKickOffCommand = "callbackUserKickOffCommand" - CallbackOfflinePushCommand = "callbackOfflinePushCommand" - CallbackOnlinePushCommand = "callbackOnlinePushCommand" - CallbackSuperGroupOnlinePushCommand = "callbackSuperGroupOnlinePushCommand" - CallbackBeforeAddFriendCommand = "callbackBeforeAddFriendCommand" - CallbackBeforeCreateGroupCommand = "callbackBeforeCreateGroupCommand" - CallbackBeforeMemberJoinGroupCommand = "callbackBeforeMemberJoinGroupCommand" - CallbackBeforeSetGroupMemberInfoCommand = "CallbackBeforeSetGroupMemberInfoCommand" - CallbackBeforeSetMessageReactionExtensionCommand = "callbackBeforeSetMessageReactionExtensionCommand" - CallbackBeforeDeleteMessageReactionExtensionsCommand = "callbackBeforeDeleteMessageReactionExtensionsCommand" - CallbackGetMessageListReactionExtensionsCommand = "callbackGetMessageListReactionExtensionsCommand" - CallbackAddMessageListReactionExtensionsCommand = "callbackAddMessageListReactionExtensionsCommand" - - // callback actionCode. - ActionAllow = 0 - ActionForbidden = 1 - // callback callbackHandleCode. - CallbackHandleSuccess = 0 - CallbackHandleFailed = 1 - - // minioUpload. - OtherType = 1 - VideoType = 2 - ImageType = 3 - - // sendMsgStaus. - MsgStatusNotExist = 0 - MsgIsSending = 1 - MsgSendSuccessed = 2 - MsgSendFailed = 3 -) - -const ( - WriteDiffusion = 0 - ReadDiffusion = 1 -) - -const ( - UnreliableNotification = 1 - ReliableNotificationNoMsg = 2 - ReliableNotificationMsg = 3 -) - -const ( - AtAllString = "AtAllTag" - AtNormal = 0 - AtMe = 1 - AtAll = 2 - AtAllAtMe = 3 - GroupNotification = 4 -) - -var ContentType2PushContent = map[int64]string{ - Picture: "[PICTURE]", - Voice: "[VOICE]", - Video: "[VIDEO]", - File: "[File]", - Text: "[TEXT]", - AtText: "[@TEXT]", - GroupMsg: "[GROUPMSG]]", - Common: "[NEWMSG]", - SignalMsg: "[SIGNALINVITE]", -} - -const ( - FieldRecvMsgOpt = 1 - FieldIsPinned = 2 - FieldAttachedInfo = 3 - FieldIsPrivateChat = 4 - FieldGroupAtType = 5 - FieldEx = 7 - FieldUnread = 8 - FieldBurnDuration = 9 - FieldHasReadSeq = 10 -) - -const ( - AppOrdinaryUsers = 1 - AppAdmin = 2 - - GroupOwner = 100 - GroupAdmin = 60 - GroupOrdinaryUsers = 20 - - GroupResponseAgree = 1 - GroupResponseRefuse = -1 - - FriendResponseNotHandle = 0 - FriendResponseAgree = 1 - FriendResponseRefuse = -1 - - Male = 1 - Female = 2 -) - -const ( - OperationID = "operationID" - OpUserID = "opUserID" - ConnID = "connID" - OpUserPlatform = "platform" - Token = "token" - RpcCustomHeader = "customHeader" // rpc中间件自定义ctx参数 - CheckKey = "CheckKey" - TriggerID = "triggerID" - RemoteAddr = "remoteAddr" -) - -const ( - BecomeFriendByImport = 1 // 管理员导入 - BecomeFriendByApply = 2 // 申请添加 -) - -const ( - ApplyNeedVerificationInviteDirectly = 0 // 申请需要同意 邀请直接进 - AllNeedVerification = 1 // 所有人进群需要验证,除了群主管理员邀请进群 - Directly = 2 // 直接进群 -) - -const ( - GroupRPCRecvSize = 30 - GroupRPCSendSize = 30 -) - -const FriendAcceptTip = "You have successfully become friends, so start chatting" - -func GroupIsBanChat(status int32) bool { - if status != GroupStatusMuted { - return false - } - return true -} - -func GroupIsBanPrivateChat(status int32) bool { - if status != GroupBanPrivateChat { - return false - } - return true -} - -const LogFileName = "OpenIM.log" - -const LocalHost = "0.0.0.0" - -// flag parse. -const ( - FlagPort = "port" - FlagWsPort = "ws_port" - - FlagPrometheusPort = "prometheus_port" - FlagConf = "config_folder_path" -) - -const OpenIMCommonConfigKey = "OpenIMServerConfig" - -const CallbackCommand = "command" - -const BatchNum = 100 diff --git a/pkg/common/constant/limit.go b/pkg/common/constant/limit.go deleted file mode 100644 index fd1551b34..000000000 --- a/pkg/common/constant/limit.go +++ /dev/null @@ -1,21 +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. - -package constant - -const ( - ShowNumber = 1000 - StatisticsTimeInterval = 60 - MaxNotificationNum = 500 -) diff --git a/pkg/common/constant/platform_id_to_name.go b/pkg/common/constant/platform_id_to_name.go deleted file mode 100644 index 3bc819ed9..000000000 --- a/pkg/common/constant/platform_id_to_name.go +++ /dev/null @@ -1,109 +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. - -package constant - -// fixme 1<--->IOS 2<--->Android 3<--->Windows -// fixme 4<--->OSX 5<--->Web 6<--->MiniWeb 7<--->Linux. -const ( - // Platform ID. - IOSPlatformID = 1 - AndroidPlatformID = 2 - WindowsPlatformID = 3 - OSXPlatformID = 4 - WebPlatformID = 5 - MiniWebPlatformID = 6 - LinuxPlatformID = 7 - AndroidPadPlatformID = 8 - IPadPlatformID = 9 - AdminPlatformID = 10 - - // Platform string match to Platform ID. - IOSPlatformStr = "IOS" - AndroidPlatformStr = "Android" - WindowsPlatformStr = "Windows" - OSXPlatformStr = "OSX" - WebPlatformStr = "Web" - MiniWebPlatformStr = "MiniWeb" - LinuxPlatformStr = "Linux" - AndroidPadPlatformStr = "APad" - IPadPlatformStr = "IPad" - AdminPlatformStr = "Admin" - - // terminal types. - TerminalPC = "PC" - TerminalMobile = "Mobile" -) - -var PlatformID2Name = map[int]string{ - IOSPlatformID: IOSPlatformStr, - AndroidPlatformID: AndroidPlatformStr, - WindowsPlatformID: WindowsPlatformStr, - OSXPlatformID: OSXPlatformStr, - WebPlatformID: WebPlatformStr, - MiniWebPlatformID: MiniWebPlatformStr, - LinuxPlatformID: LinuxPlatformStr, - AndroidPadPlatformID: AndroidPadPlatformStr, - IPadPlatformID: IPadPlatformStr, - AdminPlatformID: AdminPlatformStr, -} - -var PlatformName2ID = map[string]int{ - IOSPlatformStr: IOSPlatformID, - AndroidPlatformStr: AndroidPlatformID, - WindowsPlatformStr: WindowsPlatformID, - OSXPlatformStr: OSXPlatformID, - WebPlatformStr: WebPlatformID, - MiniWebPlatformStr: MiniWebPlatformID, - LinuxPlatformStr: LinuxPlatformID, - AndroidPadPlatformStr: AndroidPadPlatformID, - IPadPlatformStr: IPadPlatformID, - AdminPlatformStr: AdminPlatformID, -} - -var PlatformName2class = map[string]string{ - IOSPlatformStr: TerminalMobile, - AndroidPlatformStr: TerminalMobile, - MiniWebPlatformStr: WebPlatformStr, - WebPlatformStr: WebPlatformStr, - WindowsPlatformStr: TerminalPC, - OSXPlatformStr: TerminalPC, - LinuxPlatformStr: TerminalPC, -} - -var PlatformID2class = map[int]string{ - IOSPlatformID: TerminalMobile, - AndroidPlatformID: TerminalMobile, - MiniWebPlatformID: WebPlatformStr, - WebPlatformID: WebPlatformStr, - WindowsPlatformID: TerminalPC, - OSXPlatformID: TerminalPC, - LinuxPlatformID: TerminalPC, -} - -func PlatformIDToName(num int) string { - return PlatformID2Name[num] -} - -func PlatformNameToID(name string) int { - return PlatformName2ID[name] -} - -func PlatformNameToClass(name string) string { - return PlatformName2class[name] -} - -func PlatformIDToClass(num int) string { - return PlatformID2class[num] -} diff --git a/pkg/common/convert/black.go b/pkg/common/convert/black.go index ba0e2a5da..cae002ada 100644 --- a/pkg/common/convert/black.go +++ b/pkg/common/convert/black.go @@ -18,8 +18,8 @@ import ( "context" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/table/relation" - "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/sdkws" - sdk "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/sdkws" + "github.com/OpenIMSDK/protocol/sdkws" + sdk "github.com/OpenIMSDK/protocol/sdkws" ) func BlackDB2Pb( diff --git a/pkg/common/convert/conversation.go b/pkg/common/convert/conversation.go index 4bb051a7c..7eccad9b0 100644 --- a/pkg/common/convert/conversation.go +++ b/pkg/common/convert/conversation.go @@ -16,8 +16,8 @@ package convert import ( "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/table/relation" - "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/conversation" - "github.com/OpenIMSDK/Open-IM-Server/pkg/utils" + "github.com/OpenIMSDK/protocol/conversation" + "github.com/OpenIMSDK/tools/utils" ) func ConversationDB2Pb(conversationDB *relation.ConversationModel) *conversation.Conversation { diff --git a/pkg/common/convert/friend.go b/pkg/common/convert/friend.go index 0531ad195..322f9d10a 100644 --- a/pkg/common/convert/friend.go +++ b/pkg/common/convert/friend.go @@ -18,8 +18,8 @@ import ( "context" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/table/relation" - "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/sdkws" - "github.com/OpenIMSDK/Open-IM-Server/pkg/utils" + "github.com/OpenIMSDK/protocol/sdkws" + "github.com/OpenIMSDK/tools/utils" ) func FriendPb2DB(friend *sdkws.FriendInfo) *relation.FriendModel { diff --git a/pkg/common/convert/group.go b/pkg/common/convert/group.go index 9ec812574..efd2c3710 100644 --- a/pkg/common/convert/group.go +++ b/pkg/common/convert/group.go @@ -18,8 +18,8 @@ import ( "time" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/table/relation" - pbGroup "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/group" - sdkws "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/sdkws" + pbGroup "github.com/OpenIMSDK/protocol/group" + sdkws "github.com/OpenIMSDK/protocol/sdkws" ) func Db2PbGroupInfo(m *relation.GroupModel, ownerUserID string, memberCount uint32) *sdkws.GroupInfo { diff --git a/pkg/common/convert/msg.go b/pkg/common/convert/msg.go index b937369d5..525d35f1c 100644 --- a/pkg/common/convert/msg.go +++ b/pkg/common/convert/msg.go @@ -16,7 +16,7 @@ package convert import ( "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/table/unrelation" - "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/sdkws" + "github.com/OpenIMSDK/protocol/sdkws" ) func MsgPb2DB(msg *sdkws.MsgData) *unrelation.MsgDataModel { diff --git a/pkg/common/convert/user.go b/pkg/common/convert/user.go index d8d4c488c..28f4781e7 100644 --- a/pkg/common/convert/user.go +++ b/pkg/common/convert/user.go @@ -18,7 +18,7 @@ import ( "time" relationTb "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/table/relation" - "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/sdkws" + "github.com/OpenIMSDK/protocol/sdkws" ) func UsersDB2Pb(users []*relationTb.UserModel) (result []*sdkws.UserInfo) { diff --git a/pkg/common/db/cache/conversation.go b/pkg/common/db/cache/conversation.go index 119967c70..7f0290c8f 100644 --- a/pkg/common/db/cache/conversation.go +++ b/pkg/common/db/cache/conversation.go @@ -26,7 +26,7 @@ import ( "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/relation" relationTb "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/table/relation" - "github.com/OpenIMSDK/Open-IM-Server/pkg/utils" + "github.com/OpenIMSDK/tools/utils" ) const ( diff --git a/pkg/common/db/cache/friend.go b/pkg/common/db/cache/friend.go index b15ed95d1..698f1364c 100644 --- a/pkg/common/db/cache/friend.go +++ b/pkg/common/db/cache/friend.go @@ -22,7 +22,7 @@ import ( "github.com/redis/go-redis/v9" relationTb "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/table/relation" - "github.com/OpenIMSDK/Open-IM-Server/pkg/utils" + "github.com/OpenIMSDK/tools/utils" ) const ( diff --git a/pkg/common/db/cache/group.go b/pkg/common/db/cache/group.go index 44ae04ecf..d72f06908 100644 --- a/pkg/common/db/cache/group.go +++ b/pkg/common/db/cache/group.go @@ -25,7 +25,7 @@ import ( relationTb "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/table/relation" unrelationTb "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/table/unrelation" - "github.com/OpenIMSDK/Open-IM-Server/pkg/utils" + "github.com/OpenIMSDK/tools/utils" ) const ( diff --git a/pkg/common/db/cache/init_redis.go b/pkg/common/db/cache/init_redis.go index 104d48ffd..307e40327 100644 --- a/pkg/common/db/cache/init_redis.go +++ b/pkg/common/db/cache/init_redis.go @@ -22,9 +22,9 @@ import ( "github.com/redis/go-redis/v9" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/config" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/mw/specialerror" - "github.com/OpenIMSDK/Open-IM-Server/pkg/errs" + "github.com/OpenIMSDK/tools/config" + "github.com/OpenIMSDK/tools/errs" + "github.com/OpenIMSDK/tools/mw/specialerror" ) const ( diff --git a/pkg/common/db/cache/init_redis_test.go b/pkg/common/db/cache/init_redis_test.go deleted file mode 100644 index 4b3f57066..000000000 --- a/pkg/common/db/cache/init_redis_test.go +++ /dev/null @@ -1,37 +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. - -package cache - -import ( - "fmt" - "testing" - - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/config" -) - -// TestNewRedis Test redis connection -func TestNewRedis(t *testing.T) { - err := config.InitConfig("config_folder_path") - if err != nil { - fmt.Println("config load error") - return - } - redis, err := NewRedis() - if err != nil { - fmt.Println(err) - return - } - fmt.Println(redis) -} diff --git a/pkg/common/db/cache/meta_cache.go b/pkg/common/db/cache/meta_cache.go index 86a47f04b..ca742d4a3 100644 --- a/pkg/common/db/cache/meta_cache.go +++ b/pkg/common/db/cache/meta_cache.go @@ -23,9 +23,9 @@ import ( "github.com/dtm-labs/rockscache" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/log" - "github.com/OpenIMSDK/Open-IM-Server/pkg/errs" - "github.com/OpenIMSDK/Open-IM-Server/pkg/utils" + "github.com/OpenIMSDK/tools/errs" + "github.com/OpenIMSDK/tools/log" + "github.com/OpenIMSDK/tools/utils" ) const ( diff --git a/pkg/common/db/cache/msg.go b/pkg/common/db/cache/msg.go index 179a0ee61..66f3cacee 100644 --- a/pkg/common/db/cache/msg.go +++ b/pkg/common/db/cache/msg.go @@ -21,16 +21,16 @@ import ( "github.com/dtm-labs/rockscache" - "github.com/OpenIMSDK/Open-IM-Server/pkg/errs" + "github.com/OpenIMSDK/tools/errs" "github.com/gogo/protobuf/jsonpb" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/config" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/constant" unRelationTb "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/table/unrelation" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/log" - "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/sdkws" - "github.com/OpenIMSDK/Open-IM-Server/pkg/utils" + "github.com/OpenIMSDK/protocol/sdkws" + "github.com/OpenIMSDK/tools/config" + "github.com/OpenIMSDK/tools/constant" + "github.com/OpenIMSDK/tools/log" + "github.com/OpenIMSDK/tools/utils" "github.com/redis/go-redis/v9" ) diff --git a/pkg/common/db/controller/auth.go b/pkg/common/db/controller/auth.go index 678d98b11..491a1394b 100644 --- a/pkg/common/db/controller/auth.go +++ b/pkg/common/db/controller/auth.go @@ -19,10 +19,10 @@ import ( "github.com/golang-jwt/jwt/v4" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/constant" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/cache" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/tokenverify" - "github.com/OpenIMSDK/Open-IM-Server/pkg/utils" + "github.com/OpenIMSDK/tools/constant" + "github.com/OpenIMSDK/tools/tokenverify" + "github.com/OpenIMSDK/tools/utils" ) type AuthDatabase interface { diff --git a/pkg/common/db/controller/black.go b/pkg/common/db/controller/black.go index 99cf25ebd..767797eb1 100644 --- a/pkg/common/db/controller/black.go +++ b/pkg/common/db/controller/black.go @@ -19,8 +19,8 @@ import ( "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/cache" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/table/relation" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/log" - "github.com/OpenIMSDK/Open-IM-Server/pkg/utils" + "github.com/OpenIMSDK/tools/log" + "github.com/OpenIMSDK/tools/utils" ) type BlackDatabase interface { diff --git a/pkg/common/db/controller/chatlog.go b/pkg/common/db/controller/chatlog.go index deca63697..37f620271 100644 --- a/pkg/common/db/controller/chatlog.go +++ b/pkg/common/db/controller/chatlog.go @@ -16,7 +16,7 @@ package controller import ( relationTb "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/table/relation" - pbMsg "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/msg" + pbMsg "github.com/OpenIMSDK/protocol/msg" ) type ChatLogDatabase interface { diff --git a/pkg/common/db/controller/conversation.go b/pkg/common/db/controller/conversation.go index d65315918..0f3403084 100644 --- a/pkg/common/db/controller/conversation.go +++ b/pkg/common/db/controller/conversation.go @@ -18,12 +18,12 @@ import ( "context" "time" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/constant" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/cache" relationTb "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/table/relation" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/tx" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/log" - "github.com/OpenIMSDK/Open-IM-Server/pkg/utils" + "github.com/OpenIMSDK/tools/constant" + "github.com/OpenIMSDK/tools/log" + "github.com/OpenIMSDK/tools/tx" + "github.com/OpenIMSDK/tools/utils" ) type ConversationDatabase interface { diff --git a/pkg/common/db/controller/friend.go b/pkg/common/db/controller/friend.go index 6b41b87f2..3c8d61a40 100644 --- a/pkg/common/db/controller/friend.go +++ b/pkg/common/db/controller/friend.go @@ -20,13 +20,13 @@ import ( "gorm.io/gorm" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/constant" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/cache" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/table/relation" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/tx" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/mcontext" - "github.com/OpenIMSDK/Open-IM-Server/pkg/errs" - "github.com/OpenIMSDK/Open-IM-Server/pkg/utils" + "github.com/OpenIMSDK/tools/constant" + "github.com/OpenIMSDK/tools/errs" + "github.com/OpenIMSDK/tools/mcontext" + "github.com/OpenIMSDK/tools/tx" + "github.com/OpenIMSDK/tools/utils" ) type FriendDatabase interface { diff --git a/pkg/common/db/controller/group.go b/pkg/common/db/controller/group.go index dff427580..ad0b4e548 100644 --- a/pkg/common/db/controller/group.go +++ b/pkg/common/db/controller/group.go @@ -24,14 +24,14 @@ import ( "go.mongodb.org/mongo-driver/mongo" "gorm.io/gorm" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/constant" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/cache" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/relation" relationTb "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/table/relation" unRelationTb "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/table/unrelation" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/tx" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/unrelation" - "github.com/OpenIMSDK/Open-IM-Server/pkg/utils" + "github.com/OpenIMSDK/tools/constant" + "github.com/OpenIMSDK/tools/tx" + "github.com/OpenIMSDK/tools/utils" ) type GroupDatabase interface { diff --git a/pkg/common/db/controller/msg.go b/pkg/common/db/controller/msg.go index 34e895765..555828c22 100644 --- a/pkg/common/db/controller/msg.go +++ b/pkg/common/db/controller/msg.go @@ -21,21 +21,21 @@ import ( "github.com/redis/go-redis/v9" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/config" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/convert" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/cache" unRelationTb "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/table/unrelation" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/unrelation" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/kafka" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/log" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/prome" - "github.com/OpenIMSDK/Open-IM-Server/pkg/errs" + "github.com/OpenIMSDK/tools/config" + "github.com/OpenIMSDK/tools/errs" + "github.com/OpenIMSDK/tools/log" "go.mongodb.org/mongo-driver/mongo" - pbMsg "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/msg" - "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/sdkws" - "github.com/OpenIMSDK/Open-IM-Server/pkg/utils" + pbMsg "github.com/OpenIMSDK/protocol/msg" + "github.com/OpenIMSDK/protocol/sdkws" + "github.com/OpenIMSDK/tools/utils" ) const ( diff --git a/pkg/common/db/controller/msg_test.go b/pkg/common/db/controller/msg_test.go index 7e50b8489..e322e6218 100644 --- a/pkg/common/db/controller/msg_test.go +++ b/pkg/common/db/controller/msg_test.go @@ -23,13 +23,13 @@ import ( "testing" "time" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/log" + "github.com/OpenIMSDK/tools/log" "go.mongodb.org/mongo-driver/bson" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/config" unRelationTb "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/table/unrelation" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/unrelation" + "github.com/OpenIMSDK/tools/config" ) func Test_BatchInsertChat2DB(t *testing.T) { diff --git a/pkg/common/db/controller/user.go b/pkg/common/db/controller/user.go index 81cabe0f6..4f9383b09 100644 --- a/pkg/common/db/controller/user.go +++ b/pkg/common/db/controller/user.go @@ -20,9 +20,9 @@ import ( "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/cache" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/table/relation" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/tx" - "github.com/OpenIMSDK/Open-IM-Server/pkg/errs" - "github.com/OpenIMSDK/Open-IM-Server/pkg/utils" + "github.com/OpenIMSDK/tools/errs" + "github.com/OpenIMSDK/tools/tx" + "github.com/OpenIMSDK/tools/utils" ) type UserDatabase interface { diff --git a/pkg/common/db/localcache/conversation.go b/pkg/common/db/localcache/conversation.go index 36f82b93e..98720fe3a 100644 --- a/pkg/common/db/localcache/conversation.go +++ b/pkg/common/db/localcache/conversation.go @@ -18,8 +18,8 @@ import ( "context" "sync" - "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/conversation" "github.com/OpenIMSDK/Open-IM-Server/pkg/rpcclient" + "github.com/OpenIMSDK/protocol/conversation" ) type ConversationLocalCache struct { diff --git a/pkg/common/db/localcache/group.go b/pkg/common/db/localcache/group.go index d58d0a8eb..57cea7245 100644 --- a/pkg/common/db/localcache/group.go +++ b/pkg/common/db/localcache/group.go @@ -18,9 +18,9 @@ import ( "context" "sync" - "github.com/OpenIMSDK/Open-IM-Server/pkg/errs" - "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/group" "github.com/OpenIMSDK/Open-IM-Server/pkg/rpcclient" + "github.com/OpenIMSDK/protocol/group" + "github.com/OpenIMSDK/tools/errs" ) type GroupLocalCache struct { diff --git a/pkg/common/db/ormutil/utils.go b/pkg/common/db/ormutil/utils.go deleted file mode 100644 index 7e4bd4f71..000000000 --- a/pkg/common/db/ormutil/utils.go +++ /dev/null @@ -1,73 +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. - -package ormutil - -import ( - "fmt" - "strings" - - "gorm.io/gorm" - - "github.com/OpenIMSDK/Open-IM-Server/pkg/errs" -) - -func GormPage[E any](db *gorm.DB, pageNumber, showNumber int32) (uint32, []*E, error) { - var count int64 - var model E - if err := db.Model(&model).Count(&count).Error; err != nil { - return 0, nil, errs.Wrap(err) - } - var es []*E - if err := db.Limit(int(showNumber)).Offset(int((pageNumber - 1) * showNumber)).Find(&es).Error; err != nil { - return 0, nil, errs.Wrap(err) - } - return uint32(count), es, nil -} - -func GormSearch[E any](db *gorm.DB, fields []string, value string, pageNumber, showNumber int32) (uint32, []*E, error) { - if len(fields) > 0 && value != "" { - val := "%" + value + "%" - arr := make([]string, 0, len(fields)) - vals := make([]interface{}, 0, len(fields)) - for _, field := range fields { - arr = append(arr, fmt.Sprintf("`%s` like ?", field)) - vals = append(vals, val) - } - db = db.Where(strings.Join(arr, " or "), vals...) - } - return GormPage[E](db, pageNumber, showNumber) -} - -func GormIn[E any](db **gorm.DB, field string, es []E) { - if len(es) == 0 { - return - } - *db = (*db).Where(field+" in (?)", es) -} - -func MapCount(db *gorm.DB, field string) (map[string]uint32, error) { - var items []struct { - ID string `gorm:"column:id"` - Count uint32 `gorm:"column:count"` - } - if err := db.Select(field + " as id, count(1) as count").Group(field).Find(&items).Error; err != nil { - return nil, errs.Wrap(err) - } - m := make(map[string]uint32) - for _, item := range items { - m[item.ID] = item.Count - } - return m, nil -} diff --git a/pkg/common/db/relation/black_model.go b/pkg/common/db/relation/black_model.go index ca90f43a7..eede403b1 100644 --- a/pkg/common/db/relation/black_model.go +++ b/pkg/common/db/relation/black_model.go @@ -17,12 +17,12 @@ package relation import ( "context" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/ormutil" + "github.com/OpenIMSDK/tools/ormutil" "gorm.io/gorm" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/table/relation" - "github.com/OpenIMSDK/Open-IM-Server/pkg/utils" + "github.com/OpenIMSDK/tools/utils" ) type BlackGorm struct { diff --git a/pkg/common/db/relation/chat_log_model.go b/pkg/common/db/relation/chat_log_model.go index b0c88b608..056295e15 100644 --- a/pkg/common/db/relation/chat_log_model.go +++ b/pkg/common/db/relation/chat_log_model.go @@ -20,11 +20,11 @@ import ( "google.golang.org/protobuf/proto" "gorm.io/gorm" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/constant" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/table/relation" - pbMsg "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/msg" - sdkws "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/sdkws" - "github.com/OpenIMSDK/Open-IM-Server/pkg/utils" + pbMsg "github.com/OpenIMSDK/protocol/msg" + sdkws "github.com/OpenIMSDK/protocol/sdkws" + "github.com/OpenIMSDK/tools/constant" + "github.com/OpenIMSDK/tools/utils" ) type ChatLogGorm struct { diff --git a/pkg/common/db/relation/conversation_model.go b/pkg/common/db/relation/conversation_model.go index fb88b8305..716d2cbe4 100644 --- a/pkg/common/db/relation/conversation_model.go +++ b/pkg/common/db/relation/conversation_model.go @@ -19,9 +19,9 @@ import ( "gorm.io/gorm" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/constant" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/table/relation" - "github.com/OpenIMSDK/Open-IM-Server/pkg/utils" + "github.com/OpenIMSDK/tools/constant" + "github.com/OpenIMSDK/tools/utils" ) type ConversationGorm struct { diff --git a/pkg/common/db/relation/friend_model.go b/pkg/common/db/relation/friend_model.go index 10daf8e80..4b119c1f8 100644 --- a/pkg/common/db/relation/friend_model.go +++ b/pkg/common/db/relation/friend_model.go @@ -20,7 +20,7 @@ import ( "gorm.io/gorm" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/table/relation" - "github.com/OpenIMSDK/Open-IM-Server/pkg/utils" + "github.com/OpenIMSDK/tools/utils" ) type FriendGorm struct { diff --git a/pkg/common/db/relation/friend_request_model.go b/pkg/common/db/relation/friend_request_model.go index fe08ac06c..9f5cbbfee 100644 --- a/pkg/common/db/relation/friend_request_model.go +++ b/pkg/common/db/relation/friend_request_model.go @@ -20,7 +20,7 @@ import ( "gorm.io/gorm" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/table/relation" - "github.com/OpenIMSDK/Open-IM-Server/pkg/utils" + "github.com/OpenIMSDK/tools/utils" ) type FriendRequestGorm struct { diff --git a/pkg/common/db/relation/group_member_model.go b/pkg/common/db/relation/group_member_model.go index 8f5aa937d..7c2ded83f 100644 --- a/pkg/common/db/relation/group_member_model.go +++ b/pkg/common/db/relation/group_member_model.go @@ -19,10 +19,10 @@ import ( "gorm.io/gorm" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/constant" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/ormutil" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/table/relation" - "github.com/OpenIMSDK/Open-IM-Server/pkg/utils" + "github.com/OpenIMSDK/tools/constant" + "github.com/OpenIMSDK/tools/ormutil" + "github.com/OpenIMSDK/tools/utils" ) var _ relation.GroupMemberModelInterface = (*GroupMemberGorm)(nil) diff --git a/pkg/common/db/relation/group_model.go b/pkg/common/db/relation/group_model.go index 3a782e02a..c95d51861 100644 --- a/pkg/common/db/relation/group_model.go +++ b/pkg/common/db/relation/group_model.go @@ -18,14 +18,14 @@ import ( "context" "time" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/constant" + "github.com/OpenIMSDK/tools/constant" "gorm.io/gorm" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/ormutil" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/table/relation" - "github.com/OpenIMSDK/Open-IM-Server/pkg/errs" - "github.com/OpenIMSDK/Open-IM-Server/pkg/utils" + "github.com/OpenIMSDK/tools/errs" + "github.com/OpenIMSDK/tools/ormutil" + "github.com/OpenIMSDK/tools/utils" ) var _ relation.GroupModelInterface = (*GroupGorm)(nil) diff --git a/pkg/common/db/relation/group_request_model.go b/pkg/common/db/relation/group_request_model.go index 0220f308e..a38f1f782 100644 --- a/pkg/common/db/relation/group_request_model.go +++ b/pkg/common/db/relation/group_request_model.go @@ -17,12 +17,12 @@ package relation import ( "context" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/ormutil" + "github.com/OpenIMSDK/tools/ormutil" "gorm.io/gorm" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/table/relation" - "github.com/OpenIMSDK/Open-IM-Server/pkg/utils" + "github.com/OpenIMSDK/tools/utils" ) type GroupRequestGorm struct { diff --git a/pkg/common/db/relation/mysql_init.go b/pkg/common/db/relation/mysql_init.go index 267acce74..29873cc89 100644 --- a/pkg/common/db/relation/mysql_init.go +++ b/pkg/common/db/relation/mysql_init.go @@ -21,10 +21,10 @@ import ( mysqlDriver "github.com/go-sql-driver/mysql" "gorm.io/driver/mysql" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/config" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/log" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/mw/specialerror" - "github.com/OpenIMSDK/Open-IM-Server/pkg/errs" + "github.com/OpenIMSDK/tools/config" + "github.com/OpenIMSDK/tools/errs" + "github.com/OpenIMSDK/tools/log" + "github.com/OpenIMSDK/tools/mw/specialerror" "gorm.io/gorm" "gorm.io/gorm/logger" diff --git a/pkg/common/db/relation/object_model.go b/pkg/common/db/relation/object_model.go index 928c72fbe..02ba0bcf0 100644 --- a/pkg/common/db/relation/object_model.go +++ b/pkg/common/db/relation/object_model.go @@ -20,7 +20,7 @@ import ( "gorm.io/gorm" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/table/relation" - "github.com/OpenIMSDK/Open-IM-Server/pkg/errs" + "github.com/OpenIMSDK/tools/errs" ) type ObjectInfoGorm struct { diff --git a/pkg/common/db/relation/user_model.go b/pkg/common/db/relation/user_model.go index d3be5dd7e..b7c592eeb 100644 --- a/pkg/common/db/relation/user_model.go +++ b/pkg/common/db/relation/user_model.go @@ -18,12 +18,12 @@ import ( "context" "time" - "github.com/OpenIMSDK/Open-IM-Server/pkg/errs" + "github.com/OpenIMSDK/tools/errs" "gorm.io/gorm" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/table/relation" - "github.com/OpenIMSDK/Open-IM-Server/pkg/utils" + "github.com/OpenIMSDK/tools/utils" ) type UserGorm struct { diff --git a/pkg/common/db/s3/cont/controller.go b/pkg/common/db/s3/cont/controller.go index 07eacc63b..01dbc787f 100644 --- a/pkg/common/db/s3/cont/controller.go +++ b/pkg/common/db/s3/cont/controller.go @@ -27,8 +27,8 @@ import ( "github.com/google/uuid" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/s3" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/log" - "github.com/OpenIMSDK/Open-IM-Server/pkg/errs" + "github.com/OpenIMSDK/tools/errs" + "github.com/OpenIMSDK/tools/log" ) func New(impl s3.Interface) *Controller { diff --git a/pkg/common/db/s3/cos/cos.go b/pkg/common/db/s3/cos/cos.go index cfdaaa5e4..29d74ceb4 100644 --- a/pkg/common/db/s3/cos/cos.go +++ b/pkg/common/db/s3/cos/cos.go @@ -26,8 +26,8 @@ import ( "github.com/tencentyun/cos-go-sdk-v5" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/config" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/s3" + "github.com/OpenIMSDK/tools/config" ) const ( diff --git a/pkg/common/db/s3/minio/minio.go b/pkg/common/db/s3/minio/minio.go index bb6e6ce24..d5ac7de40 100644 --- a/pkg/common/db/s3/minio/minio.go +++ b/pkg/common/db/s3/minio/minio.go @@ -29,8 +29,8 @@ import ( "github.com/minio/minio-go/v7/pkg/credentials" "github.com/minio/minio-go/v7/pkg/signer" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/config" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/s3" + "github.com/OpenIMSDK/tools/config" ) const ( diff --git a/pkg/common/db/s3/oss/oss.go b/pkg/common/db/s3/oss/oss.go index 774150389..ee4d19464 100644 --- a/pkg/common/db/s3/oss/oss.go +++ b/pkg/common/db/s3/oss/oss.go @@ -26,8 +26,8 @@ import ( "github.com/aliyun/aliyun-oss-go-sdk/oss" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/config" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/s3" + "github.com/OpenIMSDK/tools/config" ) const ( diff --git a/pkg/common/db/table/relation/chatlog.go b/pkg/common/db/table/relation/chatlog.go index 8d4429362..13bf7e842 100644 --- a/pkg/common/db/table/relation/chatlog.go +++ b/pkg/common/db/table/relation/chatlog.go @@ -17,7 +17,7 @@ package relation import ( "time" - pbMsg "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/msg" + pbMsg "github.com/OpenIMSDK/protocol/msg" ) const ( diff --git a/pkg/common/db/table/relation/utils.go b/pkg/common/db/table/relation/utils.go index c8c59b390..c944eae8b 100644 --- a/pkg/common/db/table/relation/utils.go +++ b/pkg/common/db/table/relation/utils.go @@ -17,7 +17,7 @@ package relation import ( "gorm.io/gorm" - "github.com/OpenIMSDK/Open-IM-Server/pkg/utils" + "github.com/OpenIMSDK/tools/utils" ) type BatchUpdateGroupMember struct { diff --git a/pkg/common/db/table/unrelation/msg.go b/pkg/common/db/table/unrelation/msg.go index dc16613ed..30e6670b5 100644 --- a/pkg/common/db/table/unrelation/msg.go +++ b/pkg/common/db/table/unrelation/msg.go @@ -19,11 +19,11 @@ import ( "strconv" "time" - "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/msg" + "github.com/OpenIMSDK/protocol/msg" "go.mongodb.org/mongo-driver/mongo" - "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/sdkws" + "github.com/OpenIMSDK/protocol/sdkws" ) const ( diff --git a/pkg/common/db/tx/gorm.go b/pkg/common/db/tx/gorm.go deleted file mode 100644 index 98e71cb9f..000000000 --- a/pkg/common/db/tx/gorm.go +++ /dev/null @@ -1,33 +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. - -package tx - -import ( - "gorm.io/gorm" -) - -func NewGorm(db *gorm.DB) Tx { - return &_Gorm{tx: db} -} - -type _Gorm struct { - tx *gorm.DB -} - -func (g *_Gorm) Transaction(fn func(tx any) error) error { - return g.tx.Transaction(func(tx *gorm.DB) error { - return fn(tx) - }) -} diff --git a/pkg/common/db/tx/mongo.go b/pkg/common/db/tx/mongo.go deleted file mode 100644 index a0c38e372..000000000 --- a/pkg/common/db/tx/mongo.go +++ /dev/null @@ -1,47 +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. - -package tx - -import ( - "context" - - "go.mongodb.org/mongo-driver/mongo" - - "github.com/OpenIMSDK/Open-IM-Server/pkg/utils" -) - -func NewMongo(client *mongo.Client) CtxTx { - return &_Mongo{ - client: client, - } -} - -type _Mongo struct { - client *mongo.Client -} - -func (m *_Mongo) Transaction(ctx context.Context, fn func(ctx context.Context) error) error { - sess, err := m.client.StartSession() - if err != nil { - return err - } - sCtx := mongo.NewSessionContext(ctx, sess) - defer sess.EndSession(sCtx) - if err := fn(sCtx); err != nil { - _ = sess.AbortTransaction(sCtx) - return err - } - return utils.Wrap(sess.CommitTransaction(sCtx), "") -} diff --git a/pkg/common/db/tx/tx.go b/pkg/common/db/tx/tx.go deleted file mode 100644 index 9a6fe02ef..000000000 --- a/pkg/common/db/tx/tx.go +++ /dev/null @@ -1,25 +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. - -package tx - -import "context" - -type Tx interface { - Transaction(fn func(tx any) error) error -} - -type CtxTx interface { - Transaction(ctx context.Context, fn func(ctx context.Context) error) error -} diff --git a/pkg/common/db/unrelation/mongo.go b/pkg/common/db/unrelation/mongo.go index 9c9f7db3b..44077a838 100644 --- a/pkg/common/db/unrelation/mongo.go +++ b/pkg/common/db/unrelation/mongo.go @@ -17,18 +17,18 @@ package unrelation import ( "context" "fmt" + "go.mongodb.org/mongo-driver/bson" "strings" "time" "go.mongodb.org/mongo-driver/mongo" "go.mongodb.org/mongo-driver/mongo/options" - "go.mongodb.org/mongo-driver/x/bsonx" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/config" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/table/unrelation" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/mw/specialerror" - "github.com/OpenIMSDK/Open-IM-Server/pkg/errs" - "github.com/OpenIMSDK/Open-IM-Server/pkg/utils" + "github.com/OpenIMSDK/tools/config" + "github.com/OpenIMSDK/tools/errs" + "github.com/OpenIMSDK/tools/mw/specialerror" + "github.com/OpenIMSDK/tools/utils" ) const ( @@ -111,13 +111,15 @@ func (m *Mongo) createMongoIndex(collection string, isUnique bool, keys ...strin db := m.db.Database(config.Config.Mongo.Database).Collection(collection) opts := options.CreateIndexes().SetMaxTime(10 * time.Second) indexView := db.Indexes() - keysDoc := bsonx.Doc{} + keysDoc := bson.D{} // create composite indexes for _, key := range keys { if strings.HasPrefix(key, "-") { - keysDoc = keysDoc.Append(strings.TrimLeft(key, "-"), bsonx.Int32(-1)) + keysDoc = append(keysDoc, bson.E{Key: strings.TrimLeft(key, "-"), Value: -1}) + //keysDoc = keysDoc.Append(strings.TrimLeft(key, "-"), bsonx.Int32(-1)) } else { - keysDoc = keysDoc.Append(key, bsonx.Int32(1)) + keysDoc = append(keysDoc, bson.E{Key: key, Value: 1}) + //keysDoc = keysDoc.Append(key, bsonx.Int32(1)) } } // create index diff --git a/pkg/common/db/unrelation/msg.go b/pkg/common/db/unrelation/msg.go index b7403ebde..2f4a166e9 100644 --- a/pkg/common/db/unrelation/msg.go +++ b/pkg/common/db/unrelation/msg.go @@ -21,9 +21,9 @@ import ( "fmt" "time" - "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/msg" + "github.com/OpenIMSDK/protocol/msg" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/constant" + "github.com/OpenIMSDK/tools/constant" "go.mongodb.org/mongo-driver/bson" "go.mongodb.org/mongo-driver/bson/primitive" @@ -32,9 +32,9 @@ import ( "google.golang.org/protobuf/proto" table "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/table/unrelation" - "github.com/OpenIMSDK/Open-IM-Server/pkg/errs" - "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/sdkws" - "github.com/OpenIMSDK/Open-IM-Server/pkg/utils" + "github.com/OpenIMSDK/protocol/sdkws" + "github.com/OpenIMSDK/tools/errs" + "github.com/OpenIMSDK/tools/utils" ) var ErrMsgListNotExist = errors.New("user not have msg in mongoDB") diff --git a/pkg/common/db/unrelation/super_group.go b/pkg/common/db/unrelation/super_group.go index f2f867c49..e93ab2b43 100644 --- a/pkg/common/db/unrelation/super_group.go +++ b/pkg/common/db/unrelation/super_group.go @@ -22,7 +22,7 @@ import ( "go.mongodb.org/mongo-driver/mongo/options" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/table/unrelation" - "github.com/OpenIMSDK/Open-IM-Server/pkg/utils" + "github.com/OpenIMSDK/tools/utils" ) func NewSuperGroupMongoDriver(database *mongo.Database) unrelation.SuperGroupModelInterface { diff --git a/pkg/common/http/http_client.go b/pkg/common/http/http_client.go index 153deb30e..46d5f23c3 100644 --- a/pkg/common/http/http_client.go +++ b/pkg/common/http/http_client.go @@ -25,10 +25,10 @@ import ( "time" "github.com/OpenIMSDK/Open-IM-Server/pkg/callbackstruct" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/config" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/constant" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/log" - "github.com/OpenIMSDK/Open-IM-Server/pkg/errs" + "github.com/OpenIMSDK/tools/config" + "github.com/OpenIMSDK/tools/constant" + "github.com/OpenIMSDK/tools/errs" + "github.com/OpenIMSDK/tools/log" ) var client http.Client diff --git a/pkg/common/kafka/consumer.go b/pkg/common/kafka/consumer.go index 67bc3977b..e04abe944 100644 --- a/pkg/common/kafka/consumer.go +++ b/pkg/common/kafka/consumer.go @@ -17,7 +17,7 @@ package kafka import ( "sync" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/config" + "github.com/OpenIMSDK/tools/config" "github.com/Shopify/sarama" ) diff --git a/pkg/common/kafka/consumer_group.go b/pkg/common/kafka/consumer_group.go index 60e69d4a6..b4bd81660 100644 --- a/pkg/common/kafka/consumer_group.go +++ b/pkg/common/kafka/consumer_group.go @@ -17,7 +17,7 @@ package kafka import ( "context" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/log" + "github.com/OpenIMSDK/tools/log" "github.com/Shopify/sarama" ) diff --git a/pkg/common/kafka/producer.go b/pkg/common/kafka/producer.go index d52d76817..8eeaa6825 100644 --- a/pkg/common/kafka/producer.go +++ b/pkg/common/kafka/producer.go @@ -19,11 +19,11 @@ import ( "errors" "time" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/config" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/constant" - log "github.com/OpenIMSDK/Open-IM-Server/pkg/common/log" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/mcontext" - "github.com/OpenIMSDK/Open-IM-Server/pkg/utils" + "github.com/OpenIMSDK/tools/config" + "github.com/OpenIMSDK/tools/constant" + log "github.com/OpenIMSDK/tools/log" + "github.com/OpenIMSDK/tools/mcontext" + "github.com/OpenIMSDK/tools/utils" "github.com/Shopify/sarama" "google.golang.org/protobuf/proto" diff --git a/pkg/common/log/color.go b/pkg/common/log/color.go deleted file mode 100644 index 9d1121d61..000000000 --- a/pkg/common/log/color.go +++ /dev/null @@ -1,64 +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. - -package log - -import ( - "fmt" - - "go.uber.org/zap/zapcore" -) - -// Foreground colors. -const ( - Black Color = iota + 30 - Red - Green - Yellow - Blue - Magenta - Cyan - White -) - -var ( - _levelToColor = map[zapcore.Level]Color{ - zapcore.DebugLevel: White, - zapcore.InfoLevel: Blue, - zapcore.WarnLevel: Yellow, - zapcore.ErrorLevel: Red, - zapcore.DPanicLevel: Red, - zapcore.PanicLevel: Red, - zapcore.FatalLevel: Red, - } - _unknownLevelColor = make(map[zapcore.Level]string, len(_levelToColor)) - - _levelToLowercaseColorString = make(map[zapcore.Level]string, len(_levelToColor)) - _levelToCapitalColorString = make(map[zapcore.Level]string, len(_levelToColor)) -) - -func init() { - for level, color := range _levelToColor { - _levelToLowercaseColorString[level] = color.Add(level.String()) - _levelToCapitalColorString[level] = color.Add(level.CapitalString()) - } -} - -// Color represents a text color. -type Color uint8 - -// Add adds the coloring to the given string. -func (c Color) Add(s string) string { - return fmt.Sprintf("\x1b[%dm%s\x1b[0m", uint8(c), s) -} diff --git a/pkg/common/log/logger.go b/pkg/common/log/logger.go deleted file mode 100644 index cfbb91bdd..000000000 --- a/pkg/common/log/logger.go +++ /dev/null @@ -1,27 +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. - -package log - -import "context" - -type Logger interface { - Debug(ctx context.Context, msg string, keysAndValues ...interface{}) - Info(ctx context.Context, msg string, keysAndValues ...interface{}) - Warn(ctx context.Context, msg string, err error, keysAndValues ...interface{}) - Error(ctx context.Context, msg string, err error, keysAndValues ...interface{}) - WithValues(keysAndValues ...interface{}) Logger - WithName(name string) Logger - WithCallDepth(depth int) Logger -} diff --git a/pkg/common/log/sql_logger.go b/pkg/common/log/sql_logger.go deleted file mode 100644 index ae6cafb34..000000000 --- a/pkg/common/log/sql_logger.go +++ /dev/null @@ -1,89 +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. - -package log - -import ( - "context" - "fmt" - "time" - - "github.com/pkg/errors" - "gorm.io/gorm" - gormLogger "gorm.io/gorm/logger" - gormUtils "gorm.io/gorm/utils" -) - -type SqlLogger struct { - LogLevel gormLogger.LogLevel - IgnoreRecordNotFoundError bool - SlowThreshold time.Duration -} - -func NewSqlLogger(logLevel gormLogger.LogLevel, ignoreRecordNotFoundError bool, slowThreshold time.Duration) *SqlLogger { - return &SqlLogger{ - LogLevel: logLevel, - IgnoreRecordNotFoundError: ignoreRecordNotFoundError, - SlowThreshold: slowThreshold, - } -} - -func (l *SqlLogger) LogMode(logLevel gormLogger.LogLevel) gormLogger.Interface { - newLogger := *l - newLogger.LogLevel = logLevel - return &newLogger -} - -func (SqlLogger) Info(ctx context.Context, msg string, args ...interface{}) { - ZInfo(ctx, msg, args) -} - -func (SqlLogger) Warn(ctx context.Context, msg string, args ...interface{}) { - ZWarn(ctx, msg, nil, args) -} - -func (SqlLogger) Error(ctx context.Context, msg string, args ...interface{}) { - ZError(ctx, msg, nil, args) -} - -func (l *SqlLogger) Trace(ctx context.Context, begin time.Time, fc func() (sql string, rowsAffected int64), err error) { - if l.LogLevel <= gormLogger.Silent { - return - } - elapsed := time.Since(begin) - switch { - case err != nil && l.LogLevel >= gormLogger.Error && (!errors.Is(err, gorm.ErrRecordNotFound) || !l.IgnoreRecordNotFoundError): - sql, rows := fc() - if rows == -1 { - ZError(ctx, "sql exec detail", err, "gorm", gormUtils.FileWithLineNum(), "elapsed time", fmt.Sprintf("%f(ms)", float64(elapsed.Nanoseconds())/1e6), "sql", sql) - } else { - ZError(ctx, "sql exec detail", err, "gorm", gormUtils.FileWithLineNum(), "elapsed time", fmt.Sprintf("%f(ms)", float64(elapsed.Nanoseconds())/1e6), "rows", rows, "sql", sql) - } - case elapsed > l.SlowThreshold && l.SlowThreshold != 0 && l.LogLevel >= gormLogger.Warn: - sql, rows := fc() - slowLog := fmt.Sprintf("SLOW SQL >= %v", l.SlowThreshold) - if rows == -1 { - ZWarn(ctx, "sql exec detail", nil, "gorm", gormUtils.FileWithLineNum(), "slow sql", slowLog, "elapsed time", fmt.Sprintf("%f(ms)", float64(elapsed.Nanoseconds())/1e6), "sql", sql) - } else { - ZWarn(ctx, "sql exec detail", nil, "gorm", gormUtils.FileWithLineNum(), "slow sql", slowLog, "elapsed time", fmt.Sprintf("%f(ms)", float64(elapsed.Nanoseconds())/1e6), "rows", rows, "sql", sql) - } - case l.LogLevel == gormLogger.Info: - sql, rows := fc() - if rows == -1 { - ZDebug(ctx, "sql exec detail", "gorm", gormUtils.FileWithLineNum(), "elapsed time", fmt.Sprintf("%f(ms)", float64(elapsed.Nanoseconds())/1e6), "sql", sql) - } else { - ZDebug(ctx, "sql exec detail", "gorm", gormUtils.FileWithLineNum(), "elapsed time", fmt.Sprintf("%f(ms)", float64(elapsed.Nanoseconds())/1e6), "rows", rows, "sql", sql) - } - } -} diff --git a/pkg/common/log/zap.go b/pkg/common/log/zap.go deleted file mode 100644 index 9d57acf85..000000000 --- a/pkg/common/log/zap.go +++ /dev/null @@ -1,302 +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. - -package log - -import ( - "context" - "fmt" - "os" - "path/filepath" - "time" - - rotatelogs "github.com/lestrrat-go/file-rotatelogs" - - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/config" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/constant" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/mcontext" - - "go.uber.org/zap" - "go.uber.org/zap/zapcore" -) - -var ( - pkgLogger Logger - sp = string(filepath.Separator) - logLevelMap = map[int]zapcore.Level{ - 6: zapcore.DebugLevel, - 5: zapcore.DebugLevel, - 4: zapcore.InfoLevel, - 3: zapcore.WarnLevel, - 2: zapcore.ErrorLevel, - 1: zapcore.FatalLevel, - 0: zapcore.PanicLevel, - } -) - -// InitFromConfig initializes a Zap-based logger. -func InitFromConfig( - loggerPrefixName, moduleName string, - logLevel int, - isStdout bool, - isJson bool, - logLocation string, - rotateCount uint, -) error { - l, err := NewZapLogger(loggerPrefixName, moduleName, logLevel, isStdout, isJson, logLocation, rotateCount) - if err != nil { - return err - } - pkgLogger = l.WithCallDepth(2) - if isJson { - pkgLogger = pkgLogger.WithName(moduleName) - } - return nil -} - -func ZDebug(ctx context.Context, msg string, keysAndValues ...interface{}) { - if pkgLogger == nil { - return - } - pkgLogger.Debug(ctx, msg, keysAndValues...) -} - -func ZInfo(ctx context.Context, msg string, keysAndValues ...interface{}) { - if pkgLogger == nil { - return - } - pkgLogger.Info(ctx, msg, keysAndValues...) -} - -func ZWarn(ctx context.Context, msg string, err error, keysAndValues ...interface{}) { - if pkgLogger == nil { - return - } - pkgLogger.Warn(ctx, msg, err, keysAndValues...) -} - -func ZError(ctx context.Context, msg string, err error, keysAndValues ...interface{}) { - if pkgLogger == nil { - return - } - pkgLogger.Error(ctx, msg, err, keysAndValues...) -} - -type ZapLogger struct { - zap *zap.SugaredLogger - level zapcore.Level - loggerName string - loggerPrefixName string -} - -func NewZapLogger( - loggerPrefixName, loggerName string, - logLevel int, - isStdout bool, - isJson bool, - logLocation string, - rotateCount uint, -) (*ZapLogger, error) { - zapConfig := zap.Config{ - Level: zap.NewAtomicLevelAt(logLevelMap[logLevel]), - // EncoderConfig: zap.NewProductionEncoderConfig(), - // InitialFields: map[string]interface{}{"PID": os.Getegid()}, - DisableStacktrace: true, - } - if isJson { - zapConfig.Encoding = "json" - } else { - zapConfig.Encoding = "console" - } - // if isStdout { - // zapConfig.OutputPaths = append(zapConfig.OutputPaths, "stdout", "stderr") - // } - zl := &ZapLogger{level: logLevelMap[logLevel], loggerName: loggerName, loggerPrefixName: loggerPrefixName} - opts, err := zl.cores(isStdout, isJson, logLocation, rotateCount) - if err != nil { - return nil, err - } - l, err := zapConfig.Build(opts) - if err != nil { - return nil, err - } - zl.zap = l.Sugar() - return zl, nil -} - -func (l *ZapLogger) cores(isStdout bool, isJson bool, logLocation string, rotateCount uint) (zap.Option, error) { - c := zap.NewProductionEncoderConfig() - c.EncodeTime = l.timeEncoder - c.EncodeDuration = zapcore.SecondsDurationEncoder - c.MessageKey = "msg" - c.LevelKey = "level" - c.TimeKey = "time" - c.CallerKey = "caller" - c.NameKey = "logger" - var fileEncoder zapcore.Encoder - if isJson { - c.EncodeLevel = zapcore.CapitalLevelEncoder - fileEncoder = zapcore.NewJSONEncoder(c) - fileEncoder.AddInt("PID", os.Getpid()) - } else { - c.EncodeLevel = l.capitalColorLevelEncoder - c.EncodeCaller = l.customCallerEncoder - fileEncoder = zapcore.NewConsoleEncoder(c) - } - writer, err := l.getWriter(logLocation, rotateCount) - if err != nil { - return nil, err - } - var cores []zapcore.Core - // if logLocation == "" && !isStdout { - // return nil, errors.New("log storage location is empty and not stdout") - // } - if logLocation != "" { - cores = []zapcore.Core{ - zapcore.NewCore(fileEncoder, writer, zap.NewAtomicLevelAt(l.level)), - } - } - if isStdout { - cores = append(cores, zapcore.NewCore(fileEncoder, zapcore.Lock(os.Stdout), zap.NewAtomicLevelAt(l.level))) - // cores = append(cores, zapcore.NewCore(fileEncoder, zapcore.Lock(os.Stderr), zap.NewAtomicLevelAt(l.level))) - } - return zap.WrapCore(func(c zapcore.Core) zapcore.Core { - return zapcore.NewTee(cores...) - }), nil -} - -func (l *ZapLogger) customCallerEncoder(caller zapcore.EntryCaller, enc zapcore.PrimitiveArrayEncoder) { - s := "[" + caller.TrimmedPath() + "]" - // color, ok := _levelToColor[l.level] - // if !ok { - // color = _levelToColor[zapcore.ErrorLevel] - // } - enc.AppendString(s) -} - -func (l *ZapLogger) timeEncoder(t time.Time, enc zapcore.PrimitiveArrayEncoder) { - layout := "2006-01-02 15:04:05.000" - type appendTimeEncoder interface { - AppendTimeLayout(time.Time, string) - } - if enc, ok := enc.(appendTimeEncoder); ok { - enc.AppendTimeLayout(t, layout) - return - } - enc.AppendString(t.Format(layout)) -} - -func (l *ZapLogger) getWriter(logLocation string, rorateCount uint) (zapcore.WriteSyncer, error) { - logf, err := rotatelogs.New(logLocation+sp+l.loggerPrefixName+".%Y-%m-%d", - rotatelogs.WithRotationCount(rorateCount), - rotatelogs.WithRotationTime(time.Duration(config.Config.Log.RotationTime)*time.Hour), - ) - if err != nil { - return nil, err - } - return zapcore.AddSync(logf), nil -} - -func (l *ZapLogger) capitalColorLevelEncoder(level zapcore.Level, enc zapcore.PrimitiveArrayEncoder) { - s, ok := _levelToCapitalColorString[level] - if !ok { - s = _unknownLevelColor[zapcore.ErrorLevel] - } - pid := fmt.Sprintf("["+"PID:"+"%d"+"]", os.Getpid()) - color := _levelToColor[level] - enc.AppendString(s) - enc.AppendString(color.Add(pid)) - if l.loggerName != "" { - enc.AppendString(color.Add(l.loggerName)) - } -} - -func (l *ZapLogger) ToZap() *zap.SugaredLogger { - return l.zap -} - -func (l *ZapLogger) Debug(ctx context.Context, msg string, keysAndValues ...interface{}) { - keysAndValues = l.kvAppend(ctx, keysAndValues) - l.zap.Debugw(msg, keysAndValues...) -} - -func (l *ZapLogger) Info(ctx context.Context, msg string, keysAndValues ...interface{}) { - keysAndValues = l.kvAppend(ctx, keysAndValues) - l.zap.Infow(msg, keysAndValues...) -} - -func (l *ZapLogger) Warn(ctx context.Context, msg string, err error, keysAndValues ...interface{}) { - if err != nil { - keysAndValues = append(keysAndValues, "error", err.Error()) - } - keysAndValues = l.kvAppend(ctx, keysAndValues) - l.zap.Warnw(msg, keysAndValues...) -} - -func (l *ZapLogger) Error(ctx context.Context, msg string, err error, keysAndValues ...interface{}) { - if err != nil { - keysAndValues = append(keysAndValues, "error", err.Error()) - } - keysAndValues = l.kvAppend(ctx, keysAndValues) - l.zap.Errorw(msg, keysAndValues...) -} - -func (l *ZapLogger) kvAppend(ctx context.Context, keysAndValues []interface{}) []interface{} { - if ctx == nil { - return keysAndValues - } - operationID := mcontext.GetOperationID(ctx) - opUserID := mcontext.GetOpUserID(ctx) - connID := mcontext.GetConnID(ctx) - triggerID := mcontext.GetTriggerID(ctx) - opUserPlatform := mcontext.GetOpUserPlatform(ctx) - remoteAddr := mcontext.GetRemoteAddr(ctx) - if opUserID != "" { - keysAndValues = append([]interface{}{constant.OpUserID, opUserID}, keysAndValues...) - } - if operationID != "" { - keysAndValues = append([]interface{}{constant.OperationID, operationID}, keysAndValues...) - } - if connID != "" { - keysAndValues = append([]interface{}{constant.ConnID, connID}, keysAndValues...) - } - if triggerID != "" { - keysAndValues = append([]interface{}{constant.TriggerID, triggerID}, keysAndValues...) - } - if opUserPlatform != "" { - keysAndValues = append([]interface{}{constant.OpUserPlatform, opUserPlatform}, keysAndValues...) - } - if remoteAddr != "" { - keysAndValues = append([]interface{}{constant.RemoteAddr, remoteAddr}, keysAndValues...) - } - return keysAndValues -} - -func (l *ZapLogger) WithValues(keysAndValues ...interface{}) Logger { - dup := *l - dup.zap = l.zap.With(keysAndValues...) - return &dup -} - -func (l *ZapLogger) WithName(name string) Logger { - dup := *l - dup.zap = l.zap.Named(name) - return &dup -} - -func (l *ZapLogger) WithCallDepth(depth int) Logger { - dup := *l - dup.zap = l.zap.WithOptions(zap.AddCallerSkip(depth)) - return &dup -} diff --git a/pkg/common/log/zk_logger.go b/pkg/common/log/zk_logger.go deleted file mode 100644 index 3579e2022..000000000 --- a/pkg/common/log/zk_logger.go +++ /dev/null @@ -1,30 +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. - -package log - -import ( - "context" - "fmt" -) - -type ZkLogger struct{} - -func NewZkLogger() *ZkLogger { - return &ZkLogger{} -} - -func (l *ZkLogger) Printf(format string, a ...interface{}) { - ZInfo(context.Background(), "zookeeper output", "msg", fmt.Sprintf(format, a...)) -} diff --git a/pkg/common/mcontext/ctx.go b/pkg/common/mcontext/ctx.go deleted file mode 100644 index 79234e2e0..000000000 --- a/pkg/common/mcontext/ctx.go +++ /dev/null @@ -1,154 +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. - -package mcontext - -import ( - "context" - - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/constant" - "github.com/OpenIMSDK/Open-IM-Server/pkg/errs" -) - -var mapper = []string{constant.OperationID, constant.OpUserID, constant.OpUserPlatform, constant.ConnID} - -func WithOpUserIDContext(ctx context.Context, opUserID string) context.Context { - return context.WithValue(ctx, constant.OpUserID, opUserID) -} - -func WithOpUserPlatformContext(ctx context.Context, platform string) context.Context { - return context.WithValue(ctx, constant.OpUserPlatform, platform) -} - -func WithTriggerIDContext(ctx context.Context, triggerID string) context.Context { - return context.WithValue(ctx, constant.TriggerID, triggerID) -} - -func NewCtx(operationID string) context.Context { - c := context.Background() - ctx := context.WithValue(c, constant.OperationID, operationID) - return SetOperationID(ctx, operationID) -} - -func SetOperationID(ctx context.Context, operationID string) context.Context { - return context.WithValue(ctx, constant.OperationID, operationID) -} - -func SetOpUserID(ctx context.Context, opUserID string) context.Context { - return context.WithValue(ctx, constant.OpUserID, opUserID) -} - -func SetConnID(ctx context.Context, connID string) context.Context { - return context.WithValue(ctx, constant.ConnID, connID) -} - -func GetOperationID(ctx context.Context) string { - if ctx.Value(constant.OperationID) != nil { - s, ok := ctx.Value(constant.OperationID).(string) - if ok { - return s - } - } - return "" -} - -func GetOpUserID(ctx context.Context) string { - if ctx.Value(constant.OpUserID) != "" { - s, ok := ctx.Value(constant.OpUserID).(string) - if ok { - return s - } - } - return "" -} - -func GetConnID(ctx context.Context) string { - if ctx.Value(constant.ConnID) != "" { - s, ok := ctx.Value(constant.ConnID).(string) - if ok { - return s - } - } - return "" -} - -func GetTriggerID(ctx context.Context) string { - if ctx.Value(constant.TriggerID) != "" { - s, ok := ctx.Value(constant.TriggerID).(string) - if ok { - return s - } - } - return "" -} - -func GetOpUserPlatform(ctx context.Context) string { - if ctx.Value(constant.OpUserPlatform) != "" { - s, ok := ctx.Value(constant.OpUserPlatform).(string) - if ok { - return s - } - } - return "" -} - -func GetRemoteAddr(ctx context.Context) string { - if ctx.Value(constant.RemoteAddr) != "" { - s, ok := ctx.Value(constant.RemoteAddr).(string) - if ok { - return s - } - } - return "" -} - -func GetMustCtxInfo(ctx context.Context) (operationID, opUserID, platform, connID string, err error) { - operationID, ok := ctx.Value(constant.OperationID).(string) - if !ok { - err = errs.ErrArgs.Wrap("ctx missing operationID") - return - } - opUserID, ok1 := ctx.Value(constant.OpUserID).(string) - if !ok1 { - err = errs.ErrArgs.Wrap("ctx missing opUserID") - return - } - platform, ok2 := ctx.Value(constant.OpUserPlatform).(string) - if !ok2 { - err = errs.ErrArgs.Wrap("ctx missing platform") - return - } - connID, _ = ctx.Value(constant.ConnID).(string) - return -} - -func GetCtxInfos(ctx context.Context) (operationID, opUserID, platform, connID string, err error) { - operationID, ok := ctx.Value(constant.OperationID).(string) - if !ok { - err = errs.ErrArgs.Wrap("ctx missing operationID") - return - } - opUserID, _ = ctx.Value(constant.OpUserID).(string) - platform, _ = ctx.Value(constant.OpUserPlatform).(string) - connID, _ = ctx.Value(constant.ConnID).(string) - return -} - -func WithMustInfoCtx(values []string) context.Context { - ctx := context.Background() - for i, v := range values { - ctx = context.WithValue(ctx, mapper[i], v) - } - return ctx -} diff --git a/pkg/common/mw/gin.go b/pkg/common/mw/gin.go deleted file mode 100644 index 287cd5f53..000000000 --- a/pkg/common/mw/gin.go +++ /dev/null @@ -1,142 +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. - -package mw - -import ( - "errors" - "net/http" - - "github.com/gin-gonic/gin" - "github.com/redis/go-redis/v9" - - "github.com/OpenIMSDK/Open-IM-Server/pkg/apiresp" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/config" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/constant" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/cache" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/controller" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/log" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/tokenverify" - "github.com/OpenIMSDK/Open-IM-Server/pkg/errs" -) - -// CorsHandler gin cross-domain configuration. -func CorsHandler() gin.HandlerFunc { - return func(c *gin.Context) { - c.Writer.Header().Set("Access-Control-Allow-Origin", "*") - c.Header("Access-Control-Allow-Methods", "*") - c.Header("Access-Control-Allow-Headers", "*") - c.Header( - "Access-Control-Expose-Headers", - "Content-Length, Access-Control-Allow-Origin, Access-Control-Allow-Headers,Cache-Control,Content-Language,Content-Type,Expires,Last-Modified,Pragma,FooBar", - ) // Cross-domain key settings allow browsers to resolve. - c.Header( - "Access-Control-Max-Age", - "172800", - ) // Cache request information in seconds. - c.Header( - "Access-Control-Allow-Credentials", - "false", - ) // Whether cross-domain requests need to carry cookie information, the default setting is true. - c.Header( - "content-type", - "application/json", - ) // Set the return format to json. - // Release all option pre-requests - if c.Request.Method == http.MethodOptions { - c.JSON(http.StatusOK, "Options Request!") - c.Abort() - return - } - c.Next() - } -} - -func GinParseOperationID() gin.HandlerFunc { - return func(c *gin.Context) { - if c.Request.Method == http.MethodPost { - operationID := c.Request.Header.Get(constant.OperationID) - if operationID == "" { - err := errors.New("header must have operationID") - apiresp.GinError(c, errs.ErrArgs.Wrap(err.Error())) - c.Abort() - return - } - c.Set(constant.OperationID, operationID) - } - c.Next() - } -} - -func GinParseToken(rdb redis.UniversalClient) gin.HandlerFunc { - dataBase := controller.NewAuthDatabase( - cache.NewMsgCacheModel(rdb), - config.Config.Secret, - config.Config.TokenPolicy.Expire, - ) - return func(c *gin.Context) { - switch c.Request.Method { - case http.MethodPost: - token := c.Request.Header.Get(constant.Token) - if token == "" { - log.ZWarn(c, "header get token error", errs.ErrArgs.Wrap("header must have token")) - apiresp.GinError(c, errs.ErrArgs.Wrap("header must have token")) - c.Abort() - return - } - claims, err := tokenverify.GetClaimFromToken(token) - if err != nil { - log.ZWarn(c, "jwt get token error", errs.ErrTokenUnknown.Wrap()) - apiresp.GinError(c, errs.ErrTokenUnknown.Wrap()) - c.Abort() - return - } - m, err := dataBase.GetTokensWithoutError(c, claims.UserID, claims.PlatformID) - if err != nil { - log.ZWarn(c, "cache get token error", errs.ErrTokenNotExist.Wrap()) - apiresp.GinError(c, errs.ErrTokenNotExist.Wrap()) - c.Abort() - return - } - if len(m) == 0 { - log.ZWarn(c, "cache do not exist token error", errs.ErrTokenNotExist.Wrap()) - apiresp.GinError(c, errs.ErrTokenNotExist.Wrap()) - c.Abort() - return - } - if v, ok := m[token]; ok { - switch v { - case constant.NormalToken: - case constant.KickedToken: - log.ZWarn(c, "cache kicked token error", errs.ErrTokenKicked.Wrap()) - apiresp.GinError(c, errs.ErrTokenKicked.Wrap()) - c.Abort() - return - default: - log.ZWarn(c, "cache unknown token error", errs.ErrTokenUnknown.Wrap()) - apiresp.GinError(c, errs.ErrTokenUnknown.Wrap()) - c.Abort() - return - } - } else { - apiresp.GinError(c, errs.ErrTokenNotExist.Wrap()) - c.Abort() - return - } - c.Set(constant.OpUserPlatform, constant.PlatformIDToName(claims.PlatformID)) - c.Set(constant.OpUserID, claims.UserID) - c.Next() - } - } -} diff --git a/pkg/common/mw/intercept_chain.go b/pkg/common/mw/intercept_chain.go deleted file mode 100644 index ae5361631..000000000 --- a/pkg/common/mw/intercept_chain.go +++ /dev/null @@ -1,41 +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. - -package mw - -import ( - "context" - - "google.golang.org/grpc" -) - -func InterceptChain(intercepts ...grpc.UnaryServerInterceptor) grpc.UnaryServerInterceptor { - l := len(intercepts) - return func(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (resp interface{}, err error) { - chain := func(currentInter grpc.UnaryServerInterceptor, currentHandler grpc.UnaryHandler) grpc.UnaryHandler { - return func(currentCtx context.Context, currentReq interface{}) (interface{}, error) { - return currentInter( - currentCtx, - currentReq, - info, - currentHandler) - } - } - chainHandler := handler - for i := l - 1; i >= 0; i-- { - chainHandler = chain(intercepts[i], chainHandler) - } - return chainHandler(ctx, req) - } -} diff --git a/pkg/common/mw/rpc_client_interceptor.go b/pkg/common/mw/rpc_client_interceptor.go deleted file mode 100644 index 91a166c32..000000000 --- a/pkg/common/mw/rpc_client_interceptor.go +++ /dev/null @@ -1,114 +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. - -package mw - -import ( - "context" - "errors" - "fmt" - "strings" - - "google.golang.org/grpc" - "google.golang.org/grpc/metadata" - "google.golang.org/grpc/status" - - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/constant" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/log" - "github.com/OpenIMSDK/Open-IM-Server/pkg/errs" - "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/errinfo" -) - -func GrpcClient() grpc.DialOption { - return grpc.WithChainUnaryInterceptor(RpcClientInterceptor) -} - -func RpcClientInterceptor( - ctx context.Context, - method string, - req, resp interface{}, - cc *grpc.ClientConn, - invoker grpc.UnaryInvoker, - opts ...grpc.CallOption, -) (err error) { - if ctx == nil { - return errs.ErrInternalServer.Wrap("call rpc request context is nil") - } - ctx, err = getRpcContext(ctx, method) - if err != nil { - return err - } - log.ZDebug(ctx, "get rpc ctx success", "conn target", cc.Target()) - err = invoker(ctx, method, req, resp, cc, opts...) - if err == nil { - log.ZInfo(ctx, "rpc client resp", "funcName", method, "resp", rpcString(resp)) - return nil - } - log.ZError(ctx, "rpc resp error", err) - rpcErr, ok := err.(interface{ GRPCStatus() *status.Status }) - if !ok { - return errs.ErrInternalServer.Wrap(err.Error()) - } - sta := rpcErr.GRPCStatus() - if sta.Code() == 0 { - return errs.NewCodeError(errs.ServerInternalError, err.Error()).Wrap() - } - if details := sta.Details(); len(details) > 0 { - errInfo, ok := details[0].(*errinfo.ErrorInfo) - if ok { - s := strings.Join(errInfo.Warp, "->") + errInfo.Cause - return errs.NewCodeError(int(sta.Code()), sta.Message()).WithDetail(s).Wrap() - } - } - return errs.NewCodeError(int(sta.Code()), sta.Message()).Wrap() -} - -func getRpcContext(ctx context.Context, method string) (context.Context, error) { - md := metadata.Pairs() - if keys, _ := ctx.Value(constant.RpcCustomHeader).([]string); len(keys) > 0 { - for _, key := range keys { - val, ok := ctx.Value(key).([]string) - if !ok { - return nil, errs.ErrInternalServer.Wrap(fmt.Sprintf("ctx missing key %s", key)) - } - if len(val) == 0 { - return nil, errs.ErrInternalServer.Wrap(fmt.Sprintf("ctx key %s value is empty", key)) - } - md.Set(key, val...) - } - md.Set(constant.RpcCustomHeader, keys...) - } - operationID, ok := ctx.Value(constant.OperationID).(string) - if !ok { - log.ZWarn(ctx, "ctx missing operationID", errors.New("ctx missing operationID"), "funcName", method) - return nil, errs.ErrArgs.Wrap("ctx missing operationID") - } - md.Set(constant.OperationID, operationID) - var checkArgs []string - checkArgs = append(checkArgs, constant.OperationID, operationID) - opUserID, ok := ctx.Value(constant.OpUserID).(string) - if ok { - md.Set(constant.OpUserID, opUserID) - checkArgs = append(checkArgs, constant.OpUserID, opUserID) - } - opUserIDPlatformID, ok := ctx.Value(constant.OpUserPlatform).(string) - if ok { - md.Set(constant.OpUserPlatform, opUserIDPlatformID) - } - connID, ok := ctx.Value(constant.ConnID).(string) - if ok { - md.Set(constant.ConnID, connID) - } - return metadata.NewOutgoingContext(ctx, md), nil -} diff --git a/pkg/common/mw/rpc_server_interceptor.go b/pkg/common/mw/rpc_server_interceptor.go deleted file mode 100644 index ec43069da..000000000 --- a/pkg/common/mw/rpc_server_interceptor.go +++ /dev/null @@ -1,181 +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. - -package mw - -import ( - "context" - "fmt" - "math" - "runtime" - "strings" - - "github.com/OpenIMSDK/Open-IM-Server/pkg/checker" - - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/constant" - - "github.com/pkg/errors" - "google.golang.org/grpc" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/metadata" - "google.golang.org/grpc/status" - - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/config" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/log" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/mw/specialerror" - "github.com/OpenIMSDK/Open-IM-Server/pkg/errs" - "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/errinfo" -) - -func rpcString(v interface{}) string { - if s, ok := v.(interface{ String() string }); ok { - return s.String() - } - return fmt.Sprintf("%+v", v) -} - -func RpcServerInterceptor( - ctx context.Context, - req interface{}, - info *grpc.UnaryServerInfo, - handler grpc.UnaryHandler, -) (resp interface{}, err error) { - log.ZDebug(ctx, "rpc server req", "req", rpcString(req)) - //defer func() { - // if r := recover(); r != nil { - // log.ZError(ctx, "rpc panic", nil, "FullMethod", info.FullMethod, "type:", fmt.Sprintf("%T", r), "panic:", r) - // fmt.Printf("panic: %+v\nstack info: %s\n", r, string(debug.Stack())) - // pc, file, line, ok := runtime.Caller(4) - // if !ok { - // panic("get runtime.Caller failed") - // } - // errInfo := &errinfo.ErrorInfo{ - // Path: file, - // Line: uint32(line), - // Name: runtime.FuncForPC(pc).Name(), - // Cause: fmt.Sprintf("%s", r), - // Warp: nil, - // } - // sta, err_ := status.New(codes.Code(errs.ErrInternalServer.Code()), - // errs.ErrInternalServer.Msg()).WithDetails(errInfo) - // if err_ != nil { - // panic(err_) - // } - // err = sta.Err() - // } - //}() - funcName := info.FullMethod - md, ok := metadata.FromIncomingContext(ctx) - if !ok { - return nil, status.New(codes.InvalidArgument, "missing metadata").Err() - } - if keys := md.Get(constant.RpcCustomHeader); len(keys) > 0 { - for _, key := range keys { - values := md.Get(key) - if len(values) == 0 { - return nil, status.New(codes.InvalidArgument, fmt.Sprintf("missing metadata key %s", key)).Err() - } - ctx = context.WithValue(ctx, key, values) - } - } - args := make([]string, 0, 4) - if opts := md.Get(constant.OperationID); len(opts) != 1 || opts[0] == "" { - return nil, status.New(codes.InvalidArgument, "operationID error").Err() - } else { - args = append(args, constant.OperationID, opts[0]) - ctx = context.WithValue(ctx, constant.OperationID, opts[0]) - } - if opts := md.Get(constant.OpUserID); len(opts) == 1 { - args = append(args, constant.OpUserID, opts[0]) - ctx = context.WithValue(ctx, constant.OpUserID, opts[0]) - } - if opts := md.Get(constant.OpUserPlatform); len(opts) == 1 { - ctx = context.WithValue(ctx, constant.OpUserPlatform, opts[0]) - } - if opts := md.Get(constant.ConnID); len(opts) == 1 { - ctx = context.WithValue(ctx, constant.ConnID, opts[0]) - } - log.ZInfo(ctx, "rpc server req", "funcName", funcName, "req", rpcString(req)) - resp, err = func() (interface{}, error) { - if err := checker.Validate(req); err != nil { - return nil, err - } - return handler(ctx, req) - }() - if err == nil { - log.ZInfo(ctx, "rpc server resp", "funcName", funcName, "resp", rpcString(resp)) - return resp, nil - } - log.ZError(ctx, "rpc server resp", err, "funcName", funcName) - unwrap := errs.Unwrap(err) - codeErr := specialerror.ErrCode(unwrap) - if codeErr == nil { - log.ZError(ctx, "rpc InternalServer error", err, "req", req) - codeErr = errs.ErrInternalServer - } - code := codeErr.Code() - if code <= 0 || code > math.MaxUint32 { - log.ZError(ctx, "rpc UnknownError", err, "rpc UnknownCode:", code) - code = errs.ServerInternalError - } - grpcStatus := status.New(codes.Code(code), codeErr.Msg()) - var errInfo *errinfo.ErrorInfo - if config.Config.Log.WithStack { - if unwrap != err { - sti, ok := err.(interface{ StackTrace() errors.StackTrace }) - if ok { - log.ZWarn( - ctx, - "rpc server resp", - err, - "funcName", - funcName, - "unwrap", - unwrap.Error(), - "stack", - fmt.Sprintf("%+v", err), - ) - if fs := sti.StackTrace(); len(fs) > 0 { - pc := uintptr(fs[0]) - fn := runtime.FuncForPC(pc) - file, line := fn.FileLine(pc) - errInfo = &errinfo.ErrorInfo{ - Path: file, - Line: uint32(line), - Name: fn.Name(), - Cause: unwrap.Error(), - Warp: nil, - } - if arr := strings.Split(err.Error(), ": "); len(arr) > 1 { - errInfo.Warp = arr[:len(arr)-1] - } - } - } - } - } - if errInfo == nil { - errInfo = &errinfo.ErrorInfo{Cause: err.Error()} - } - details, err := grpcStatus.WithDetails(errInfo) - if err != nil { - log.ZWarn(ctx, "rpc server resp WithDetails error", err, "funcName", funcName) - return nil, errs.Wrap(err) - } - log.ZWarn(ctx, "rpc server resp", err, "funcName", funcName) - return nil, details.Err() -} - -func GrpcServer() grpc.ServerOption { - return grpc.ChainUnaryInterceptor(RpcServerInterceptor) -} diff --git a/pkg/common/mw/specialerror/error.go b/pkg/common/mw/specialerror/error.go deleted file mode 100644 index b8b8d27ae..000000000 --- a/pkg/common/mw/specialerror/error.go +++ /dev/null @@ -1,47 +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. - -package specialerror - -import "github.com/OpenIMSDK/Open-IM-Server/pkg/errs" - -var handlers []func(err error) errs.CodeError - -func AddErrHandler(h func(err error) errs.CodeError) { - if h == nil { - panic("nil handler") - } - handlers = append(handlers, h) -} - -func AddReplace(target error, codeErr errs.CodeError) { - AddErrHandler(func(err error) errs.CodeError { - if err == target { - return codeErr - } - return nil - }) -} - -func ErrCode(err error) errs.CodeError { - if codeErr, ok := err.(errs.CodeError); ok { - return codeErr - } - for i := 0; i < len(handlers); i++ { - if codeErr := handlers[i](err); codeErr != nil { - return codeErr - } - } - return nil -} diff --git a/pkg/common/network/ip.go b/pkg/common/network/ip.go deleted file mode 100644 index bf062429d..000000000 --- a/pkg/common/network/ip.go +++ /dev/null @@ -1,41 +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. - -package network - -import ( - utils "github.com/OpenIMSDK/open_utils" - - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/constant" -) - -func GetRpcRegisterIP(configIP string) (string, error) { - registerIP := configIP - if registerIP == "" { - ip, err := utils.GetLocalIP() - if err != nil { - return "", err - } - registerIP = ip - } - return registerIP, nil -} - -func GetListenIP(configIP string) string { - if configIP == "" { - return constant.LocalHost - } else { - return configIP - } -} diff --git a/pkg/common/prome/prometheus.go b/pkg/common/prome/prometheus.go index d66b1df70..26efb9dae 100644 --- a/pkg/common/prome/prometheus.go +++ b/pkg/common/prome/prometheus.go @@ -19,7 +19,7 @@ import ( "net/http" "strconv" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/config" + "github.com/OpenIMSDK/tools/config" "github.com/gin-gonic/gin" "github.com/prometheus/client_golang/prometheus" diff --git a/pkg/common/tokenverify/jwt_token.go b/pkg/common/tokenverify/jwt_token.go deleted file mode 100644 index 317347b1d..000000000 --- a/pkg/common/tokenverify/jwt_token.go +++ /dev/null @@ -1,122 +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. - -package tokenverify - -import ( - "context" - "fmt" - "time" - - "github.com/golang-jwt/jwt/v4" - - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/config" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/mcontext" - "github.com/OpenIMSDK/Open-IM-Server/pkg/errs" - "github.com/OpenIMSDK/Open-IM-Server/pkg/utils" -) - -type Claims struct { - UserID string - PlatformID int // login platform - jwt.RegisteredClaims -} - -func BuildClaims(uid string, platformID int, ttl int64) Claims { - now := time.Now() - before := now.Add(-time.Minute * 5) - return Claims{ - UserID: uid, - PlatformID: platformID, - RegisteredClaims: jwt.RegisteredClaims{ - ExpiresAt: jwt.NewNumericDate(now.Add(time.Duration(ttl*24) * time.Hour)), // Expiration time - IssuedAt: jwt.NewNumericDate(now), // Issuing time - NotBefore: jwt.NewNumericDate(before), // Begin Effective time - }, - } -} - -func secret() jwt.Keyfunc { - return func(token *jwt.Token) (interface{}, error) { - return []byte(config.Config.Secret), nil - } -} - -func GetClaimFromToken(tokensString string) (*Claims, error) { - token, err := jwt.ParseWithClaims(tokensString, &Claims{}, secret()) - if err != nil { - if ve, ok := err.(*jwt.ValidationError); ok { - if ve.Errors&jwt.ValidationErrorMalformed != 0 { - return nil, utils.Wrap(errs.ErrTokenMalformed, "") - } else if ve.Errors&jwt.ValidationErrorExpired != 0 { - return nil, utils.Wrap(errs.ErrTokenExpired, "") - } else if ve.Errors&jwt.ValidationErrorNotValidYet != 0 { - return nil, utils.Wrap(errs.ErrTokenNotValidYet, "") - } else { - return nil, utils.Wrap(errs.ErrTokenUnknown, "") - } - } else { - return nil, utils.Wrap(errs.ErrTokenUnknown, "") - } - } else { - if claims, ok := token.Claims.(*Claims); ok && token.Valid { - return claims, nil - } - return nil, utils.Wrap(errs.ErrTokenUnknown, "") - } -} - -func CheckAccessV3(ctx context.Context, ownerUserID string) (err error) { - opUserID := mcontext.GetOpUserID(ctx) - if utils.IsContain(opUserID, config.Config.Manager.UserID) { - return nil - } - if opUserID == ownerUserID { - return nil - } - return errs.ErrNoPermission.Wrap(utils.GetSelfFuncName()) -} - -func IsAppManagerUid(ctx context.Context) bool { - return utils.IsContain(mcontext.GetOpUserID(ctx), config.Config.Manager.UserID) -} - -func CheckAdmin(ctx context.Context) error { - if utils.IsContain(mcontext.GetOpUserID(ctx), config.Config.Manager.UserID) { - return nil - } - return errs.ErrNoPermission.Wrap(fmt.Sprintf("user %s is not admin userID", mcontext.GetOpUserID(ctx))) -} - -func ParseRedisInterfaceToken(redisToken interface{}) (*Claims, error) { - return GetClaimFromToken(string(redisToken.([]uint8))) -} - -func IsManagerUserID(opUserID string) bool { - return utils.IsContain(opUserID, config.Config.Manager.UserID) -} - -func WsVerifyToken(token, userID string, platformID int) error { - claim, err := GetClaimFromToken(token) - if err != nil { - return err - } - if claim.UserID != userID { - return errs.ErrTokenInvalid.Wrap(fmt.Sprintf("token uid %s != userID %s", claim.UserID, userID)) - } - if claim.PlatformID != platformID { - return errs.ErrTokenInvalid.Wrap(fmt.Sprintf("token platform %d != %d", claim.PlatformID, platformID)) - } - return nil -} diff --git a/pkg/common/tokenverify/jwt_token_test.go b/pkg/common/tokenverify/jwt_token_test.go deleted file mode 100644 index 4e8e98c41..000000000 --- a/pkg/common/tokenverify/jwt_token_test.go +++ /dev/null @@ -1,39 +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. - -package tokenverify - -import ( - "testing" - - "github.com/golang-jwt/jwt/v4" - - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/config" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/constant" -) - -func Test_ParseToken(t *testing.T) { - config.Config.Secret = "OpenIM_server" - claims1 := BuildClaims("123456", constant.AndroidPadPlatformID, 10) - token := jwt.NewWithClaims(jwt.SigningMethodHS256, claims1) - tokenString, err := token.SignedString([]byte(config.Config.Secret)) - if err != nil { - t.Fatal(err) - } - claim2, err := GetClaimFromToken(tokenString) - if err != nil { - t.Fatal(err) - } - t.Log(claim2) -} diff --git a/pkg/discoveryregistry/discovery_register.go b/pkg/discoveryregistry/discovery_register.go deleted file mode 100644 index 4ebabe7a8..000000000 --- a/pkg/discoveryregistry/discovery_register.go +++ /dev/null @@ -1,39 +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. - -package discoveryregistry - -import ( - "context" - - "google.golang.org/grpc" -) - -type Conn interface { - GetConns(ctx context.Context, serviceName string, opts ...grpc.DialOption) ([]grpc.ClientConnInterface, error) - GetConn(ctx context.Context, serviceName string, opts ...grpc.DialOption) (grpc.ClientConnInterface, error) - AddOption(opts ...grpc.DialOption) - CloseConn(conn grpc.ClientConnInterface) - // do not use this method for call rpc - GetClientLocalConns() map[string][]grpc.ClientConnInterface -} - -type SvcDiscoveryRegistry interface { - Conn - Register(serviceName, host string, port int, opts ...grpc.DialOption) error - UnRegister() error - CreateRpcRootNodes(serviceNames []string) error - RegisterConf2Registry(key string, conf []byte) error - GetConfFromRegistry(key string) ([]byte, error) -} diff --git a/pkg/discoveryregistry/zookeeper/conf.go b/pkg/discoveryregistry/zookeeper/conf.go deleted file mode 100644 index 034c525ba..000000000 --- a/pkg/discoveryregistry/zookeeper/conf.go +++ /dev/null @@ -1,41 +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. - -package zookeeper - -import ( - "github.com/go-zookeeper/zk" -) - -func (s *ZkClient) RegisterConf2Registry(key string, conf []byte) error { - exists, _, err := s.conn.Exists(s.getPath(key)) - if err != nil { - return err - } - if exists { - if err := s.conn.Delete(s.getPath(key), 0); err != nil { - return err - } - } - _, err = s.conn.Create(s.getPath(key), conf, 0, zk.WorldACL(zk.PermAll)) - if err != zk.ErrNodeExists { - return err - } - return nil -} - -func (s *ZkClient) GetConfFromRegistry(key string) ([]byte, error) { - bytes, _, err := s.conn.Get(s.getPath(key)) - return bytes, err -} diff --git a/pkg/discoveryregistry/zookeeper/discover.go b/pkg/discoveryregistry/zookeeper/discover.go deleted file mode 100644 index 94cf1f84a..000000000 --- a/pkg/discoveryregistry/zookeeper/discover.go +++ /dev/null @@ -1,136 +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. - -package zookeeper - -import ( - "context" - "fmt" - "io" - "strings" - - "github.com/pkg/errors" - - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/log" - "github.com/OpenIMSDK/Open-IM-Server/pkg/errs" - - "github.com/go-zookeeper/zk" - "google.golang.org/grpc" - "google.golang.org/grpc/resolver" -) - -var ( - ErrConnIsNil = errors.New("conn is nil") - ErrConnIsNilButLocalNotNil = errors.New("conn is nil, but local is not nil") -) - -func (s *ZkClient) watch() { - for { - event := <-s.eventChan - switch event.Type { - case zk.EventSession: - if event.State == zk.StateHasSession && s.isRegistered { - s.logger.Printf("zk session event stateHasSession: %+v, client prepare to create new temp node", event) - node, err := s.CreateTempNode(s.rpcRegisterName, s.rpcRegisterAddr) - if err != nil { - s.logger.Printf("zk session event stateHasSession: %+v, create temp node error: %v", event, err) - } else { - s.node = node - } - } else { - s.logger.Printf("zk session event: %+v", event) - } - case zk.EventNodeChildrenChanged: - s.logger.Printf("zk event: %s", event.Path) - l := strings.Split(event.Path, "/") - if len(l) > 1 { - serviceName := l[len(l)-1] - s.lock.Lock() - s.flushResolverAndDeleteLocal(serviceName) - s.lock.Unlock() - } - s.logger.Printf("zk event handle success: %s", event.Path) - case zk.EventNodeDataChanged: - case zk.EventNodeCreated: - case zk.EventNodeDeleted: - case zk.EventNotWatching: - } - } -} - -func (s *ZkClient) GetConnsRemote(serviceName string) (conns []resolver.Address, err error) { - path := s.getPath(serviceName) - _, _, _, err = s.conn.ChildrenW(path) - if err != nil { - return nil, errors.Wrap(err, "children watch error") - } - childNodes, _, err := s.conn.Children(path) - if err != nil { - return nil, errors.Wrap(err, "get children error") - } else { - for _, child := range childNodes { - fullPath := path + "/" + child - data, _, err := s.conn.Get(fullPath) - if err != nil { - if err == zk.ErrNoNode { - return nil, errors.Wrap(err, "this is zk ErrNoNode") - } - return nil, errors.Wrap(err, "get children error") - } - log.ZDebug(context.Background(), "get addrs from remote", "conn", string(data)) - conns = append(conns, resolver.Address{Addr: string(data), ServerName: serviceName}) - } - } - return conns, nil -} - -func (s *ZkClient) GetConns(ctx context.Context, serviceName string, opts ...grpc.DialOption) ([]grpc.ClientConnInterface, error) { - s.logger.Printf("get conns from client, serviceName: %s", serviceName) - s.lock.Lock() - defer s.lock.Unlock() - conns := s.localConns[serviceName] - if len(conns) == 0 { - var err error - s.logger.Printf("get conns from zk remote, serviceName: %s", serviceName) - addrs, err := s.GetConnsRemote(serviceName) - if err != nil { - return nil, err - } - if len(addrs) == 0 { - return nil, fmt.Errorf("no conn for service %s, grpc server may not exist, local conn is %v, please check zookeeper server %v, path: %s", serviceName, s.localConns, s.zkServers, s.zkRoot) - } - for _, addr := range addrs { - cc, err := grpc.DialContext(ctx, addr.Addr, append(s.options, opts...)...) - if err != nil { - log.ZError(context.Background(), "dialContext failed", err, "addr", addr.Addr, "opts", append(s.options, opts...)) - return nil, errs.Wrap(err) - } - conns = append(conns, cc) - } - s.localConns[serviceName] = conns - } - return conns, nil -} - -func (s *ZkClient) GetConn(ctx context.Context, serviceName string, opts ...grpc.DialOption) (grpc.ClientConnInterface, error) { - newOpts := append(s.options, grpc.WithDefaultServiceConfig(fmt.Sprintf(`{"LoadBalancingPolicy": "%s"}`, s.balancerName))) - s.logger.Printf("get conn from client, serviceName: %s", serviceName) - return grpc.DialContext(ctx, fmt.Sprintf("%s:///%s", s.scheme, serviceName), append(newOpts, opts...)...) -} - -func (s *ZkClient) CloseConn(conn grpc.ClientConnInterface) { - if closer, ok := conn.(io.Closer); ok { - closer.Close() - } -} diff --git a/pkg/discoveryregistry/zookeeper/register.go b/pkg/discoveryregistry/zookeeper/register.go deleted file mode 100644 index 8fc5fa34e..000000000 --- a/pkg/discoveryregistry/zookeeper/register.go +++ /dev/null @@ -1,76 +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. - -package zookeeper - -import ( - "time" - - "github.com/go-zookeeper/zk" - "google.golang.org/grpc" -) - -func (s *ZkClient) CreateRpcRootNodes(serviceNames []string) error { - for _, serviceName := range serviceNames { - if err := s.ensureName(serviceName); err != nil && err != zk.ErrNodeExists { - return err - } - } - return nil -} - -func (s *ZkClient) CreateTempNode(rpcRegisterName, addr string) (node string, err error) { - return s.conn.CreateProtectedEphemeralSequential( - s.getPath(rpcRegisterName)+"/"+addr+"_", - []byte(addr), - zk.WorldACL(zk.PermAll), - ) -} - -func (s *ZkClient) Register(rpcRegisterName, host string, port int, opts ...grpc.DialOption) error { - if err := s.ensureName(rpcRegisterName); err != nil { - return err - } - addr := s.getAddr(host, port) - _, err := grpc.Dial(addr, opts...) - if err != nil { - return err - } - node, err := s.CreateTempNode(rpcRegisterName, addr) - if err != nil { - return err - } - s.rpcRegisterName = rpcRegisterName - s.rpcRegisterAddr = addr - s.node = node - s.isRegistered = true - return nil -} - -func (s *ZkClient) UnRegister() error { - s.lock.Lock() - defer s.lock.Unlock() - err := s.conn.Delete(s.node, -1) - if err != nil { - return err - } - time.Sleep(time.Second) - s.node = "" - s.rpcRegisterName = "" - s.rpcRegisterAddr = "" - s.isRegistered = false - s.localConns = make(map[string][]grpc.ClientConnInterface) - s.resolvers = make(map[string]*Resolver) - return nil -} diff --git a/pkg/discoveryregistry/zookeeper/resolver.go b/pkg/discoveryregistry/zookeeper/resolver.go deleted file mode 100644 index 7e9c8c125..000000000 --- a/pkg/discoveryregistry/zookeeper/resolver.go +++ /dev/null @@ -1,93 +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. - -package zookeeper - -import ( - "context" - "strings" - - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/log" - - "google.golang.org/grpc/resolver" -) - -type Resolver struct { - target resolver.Target - cc resolver.ClientConn - addrs []resolver.Address - - getConnsRemote func(serviceName string) (conns []resolver.Address, err error) -} - -func (r *Resolver) ResolveNowZK(o resolver.ResolveNowOptions) { - log.ZDebug( - context.Background(), - "start resolve now", - "target", - r.target, - "cc", - r.cc.UpdateState, - "serviceName", - strings.TrimLeft(r.target.URL.Path, "/"), - ) - newConns, err := r.getConnsRemote(strings.TrimLeft(r.target.URL.Path, "/")) - if err != nil { - log.ZError(context.Background(), "resolve now error", err, "target", r.target) - return - } - r.addrs = newConns - if err := r.cc.UpdateState(resolver.State{Addresses: newConns}); err != nil { - log.ZError( - context.Background(), - "UpdateState error, conns is nil from svr", - err, - "conns", - newConns, - "zk path", - r.target.URL.Path, - ) - return - } - log.ZDebug(context.Background(), "resolve now finished", "target", r.target, "conns", r.addrs) -} - -func (r *Resolver) ResolveNow(o resolver.ResolveNowOptions) {} - -func (s *Resolver) Close() {} - -func (s *ZkClient) Build( - target resolver.Target, - cc resolver.ClientConn, - opts resolver.BuildOptions, -) (resolver.Resolver, error) { - s.logger.Printf("build resolver: %+v, cc: %+v", target, cc.UpdateState) - serviceName := strings.TrimLeft(target.URL.Path, "/") - if oldResolver, ok := s.resolvers[serviceName]; ok { - s.logger.Printf("rpc resolver exist: %+v, cc: %+v, key: %s", target, cc.UpdateState, serviceName) - return oldResolver, nil - } - r := &Resolver{} - r.target = target - r.cc = cc - r.getConnsRemote = s.GetConnsRemote - r.ResolveNowZK(resolver.ResolveNowOptions{}) - s.lock.Lock() - defer s.lock.Unlock() - s.resolvers[serviceName] = r - s.logger.Printf("build resolver finished: %+v, cc: %+v, key: %s", target, cc.UpdateState, serviceName) - return r, nil -} - -func (s *ZkClient) Scheme() string { return s.scheme } diff --git a/pkg/discoveryregistry/zookeeper/zk.go b/pkg/discoveryregistry/zookeeper/zk.go deleted file mode 100644 index cc333c4b6..000000000 --- a/pkg/discoveryregistry/zookeeper/zk.go +++ /dev/null @@ -1,226 +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. - -package zookeeper - -import ( - "net" - "strconv" - "sync" - "time" - - "github.com/go-zookeeper/zk" - "google.golang.org/grpc" - "google.golang.org/grpc/resolver" -) - -const ( - defaultFreq = time.Minute * 30 - timeout = 5 -) - -type Logger interface { - Printf(string, ...interface{}) -} - -type ZkClient struct { - zkServers []string - zkRoot string - userName string - password string - - rpcRegisterName string - rpcRegisterAddr string - isRegistered bool - scheme string - - timeout int - conn *zk.Conn - eventChan <-chan zk.Event - node string - ticker *time.Ticker - - lock sync.Locker - options []grpc.DialOption - - resolvers map[string]*Resolver - localConns map[string][]grpc.ClientConnInterface - - balancerName string - - logger Logger -} - -type ZkOption func(*ZkClient) - -func WithRoundRobin() ZkOption { - return func(client *ZkClient) { - client.balancerName = "round_robin" - } -} - -func WithUserNameAndPassword(userName, password string) ZkOption { - return func(client *ZkClient) { - client.userName = userName - client.password = password - } -} - -func WithOptions(opts ...grpc.DialOption) ZkOption { - return func(client *ZkClient) { - client.options = opts - } -} - -func WithFreq(freq time.Duration) ZkOption { - return func(client *ZkClient) { - client.ticker = time.NewTicker(freq) - } -} - -func WithTimeout(timeout int) ZkOption { - return func(client *ZkClient) { - client.timeout = timeout - } -} - -func WithLogger(logger Logger) ZkOption { - return func(client *ZkClient) { - client.logger = logger - } -} - -func NewClient(zkServers []string, zkRoot string, options ...ZkOption) (*ZkClient, error) { - client := &ZkClient{ - zkServers: zkServers, - zkRoot: "/", - scheme: zkRoot, - timeout: timeout, - localConns: make(map[string][]grpc.ClientConnInterface), - resolvers: make(map[string]*Resolver), - lock: &sync.Mutex{}, - } - client.ticker = time.NewTicker(defaultFreq) - for _, option := range options { - option(client) - } - conn, eventChan, err := zk.Connect( - zkServers, - time.Duration(client.timeout)*time.Second, - zk.WithLogInfo(true), - zk.WithLogger(client.logger), - ) - if err != nil { - return nil, err - } - if client.userName != "" && client.password != "" { - if err := conn.AddAuth("digest", []byte(client.userName+":"+client.password)); err != nil { - return nil, err - } - } - client.zkRoot += zkRoot - client.eventChan = eventChan - client.conn = conn - if err := client.ensureRoot(); err != nil { - client.CloseZK() - return nil, err - } - resolver.Register(client) - go client.refresh() - go client.watch() - time.Sleep(time.Millisecond * 50) - return client, nil -} - -func (s *ZkClient) CloseZK() { - s.conn.Close() -} - -func (s *ZkClient) ensureAndCreate(node string) error { - exists, _, err := s.conn.Exists(node) - if err != nil { - return err - } - if !exists { - _, err := s.conn.Create(node, []byte(""), 0, zk.WorldACL(zk.PermAll)) - if err != nil && err != zk.ErrNodeExists { - return err - } - } - return nil -} - -func (s *ZkClient) refresh() { - for range s.ticker.C { - s.logger.Printf("refresh local conns") - s.lock.Lock() - for rpcName := range s.resolvers { - s.flushResolver(rpcName) - } - for rpcName := range s.localConns { - delete(s.localConns, rpcName) - } - s.lock.Unlock() - s.logger.Printf("refresh local conns success") - } -} - -func (s *ZkClient) flushResolverAndDeleteLocal(serviceName string) { - s.logger.Printf("start flush %s", serviceName) - s.flushResolver(serviceName) - delete(s.localConns, serviceName) -} - -func (s *ZkClient) flushResolver(serviceName string) { - r, ok := s.resolvers[serviceName] - if ok { - r.ResolveNowZK(resolver.ResolveNowOptions{}) - } -} - -func (s *ZkClient) GetZkConn() *zk.Conn { - return s.conn -} - -func (s *ZkClient) GetRootPath() string { - return s.zkRoot -} - -func (s *ZkClient) GetNode() string { - return s.node -} - -func (s *ZkClient) ensureRoot() error { - return s.ensureAndCreate(s.zkRoot) -} - -func (s *ZkClient) ensureName(rpcRegisterName string) error { - return s.ensureAndCreate(s.getPath(rpcRegisterName)) -} - -func (s *ZkClient) getPath(rpcRegisterName string) string { - return s.zkRoot + "/" + rpcRegisterName -} - -func (s *ZkClient) getAddr(host string, port int) string { - return net.JoinHostPort(host, strconv.Itoa(port)) -} - -func (s *ZkClient) AddOption(opts ...grpc.DialOption) { - s.options = append(s.options, opts...) -} - -func (s *ZkClient) GetClientLocalConns() map[string][]grpc.ClientConnInterface { - return s.localConns -} diff --git a/pkg/errs/code.go b/pkg/errs/code.go deleted file mode 100644 index 9f70ab5e6..000000000 --- a/pkg/errs/code.go +++ /dev/null @@ -1,92 +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. - -package errs - -// UnknownCode 没有解析到code或解析的code=0. -const UnknownCode = 1000 - -const ( - FormattingError = 10001 - HasRegistered = 10002 - NotRegistered = 10003 - PasswordErr = 10004 - GetIMTokenErr = 10005 - RepeatSendCode = 10006 - MailSendCodeErr = 10007 - SmsSendCodeErr = 10008 - CodeInvalidOrExpired = 10009 - RegisterFailed = 10010 - ResetPasswordFailed = 10011 - RegisterLimit = 10012 - LoginLimit = 10013 - InvitationError = 10014 -) - -// 通用错误码. -const ( - NoError = 0 // 无错误 - DatabaseError = 90002 // redis/mysql等db错误 - NetworkError = 90004 // 网络错误 - DataError = 90007 // 数据错误 - - CallbackError = 80000 - - // 通用错误码. - ServerInternalError = 500 // 服务器内部错误 - ArgsError = 1001 // 输入参数错误 - NoPermissionError = 1002 // 权限不足 - DuplicateKeyError = 1003 - RecordNotFoundError = 1004 // 记录不存在 - - // 账号错误码. - UserIDNotFoundError = 1101 // UserID不存在 或未注册 - RegisteredAlreadyError = 1102 // 用户已经注册过了 - - // 群组错误码. - GroupIDNotFoundError = 1201 // GroupID不存在 - GroupIDExisted = 1202 // GroupID已存在 - NotInGroupYetError = 1203 // 不在群组中 - DismissedAlreadyError = 1204 // 群组已经解散 - GroupTypeNotSupport = 1205 - GroupRequestHandled = 1206 - - // 关系链错误码. - CanNotAddYourselfError = 1301 // 不能添加自己为好友 - BlockedByPeer = 1302 // 被对方拉黑 - NotPeersFriend = 1303 // 不是对方的好友 - RelationshipAlreadyError = 1304 // 已经是好友关系 - - // 消息错误码. - MessageHasReadDisable = 1401 - MutedInGroup = 1402 // 群成员被禁言 - MutedGroup = 1403 // 群被禁言 - MsgAlreadyRevoke = 1404 // 消息已撤回 - - // token错误码. - TokenExpiredError = 1501 - TokenInvalidError = 1502 - TokenMalformedError = 1503 - TokenNotValidYetError = 1504 - TokenUnknownError = 1505 - TokenKickedError = 1506 - TokenNotExistError = 1507 - - // 长连接网关错误码. - ConnOverMaxNumLimit = 1601 - ConnArgsErr = 1602 - - // S3错误码. - FileUploadedExpiredError = 1701 // 上传过期 -) diff --git a/pkg/errs/coderr.go b/pkg/errs/coderr.go deleted file mode 100644 index af88a6353..000000000 --- a/pkg/errs/coderr.go +++ /dev/null @@ -1,124 +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. - -package errs - -import ( - "fmt" - "strings" - - "github.com/pkg/errors" -) - -type CodeError interface { - Code() int - Msg() string - Detail() string - WithDetail(detail string) CodeError - // Is 判断是否是某个错误, loose为false时, 只有错误码相同就认为是同一个错误, 默认为true - Is(err error, loose ...bool) bool - Wrap(msg ...string) error - error -} - -func NewCodeError(code int, msg string) CodeError { - return &codeError{ - code: code, - msg: msg, - } -} - -type codeError struct { - code int - msg string - detail string -} - -func (e *codeError) Code() int { - return e.code -} - -func (e *codeError) Msg() string { - return e.msg -} - -func (e *codeError) Detail() string { - return e.detail -} - -func (e *codeError) WithDetail(detail string) CodeError { - var d string - if e.detail == "" { - d = detail - } else { - d = e.detail + ", " + detail - } - return &codeError{ - code: e.code, - msg: e.msg, - detail: d, - } -} - -func (e *codeError) Wrap(w ...string) error { - return errors.Wrap(e, strings.Join(w, ", ")) -} - -func (e *codeError) Is(err error, loose ...bool) bool { - if err == nil { - return false - } - var allowSubclasses bool - if len(loose) == 0 { - allowSubclasses = true - } else { - allowSubclasses = loose[0] - } - codeErr, ok := Unwrap(err).(CodeError) - if ok { - if allowSubclasses { - return Relation.Is(e.code, codeErr.Code()) - } else { - return codeErr.Code() == e.code - } - } - return false -} - -func (e *codeError) Error() string { - return fmt.Sprintf("%s", e.msg) -} - -func Unwrap(err error) error { - for err != nil { - unwrap, ok := err.(interface { - Unwrap() error - }) - if !ok { - break - } - err = unwrap.Unwrap() - } - return err -} - -func Wrap(err error, msg ...string) error { - if err == nil { - return nil - } - if len(msg) == 0 { - return errors.WithStack(err) - } - return errors.Wrap(err, strings.Join(msg, ", ")) -} diff --git a/pkg/errs/predefine.go b/pkg/errs/predefine.go deleted file mode 100644 index f11349891..000000000 --- a/pkg/errs/predefine.go +++ /dev/null @@ -1,64 +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. - -package errs - -var ( - ErrArgs = NewCodeError(ArgsError, "ArgsError") - ErrNoPermission = NewCodeError(NoPermissionError, "NoPermissionError") - ErrDatabase = NewCodeError(DatabaseError, "DatabaseError") - ErrInternalServer = NewCodeError(ServerInternalError, "ServerInternalError") - ErrNetwork = NewCodeError(NetworkError, "NetworkError") - ErrCallback = NewCodeError(CallbackError, "CallbackError") - ErrCallbackContinue = NewCodeError(CallbackError, "ErrCallbackContinue") - - ErrUserIDNotFound = NewCodeError(UserIDNotFoundError, "UserIDNotFoundError") - ErrGroupIDNotFound = NewCodeError(GroupIDNotFoundError, "GroupIDNotFoundError") - ErrGroupIDExisted = NewCodeError(GroupIDExisted, "GroupIDExisted") - - ErrRecordNotFound = NewCodeError(RecordNotFoundError, "RecordNotFoundError") - - ErrNotInGroupYet = NewCodeError(NotInGroupYetError, "NotInGroupYetError") - ErrDismissedAlready = NewCodeError(DismissedAlreadyError, "DismissedAlreadyError") - ErrRegisteredAlready = NewCodeError(RegisteredAlreadyError, "RegisteredAlreadyError") - ErrGroupTypeNotSupport = NewCodeError(GroupTypeNotSupport, "") - ErrGroupRequestHandled = NewCodeError(GroupRequestHandled, "GroupRequestHandled") - - ErrData = NewCodeError(DataError, "DataError") - ErrTokenExpired = NewCodeError(TokenExpiredError, "TokenExpiredError") - ErrTokenInvalid = NewCodeError(TokenInvalidError, "TokenInvalidError") // - ErrTokenMalformed = NewCodeError(TokenMalformedError, "TokenMalformedError") // 格式错误 - ErrTokenNotValidYet = NewCodeError(TokenNotValidYetError, "TokenNotValidYetError") // 还未生效 - ErrTokenUnknown = NewCodeError(TokenUnknownError, "TokenUnknownError") // 未知错误 - ErrTokenKicked = NewCodeError(TokenKickedError, "TokenKickedError") - ErrTokenNotExist = NewCodeError(TokenNotExistError, "TokenNotExistError") // 在redis中不存在 - ErrDuplicateKey = NewCodeError(DuplicateKeyError, "DuplicateKeyError") - - ErrMessageHasReadDisable = NewCodeError(MessageHasReadDisable, "MessageHasReadDisable") - - ErrCanNotAddYourself = NewCodeError(CanNotAddYourselfError, "CanNotAddYourselfError") - ErrBlockedByPeer = NewCodeError(BlockedByPeer, "BlockedByPeer") - ErrNotPeersFriend = NewCodeError(NotPeersFriend, "NotPeersFriend") - ErrRelationshipAlready = NewCodeError(RelationshipAlreadyError, "RelationshipAlreadyError") - - ErrMutedInGroup = NewCodeError(MutedInGroup, "MutedInGroup") - ErrMutedGroup = NewCodeError(MutedGroup, "MutedGroup") - ErrMsgAlreadyRevoke = NewCodeError(MsgAlreadyRevoke, "MsgAlreadyRevoke") - - ErrConnOverMaxNumLimit = NewCodeError(ConnOverMaxNumLimit, "ConnOverMaxNumLimit") - - ErrConnArgsErr = NewCodeError(ConnArgsErr, "args err, need token, sendID, platformID") - - ErrFileUploadedExpired = NewCodeError(FileUploadedExpiredError, "FileUploadedExpiredError") -) diff --git a/pkg/errs/relation.go b/pkg/errs/relation.go deleted file mode 100644 index 0a7ad4997..000000000 --- a/pkg/errs/relation.go +++ /dev/null @@ -1,56 +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. - -package errs - -var Relation = &relation{m: make(map[int]map[int]struct{})} - -func init() { - Relation.Add(RecordNotFoundError, UserIDNotFoundError) - Relation.Add(RecordNotFoundError, GroupIDNotFoundError) - Relation.Add(DuplicateKeyError, GroupIDExisted) -} - -type relation struct { - m map[int]map[int]struct{} -} - -func (r *relation) Add(codes ...int) { - if len(codes) < 2 { - panic("codes length must be greater than 2") - } - for i := 1; i < len(codes); i++ { - parent := codes[i-1] - s, ok := r.m[parent] - if !ok { - s = make(map[int]struct{}) - r.m[parent] = s - } - for _, code := range codes[i:] { - s[code] = struct{}{} - } - } -} - -func (r *relation) Is(parent, child int) bool { - if parent == child { - return true - } - s, ok := r.m[parent] - if !ok { - return false - } - _, ok = s[child] - return ok -} diff --git a/pkg/proto/auth/auth.go b/pkg/proto/auth/auth.go deleted file mode 100644 index 9b8fdd988..000000000 --- a/pkg/proto/auth/auth.go +++ /dev/null @@ -1,47 +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. - -package auth - -import ( - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/constant" - "github.com/OpenIMSDK/Open-IM-Server/pkg/errs" -) - -func (x *UserTokenReq) Check() error { - if x.UserID == "" { - return errs.ErrArgs.Wrap("userID is empty") - } - if x.PlatformID > constant.AdminPlatformID || x.PlatformID < constant.IOSPlatformID { - return errs.ErrArgs.Wrap("platform is invalidate") - } - return nil -} - -func (x *ForceLogoutReq) Check() error { - if x.UserID == "" { - return errs.ErrArgs.Wrap("userID is empty") - } - if x.PlatformID > constant.AdminPlatformID || x.PlatformID < constant.IOSPlatformID { - return errs.ErrArgs.Wrap("platformID is invalidate") - } - return nil -} - -func (x *ParseTokenReq) Check() error { - if x.Token == "" { - return errs.ErrArgs.Wrap("userID is empty") - } - return nil -} diff --git a/pkg/proto/auth/auth.pb.go b/pkg/proto/auth/auth.pb.go deleted file mode 100644 index 2d1e0493c..000000000 --- a/pkg/proto/auth/auth.pb.go +++ /dev/null @@ -1,707 +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. - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.29.1 -// protoc v4.22.0 -// source: auth/auth.proto - -package auth - -import ( - context "context" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type UserTokenReq struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Secret string `protobuf:"bytes,1,opt,name=secret,proto3" json:"secret"` - PlatformID int32 `protobuf:"varint,2,opt,name=platformID,proto3" json:"platformID"` - UserID string `protobuf:"bytes,3,opt,name=userID,proto3" json:"userID"` -} - -func (x *UserTokenReq) Reset() { - *x = UserTokenReq{} - if protoimpl.UnsafeEnabled { - mi := &file_auth_auth_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *UserTokenReq) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*UserTokenReq) ProtoMessage() {} - -func (x *UserTokenReq) ProtoReflect() protoreflect.Message { - mi := &file_auth_auth_proto_msgTypes[0] - 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 UserTokenReq.ProtoReflect.Descriptor instead. -func (*UserTokenReq) Descriptor() ([]byte, []int) { - return file_auth_auth_proto_rawDescGZIP(), []int{0} -} - -func (x *UserTokenReq) GetSecret() string { - if x != nil { - return x.Secret - } - return "" -} - -func (x *UserTokenReq) GetPlatformID() int32 { - if x != nil { - return x.PlatformID - } - return 0 -} - -func (x *UserTokenReq) GetUserID() string { - if x != nil { - return x.UserID - } - return "" -} - -type UserTokenResp struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Token string `protobuf:"bytes,2,opt,name=token,proto3" json:"token"` - ExpireTimeSeconds int64 `protobuf:"varint,3,opt,name=expireTimeSeconds,proto3" json:"expireTimeSeconds"` -} - -func (x *UserTokenResp) Reset() { - *x = UserTokenResp{} - if protoimpl.UnsafeEnabled { - mi := &file_auth_auth_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *UserTokenResp) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*UserTokenResp) ProtoMessage() {} - -func (x *UserTokenResp) ProtoReflect() protoreflect.Message { - mi := &file_auth_auth_proto_msgTypes[1] - 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 UserTokenResp.ProtoReflect.Descriptor instead. -func (*UserTokenResp) Descriptor() ([]byte, []int) { - return file_auth_auth_proto_rawDescGZIP(), []int{1} -} - -func (x *UserTokenResp) GetToken() string { - if x != nil { - return x.Token - } - return "" -} - -func (x *UserTokenResp) GetExpireTimeSeconds() int64 { - if x != nil { - return x.ExpireTimeSeconds - } - return 0 -} - -type ForceLogoutReq struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - PlatformID int32 `protobuf:"varint,1,opt,name=platformID,proto3" json:"platformID"` - UserID string `protobuf:"bytes,2,opt,name=userID,proto3" json:"userID"` -} - -func (x *ForceLogoutReq) Reset() { - *x = ForceLogoutReq{} - if protoimpl.UnsafeEnabled { - mi := &file_auth_auth_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ForceLogoutReq) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ForceLogoutReq) ProtoMessage() {} - -func (x *ForceLogoutReq) ProtoReflect() protoreflect.Message { - mi := &file_auth_auth_proto_msgTypes[2] - 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 ForceLogoutReq.ProtoReflect.Descriptor instead. -func (*ForceLogoutReq) Descriptor() ([]byte, []int) { - return file_auth_auth_proto_rawDescGZIP(), []int{2} -} - -func (x *ForceLogoutReq) GetPlatformID() int32 { - if x != nil { - return x.PlatformID - } - return 0 -} - -func (x *ForceLogoutReq) GetUserID() string { - if x != nil { - return x.UserID - } - return "" -} - -type ForceLogoutResp struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *ForceLogoutResp) Reset() { - *x = ForceLogoutResp{} - if protoimpl.UnsafeEnabled { - mi := &file_auth_auth_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ForceLogoutResp) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ForceLogoutResp) ProtoMessage() {} - -func (x *ForceLogoutResp) ProtoReflect() protoreflect.Message { - mi := &file_auth_auth_proto_msgTypes[3] - 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 ForceLogoutResp.ProtoReflect.Descriptor instead. -func (*ForceLogoutResp) Descriptor() ([]byte, []int) { - return file_auth_auth_proto_rawDescGZIP(), []int{3} -} - -type ParseTokenReq struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token"` -} - -func (x *ParseTokenReq) Reset() { - *x = ParseTokenReq{} - if protoimpl.UnsafeEnabled { - mi := &file_auth_auth_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ParseTokenReq) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ParseTokenReq) ProtoMessage() {} - -func (x *ParseTokenReq) ProtoReflect() protoreflect.Message { - mi := &file_auth_auth_proto_msgTypes[4] - 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 ParseTokenReq.ProtoReflect.Descriptor instead. -func (*ParseTokenReq) Descriptor() ([]byte, []int) { - return file_auth_auth_proto_rawDescGZIP(), []int{4} -} - -func (x *ParseTokenReq) GetToken() string { - if x != nil { - return x.Token - } - return "" -} - -type ParseTokenResp struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - UserID string `protobuf:"bytes,1,opt,name=userID,proto3" json:"userID"` - Platform string `protobuf:"bytes,2,opt,name=platform,proto3" json:"platform"` - ExpireTimeSeconds int64 `protobuf:"varint,4,opt,name=expireTimeSeconds,proto3" json:"expireTimeSeconds"` -} - -func (x *ParseTokenResp) Reset() { - *x = ParseTokenResp{} - if protoimpl.UnsafeEnabled { - mi := &file_auth_auth_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ParseTokenResp) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ParseTokenResp) ProtoMessage() {} - -func (x *ParseTokenResp) ProtoReflect() protoreflect.Message { - mi := &file_auth_auth_proto_msgTypes[5] - 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 ParseTokenResp.ProtoReflect.Descriptor instead. -func (*ParseTokenResp) Descriptor() ([]byte, []int) { - return file_auth_auth_proto_rawDescGZIP(), []int{5} -} - -func (x *ParseTokenResp) GetUserID() string { - if x != nil { - return x.UserID - } - return "" -} - -func (x *ParseTokenResp) GetPlatform() string { - if x != nil { - return x.Platform - } - return "" -} - -func (x *ParseTokenResp) GetExpireTimeSeconds() int64 { - if x != nil { - return x.ExpireTimeSeconds - } - return 0 -} - -var File_auth_auth_proto protoreflect.FileDescriptor - -var file_auth_auth_proto_rawDesc = []byte{ - 0x0a, 0x0f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x12, 0x11, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, - 0x61, 0x75, 0x74, 0x68, 0x22, 0x5e, 0x0a, 0x0c, 0x75, 0x73, 0x65, 0x72, 0x54, 0x6f, 0x6b, 0x65, - 0x6e, 0x52, 0x65, 0x71, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x12, 0x1e, 0x0a, 0x0a, - 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, - 0x52, 0x0a, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x49, 0x44, 0x12, 0x16, 0x0a, 0x06, - 0x75, 0x73, 0x65, 0x72, 0x49, 0x44, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, - 0x65, 0x72, 0x49, 0x44, 0x22, 0x53, 0x0a, 0x0d, 0x75, 0x73, 0x65, 0x72, 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, 0x12, 0x2c, 0x0a, 0x11, 0x65, - 0x78, 0x70, 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, 0x48, 0x0a, 0x0e, 0x66, 0x6f, 0x72, - 0x63, 0x65, 0x4c, 0x6f, 0x67, 0x6f, 0x75, 0x74, 0x52, 0x65, 0x71, 0x12, 0x1e, 0x0a, 0x0a, 0x70, - 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, - 0x0a, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x49, 0x44, 0x12, 0x16, 0x0a, 0x06, 0x75, - 0x73, 0x65, 0x72, 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, 0x65, - 0x72, 0x49, 0x44, 0x22, 0x11, 0x0a, 0x0f, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x4c, 0x6f, 0x67, 0x6f, - 0x75, 0x74, 0x52, 0x65, 0x73, 0x70, 0x22, 0x25, 0x0a, 0x0d, 0x70, 0x61, 0x72, 0x73, 0x65, 0x54, - 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x71, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x72, 0x0a, - 0x0e, 0x70, 0x61, 0x72, 0x73, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x12, - 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, 0x70, 0x6c, 0x61, 0x74, 0x66, - 0x6f, 0x72, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x6c, 0x61, 0x74, 0x66, - 0x6f, 0x72, 0x6d, 0x12, 0x2c, 0x0a, 0x11, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x54, 0x69, 0x6d, - 0x65, 0x53, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x11, - 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x53, 0x65, 0x63, 0x6f, 0x6e, 0x64, - 0x73, 0x32, 0xff, 0x01, 0x0a, 0x04, 0x41, 0x75, 0x74, 0x68, 0x12, 0x4e, 0x0a, 0x09, 0x75, 0x73, - 0x65, 0x72, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x1f, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, - 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x75, 0x73, 0x65, 0x72, - 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x71, 0x1a, 0x20, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, - 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x75, 0x73, 0x65, - 0x72, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x12, 0x54, 0x0a, 0x0b, 0x66, 0x6f, - 0x72, 0x63, 0x65, 0x4c, 0x6f, 0x67, 0x6f, 0x75, 0x74, 0x12, 0x21, 0x2e, 0x4f, 0x70, 0x65, 0x6e, - 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x66, 0x6f, - 0x72, 0x63, 0x65, 0x4c, 0x6f, 0x67, 0x6f, 0x75, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x22, 0x2e, 0x4f, - 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x61, 0x75, 0x74, 0x68, - 0x2e, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x4c, 0x6f, 0x67, 0x6f, 0x75, 0x74, 0x52, 0x65, 0x73, 0x70, - 0x12, 0x51, 0x0a, 0x0a, 0x70, 0x61, 0x72, 0x73, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x20, - 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x61, 0x75, - 0x74, 0x68, 0x2e, 0x70, 0x61, 0x72, 0x73, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x71, - 0x1a, 0x21, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, - 0x61, 0x75, 0x74, 0x68, 0x2e, 0x70, 0x61, 0x72, 0x73, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, - 0x65, 0x73, 0x70, 0x42, 0x34, 0x5a, 0x32, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, - 0x6d, 0x2f, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x44, 0x4b, 0x2f, 0x4f, 0x70, 0x65, 0x6e, - 0x2d, 0x49, 0x4d, 0x2d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x33, -} - -var ( - file_auth_auth_proto_rawDescOnce sync.Once - file_auth_auth_proto_rawDescData = file_auth_auth_proto_rawDesc -) - -func file_auth_auth_proto_rawDescGZIP() []byte { - file_auth_auth_proto_rawDescOnce.Do(func() { - file_auth_auth_proto_rawDescData = protoimpl.X.CompressGZIP(file_auth_auth_proto_rawDescData) - }) - return file_auth_auth_proto_rawDescData -} - -var file_auth_auth_proto_msgTypes = make([]protoimpl.MessageInfo, 6) -var file_auth_auth_proto_goTypes = []interface{}{ - (*UserTokenReq)(nil), // 0: OpenIMServer.auth.userTokenReq - (*UserTokenResp)(nil), // 1: OpenIMServer.auth.userTokenResp - (*ForceLogoutReq)(nil), // 2: OpenIMServer.auth.forceLogoutReq - (*ForceLogoutResp)(nil), // 3: OpenIMServer.auth.forceLogoutResp - (*ParseTokenReq)(nil), // 4: OpenIMServer.auth.parseTokenReq - (*ParseTokenResp)(nil), // 5: OpenIMServer.auth.parseTokenResp -} -var file_auth_auth_proto_depIdxs = []int32{ - 0, // 0: OpenIMServer.auth.Auth.userToken:input_type -> OpenIMServer.auth.userTokenReq - 2, // 1: OpenIMServer.auth.Auth.forceLogout:input_type -> OpenIMServer.auth.forceLogoutReq - 4, // 2: OpenIMServer.auth.Auth.parseToken:input_type -> OpenIMServer.auth.parseTokenReq - 1, // 3: OpenIMServer.auth.Auth.userToken:output_type -> OpenIMServer.auth.userTokenResp - 3, // 4: OpenIMServer.auth.Auth.forceLogout:output_type -> OpenIMServer.auth.forceLogoutResp - 5, // 5: OpenIMServer.auth.Auth.parseToken:output_type -> OpenIMServer.auth.parseTokenResp - 3, // [3:6] is the sub-list for method output_type - 0, // [0:3] is the sub-list for method input_type - 0, // [0:0] is the sub-list for extension type_name - 0, // [0:0] is the sub-list for extension extendee - 0, // [0:0] is the sub-list for field type_name -} - -func init() { file_auth_auth_proto_init() } -func file_auth_auth_proto_init() { - if File_auth_auth_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_auth_auth_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UserTokenReq); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_auth_auth_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UserTokenResp); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_auth_auth_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ForceLogoutReq); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_auth_auth_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ForceLogoutResp); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_auth_auth_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ParseTokenReq); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_auth_auth_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ParseTokenResp); 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{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_auth_auth_proto_rawDesc, - NumEnums: 0, - NumMessages: 6, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_auth_auth_proto_goTypes, - DependencyIndexes: file_auth_auth_proto_depIdxs, - MessageInfos: file_auth_auth_proto_msgTypes, - }.Build() - File_auth_auth_proto = out.File - file_auth_auth_proto_rawDesc = nil - file_auth_auth_proto_goTypes = nil - file_auth_auth_proto_depIdxs = nil -} - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConnInterface - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion6 - -// AuthClient is the client API for Auth service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type AuthClient interface { - // 生成token - UserToken(ctx context.Context, in *UserTokenReq, opts ...grpc.CallOption) (*UserTokenResp, error) - // 强制退出登录 - ForceLogout(ctx context.Context, in *ForceLogoutReq, opts ...grpc.CallOption) (*ForceLogoutResp, error) - // 解析token - ParseToken(ctx context.Context, in *ParseTokenReq, opts ...grpc.CallOption) (*ParseTokenResp, error) -} - -type authClient struct { - cc grpc.ClientConnInterface -} - -func NewAuthClient(cc grpc.ClientConnInterface) AuthClient { - return &authClient{cc} -} - -func (c *authClient) UserToken(ctx context.Context, in *UserTokenReq, opts ...grpc.CallOption) (*UserTokenResp, error) { - out := new(UserTokenResp) - err := c.cc.Invoke(ctx, "/OpenIMServer.auth.Auth/userToken", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *authClient) ForceLogout(ctx context.Context, in *ForceLogoutReq, opts ...grpc.CallOption) (*ForceLogoutResp, error) { - out := new(ForceLogoutResp) - err := c.cc.Invoke(ctx, "/OpenIMServer.auth.Auth/forceLogout", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *authClient) ParseToken(ctx context.Context, in *ParseTokenReq, opts ...grpc.CallOption) (*ParseTokenResp, error) { - out := new(ParseTokenResp) - err := c.cc.Invoke(ctx, "/OpenIMServer.auth.Auth/parseToken", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// AuthServer is the server API for Auth service. -type AuthServer interface { - // 生成token - UserToken(context.Context, *UserTokenReq) (*UserTokenResp, error) - // 强制退出登录 - ForceLogout(context.Context, *ForceLogoutReq) (*ForceLogoutResp, error) - // 解析token - ParseToken(context.Context, *ParseTokenReq) (*ParseTokenResp, error) -} - -// UnimplementedAuthServer can be embedded to have forward compatible implementations. -type UnimplementedAuthServer struct { -} - -func (*UnimplementedAuthServer) UserToken(context.Context, *UserTokenReq) (*UserTokenResp, error) { - return nil, status.Errorf(codes.Unimplemented, "method UserToken not implemented") -} -func (*UnimplementedAuthServer) ForceLogout(context.Context, *ForceLogoutReq) (*ForceLogoutResp, error) { - return nil, status.Errorf(codes.Unimplemented, "method ForceLogout not implemented") -} -func (*UnimplementedAuthServer) ParseToken(context.Context, *ParseTokenReq) (*ParseTokenResp, error) { - return nil, status.Errorf(codes.Unimplemented, "method ParseToken not implemented") -} - -func RegisterAuthServer(s *grpc.Server, srv AuthServer) { - s.RegisterService(&_Auth_serviceDesc, srv) -} - -func _Auth_UserToken_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(UserTokenReq) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(AuthServer).UserToken(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/OpenIMServer.auth.Auth/UserToken", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AuthServer).UserToken(ctx, req.(*UserTokenReq)) - } - return interceptor(ctx, in, info, handler) -} - -func _Auth_ForceLogout_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ForceLogoutReq) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(AuthServer).ForceLogout(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/OpenIMServer.auth.Auth/ForceLogout", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AuthServer).ForceLogout(ctx, req.(*ForceLogoutReq)) - } - return interceptor(ctx, in, info, handler) -} - -func _Auth_ParseToken_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ParseTokenReq) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(AuthServer).ParseToken(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/OpenIMServer.auth.Auth/ParseToken", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AuthServer).ParseToken(ctx, req.(*ParseTokenReq)) - } - return interceptor(ctx, in, info, handler) -} - -var _Auth_serviceDesc = grpc.ServiceDesc{ - ServiceName: "OpenIMServer.auth.Auth", - HandlerType: (*AuthServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "userToken", - Handler: _Auth_UserToken_Handler, - }, - { - MethodName: "forceLogout", - Handler: _Auth_ForceLogout_Handler, - }, - { - MethodName: "parseToken", - Handler: _Auth_ParseToken_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "auth/auth.proto", -} diff --git a/pkg/proto/auth/auth.proto b/pkg/proto/auth/auth.proto deleted file mode 100644 index 29c008cbe..000000000 --- a/pkg/proto/auth/auth.proto +++ /dev/null @@ -1,55 +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. - -syntax = "proto3"; -package OpenIMServer.auth; -option go_package = "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/auth"; - - -message userTokenReq { - string secret = 1; - int32 platformID = 2; - string userID = 3; -} -message userTokenResp { - string token = 2; - int64 expireTimeSeconds = 3; -} - -message forceLogoutReq { - int32 platformID = 1; - string userID = 2; -} -message forceLogoutResp { -} - -message parseTokenReq{ - string token = 1; -} -message parseTokenResp{ - string userID = 1; - string platform = 2; - int64 expireTimeSeconds = 4; -} - -service Auth { - //生成token - rpc userToken(userTokenReq) returns(userTokenResp); - //强制退出登录 - rpc forceLogout(forceLogoutReq) returns(forceLogoutResp); - //解析token - rpc parseToken(parseTokenReq)returns(parseTokenResp); -} - - diff --git a/pkg/proto/conversation/conversation.go b/pkg/proto/conversation/conversation.go deleted file mode 100644 index 7e8f62bbc..000000000 --- a/pkg/proto/conversation/conversation.go +++ /dev/null @@ -1,162 +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. - -package conversation - -import "github.com/OpenIMSDK/Open-IM-Server/pkg/errs" - -func (x *ConversationReq) Check() error { - if x.ConversationID == "" { - return errs.ErrArgs.Wrap("conversation is empty") - } - return nil -} - -func (x *Conversation) Check() error { - if x.OwnerUserID == "" { - return errs.ErrArgs.Wrap("OwnerUserID is empty") - } - if x.ConversationID == "" { - return errs.ErrArgs.Wrap("ConversationID is empty") - } - if x.ConversationType < 1 || x.ConversationType > 4 { - return errs.ErrArgs.Wrap("ConversationType is invalid") - } - if x.RecvMsgOpt < 0 || x.RecvMsgOpt > 2 { - return errs.ErrArgs.Wrap("RecvMsgOpt is invalid") - } - return nil -} - -//func (x *ModifyConversationFieldReq) Check() error { -// if x.UserIDList == nil { -// return errs.ErrArgs.Wrap("userIDList is empty") -// } -// if x.Conversation == nil { -// return errs.ErrArgs.Wrap("conversation is empty") -// } -// return nil -//} - -func (x *SetConversationReq) Check() error { - if x.Conversation == nil { - return errs.ErrArgs.Wrap("Conversation is empty") - } - if x.Conversation.ConversationID == "" { - return errs.ErrArgs.Wrap("conversationID is empty") - } - return nil -} - -//func (x *SetRecvMsgOptReq) Check() error { -// if x.OwnerUserID == "" { -// return errs.ErrArgs.Wrap("ownerUserID is empty") -// } -// if x.ConversationID == "" { -// return errs.ErrArgs.Wrap("conversationID is empty") -// } -// if x.RecvMsgOpt > 2 || x.RecvMsgOpt < 0 { -// return errs.ErrArgs.Wrap("MsgReceiveOpt is invalid") -// } -// return nil -//} - -func (x *GetConversationReq) Check() error { - if x.OwnerUserID == "" { - return errs.ErrArgs.Wrap("ownerUserID is empty") - } - if x.ConversationID == "" { - return errs.ErrArgs.Wrap("conversationID is empty") - } - return nil -} - -func (x *GetConversationsReq) Check() error { - if x.OwnerUserID == "" { - return errs.ErrArgs.Wrap("ownerUserID is empty") - } - if x.ConversationIDs == nil { - return errs.ErrArgs.Wrap("conversationIDs is empty") - } - return nil -} - -func (x *GetAllConversationsReq) Check() error { - if x.OwnerUserID == "" { - return errs.ErrArgs.Wrap("ownerUserID is empty") - } - return nil -} - -// -//func (x *BatchSetConversationsReq) Check() error { -// if x.Conversations == nil { -// return errs.ErrArgs.Wrap("conversations is empty") -// } -// if x.OwnerUserID == "" { -// return errs.ErrArgs.Wrap("conversation is empty") -// } -// return nil -//} - -func (x *GetRecvMsgNotNotifyUserIDsReq) Check() error { - if x.GroupID == "" { - return errs.ErrArgs.Wrap("groupID is empty") - } - return nil -} - -func (x *CreateGroupChatConversationsReq) Check() error { - if x.GroupID == "" { - return errs.ErrArgs.Wrap("groupID is empty") - } - return nil -} - -func (x *SetConversationMaxSeqReq) Check() error { - if x.ConversationID == "" { - return errs.ErrArgs.Wrap("conversationID is empty") - } - if x.OwnerUserID == nil { - return errs.ErrArgs.Wrap("ownerUserID is empty") - } - if x.MaxSeq <= 0 { - return errs.ErrArgs.Wrap("maxSeq is invalid") - } - return nil -} - -func (x *SetConversationsReq) Check() error { - if x.UserIDs == nil { - return errs.ErrArgs.Wrap("userID is empty") - } - if x.Conversation == nil { - return errs.ErrArgs.Wrap("conversation is empty") - } - return nil -} - -func (x *GetUserConversationIDsHashReq) Check() error { - if x.OwnerUserID == "" { - return errs.ErrArgs.Wrap("ownerUserID is empty") - } - return nil -} - -func (x *GetConversationsByConversationIDReq) Check() error { - if x.ConversationIDs == nil { - return errs.ErrArgs.Wrap("conversationIDs is empty") - } - return nil -} diff --git a/pkg/proto/conversation/conversation.pb.go b/pkg/proto/conversation/conversation.pb.go deleted file mode 100644 index cf5de48a7..000000000 --- a/pkg/proto/conversation/conversation.pb.go +++ /dev/null @@ -1,2744 +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. - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.29.1 -// protoc v4.22.0 -// source: conversation/conversation.proto - -package conversation - -import ( - context "context" - wrapperspb "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/wrapperspb" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type Conversation struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - OwnerUserID string `protobuf:"bytes,1,opt,name=ownerUserID,proto3" json:"ownerUserID"` - ConversationID string `protobuf:"bytes,2,opt,name=conversationID,proto3" json:"conversationID"` - RecvMsgOpt int32 `protobuf:"varint,3,opt,name=recvMsgOpt,proto3" json:"recvMsgOpt"` - ConversationType int32 `protobuf:"varint,4,opt,name=conversationType,proto3" json:"conversationType"` - UserID string `protobuf:"bytes,5,opt,name=userID,proto3" json:"userID"` - GroupID string `protobuf:"bytes,6,opt,name=groupID,proto3" json:"groupID"` - IsPinned bool `protobuf:"varint,7,opt,name=isPinned,proto3" json:"isPinned"` - AttachedInfo string `protobuf:"bytes,8,opt,name=attachedInfo,proto3" json:"attachedInfo"` - IsPrivateChat bool `protobuf:"varint,9,opt,name=isPrivateChat,proto3" json:"isPrivateChat"` - GroupAtType int32 `protobuf:"varint,10,opt,name=groupAtType,proto3" json:"groupAtType"` - Ex string `protobuf:"bytes,11,opt,name=ex,proto3" json:"ex"` - BurnDuration int32 `protobuf:"varint,12,opt,name=burnDuration,proto3" json:"burnDuration"` - MinSeq int64 `protobuf:"varint,13,opt,name=minSeq,proto3" json:"minSeq"` - MaxSeq int64 `protobuf:"varint,14,opt,name=maxSeq,proto3" json:"maxSeq"` - MsgDestructTime int64 `protobuf:"varint,15,opt,name=msgDestructTime,proto3" json:"msgDestructTime"` - LatestMsgDestructTime int64 `protobuf:"varint,16,opt,name=latestMsgDestructTime,proto3" json:"latestMsgDestructTime"` - IsMsgDestruct bool `protobuf:"varint,17,opt,name=isMsgDestruct,proto3" json:"isMsgDestruct"` -} - -func (x *Conversation) Reset() { - *x = Conversation{} - if protoimpl.UnsafeEnabled { - mi := &file_conversation_conversation_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Conversation) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Conversation) ProtoMessage() {} - -func (x *Conversation) ProtoReflect() protoreflect.Message { - mi := &file_conversation_conversation_proto_msgTypes[0] - 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 Conversation.ProtoReflect.Descriptor instead. -func (*Conversation) Descriptor() ([]byte, []int) { - return file_conversation_conversation_proto_rawDescGZIP(), []int{0} -} - -func (x *Conversation) GetOwnerUserID() string { - if x != nil { - return x.OwnerUserID - } - return "" -} - -func (x *Conversation) GetConversationID() string { - if x != nil { - return x.ConversationID - } - return "" -} - -func (x *Conversation) GetRecvMsgOpt() int32 { - if x != nil { - return x.RecvMsgOpt - } - return 0 -} - -func (x *Conversation) GetConversationType() int32 { - if x != nil { - return x.ConversationType - } - return 0 -} - -func (x *Conversation) GetUserID() string { - if x != nil { - return x.UserID - } - return "" -} - -func (x *Conversation) GetGroupID() string { - if x != nil { - return x.GroupID - } - return "" -} - -func (x *Conversation) GetIsPinned() bool { - if x != nil { - return x.IsPinned - } - return false -} - -func (x *Conversation) GetAttachedInfo() string { - if x != nil { - return x.AttachedInfo - } - return "" -} - -func (x *Conversation) GetIsPrivateChat() bool { - if x != nil { - return x.IsPrivateChat - } - return false -} - -func (x *Conversation) GetGroupAtType() int32 { - if x != nil { - return x.GroupAtType - } - return 0 -} - -func (x *Conversation) GetEx() string { - if x != nil { - return x.Ex - } - return "" -} - -func (x *Conversation) GetBurnDuration() int32 { - if x != nil { - return x.BurnDuration - } - return 0 -} - -func (x *Conversation) GetMinSeq() int64 { - if x != nil { - return x.MinSeq - } - return 0 -} - -func (x *Conversation) GetMaxSeq() int64 { - if x != nil { - return x.MaxSeq - } - return 0 -} - -func (x *Conversation) GetMsgDestructTime() int64 { - if x != nil { - return x.MsgDestructTime - } - return 0 -} - -func (x *Conversation) GetLatestMsgDestructTime() int64 { - if x != nil { - return x.LatestMsgDestructTime - } - return 0 -} - -func (x *Conversation) GetIsMsgDestruct() bool { - if x != nil { - return x.IsMsgDestruct - } - return false -} - -type ConversationReq struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - ConversationID string `protobuf:"bytes,1,opt,name=conversationID,proto3" json:"conversationID"` - ConversationType int32 `protobuf:"varint,2,opt,name=conversationType,proto3" json:"conversationType"` - UserID string `protobuf:"bytes,3,opt,name=userID,proto3" json:"userID"` - GroupID string `protobuf:"bytes,4,opt,name=groupID,proto3" json:"groupID"` - RecvMsgOpt *wrapperspb.Int32Value `protobuf:"bytes,5,opt,name=recvMsgOpt,proto3" json:"recvMsgOpt"` - IsPinned *wrapperspb.BoolValue `protobuf:"bytes,6,opt,name=isPinned,proto3" json:"isPinned"` - AttachedInfo *wrapperspb.StringValue `protobuf:"bytes,7,opt,name=attachedInfo,proto3" json:"attachedInfo"` - IsPrivateChat *wrapperspb.BoolValue `protobuf:"bytes,8,opt,name=isPrivateChat,proto3" json:"isPrivateChat"` - Ex *wrapperspb.StringValue `protobuf:"bytes,9,opt,name=ex,proto3" json:"ex"` - BurnDuration *wrapperspb.Int32Value `protobuf:"bytes,10,opt,name=burnDuration,proto3" json:"burnDuration"` - MinSeq *wrapperspb.Int64Value `protobuf:"bytes,11,opt,name=minSeq,proto3" json:"minSeq"` - MaxSeq *wrapperspb.Int64Value `protobuf:"bytes,12,opt,name=maxSeq,proto3" json:"maxSeq"` - GroupAtType *wrapperspb.Int32Value `protobuf:"bytes,13,opt,name=groupAtType,proto3" json:"groupAtType"` - MsgDestructTime *wrapperspb.Int64Value `protobuf:"bytes,14,opt,name=msgDestructTime,proto3" json:"msgDestructTime"` - IsMsgDestruct *wrapperspb.BoolValue `protobuf:"bytes,15,opt,name=isMsgDestruct,proto3" json:"isMsgDestruct"` -} - -func (x *ConversationReq) Reset() { - *x = ConversationReq{} - if protoimpl.UnsafeEnabled { - mi := &file_conversation_conversation_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ConversationReq) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ConversationReq) ProtoMessage() {} - -func (x *ConversationReq) ProtoReflect() protoreflect.Message { - mi := &file_conversation_conversation_proto_msgTypes[1] - 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 ConversationReq.ProtoReflect.Descriptor instead. -func (*ConversationReq) Descriptor() ([]byte, []int) { - return file_conversation_conversation_proto_rawDescGZIP(), []int{1} -} - -func (x *ConversationReq) GetConversationID() string { - if x != nil { - return x.ConversationID - } - return "" -} - -func (x *ConversationReq) GetConversationType() int32 { - if x != nil { - return x.ConversationType - } - return 0 -} - -func (x *ConversationReq) GetUserID() string { - if x != nil { - return x.UserID - } - return "" -} - -func (x *ConversationReq) GetGroupID() string { - if x != nil { - return x.GroupID - } - return "" -} - -func (x *ConversationReq) GetRecvMsgOpt() *wrapperspb.Int32Value { - if x != nil { - return x.RecvMsgOpt - } - return nil -} - -func (x *ConversationReq) GetIsPinned() *wrapperspb.BoolValue { - if x != nil { - return x.IsPinned - } - return nil -} - -func (x *ConversationReq) GetAttachedInfo() *wrapperspb.StringValue { - if x != nil { - return x.AttachedInfo - } - return nil -} - -func (x *ConversationReq) GetIsPrivateChat() *wrapperspb.BoolValue { - if x != nil { - return x.IsPrivateChat - } - return nil -} - -func (x *ConversationReq) GetEx() *wrapperspb.StringValue { - if x != nil { - return x.Ex - } - return nil -} - -func (x *ConversationReq) GetBurnDuration() *wrapperspb.Int32Value { - if x != nil { - return x.BurnDuration - } - return nil -} - -func (x *ConversationReq) GetMinSeq() *wrapperspb.Int64Value { - if x != nil { - return x.MinSeq - } - return nil -} - -func (x *ConversationReq) GetMaxSeq() *wrapperspb.Int64Value { - if x != nil { - return x.MaxSeq - } - return nil -} - -func (x *ConversationReq) GetGroupAtType() *wrapperspb.Int32Value { - if x != nil { - return x.GroupAtType - } - return nil -} - -func (x *ConversationReq) GetMsgDestructTime() *wrapperspb.Int64Value { - if x != nil { - return x.MsgDestructTime - } - return nil -} - -func (x *ConversationReq) GetIsMsgDestruct() *wrapperspb.BoolValue { - if x != nil { - return x.IsMsgDestruct - } - return nil -} - -type SetConversationReq struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Conversation *Conversation `protobuf:"bytes,1,opt,name=conversation,proto3" json:"conversation"` -} - -func (x *SetConversationReq) Reset() { - *x = SetConversationReq{} - if protoimpl.UnsafeEnabled { - mi := &file_conversation_conversation_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SetConversationReq) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SetConversationReq) ProtoMessage() {} - -func (x *SetConversationReq) ProtoReflect() protoreflect.Message { - mi := &file_conversation_conversation_proto_msgTypes[2] - 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 SetConversationReq.ProtoReflect.Descriptor instead. -func (*SetConversationReq) Descriptor() ([]byte, []int) { - return file_conversation_conversation_proto_rawDescGZIP(), []int{2} -} - -func (x *SetConversationReq) GetConversation() *Conversation { - if x != nil { - return x.Conversation - } - return nil -} - -type SetConversationResp struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *SetConversationResp) Reset() { - *x = SetConversationResp{} - if protoimpl.UnsafeEnabled { - mi := &file_conversation_conversation_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SetConversationResp) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SetConversationResp) ProtoMessage() {} - -func (x *SetConversationResp) ProtoReflect() protoreflect.Message { - mi := &file_conversation_conversation_proto_msgTypes[3] - 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 SetConversationResp.ProtoReflect.Descriptor instead. -func (*SetConversationResp) Descriptor() ([]byte, []int) { - return file_conversation_conversation_proto_rawDescGZIP(), []int{3} -} - -type GetConversationReq struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - ConversationID string `protobuf:"bytes,1,opt,name=conversationID,proto3" json:"conversationID"` - OwnerUserID string `protobuf:"bytes,2,opt,name=ownerUserID,proto3" json:"ownerUserID"` -} - -func (x *GetConversationReq) Reset() { - *x = GetConversationReq{} - if protoimpl.UnsafeEnabled { - mi := &file_conversation_conversation_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetConversationReq) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetConversationReq) ProtoMessage() {} - -func (x *GetConversationReq) ProtoReflect() protoreflect.Message { - mi := &file_conversation_conversation_proto_msgTypes[4] - 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 GetConversationReq.ProtoReflect.Descriptor instead. -func (*GetConversationReq) Descriptor() ([]byte, []int) { - return file_conversation_conversation_proto_rawDescGZIP(), []int{4} -} - -func (x *GetConversationReq) GetConversationID() string { - if x != nil { - return x.ConversationID - } - return "" -} - -func (x *GetConversationReq) GetOwnerUserID() string { - if x != nil { - return x.OwnerUserID - } - return "" -} - -type GetConversationResp struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Conversation *Conversation `protobuf:"bytes,2,opt,name=conversation,proto3" json:"conversation"` -} - -func (x *GetConversationResp) Reset() { - *x = GetConversationResp{} - if protoimpl.UnsafeEnabled { - mi := &file_conversation_conversation_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetConversationResp) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetConversationResp) ProtoMessage() {} - -func (x *GetConversationResp) ProtoReflect() protoreflect.Message { - mi := &file_conversation_conversation_proto_msgTypes[5] - 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 GetConversationResp.ProtoReflect.Descriptor instead. -func (*GetConversationResp) Descriptor() ([]byte, []int) { - return file_conversation_conversation_proto_rawDescGZIP(), []int{5} -} - -func (x *GetConversationResp) GetConversation() *Conversation { - if x != nil { - return x.Conversation - } - return nil -} - -type GetConversationsReq struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - OwnerUserID string `protobuf:"bytes,1,opt,name=ownerUserID,proto3" json:"ownerUserID"` - ConversationIDs []string `protobuf:"bytes,2,rep,name=conversationIDs,proto3" json:"conversationIDs"` -} - -func (x *GetConversationsReq) Reset() { - *x = GetConversationsReq{} - if protoimpl.UnsafeEnabled { - mi := &file_conversation_conversation_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetConversationsReq) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetConversationsReq) ProtoMessage() {} - -func (x *GetConversationsReq) ProtoReflect() protoreflect.Message { - mi := &file_conversation_conversation_proto_msgTypes[6] - 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 GetConversationsReq.ProtoReflect.Descriptor instead. -func (*GetConversationsReq) Descriptor() ([]byte, []int) { - return file_conversation_conversation_proto_rawDescGZIP(), []int{6} -} - -func (x *GetConversationsReq) GetOwnerUserID() string { - if x != nil { - return x.OwnerUserID - } - return "" -} - -func (x *GetConversationsReq) GetConversationIDs() []string { - if x != nil { - return x.ConversationIDs - } - return nil -} - -type GetConversationsResp struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Conversations []*Conversation `protobuf:"bytes,2,rep,name=conversations,proto3" json:"conversations"` -} - -func (x *GetConversationsResp) Reset() { - *x = GetConversationsResp{} - if protoimpl.UnsafeEnabled { - mi := &file_conversation_conversation_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetConversationsResp) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetConversationsResp) ProtoMessage() {} - -func (x *GetConversationsResp) ProtoReflect() protoreflect.Message { - mi := &file_conversation_conversation_proto_msgTypes[7] - 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 GetConversationsResp.ProtoReflect.Descriptor instead. -func (*GetConversationsResp) Descriptor() ([]byte, []int) { - return file_conversation_conversation_proto_rawDescGZIP(), []int{7} -} - -func (x *GetConversationsResp) GetConversations() []*Conversation { - if x != nil { - return x.Conversations - } - return nil -} - -type GetAllConversationsReq struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - OwnerUserID string `protobuf:"bytes,1,opt,name=ownerUserID,proto3" json:"ownerUserID"` -} - -func (x *GetAllConversationsReq) Reset() { - *x = GetAllConversationsReq{} - if protoimpl.UnsafeEnabled { - mi := &file_conversation_conversation_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetAllConversationsReq) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetAllConversationsReq) ProtoMessage() {} - -func (x *GetAllConversationsReq) ProtoReflect() protoreflect.Message { - mi := &file_conversation_conversation_proto_msgTypes[8] - 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 GetAllConversationsReq.ProtoReflect.Descriptor instead. -func (*GetAllConversationsReq) Descriptor() ([]byte, []int) { - return file_conversation_conversation_proto_rawDescGZIP(), []int{8} -} - -func (x *GetAllConversationsReq) GetOwnerUserID() string { - if x != nil { - return x.OwnerUserID - } - return "" -} - -type GetAllConversationsResp struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Conversations []*Conversation `protobuf:"bytes,2,rep,name=conversations,proto3" json:"conversations"` -} - -func (x *GetAllConversationsResp) Reset() { - *x = GetAllConversationsResp{} - if protoimpl.UnsafeEnabled { - mi := &file_conversation_conversation_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetAllConversationsResp) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetAllConversationsResp) ProtoMessage() {} - -func (x *GetAllConversationsResp) ProtoReflect() protoreflect.Message { - mi := &file_conversation_conversation_proto_msgTypes[9] - 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 GetAllConversationsResp.ProtoReflect.Descriptor instead. -func (*GetAllConversationsResp) Descriptor() ([]byte, []int) { - return file_conversation_conversation_proto_rawDescGZIP(), []int{9} -} - -func (x *GetAllConversationsResp) GetConversations() []*Conversation { - if x != nil { - return x.Conversations - } - return nil -} - -type GetRecvMsgNotNotifyUserIDsReq struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - GroupID string `protobuf:"bytes,1,opt,name=groupID,proto3" json:"groupID"` -} - -func (x *GetRecvMsgNotNotifyUserIDsReq) Reset() { - *x = GetRecvMsgNotNotifyUserIDsReq{} - if protoimpl.UnsafeEnabled { - mi := &file_conversation_conversation_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetRecvMsgNotNotifyUserIDsReq) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetRecvMsgNotNotifyUserIDsReq) ProtoMessage() {} - -func (x *GetRecvMsgNotNotifyUserIDsReq) ProtoReflect() protoreflect.Message { - mi := &file_conversation_conversation_proto_msgTypes[10] - 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 GetRecvMsgNotNotifyUserIDsReq.ProtoReflect.Descriptor instead. -func (*GetRecvMsgNotNotifyUserIDsReq) Descriptor() ([]byte, []int) { - return file_conversation_conversation_proto_rawDescGZIP(), []int{10} -} - -func (x *GetRecvMsgNotNotifyUserIDsReq) GetGroupID() string { - if x != nil { - return x.GroupID - } - return "" -} - -type GetRecvMsgNotNotifyUserIDsResp struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - UserIDs []string `protobuf:"bytes,1,rep,name=userIDs,proto3" json:"userIDs"` -} - -func (x *GetRecvMsgNotNotifyUserIDsResp) Reset() { - *x = GetRecvMsgNotNotifyUserIDsResp{} - if protoimpl.UnsafeEnabled { - mi := &file_conversation_conversation_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetRecvMsgNotNotifyUserIDsResp) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetRecvMsgNotNotifyUserIDsResp) ProtoMessage() {} - -func (x *GetRecvMsgNotNotifyUserIDsResp) ProtoReflect() protoreflect.Message { - mi := &file_conversation_conversation_proto_msgTypes[11] - 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 GetRecvMsgNotNotifyUserIDsResp.ProtoReflect.Descriptor instead. -func (*GetRecvMsgNotNotifyUserIDsResp) Descriptor() ([]byte, []int) { - return file_conversation_conversation_proto_rawDescGZIP(), []int{11} -} - -func (x *GetRecvMsgNotNotifyUserIDsResp) GetUserIDs() []string { - if x != nil { - return x.UserIDs - } - return nil -} - -type CreateSingleChatConversationsReq struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - RecvID string `protobuf:"bytes,1,opt,name=recvID,proto3" json:"recvID"` - SendID string `protobuf:"bytes,2,opt,name=sendID,proto3" json:"sendID"` -} - -func (x *CreateSingleChatConversationsReq) Reset() { - *x = CreateSingleChatConversationsReq{} - if protoimpl.UnsafeEnabled { - mi := &file_conversation_conversation_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CreateSingleChatConversationsReq) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CreateSingleChatConversationsReq) ProtoMessage() {} - -func (x *CreateSingleChatConversationsReq) ProtoReflect() protoreflect.Message { - mi := &file_conversation_conversation_proto_msgTypes[12] - 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 CreateSingleChatConversationsReq.ProtoReflect.Descriptor instead. -func (*CreateSingleChatConversationsReq) Descriptor() ([]byte, []int) { - return file_conversation_conversation_proto_rawDescGZIP(), []int{12} -} - -func (x *CreateSingleChatConversationsReq) GetRecvID() string { - if x != nil { - return x.RecvID - } - return "" -} - -func (x *CreateSingleChatConversationsReq) GetSendID() string { - if x != nil { - return x.SendID - } - return "" -} - -type CreateSingleChatConversationsResp struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *CreateSingleChatConversationsResp) Reset() { - *x = CreateSingleChatConversationsResp{} - if protoimpl.UnsafeEnabled { - mi := &file_conversation_conversation_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CreateSingleChatConversationsResp) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CreateSingleChatConversationsResp) ProtoMessage() {} - -func (x *CreateSingleChatConversationsResp) ProtoReflect() protoreflect.Message { - mi := &file_conversation_conversation_proto_msgTypes[13] - 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 CreateSingleChatConversationsResp.ProtoReflect.Descriptor instead. -func (*CreateSingleChatConversationsResp) Descriptor() ([]byte, []int) { - return file_conversation_conversation_proto_rawDescGZIP(), []int{13} -} - -type CreateGroupChatConversationsReq struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - UserIDs []string `protobuf:"bytes,1,rep,name=userIDs,proto3" json:"userIDs"` - GroupID string `protobuf:"bytes,2,opt,name=groupID,proto3" json:"groupID"` -} - -func (x *CreateGroupChatConversationsReq) Reset() { - *x = CreateGroupChatConversationsReq{} - if protoimpl.UnsafeEnabled { - mi := &file_conversation_conversation_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CreateGroupChatConversationsReq) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CreateGroupChatConversationsReq) ProtoMessage() {} - -func (x *CreateGroupChatConversationsReq) ProtoReflect() protoreflect.Message { - mi := &file_conversation_conversation_proto_msgTypes[14] - 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 CreateGroupChatConversationsReq.ProtoReflect.Descriptor instead. -func (*CreateGroupChatConversationsReq) Descriptor() ([]byte, []int) { - return file_conversation_conversation_proto_rawDescGZIP(), []int{14} -} - -func (x *CreateGroupChatConversationsReq) GetUserIDs() []string { - if x != nil { - return x.UserIDs - } - return nil -} - -func (x *CreateGroupChatConversationsReq) GetGroupID() string { - if x != nil { - return x.GroupID - } - return "" -} - -type CreateGroupChatConversationsResp struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *CreateGroupChatConversationsResp) Reset() { - *x = CreateGroupChatConversationsResp{} - if protoimpl.UnsafeEnabled { - mi := &file_conversation_conversation_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CreateGroupChatConversationsResp) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CreateGroupChatConversationsResp) ProtoMessage() {} - -func (x *CreateGroupChatConversationsResp) ProtoReflect() protoreflect.Message { - mi := &file_conversation_conversation_proto_msgTypes[15] - 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 CreateGroupChatConversationsResp.ProtoReflect.Descriptor instead. -func (*CreateGroupChatConversationsResp) Descriptor() ([]byte, []int) { - return file_conversation_conversation_proto_rawDescGZIP(), []int{15} -} - -type SetConversationMaxSeqReq struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - ConversationID string `protobuf:"bytes,1,opt,name=conversationID,proto3" json:"conversationID"` - OwnerUserID []string `protobuf:"bytes,2,rep,name=ownerUserID,proto3" json:"ownerUserID"` - MaxSeq int64 `protobuf:"varint,3,opt,name=maxSeq,proto3" json:"maxSeq"` -} - -func (x *SetConversationMaxSeqReq) Reset() { - *x = SetConversationMaxSeqReq{} - if protoimpl.UnsafeEnabled { - mi := &file_conversation_conversation_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SetConversationMaxSeqReq) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SetConversationMaxSeqReq) ProtoMessage() {} - -func (x *SetConversationMaxSeqReq) ProtoReflect() protoreflect.Message { - mi := &file_conversation_conversation_proto_msgTypes[16] - 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 SetConversationMaxSeqReq.ProtoReflect.Descriptor instead. -func (*SetConversationMaxSeqReq) Descriptor() ([]byte, []int) { - return file_conversation_conversation_proto_rawDescGZIP(), []int{16} -} - -func (x *SetConversationMaxSeqReq) GetConversationID() string { - if x != nil { - return x.ConversationID - } - return "" -} - -func (x *SetConversationMaxSeqReq) GetOwnerUserID() []string { - if x != nil { - return x.OwnerUserID - } - return nil -} - -func (x *SetConversationMaxSeqReq) GetMaxSeq() int64 { - if x != nil { - return x.MaxSeq - } - return 0 -} - -type SetConversationMaxSeqResp struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *SetConversationMaxSeqResp) Reset() { - *x = SetConversationMaxSeqResp{} - if protoimpl.UnsafeEnabled { - mi := &file_conversation_conversation_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SetConversationMaxSeqResp) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SetConversationMaxSeqResp) ProtoMessage() {} - -func (x *SetConversationMaxSeqResp) ProtoReflect() protoreflect.Message { - mi := &file_conversation_conversation_proto_msgTypes[17] - 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 SetConversationMaxSeqResp.ProtoReflect.Descriptor instead. -func (*SetConversationMaxSeqResp) Descriptor() ([]byte, []int) { - return file_conversation_conversation_proto_rawDescGZIP(), []int{17} -} - -type GetConversationIDsReq struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - UserID string `protobuf:"bytes,1,opt,name=userID,proto3" json:"userID"` -} - -func (x *GetConversationIDsReq) Reset() { - *x = GetConversationIDsReq{} - if protoimpl.UnsafeEnabled { - mi := &file_conversation_conversation_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetConversationIDsReq) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetConversationIDsReq) ProtoMessage() {} - -func (x *GetConversationIDsReq) ProtoReflect() protoreflect.Message { - mi := &file_conversation_conversation_proto_msgTypes[18] - 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 GetConversationIDsReq.ProtoReflect.Descriptor instead. -func (*GetConversationIDsReq) Descriptor() ([]byte, []int) { - return file_conversation_conversation_proto_rawDescGZIP(), []int{18} -} - -func (x *GetConversationIDsReq) GetUserID() string { - if x != nil { - return x.UserID - } - return "" -} - -type GetConversationIDsResp struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - ConversationIDs []string `protobuf:"bytes,1,rep,name=conversationIDs,proto3" json:"conversationIDs"` -} - -func (x *GetConversationIDsResp) Reset() { - *x = GetConversationIDsResp{} - if protoimpl.UnsafeEnabled { - mi := &file_conversation_conversation_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetConversationIDsResp) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetConversationIDsResp) ProtoMessage() {} - -func (x *GetConversationIDsResp) ProtoReflect() protoreflect.Message { - mi := &file_conversation_conversation_proto_msgTypes[19] - 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 GetConversationIDsResp.ProtoReflect.Descriptor instead. -func (*GetConversationIDsResp) Descriptor() ([]byte, []int) { - return file_conversation_conversation_proto_rawDescGZIP(), []int{19} -} - -func (x *GetConversationIDsResp) GetConversationIDs() []string { - if x != nil { - return x.ConversationIDs - } - return nil -} - -type SetConversationsReq struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - UserIDs []string `protobuf:"bytes,1,rep,name=userIDs,proto3" json:"userIDs"` - Conversation *ConversationReq `protobuf:"bytes,2,opt,name=conversation,proto3" json:"conversation"` -} - -func (x *SetConversationsReq) Reset() { - *x = SetConversationsReq{} - if protoimpl.UnsafeEnabled { - mi := &file_conversation_conversation_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SetConversationsReq) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SetConversationsReq) ProtoMessage() {} - -func (x *SetConversationsReq) ProtoReflect() protoreflect.Message { - mi := &file_conversation_conversation_proto_msgTypes[20] - 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 SetConversationsReq.ProtoReflect.Descriptor instead. -func (*SetConversationsReq) Descriptor() ([]byte, []int) { - return file_conversation_conversation_proto_rawDescGZIP(), []int{20} -} - -func (x *SetConversationsReq) GetUserIDs() []string { - if x != nil { - return x.UserIDs - } - return nil -} - -func (x *SetConversationsReq) GetConversation() *ConversationReq { - if x != nil { - return x.Conversation - } - return nil -} - -type SetConversationsResp struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *SetConversationsResp) Reset() { - *x = SetConversationsResp{} - if protoimpl.UnsafeEnabled { - mi := &file_conversation_conversation_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SetConversationsResp) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SetConversationsResp) ProtoMessage() {} - -func (x *SetConversationsResp) ProtoReflect() protoreflect.Message { - mi := &file_conversation_conversation_proto_msgTypes[21] - 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 SetConversationsResp.ProtoReflect.Descriptor instead. -func (*SetConversationsResp) Descriptor() ([]byte, []int) { - return file_conversation_conversation_proto_rawDescGZIP(), []int{21} -} - -type GetUserConversationIDsHashReq struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - OwnerUserID string `protobuf:"bytes,1,opt,name=ownerUserID,proto3" json:"ownerUserID"` -} - -func (x *GetUserConversationIDsHashReq) Reset() { - *x = GetUserConversationIDsHashReq{} - if protoimpl.UnsafeEnabled { - mi := &file_conversation_conversation_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetUserConversationIDsHashReq) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetUserConversationIDsHashReq) ProtoMessage() {} - -func (x *GetUserConversationIDsHashReq) ProtoReflect() protoreflect.Message { - mi := &file_conversation_conversation_proto_msgTypes[22] - 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 GetUserConversationIDsHashReq.ProtoReflect.Descriptor instead. -func (*GetUserConversationIDsHashReq) Descriptor() ([]byte, []int) { - return file_conversation_conversation_proto_rawDescGZIP(), []int{22} -} - -func (x *GetUserConversationIDsHashReq) GetOwnerUserID() string { - if x != nil { - return x.OwnerUserID - } - return "" -} - -type GetUserConversationIDsHashResp struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Hash uint64 `protobuf:"varint,1,opt,name=hash,proto3" json:"hash"` -} - -func (x *GetUserConversationIDsHashResp) Reset() { - *x = GetUserConversationIDsHashResp{} - if protoimpl.UnsafeEnabled { - mi := &file_conversation_conversation_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetUserConversationIDsHashResp) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetUserConversationIDsHashResp) ProtoMessage() {} - -func (x *GetUserConversationIDsHashResp) ProtoReflect() protoreflect.Message { - mi := &file_conversation_conversation_proto_msgTypes[23] - 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 GetUserConversationIDsHashResp.ProtoReflect.Descriptor instead. -func (*GetUserConversationIDsHashResp) Descriptor() ([]byte, []int) { - return file_conversation_conversation_proto_rawDescGZIP(), []int{23} -} - -func (x *GetUserConversationIDsHashResp) GetHash() uint64 { - if x != nil { - return x.Hash - } - return 0 -} - -type GetConversationsByConversationIDReq struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - ConversationIDs []string `protobuf:"bytes,1,rep,name=conversationIDs,proto3" json:"conversationIDs"` -} - -func (x *GetConversationsByConversationIDReq) Reset() { - *x = GetConversationsByConversationIDReq{} - if protoimpl.UnsafeEnabled { - mi := &file_conversation_conversation_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetConversationsByConversationIDReq) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetConversationsByConversationIDReq) ProtoMessage() {} - -func (x *GetConversationsByConversationIDReq) ProtoReflect() protoreflect.Message { - mi := &file_conversation_conversation_proto_msgTypes[24] - 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 GetConversationsByConversationIDReq.ProtoReflect.Descriptor instead. -func (*GetConversationsByConversationIDReq) Descriptor() ([]byte, []int) { - return file_conversation_conversation_proto_rawDescGZIP(), []int{24} -} - -func (x *GetConversationsByConversationIDReq) GetConversationIDs() []string { - if x != nil { - return x.ConversationIDs - } - return nil -} - -type GetConversationsByConversationIDResp struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Conversations []*Conversation `protobuf:"bytes,1,rep,name=conversations,proto3" json:"conversations"` -} - -func (x *GetConversationsByConversationIDResp) Reset() { - *x = GetConversationsByConversationIDResp{} - if protoimpl.UnsafeEnabled { - mi := &file_conversation_conversation_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetConversationsByConversationIDResp) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetConversationsByConversationIDResp) ProtoMessage() {} - -func (x *GetConversationsByConversationIDResp) ProtoReflect() protoreflect.Message { - mi := &file_conversation_conversation_proto_msgTypes[25] - 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 GetConversationsByConversationIDResp.ProtoReflect.Descriptor instead. -func (*GetConversationsByConversationIDResp) Descriptor() ([]byte, []int) { - return file_conversation_conversation_proto_rawDescGZIP(), []int{25} -} - -func (x *GetConversationsByConversationIDResp) GetConversations() []*Conversation { - if x != nil { - return x.Conversations - } - return nil -} - -var File_conversation_conversation_proto protoreflect.FileDescriptor - -var file_conversation_conversation_proto_rawDesc = []byte{ - 0x0a, 0x1f, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x63, - 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x12, 0x19, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, - 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 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, 0x22, 0xc8, 0x04, 0x0a, 0x0c, 0x43, 0x6f, - 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x20, 0x0a, 0x0b, 0x6f, 0x77, - 0x6e, 0x65, 0x72, 0x55, 0x73, 0x65, 0x72, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0b, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x55, 0x73, 0x65, 0x72, 0x49, 0x44, 0x12, 0x26, 0x0a, 0x0e, - 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x49, 0x44, 0x12, 0x1e, 0x0a, 0x0a, 0x72, 0x65, 0x63, 0x76, 0x4d, 0x73, 0x67, 0x4f, - 0x70, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x72, 0x65, 0x63, 0x76, 0x4d, 0x73, - 0x67, 0x4f, 0x70, 0x74, 0x12, 0x2a, 0x0a, 0x10, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x10, - 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, - 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x44, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x44, 0x12, 0x18, 0x0a, 0x07, 0x67, 0x72, 0x6f, 0x75, - 0x70, 0x49, 0x44, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x67, 0x72, 0x6f, 0x75, 0x70, - 0x49, 0x44, 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x73, 0x50, 0x69, 0x6e, 0x6e, 0x65, 0x64, 0x18, 0x07, - 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x69, 0x73, 0x50, 0x69, 0x6e, 0x6e, 0x65, 0x64, 0x12, 0x22, - 0x0a, 0x0c, 0x61, 0x74, 0x74, 0x61, 0x63, 0x68, 0x65, 0x64, 0x49, 0x6e, 0x66, 0x6f, 0x18, 0x08, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x61, 0x74, 0x74, 0x61, 0x63, 0x68, 0x65, 0x64, 0x49, 0x6e, - 0x66, 0x6f, 0x12, 0x24, 0x0a, 0x0d, 0x69, 0x73, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x43, - 0x68, 0x61, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x69, 0x73, 0x50, 0x72, 0x69, - 0x76, 0x61, 0x74, 0x65, 0x43, 0x68, 0x61, 0x74, 0x12, 0x20, 0x0a, 0x0b, 0x67, 0x72, 0x6f, 0x75, - 0x70, 0x41, 0x74, 0x54, 0x79, 0x70, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x67, - 0x72, 0x6f, 0x75, 0x70, 0x41, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x65, 0x78, - 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x65, 0x78, 0x12, 0x22, 0x0a, 0x0c, 0x62, 0x75, - 0x72, 0x6e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x05, - 0x52, 0x0c, 0x62, 0x75, 0x72, 0x6e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, - 0x0a, 0x06, 0x6d, 0x69, 0x6e, 0x53, 0x65, 0x71, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, - 0x6d, 0x69, 0x6e, 0x53, 0x65, 0x71, 0x12, 0x16, 0x0a, 0x06, 0x6d, 0x61, 0x78, 0x53, 0x65, 0x71, - 0x18, 0x0e, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x6d, 0x61, 0x78, 0x53, 0x65, 0x71, 0x12, 0x28, - 0x0a, 0x0f, 0x6d, 0x73, 0x67, 0x44, 0x65, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x54, 0x69, 0x6d, - 0x65, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0f, 0x6d, 0x73, 0x67, 0x44, 0x65, 0x73, 0x74, - 0x72, 0x75, 0x63, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x34, 0x0a, 0x15, 0x6c, 0x61, 0x74, 0x65, - 0x73, 0x74, 0x4d, 0x73, 0x67, 0x44, 0x65, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x54, 0x69, 0x6d, - 0x65, 0x18, 0x10, 0x20, 0x01, 0x28, 0x03, 0x52, 0x15, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x4d, - 0x73, 0x67, 0x44, 0x65, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x24, - 0x0a, 0x0d, 0x69, 0x73, 0x4d, 0x73, 0x67, 0x44, 0x65, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x18, - 0x11, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x69, 0x73, 0x4d, 0x73, 0x67, 0x44, 0x65, 0x73, 0x74, - 0x72, 0x75, 0x63, 0x74, 0x22, 0xf3, 0x06, 0x0a, 0x0f, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x12, 0x26, 0x0a, 0x0e, 0x63, 0x6f, 0x6e, 0x76, - 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0e, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, - 0x12, 0x2a, 0x0a, 0x10, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x54, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x10, 0x63, 0x6f, 0x6e, 0x76, - 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x16, 0x0a, 0x06, - 0x75, 0x73, 0x65, 0x72, 0x49, 0x44, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, - 0x65, 0x72, 0x49, 0x44, 0x12, 0x18, 0x0a, 0x07, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x44, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x44, 0x12, 0x41, - 0x0a, 0x0a, 0x72, 0x65, 0x63, 0x76, 0x4d, 0x73, 0x67, 0x4f, 0x70, 0x74, 0x18, 0x05, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, - 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x49, 0x6e, 0x74, 0x33, 0x32, - 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0a, 0x72, 0x65, 0x63, 0x76, 0x4d, 0x73, 0x67, 0x4f, 0x70, - 0x74, 0x12, 0x3c, 0x0a, 0x08, 0x69, 0x73, 0x50, 0x69, 0x6e, 0x6e, 0x65, 0x64, 0x18, 0x06, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, - 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, - 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x08, 0x69, 0x73, 0x50, 0x69, 0x6e, 0x6e, 0x65, 0x64, 0x12, - 0x46, 0x0a, 0x0c, 0x61, 0x74, 0x74, 0x61, 0x63, 0x68, 0x65, 0x64, 0x49, 0x6e, 0x66, 0x6f, 0x18, - 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, - 0x72, 0x76, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, - 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0c, 0x61, 0x74, 0x74, 0x61, 0x63, - 0x68, 0x65, 0x64, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x46, 0x0a, 0x0d, 0x69, 0x73, 0x50, 0x72, 0x69, - 0x76, 0x61, 0x74, 0x65, 0x43, 0x68, 0x61, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, - 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, - 0x52, 0x0d, 0x69, 0x73, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x43, 0x68, 0x61, 0x74, 0x12, - 0x32, 0x0a, 0x02, 0x65, 0x78, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x4f, 0x70, - 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, - 0x02, 0x65, 0x78, 0x12, 0x45, 0x0a, 0x0c, 0x62, 0x75, 0x72, 0x6e, 0x44, 0x75, 0x72, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x4f, 0x70, 0x65, 0x6e, - 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0c, 0x62, 0x75, - 0x72, 0x6e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x39, 0x0a, 0x06, 0x6d, 0x69, - 0x6e, 0x53, 0x65, 0x71, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x4f, 0x70, 0x65, - 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x49, 0x6e, 0x74, 0x36, 0x34, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x06, 0x6d, - 0x69, 0x6e, 0x53, 0x65, 0x71, 0x12, 0x39, 0x0a, 0x06, 0x6d, 0x61, 0x78, 0x53, 0x65, 0x71, 0x18, - 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, - 0x72, 0x76, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x49, 0x6e, - 0x74, 0x36, 0x34, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x06, 0x6d, 0x61, 0x78, 0x53, 0x65, 0x71, - 0x12, 0x43, 0x0a, 0x0b, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x41, 0x74, 0x54, 0x79, 0x70, 0x65, 0x18, - 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, - 0x72, 0x76, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x49, 0x6e, - 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0b, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x41, - 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x4b, 0x0a, 0x0f, 0x6d, 0x73, 0x67, 0x44, 0x65, 0x73, 0x74, - 0x72, 0x75, 0x63, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, - 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x49, 0x6e, 0x74, 0x36, 0x34, 0x56, 0x61, 0x6c, 0x75, - 0x65, 0x52, 0x0f, 0x6d, 0x73, 0x67, 0x44, 0x65, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x54, 0x69, - 0x6d, 0x65, 0x12, 0x46, 0x0a, 0x0d, 0x69, 0x73, 0x4d, 0x73, 0x67, 0x44, 0x65, 0x73, 0x74, 0x72, - 0x75, 0x63, 0x74, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x4f, 0x70, 0x65, 0x6e, - 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0d, 0x69, 0x73, 0x4d, - 0x73, 0x67, 0x44, 0x65, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x22, 0x61, 0x0a, 0x12, 0x53, 0x65, - 0x74, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, - 0x12, 0x4b, 0x0a, 0x0c, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, - 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x2e, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, - 0x0c, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x15, 0x0a, - 0x13, 0x53, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x52, 0x65, 0x73, 0x70, 0x22, 0x5e, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x76, 0x65, - 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x12, 0x26, 0x0a, 0x0e, 0x63, 0x6f, - 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0e, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x49, 0x44, 0x12, 0x20, 0x0a, 0x0b, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x55, 0x73, 0x65, 0x72, 0x49, - 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x55, 0x73, - 0x65, 0x72, 0x49, 0x44, 0x22, 0x62, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x76, 0x65, - 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x12, 0x4b, 0x0a, 0x0c, 0x63, - 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x27, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, - 0x2e, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x6f, - 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x63, 0x6f, 0x6e, 0x76, - 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x61, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x43, - 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x12, - 0x20, 0x0a, 0x0b, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x55, 0x73, 0x65, 0x72, 0x49, 0x44, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x55, 0x73, 0x65, 0x72, 0x49, - 0x44, 0x12, 0x28, 0x0a, 0x0f, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x49, 0x44, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0f, 0x63, 0x6f, 0x6e, 0x76, - 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x73, 0x22, 0x65, 0x0a, 0x14, 0x47, - 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, - 0x65, 0x73, 0x70, 0x12, 0x4d, 0x0a, 0x0d, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x4f, 0x70, 0x65, - 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, - 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x52, 0x0d, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x22, 0x3a, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x41, 0x6c, 0x6c, 0x43, 0x6f, 0x6e, 0x76, - 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x12, 0x20, 0x0a, 0x0b, - 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x55, 0x73, 0x65, 0x72, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0b, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x55, 0x73, 0x65, 0x72, 0x49, 0x44, 0x22, 0x68, - 0x0a, 0x17, 0x47, 0x65, 0x74, 0x41, 0x6c, 0x6c, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x12, 0x4d, 0x0a, 0x0d, 0x63, 0x6f, 0x6e, - 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x27, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, - 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x6f, 0x6e, - 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0d, 0x63, 0x6f, 0x6e, 0x76, 0x65, - 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x39, 0x0a, 0x1d, 0x47, 0x65, 0x74, 0x52, - 0x65, 0x63, 0x76, 0x4d, 0x73, 0x67, 0x4e, 0x6f, 0x74, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x79, 0x55, - 0x73, 0x65, 0x72, 0x49, 0x44, 0x73, 0x52, 0x65, 0x71, 0x12, 0x18, 0x0a, 0x07, 0x67, 0x72, 0x6f, - 0x75, 0x70, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x67, 0x72, 0x6f, 0x75, - 0x70, 0x49, 0x44, 0x22, 0x3a, 0x0a, 0x1e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x63, 0x76, 0x4d, 0x73, - 0x67, 0x4e, 0x6f, 0x74, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x79, 0x55, 0x73, 0x65, 0x72, 0x49, 0x44, - 0x73, 0x52, 0x65, 0x73, 0x70, 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, - 0x52, 0x0a, 0x20, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x43, - 0x68, 0x61, 0x74, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x52, 0x65, 0x71, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x63, 0x76, 0x49, 0x44, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x65, 0x63, 0x76, 0x49, 0x44, 0x12, 0x16, 0x0a, 0x06, 0x73, - 0x65, 0x6e, 0x64, 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x65, 0x6e, - 0x64, 0x49, 0x44, 0x22, 0x23, 0x0a, 0x21, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x69, 0x6e, - 0x67, 0x6c, 0x65, 0x43, 0x68, 0x61, 0x74, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x22, 0x55, 0x0a, 0x1f, 0x43, 0x72, 0x65, 0x61, - 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x43, 0x68, 0x61, 0x74, 0x43, 0x6f, 0x6e, 0x76, 0x65, - 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 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, 0x12, 0x18, 0x0a, 0x07, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x44, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x44, 0x22, - 0x22, 0x0a, 0x20, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x43, 0x68, - 0x61, 0x74, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, - 0x65, 0x73, 0x70, 0x22, 0x7c, 0x0a, 0x18, 0x53, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, - 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x78, 0x53, 0x65, 0x71, 0x52, 0x65, 0x71, 0x12, - 0x26, 0x0a, 0x0e, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, - 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x12, 0x20, 0x0a, 0x0b, 0x6f, 0x77, 0x6e, 0x65, 0x72, - 0x55, 0x73, 0x65, 0x72, 0x49, 0x44, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0b, 0x6f, 0x77, - 0x6e, 0x65, 0x72, 0x55, 0x73, 0x65, 0x72, 0x49, 0x44, 0x12, 0x16, 0x0a, 0x06, 0x6d, 0x61, 0x78, - 0x53, 0x65, 0x71, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x6d, 0x61, 0x78, 0x53, 0x65, - 0x71, 0x22, 0x1b, 0x0a, 0x19, 0x53, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x78, 0x53, 0x65, 0x71, 0x52, 0x65, 0x73, 0x70, 0x22, 0x2f, - 0x0a, 0x15, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x49, 0x44, 0x73, 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, - 0x42, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x49, 0x44, 0x73, 0x52, 0x65, 0x73, 0x70, 0x12, 0x28, 0x0a, 0x0f, 0x63, 0x6f, 0x6e, - 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x73, 0x18, 0x01, 0x20, 0x03, - 0x28, 0x09, 0x52, 0x0f, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x49, 0x44, 0x73, 0x22, 0x7f, 0x0a, 0x13, 0x53, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, - 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 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, 0x12, 0x4e, 0x0a, 0x0c, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x4f, 0x70, 0x65, - 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, - 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x52, 0x0c, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x16, 0x0a, 0x14, 0x53, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x76, 0x65, - 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x22, 0x41, 0x0a, 0x1d, - 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x73, 0x48, 0x61, 0x73, 0x68, 0x52, 0x65, 0x71, 0x12, 0x20, 0x0a, - 0x0b, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x55, 0x73, 0x65, 0x72, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0b, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x55, 0x73, 0x65, 0x72, 0x49, 0x44, 0x22, - 0x34, 0x0a, 0x1e, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, - 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x73, 0x48, 0x61, 0x73, 0x68, 0x52, 0x65, 0x73, - 0x70, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x61, 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, - 0x04, 0x68, 0x61, 0x73, 0x68, 0x22, 0x4f, 0x0a, 0x23, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x76, - 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x42, 0x79, 0x43, 0x6f, 0x6e, 0x76, 0x65, - 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x52, 0x65, 0x71, 0x12, 0x28, 0x0a, 0x0f, - 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x73, 0x18, - 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0f, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x73, 0x22, 0x75, 0x0a, 0x24, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, - 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x42, 0x79, 0x43, 0x6f, 0x6e, 0x76, - 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x52, 0x65, 0x73, 0x70, 0x12, 0x4d, - 0x0a, 0x0d, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, - 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, - 0x72, 0x76, 0x65, 0x72, 0x2e, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x2e, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0d, - 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x32, 0xdf, 0x0c, - 0x0a, 0x0c, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x70, - 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x12, 0x2d, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, - 0x2e, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x47, 0x65, - 0x74, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, - 0x1a, 0x2e, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, - 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x47, 0x65, 0x74, - 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, - 0x12, 0x7c, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x41, 0x6c, 0x6c, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, - 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x31, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, - 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x6c, 0x6c, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, - 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x1a, 0x32, 0x2e, 0x4f, 0x70, 0x65, - 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, - 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x6c, 0x6c, 0x43, 0x6f, 0x6e, - 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x12, 0x73, - 0x0a, 0x10, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x12, 0x2e, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, - 0x72, 0x2e, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x47, - 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, - 0x65, 0x71, 0x1a, 0x2f, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, - 0x72, 0x2e, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x47, - 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, - 0x65, 0x73, 0x70, 0x12, 0x70, 0x0a, 0x0f, 0x53, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, - 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2d, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, - 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x2e, 0x53, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x1a, 0x2e, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, - 0x72, 0x76, 0x65, 0x72, 0x2e, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x2e, 0x53, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x52, 0x65, 0x73, 0x70, 0x12, 0x91, 0x01, 0x0a, 0x1a, 0x47, 0x65, 0x74, 0x52, 0x65, 0x63, - 0x76, 0x4d, 0x73, 0x67, 0x4e, 0x6f, 0x74, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x79, 0x55, 0x73, 0x65, - 0x72, 0x49, 0x44, 0x73, 0x12, 0x38, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, - 0x76, 0x65, 0x72, 0x2e, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x2e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x63, 0x76, 0x4d, 0x73, 0x67, 0x4e, 0x6f, 0x74, 0x4e, 0x6f, - 0x74, 0x69, 0x66, 0x79, 0x55, 0x73, 0x65, 0x72, 0x49, 0x44, 0x73, 0x52, 0x65, 0x71, 0x1a, 0x39, - 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x63, 0x6f, - 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x65, - 0x63, 0x76, 0x4d, 0x73, 0x67, 0x4e, 0x6f, 0x74, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x79, 0x55, 0x73, - 0x65, 0x72, 0x49, 0x44, 0x73, 0x52, 0x65, 0x73, 0x70, 0x12, 0x9a, 0x01, 0x0a, 0x1d, 0x43, 0x72, - 0x65, 0x61, 0x74, 0x65, 0x53, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x43, 0x68, 0x61, 0x74, 0x43, 0x6f, - 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x3b, 0x2e, 0x4f, 0x70, - 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x63, 0x6f, 0x6e, 0x76, 0x65, - 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x69, - 0x6e, 0x67, 0x6c, 0x65, 0x43, 0x68, 0x61, 0x74, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x1a, 0x3c, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, - 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x69, 0x6e, 0x67, 0x6c, - 0x65, 0x43, 0x68, 0x61, 0x74, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x12, 0x97, 0x01, 0x0a, 0x1c, 0x43, 0x72, 0x65, 0x61, 0x74, - 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x43, 0x68, 0x61, 0x74, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, - 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x3a, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, - 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x43, - 0x68, 0x61, 0x74, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x52, 0x65, 0x71, 0x1a, 0x3b, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, - 0x65, 0x72, 0x2e, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, - 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x43, 0x68, 0x61, 0x74, 0x43, - 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, - 0x12, 0x82, 0x01, 0x0a, 0x15, 0x53, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x78, 0x53, 0x65, 0x71, 0x12, 0x33, 0x2e, 0x4f, 0x70, 0x65, - 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, - 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x53, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, - 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x78, 0x53, 0x65, 0x71, 0x52, 0x65, 0x71, 0x1a, - 0x34, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x63, - 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x53, 0x65, 0x74, 0x43, - 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x78, 0x53, 0x65, - 0x71, 0x52, 0x65, 0x73, 0x70, 0x12, 0x79, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x76, - 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x73, 0x12, 0x30, 0x2e, 0x4f, 0x70, - 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x63, 0x6f, 0x6e, 0x76, 0x65, - 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x76, 0x65, - 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x73, 0x52, 0x65, 0x71, 0x1a, 0x31, 0x2e, - 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x63, 0x6f, 0x6e, - 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, - 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x73, 0x52, 0x65, 0x73, 0x70, - 0x12, 0x73, 0x0a, 0x10, 0x53, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x2e, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, - 0x76, 0x65, 0x72, 0x2e, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x2e, 0x53, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x52, 0x65, 0x71, 0x1a, 0x2f, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, - 0x76, 0x65, 0x72, 0x2e, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x2e, 0x53, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x52, 0x65, 0x73, 0x70, 0x12, 0x91, 0x01, 0x0a, 0x1a, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, - 0x72, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x73, - 0x48, 0x61, 0x73, 0x68, 0x12, 0x38, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, - 0x76, 0x65, 0x72, 0x2e, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x2e, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x73, 0x48, 0x61, 0x73, 0x68, 0x52, 0x65, 0x71, 0x1a, 0x39, - 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x63, 0x6f, - 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x47, 0x65, 0x74, 0x55, 0x73, - 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, - 0x73, 0x48, 0x61, 0x73, 0x68, 0x52, 0x65, 0x73, 0x70, 0x12, 0xa3, 0x01, 0x0a, 0x20, 0x47, 0x65, - 0x74, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x42, 0x79, - 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x12, 0x3e, - 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x63, 0x6f, - 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6f, - 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x42, 0x79, 0x43, 0x6f, 0x6e, - 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x52, 0x65, 0x71, 0x1a, 0x3f, - 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x63, 0x6f, - 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6f, - 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x42, 0x79, 0x43, 0x6f, 0x6e, - 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x52, 0x65, 0x73, 0x70, 0x42, - 0x3c, 0x5a, 0x3a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x4f, 0x70, - 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x44, 0x4b, 0x2f, 0x4f, 0x70, 0x65, 0x6e, 0x2d, 0x49, 0x4d, 0x2d, - 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x2f, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x62, 0x06, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_conversation_conversation_proto_rawDescOnce sync.Once - file_conversation_conversation_proto_rawDescData = file_conversation_conversation_proto_rawDesc -) - -func file_conversation_conversation_proto_rawDescGZIP() []byte { - file_conversation_conversation_proto_rawDescOnce.Do(func() { - file_conversation_conversation_proto_rawDescData = protoimpl.X.CompressGZIP(file_conversation_conversation_proto_rawDescData) - }) - return file_conversation_conversation_proto_rawDescData -} - -var file_conversation_conversation_proto_msgTypes = make([]protoimpl.MessageInfo, 26) -var file_conversation_conversation_proto_goTypes = []interface{}{ - (*Conversation)(nil), // 0: OpenIMServer.conversation.Conversation - (*ConversationReq)(nil), // 1: OpenIMServer.conversation.ConversationReq - (*SetConversationReq)(nil), // 2: OpenIMServer.conversation.SetConversationReq - (*SetConversationResp)(nil), // 3: OpenIMServer.conversation.SetConversationResp - (*GetConversationReq)(nil), // 4: OpenIMServer.conversation.GetConversationReq - (*GetConversationResp)(nil), // 5: OpenIMServer.conversation.GetConversationResp - (*GetConversationsReq)(nil), // 6: OpenIMServer.conversation.GetConversationsReq - (*GetConversationsResp)(nil), // 7: OpenIMServer.conversation.GetConversationsResp - (*GetAllConversationsReq)(nil), // 8: OpenIMServer.conversation.GetAllConversationsReq - (*GetAllConversationsResp)(nil), // 9: OpenIMServer.conversation.GetAllConversationsResp - (*GetRecvMsgNotNotifyUserIDsReq)(nil), // 10: OpenIMServer.conversation.GetRecvMsgNotNotifyUserIDsReq - (*GetRecvMsgNotNotifyUserIDsResp)(nil), // 11: OpenIMServer.conversation.GetRecvMsgNotNotifyUserIDsResp - (*CreateSingleChatConversationsReq)(nil), // 12: OpenIMServer.conversation.CreateSingleChatConversationsReq - (*CreateSingleChatConversationsResp)(nil), // 13: OpenIMServer.conversation.CreateSingleChatConversationsResp - (*CreateGroupChatConversationsReq)(nil), // 14: OpenIMServer.conversation.CreateGroupChatConversationsReq - (*CreateGroupChatConversationsResp)(nil), // 15: OpenIMServer.conversation.CreateGroupChatConversationsResp - (*SetConversationMaxSeqReq)(nil), // 16: OpenIMServer.conversation.SetConversationMaxSeqReq - (*SetConversationMaxSeqResp)(nil), // 17: OpenIMServer.conversation.SetConversationMaxSeqResp - (*GetConversationIDsReq)(nil), // 18: OpenIMServer.conversation.GetConversationIDsReq - (*GetConversationIDsResp)(nil), // 19: OpenIMServer.conversation.GetConversationIDsResp - (*SetConversationsReq)(nil), // 20: OpenIMServer.conversation.SetConversationsReq - (*SetConversationsResp)(nil), // 21: OpenIMServer.conversation.SetConversationsResp - (*GetUserConversationIDsHashReq)(nil), // 22: OpenIMServer.conversation.GetUserConversationIDsHashReq - (*GetUserConversationIDsHashResp)(nil), // 23: OpenIMServer.conversation.GetUserConversationIDsHashResp - (*GetConversationsByConversationIDReq)(nil), // 24: OpenIMServer.conversation.GetConversationsByConversationIDReq - (*GetConversationsByConversationIDResp)(nil), // 25: OpenIMServer.conversation.GetConversationsByConversationIDResp - (*wrapperspb.Int32Value)(nil), // 26: OpenIMServer.protobuf.Int32Value - (*wrapperspb.BoolValue)(nil), // 27: OpenIMServer.protobuf.BoolValue - (*wrapperspb.StringValue)(nil), // 28: OpenIMServer.protobuf.StringValue - (*wrapperspb.Int64Value)(nil), // 29: OpenIMServer.protobuf.Int64Value -} -var file_conversation_conversation_proto_depIdxs = []int32{ - 26, // 0: OpenIMServer.conversation.ConversationReq.recvMsgOpt:type_name -> OpenIMServer.protobuf.Int32Value - 27, // 1: OpenIMServer.conversation.ConversationReq.isPinned:type_name -> OpenIMServer.protobuf.BoolValue - 28, // 2: OpenIMServer.conversation.ConversationReq.attachedInfo:type_name -> OpenIMServer.protobuf.StringValue - 27, // 3: OpenIMServer.conversation.ConversationReq.isPrivateChat:type_name -> OpenIMServer.protobuf.BoolValue - 28, // 4: OpenIMServer.conversation.ConversationReq.ex:type_name -> OpenIMServer.protobuf.StringValue - 26, // 5: OpenIMServer.conversation.ConversationReq.burnDuration:type_name -> OpenIMServer.protobuf.Int32Value - 29, // 6: OpenIMServer.conversation.ConversationReq.minSeq:type_name -> OpenIMServer.protobuf.Int64Value - 29, // 7: OpenIMServer.conversation.ConversationReq.maxSeq:type_name -> OpenIMServer.protobuf.Int64Value - 26, // 8: OpenIMServer.conversation.ConversationReq.groupAtType:type_name -> OpenIMServer.protobuf.Int32Value - 29, // 9: OpenIMServer.conversation.ConversationReq.msgDestructTime:type_name -> OpenIMServer.protobuf.Int64Value - 27, // 10: OpenIMServer.conversation.ConversationReq.isMsgDestruct:type_name -> OpenIMServer.protobuf.BoolValue - 0, // 11: OpenIMServer.conversation.SetConversationReq.conversation:type_name -> OpenIMServer.conversation.Conversation - 0, // 12: OpenIMServer.conversation.GetConversationResp.conversation:type_name -> OpenIMServer.conversation.Conversation - 0, // 13: OpenIMServer.conversation.GetConversationsResp.conversations:type_name -> OpenIMServer.conversation.Conversation - 0, // 14: OpenIMServer.conversation.GetAllConversationsResp.conversations:type_name -> OpenIMServer.conversation.Conversation - 1, // 15: OpenIMServer.conversation.SetConversationsReq.conversation:type_name -> OpenIMServer.conversation.ConversationReq - 0, // 16: OpenIMServer.conversation.GetConversationsByConversationIDResp.conversations:type_name -> OpenIMServer.conversation.Conversation - 4, // 17: OpenIMServer.conversation.conversation.GetConversation:input_type -> OpenIMServer.conversation.GetConversationReq - 8, // 18: OpenIMServer.conversation.conversation.GetAllConversations:input_type -> OpenIMServer.conversation.GetAllConversationsReq - 6, // 19: OpenIMServer.conversation.conversation.GetConversations:input_type -> OpenIMServer.conversation.GetConversationsReq - 2, // 20: OpenIMServer.conversation.conversation.SetConversation:input_type -> OpenIMServer.conversation.SetConversationReq - 10, // 21: OpenIMServer.conversation.conversation.GetRecvMsgNotNotifyUserIDs:input_type -> OpenIMServer.conversation.GetRecvMsgNotNotifyUserIDsReq - 12, // 22: OpenIMServer.conversation.conversation.CreateSingleChatConversations:input_type -> OpenIMServer.conversation.CreateSingleChatConversationsReq - 14, // 23: OpenIMServer.conversation.conversation.CreateGroupChatConversations:input_type -> OpenIMServer.conversation.CreateGroupChatConversationsReq - 16, // 24: OpenIMServer.conversation.conversation.SetConversationMaxSeq:input_type -> OpenIMServer.conversation.SetConversationMaxSeqReq - 18, // 25: OpenIMServer.conversation.conversation.GetConversationIDs:input_type -> OpenIMServer.conversation.GetConversationIDsReq - 20, // 26: OpenIMServer.conversation.conversation.SetConversations:input_type -> OpenIMServer.conversation.SetConversationsReq - 22, // 27: OpenIMServer.conversation.conversation.GetUserConversationIDsHash:input_type -> OpenIMServer.conversation.GetUserConversationIDsHashReq - 24, // 28: OpenIMServer.conversation.conversation.GetConversationsByConversationID:input_type -> OpenIMServer.conversation.GetConversationsByConversationIDReq - 5, // 29: OpenIMServer.conversation.conversation.GetConversation:output_type -> OpenIMServer.conversation.GetConversationResp - 9, // 30: OpenIMServer.conversation.conversation.GetAllConversations:output_type -> OpenIMServer.conversation.GetAllConversationsResp - 7, // 31: OpenIMServer.conversation.conversation.GetConversations:output_type -> OpenIMServer.conversation.GetConversationsResp - 3, // 32: OpenIMServer.conversation.conversation.SetConversation:output_type -> OpenIMServer.conversation.SetConversationResp - 11, // 33: OpenIMServer.conversation.conversation.GetRecvMsgNotNotifyUserIDs:output_type -> OpenIMServer.conversation.GetRecvMsgNotNotifyUserIDsResp - 13, // 34: OpenIMServer.conversation.conversation.CreateSingleChatConversations:output_type -> OpenIMServer.conversation.CreateSingleChatConversationsResp - 15, // 35: OpenIMServer.conversation.conversation.CreateGroupChatConversations:output_type -> OpenIMServer.conversation.CreateGroupChatConversationsResp - 17, // 36: OpenIMServer.conversation.conversation.SetConversationMaxSeq:output_type -> OpenIMServer.conversation.SetConversationMaxSeqResp - 19, // 37: OpenIMServer.conversation.conversation.GetConversationIDs:output_type -> OpenIMServer.conversation.GetConversationIDsResp - 21, // 38: OpenIMServer.conversation.conversation.SetConversations:output_type -> OpenIMServer.conversation.SetConversationsResp - 23, // 39: OpenIMServer.conversation.conversation.GetUserConversationIDsHash:output_type -> OpenIMServer.conversation.GetUserConversationIDsHashResp - 25, // 40: OpenIMServer.conversation.conversation.GetConversationsByConversationID:output_type -> OpenIMServer.conversation.GetConversationsByConversationIDResp - 29, // [29:41] is the sub-list for method output_type - 17, // [17:29] is the sub-list for method input_type - 17, // [17:17] is the sub-list for extension type_name - 17, // [17:17] is the sub-list for extension extendee - 0, // [0:17] is the sub-list for field type_name -} - -func init() { file_conversation_conversation_proto_init() } -func file_conversation_conversation_proto_init() { - if File_conversation_conversation_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_conversation_conversation_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Conversation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_conversation_conversation_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ConversationReq); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_conversation_conversation_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SetConversationReq); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_conversation_conversation_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SetConversationResp); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_conversation_conversation_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetConversationReq); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_conversation_conversation_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetConversationResp); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_conversation_conversation_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetConversationsReq); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_conversation_conversation_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetConversationsResp); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_conversation_conversation_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetAllConversationsReq); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_conversation_conversation_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetAllConversationsResp); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_conversation_conversation_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetRecvMsgNotNotifyUserIDsReq); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_conversation_conversation_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetRecvMsgNotNotifyUserIDsResp); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_conversation_conversation_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CreateSingleChatConversationsReq); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_conversation_conversation_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CreateSingleChatConversationsResp); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_conversation_conversation_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CreateGroupChatConversationsReq); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_conversation_conversation_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CreateGroupChatConversationsResp); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_conversation_conversation_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SetConversationMaxSeqReq); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_conversation_conversation_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SetConversationMaxSeqResp); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_conversation_conversation_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetConversationIDsReq); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_conversation_conversation_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetConversationIDsResp); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_conversation_conversation_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SetConversationsReq); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_conversation_conversation_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SetConversationsResp); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_conversation_conversation_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetUserConversationIDsHashReq); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_conversation_conversation_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetUserConversationIDsHashResp); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_conversation_conversation_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetConversationsByConversationIDReq); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_conversation_conversation_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetConversationsByConversationIDResp); 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{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_conversation_conversation_proto_rawDesc, - NumEnums: 0, - NumMessages: 26, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_conversation_conversation_proto_goTypes, - DependencyIndexes: file_conversation_conversation_proto_depIdxs, - MessageInfos: file_conversation_conversation_proto_msgTypes, - }.Build() - File_conversation_conversation_proto = out.File - file_conversation_conversation_proto_rawDesc = nil - file_conversation_conversation_proto_goTypes = nil - file_conversation_conversation_proto_depIdxs = nil -} - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConnInterface - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion6 - -// ConversationClient is the client API for Conversation service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type ConversationClient interface { - GetConversation(ctx context.Context, in *GetConversationReq, opts ...grpc.CallOption) (*GetConversationResp, error) - GetAllConversations(ctx context.Context, in *GetAllConversationsReq, opts ...grpc.CallOption) (*GetAllConversationsResp, error) - GetConversations(ctx context.Context, in *GetConversationsReq, opts ...grpc.CallOption) (*GetConversationsResp, error) - SetConversation(ctx context.Context, in *SetConversationReq, opts ...grpc.CallOption) (*SetConversationResp, error) - GetRecvMsgNotNotifyUserIDs(ctx context.Context, in *GetRecvMsgNotNotifyUserIDsReq, opts ...grpc.CallOption) (*GetRecvMsgNotNotifyUserIDsResp, error) - CreateSingleChatConversations(ctx context.Context, in *CreateSingleChatConversationsReq, opts ...grpc.CallOption) (*CreateSingleChatConversationsResp, error) - CreateGroupChatConversations(ctx context.Context, in *CreateGroupChatConversationsReq, opts ...grpc.CallOption) (*CreateGroupChatConversationsResp, error) - SetConversationMaxSeq(ctx context.Context, in *SetConversationMaxSeqReq, opts ...grpc.CallOption) (*SetConversationMaxSeqResp, error) - GetConversationIDs(ctx context.Context, in *GetConversationIDsReq, opts ...grpc.CallOption) (*GetConversationIDsResp, error) - SetConversations(ctx context.Context, in *SetConversationsReq, opts ...grpc.CallOption) (*SetConversationsResp, error) - GetUserConversationIDsHash(ctx context.Context, in *GetUserConversationIDsHashReq, opts ...grpc.CallOption) (*GetUserConversationIDsHashResp, error) - GetConversationsByConversationID(ctx context.Context, in *GetConversationsByConversationIDReq, opts ...grpc.CallOption) (*GetConversationsByConversationIDResp, error) -} - -type conversationClient struct { - cc grpc.ClientConnInterface -} - -func NewConversationClient(cc grpc.ClientConnInterface) ConversationClient { - return &conversationClient{cc} -} - -func (c *conversationClient) GetConversation(ctx context.Context, in *GetConversationReq, opts ...grpc.CallOption) (*GetConversationResp, error) { - out := new(GetConversationResp) - err := c.cc.Invoke(ctx, "/OpenIMServer.conversation.conversation/GetConversation", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *conversationClient) GetAllConversations(ctx context.Context, in *GetAllConversationsReq, opts ...grpc.CallOption) (*GetAllConversationsResp, error) { - out := new(GetAllConversationsResp) - err := c.cc.Invoke(ctx, "/OpenIMServer.conversation.conversation/GetAllConversations", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *conversationClient) GetConversations(ctx context.Context, in *GetConversationsReq, opts ...grpc.CallOption) (*GetConversationsResp, error) { - out := new(GetConversationsResp) - err := c.cc.Invoke(ctx, "/OpenIMServer.conversation.conversation/GetConversations", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *conversationClient) SetConversation(ctx context.Context, in *SetConversationReq, opts ...grpc.CallOption) (*SetConversationResp, error) { - out := new(SetConversationResp) - err := c.cc.Invoke(ctx, "/OpenIMServer.conversation.conversation/SetConversation", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *conversationClient) GetRecvMsgNotNotifyUserIDs(ctx context.Context, in *GetRecvMsgNotNotifyUserIDsReq, opts ...grpc.CallOption) (*GetRecvMsgNotNotifyUserIDsResp, error) { - out := new(GetRecvMsgNotNotifyUserIDsResp) - err := c.cc.Invoke(ctx, "/OpenIMServer.conversation.conversation/GetRecvMsgNotNotifyUserIDs", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *conversationClient) CreateSingleChatConversations(ctx context.Context, in *CreateSingleChatConversationsReq, opts ...grpc.CallOption) (*CreateSingleChatConversationsResp, error) { - out := new(CreateSingleChatConversationsResp) - err := c.cc.Invoke(ctx, "/OpenIMServer.conversation.conversation/CreateSingleChatConversations", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *conversationClient) CreateGroupChatConversations(ctx context.Context, in *CreateGroupChatConversationsReq, opts ...grpc.CallOption) (*CreateGroupChatConversationsResp, error) { - out := new(CreateGroupChatConversationsResp) - err := c.cc.Invoke(ctx, "/OpenIMServer.conversation.conversation/CreateGroupChatConversations", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *conversationClient) SetConversationMaxSeq(ctx context.Context, in *SetConversationMaxSeqReq, opts ...grpc.CallOption) (*SetConversationMaxSeqResp, error) { - out := new(SetConversationMaxSeqResp) - err := c.cc.Invoke(ctx, "/OpenIMServer.conversation.conversation/SetConversationMaxSeq", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *conversationClient) GetConversationIDs(ctx context.Context, in *GetConversationIDsReq, opts ...grpc.CallOption) (*GetConversationIDsResp, error) { - out := new(GetConversationIDsResp) - err := c.cc.Invoke(ctx, "/OpenIMServer.conversation.conversation/GetConversationIDs", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *conversationClient) SetConversations(ctx context.Context, in *SetConversationsReq, opts ...grpc.CallOption) (*SetConversationsResp, error) { - out := new(SetConversationsResp) - err := c.cc.Invoke(ctx, "/OpenIMServer.conversation.conversation/SetConversations", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *conversationClient) GetUserConversationIDsHash(ctx context.Context, in *GetUserConversationIDsHashReq, opts ...grpc.CallOption) (*GetUserConversationIDsHashResp, error) { - out := new(GetUserConversationIDsHashResp) - err := c.cc.Invoke(ctx, "/OpenIMServer.conversation.conversation/GetUserConversationIDsHash", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *conversationClient) GetConversationsByConversationID(ctx context.Context, in *GetConversationsByConversationIDReq, opts ...grpc.CallOption) (*GetConversationsByConversationIDResp, error) { - out := new(GetConversationsByConversationIDResp) - err := c.cc.Invoke(ctx, "/OpenIMServer.conversation.conversation/GetConversationsByConversationID", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// ConversationServer is the server API for Conversation service. -type ConversationServer interface { - GetConversation(context.Context, *GetConversationReq) (*GetConversationResp, error) - GetAllConversations(context.Context, *GetAllConversationsReq) (*GetAllConversationsResp, error) - GetConversations(context.Context, *GetConversationsReq) (*GetConversationsResp, error) - SetConversation(context.Context, *SetConversationReq) (*SetConversationResp, error) - GetRecvMsgNotNotifyUserIDs(context.Context, *GetRecvMsgNotNotifyUserIDsReq) (*GetRecvMsgNotNotifyUserIDsResp, error) - CreateSingleChatConversations(context.Context, *CreateSingleChatConversationsReq) (*CreateSingleChatConversationsResp, error) - CreateGroupChatConversations(context.Context, *CreateGroupChatConversationsReq) (*CreateGroupChatConversationsResp, error) - SetConversationMaxSeq(context.Context, *SetConversationMaxSeqReq) (*SetConversationMaxSeqResp, error) - GetConversationIDs(context.Context, *GetConversationIDsReq) (*GetConversationIDsResp, error) - SetConversations(context.Context, *SetConversationsReq) (*SetConversationsResp, error) - GetUserConversationIDsHash(context.Context, *GetUserConversationIDsHashReq) (*GetUserConversationIDsHashResp, error) - GetConversationsByConversationID(context.Context, *GetConversationsByConversationIDReq) (*GetConversationsByConversationIDResp, error) -} - -// UnimplementedConversationServer can be embedded to have forward compatible implementations. -type UnimplementedConversationServer struct { -} - -func (*UnimplementedConversationServer) GetConversation(context.Context, *GetConversationReq) (*GetConversationResp, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetConversation not implemented") -} -func (*UnimplementedConversationServer) GetAllConversations(context.Context, *GetAllConversationsReq) (*GetAllConversationsResp, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetAllConversations not implemented") -} -func (*UnimplementedConversationServer) GetConversations(context.Context, *GetConversationsReq) (*GetConversationsResp, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetConversations not implemented") -} -func (*UnimplementedConversationServer) SetConversation(context.Context, *SetConversationReq) (*SetConversationResp, error) { - return nil, status.Errorf(codes.Unimplemented, "method SetConversation not implemented") -} -func (*UnimplementedConversationServer) GetRecvMsgNotNotifyUserIDs(context.Context, *GetRecvMsgNotNotifyUserIDsReq) (*GetRecvMsgNotNotifyUserIDsResp, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetRecvMsgNotNotifyUserIDs not implemented") -} -func (*UnimplementedConversationServer) CreateSingleChatConversations(context.Context, *CreateSingleChatConversationsReq) (*CreateSingleChatConversationsResp, error) { - return nil, status.Errorf(codes.Unimplemented, "method CreateSingleChatConversations not implemented") -} -func (*UnimplementedConversationServer) CreateGroupChatConversations(context.Context, *CreateGroupChatConversationsReq) (*CreateGroupChatConversationsResp, error) { - return nil, status.Errorf(codes.Unimplemented, "method CreateGroupChatConversations not implemented") -} -func (*UnimplementedConversationServer) SetConversationMaxSeq(context.Context, *SetConversationMaxSeqReq) (*SetConversationMaxSeqResp, error) { - return nil, status.Errorf(codes.Unimplemented, "method SetConversationMaxSeq not implemented") -} -func (*UnimplementedConversationServer) GetConversationIDs(context.Context, *GetConversationIDsReq) (*GetConversationIDsResp, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetConversationIDs not implemented") -} -func (*UnimplementedConversationServer) SetConversations(context.Context, *SetConversationsReq) (*SetConversationsResp, error) { - return nil, status.Errorf(codes.Unimplemented, "method SetConversations not implemented") -} -func (*UnimplementedConversationServer) GetUserConversationIDsHash(context.Context, *GetUserConversationIDsHashReq) (*GetUserConversationIDsHashResp, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetUserConversationIDsHash not implemented") -} -func (*UnimplementedConversationServer) GetConversationsByConversationID(context.Context, *GetConversationsByConversationIDReq) (*GetConversationsByConversationIDResp, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetConversationsByConversationID not implemented") -} - -func RegisterConversationServer(s *grpc.Server, srv ConversationServer) { - s.RegisterService(&_Conversation_serviceDesc, srv) -} - -func _Conversation_GetConversation_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetConversationReq) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ConversationServer).GetConversation(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/OpenIMServer.conversation.conversation/GetConversation", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ConversationServer).GetConversation(ctx, req.(*GetConversationReq)) - } - return interceptor(ctx, in, info, handler) -} - -func _Conversation_GetAllConversations_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetAllConversationsReq) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ConversationServer).GetAllConversations(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/OpenIMServer.conversation.conversation/GetAllConversations", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ConversationServer).GetAllConversations(ctx, req.(*GetAllConversationsReq)) - } - return interceptor(ctx, in, info, handler) -} - -func _Conversation_GetConversations_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetConversationsReq) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ConversationServer).GetConversations(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/OpenIMServer.conversation.conversation/GetConversations", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ConversationServer).GetConversations(ctx, req.(*GetConversationsReq)) - } - return interceptor(ctx, in, info, handler) -} - -func _Conversation_SetConversation_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(SetConversationReq) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ConversationServer).SetConversation(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/OpenIMServer.conversation.conversation/SetConversation", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ConversationServer).SetConversation(ctx, req.(*SetConversationReq)) - } - return interceptor(ctx, in, info, handler) -} - -func _Conversation_GetRecvMsgNotNotifyUserIDs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetRecvMsgNotNotifyUserIDsReq) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ConversationServer).GetRecvMsgNotNotifyUserIDs(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/OpenIMServer.conversation.conversation/GetRecvMsgNotNotifyUserIDs", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ConversationServer).GetRecvMsgNotNotifyUserIDs(ctx, req.(*GetRecvMsgNotNotifyUserIDsReq)) - } - return interceptor(ctx, in, info, handler) -} - -func _Conversation_CreateSingleChatConversations_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(CreateSingleChatConversationsReq) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ConversationServer).CreateSingleChatConversations(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/OpenIMServer.conversation.conversation/CreateSingleChatConversations", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ConversationServer).CreateSingleChatConversations(ctx, req.(*CreateSingleChatConversationsReq)) - } - return interceptor(ctx, in, info, handler) -} - -func _Conversation_CreateGroupChatConversations_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(CreateGroupChatConversationsReq) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ConversationServer).CreateGroupChatConversations(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/OpenIMServer.conversation.conversation/CreateGroupChatConversations", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ConversationServer).CreateGroupChatConversations(ctx, req.(*CreateGroupChatConversationsReq)) - } - return interceptor(ctx, in, info, handler) -} - -func _Conversation_SetConversationMaxSeq_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(SetConversationMaxSeqReq) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ConversationServer).SetConversationMaxSeq(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/OpenIMServer.conversation.conversation/SetConversationMaxSeq", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ConversationServer).SetConversationMaxSeq(ctx, req.(*SetConversationMaxSeqReq)) - } - return interceptor(ctx, in, info, handler) -} - -func _Conversation_GetConversationIDs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetConversationIDsReq) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ConversationServer).GetConversationIDs(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/OpenIMServer.conversation.conversation/GetConversationIDs", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ConversationServer).GetConversationIDs(ctx, req.(*GetConversationIDsReq)) - } - return interceptor(ctx, in, info, handler) -} - -func _Conversation_SetConversations_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(SetConversationsReq) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ConversationServer).SetConversations(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/OpenIMServer.conversation.conversation/SetConversations", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ConversationServer).SetConversations(ctx, req.(*SetConversationsReq)) - } - return interceptor(ctx, in, info, handler) -} - -func _Conversation_GetUserConversationIDsHash_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetUserConversationIDsHashReq) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ConversationServer).GetUserConversationIDsHash(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/OpenIMServer.conversation.conversation/GetUserConversationIDsHash", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ConversationServer).GetUserConversationIDsHash(ctx, req.(*GetUserConversationIDsHashReq)) - } - return interceptor(ctx, in, info, handler) -} - -func _Conversation_GetConversationsByConversationID_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetConversationsByConversationIDReq) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ConversationServer).GetConversationsByConversationID(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/OpenIMServer.conversation.conversation/GetConversationsByConversationID", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ConversationServer).GetConversationsByConversationID(ctx, req.(*GetConversationsByConversationIDReq)) - } - return interceptor(ctx, in, info, handler) -} - -var _Conversation_serviceDesc = grpc.ServiceDesc{ - ServiceName: "OpenIMServer.conversation.conversation", - HandlerType: (*ConversationServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "GetConversation", - Handler: _Conversation_GetConversation_Handler, - }, - { - MethodName: "GetAllConversations", - Handler: _Conversation_GetAllConversations_Handler, - }, - { - MethodName: "GetConversations", - Handler: _Conversation_GetConversations_Handler, - }, - { - MethodName: "SetConversation", - Handler: _Conversation_SetConversation_Handler, - }, - { - MethodName: "GetRecvMsgNotNotifyUserIDs", - Handler: _Conversation_GetRecvMsgNotNotifyUserIDs_Handler, - }, - { - MethodName: "CreateSingleChatConversations", - Handler: _Conversation_CreateSingleChatConversations_Handler, - }, - { - MethodName: "CreateGroupChatConversations", - Handler: _Conversation_CreateGroupChatConversations_Handler, - }, - { - MethodName: "SetConversationMaxSeq", - Handler: _Conversation_SetConversationMaxSeq_Handler, - }, - { - MethodName: "GetConversationIDs", - Handler: _Conversation_GetConversationIDs_Handler, - }, - { - MethodName: "SetConversations", - Handler: _Conversation_SetConversations_Handler, - }, - { - MethodName: "GetUserConversationIDsHash", - Handler: _Conversation_GetUserConversationIDsHash_Handler, - }, - { - MethodName: "GetConversationsByConversationID", - Handler: _Conversation_GetConversationsByConversationID_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "conversation/conversation.proto", -} diff --git a/pkg/proto/conversation/conversation.proto b/pkg/proto/conversation/conversation.proto deleted file mode 100644 index 0a271d525..000000000 --- a/pkg/proto/conversation/conversation.proto +++ /dev/null @@ -1,172 +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. - -syntax = "proto3"; -package OpenIMServer.conversation; -import "wrapperspb/wrapperspb.proto"; -option go_package = "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/conversation"; - -message Conversation{ - string ownerUserID = 1; - string conversationID = 2; - int32 recvMsgOpt = 3; - int32 conversationType = 4; - string userID = 5; - string groupID = 6; - bool isPinned = 7; - string attachedInfo = 8; - bool isPrivateChat = 9; - int32 groupAtType = 10; - string ex = 11; - int32 burnDuration = 12; - int64 minSeq = 13; - int64 maxSeq = 14; - int64 msgDestructTime = 15; - int64 latestMsgDestructTime = 16; - bool isMsgDestruct = 17; -} - -message ConversationReq{ - string conversationID = 1; - int32 conversationType = 2; - string userID = 3; - string groupID = 4; - OpenIMServer.protobuf.Int32Value recvMsgOpt = 5; - OpenIMServer.protobuf.BoolValue isPinned = 6; - OpenIMServer.protobuf.StringValue attachedInfo = 7; - OpenIMServer.protobuf.BoolValue isPrivateChat = 8; - OpenIMServer.protobuf.StringValue ex = 9; - OpenIMServer.protobuf.Int32Value burnDuration = 10; - OpenIMServer.protobuf.Int64Value minSeq = 11; - OpenIMServer.protobuf.Int64Value maxSeq = 12; - OpenIMServer.protobuf.Int32Value groupAtType = 13; - OpenIMServer.protobuf.Int64Value msgDestructTime = 14; - OpenIMServer.protobuf.BoolValue isMsgDestruct = 15; -} - -message SetConversationReq{ - Conversation conversation = 1; -} - -message SetConversationResp{ -} - -message GetConversationReq{ - string conversationID = 1; - string ownerUserID = 2; -} - -message GetConversationResp{ - Conversation conversation = 2; -} - -message GetConversationsReq{ - string ownerUserID = 1; - repeated string conversationIDs = 2; -} - -message GetConversationsResp{ - repeated Conversation conversations = 2; -} - -message GetAllConversationsReq{ - string ownerUserID = 1; -} - -message GetAllConversationsResp{ - repeated Conversation conversations = 2; -} - - -message GetRecvMsgNotNotifyUserIDsReq { - string groupID = 1; -} - -message GetRecvMsgNotNotifyUserIDsResp { - repeated string userIDs = 1; -} - -message CreateSingleChatConversationsReq { - string recvID = 1; - string sendID = 2; -} - -message CreateSingleChatConversationsResp { -} - -message CreateGroupChatConversationsReq { - repeated string userIDs = 1; - string groupID = 2; -} - -message CreateGroupChatConversationsResp { -} - -message SetConversationMaxSeqReq { - string conversationID = 1; - repeated string ownerUserID = 2; - int64 maxSeq = 3; -} - -message SetConversationMaxSeqResp { -} - -message GetConversationIDsReq { - string userID = 1; -} - -message GetConversationIDsResp { - repeated string conversationIDs = 1; -} - - - -message SetConversationsReq { - repeated string userIDs = 1; - ConversationReq conversation = 2; -} - -message SetConversationsResp { -} - -message GetUserConversationIDsHashReq { - string ownerUserID = 1; -} - -message GetUserConversationIDsHashResp { - uint64 hash = 1; -} - -message GetConversationsByConversationIDReq { - repeated string conversationIDs = 1; -} - -message GetConversationsByConversationIDResp { - repeated Conversation conversations = 1; -} - -service conversation { - rpc GetConversation(GetConversationReq)returns(GetConversationResp); - rpc GetAllConversations(GetAllConversationsReq)returns(GetAllConversationsResp); - rpc GetConversations(GetConversationsReq)returns(GetConversationsResp); - rpc SetConversation(SetConversationReq)returns(SetConversationResp); - rpc GetRecvMsgNotNotifyUserIDs(GetRecvMsgNotNotifyUserIDsReq) returns (GetRecvMsgNotNotifyUserIDsResp); - rpc CreateSingleChatConversations(CreateSingleChatConversationsReq) returns (CreateSingleChatConversationsResp); - rpc CreateGroupChatConversations(CreateGroupChatConversationsReq) returns (CreateGroupChatConversationsResp); - rpc SetConversationMaxSeq(SetConversationMaxSeqReq) returns(SetConversationMaxSeqResp); - rpc GetConversationIDs(GetConversationIDsReq) returns(GetConversationIDsResp); - rpc SetConversations(SetConversationsReq) returns(SetConversationsResp); - rpc GetUserConversationIDsHash(GetUserConversationIDsHashReq) returns(GetUserConversationIDsHashResp); - rpc GetConversationsByConversationID(GetConversationsByConversationIDReq) returns(GetConversationsByConversationIDResp); -} diff --git a/pkg/proto/errinfo/errinfo.pb.go b/pkg/proto/errinfo/errinfo.pb.go deleted file mode 100644 index 44f906d86..000000000 --- a/pkg/proto/errinfo/errinfo.pb.go +++ /dev/null @@ -1,197 +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. - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.29.1 -// protoc v4.22.0 -// source: errinfo/errinfo.proto - -package errinfo - -import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type ErrorInfo struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path"` - Line uint32 `protobuf:"varint,2,opt,name=line,proto3" json:"line"` - Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name"` - Cause string `protobuf:"bytes,4,opt,name=cause,proto3" json:"cause"` - Warp []string `protobuf:"bytes,5,rep,name=warp,proto3" json:"warp"` -} - -func (x *ErrorInfo) Reset() { - *x = ErrorInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_errinfo_errinfo_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ErrorInfo) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ErrorInfo) ProtoMessage() {} - -func (x *ErrorInfo) ProtoReflect() protoreflect.Message { - mi := &file_errinfo_errinfo_proto_msgTypes[0] - 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 ErrorInfo.ProtoReflect.Descriptor instead. -func (*ErrorInfo) Descriptor() ([]byte, []int) { - return file_errinfo_errinfo_proto_rawDescGZIP(), []int{0} -} - -func (x *ErrorInfo) GetPath() string { - if x != nil { - return x.Path - } - return "" -} - -func (x *ErrorInfo) GetLine() uint32 { - if x != nil { - return x.Line - } - return 0 -} - -func (x *ErrorInfo) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *ErrorInfo) GetCause() string { - if x != nil { - return x.Cause - } - return "" -} - -func (x *ErrorInfo) GetWarp() []string { - if x != nil { - return x.Warp - } - return nil -} - -var File_errinfo_errinfo_proto protoreflect.FileDescriptor - -var file_errinfo_errinfo_proto_rawDesc = []byte{ - 0x0a, 0x15, 0x65, 0x72, 0x72, 0x69, 0x6e, 0x66, 0x6f, 0x2f, 0x65, 0x72, 0x72, 0x69, 0x6e, 0x66, - 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x15, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, - 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x22, 0x71, - 0x0a, 0x09, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x70, - 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, - 0x12, 0x0a, 0x04, 0x6c, 0x69, 0x6e, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x04, 0x6c, - 0x69, 0x6e, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x61, 0x75, 0x73, 0x65, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x63, 0x61, 0x75, 0x73, 0x65, 0x12, 0x12, 0x0a, - 0x04, 0x77, 0x61, 0x72, 0x70, 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, 0x52, 0x04, 0x77, 0x61, 0x72, - 0x70, 0x42, 0x37, 0x5a, 0x35, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, - 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x44, 0x4b, 0x2f, 0x4f, 0x70, 0x65, 0x6e, 0x2d, 0x49, - 0x4d, 0x2d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x2f, 0x65, 0x72, 0x72, 0x69, 0x6e, 0x66, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x33, -} - -var ( - file_errinfo_errinfo_proto_rawDescOnce sync.Once - file_errinfo_errinfo_proto_rawDescData = file_errinfo_errinfo_proto_rawDesc -) - -func file_errinfo_errinfo_proto_rawDescGZIP() []byte { - file_errinfo_errinfo_proto_rawDescOnce.Do(func() { - file_errinfo_errinfo_proto_rawDescData = protoimpl.X.CompressGZIP(file_errinfo_errinfo_proto_rawDescData) - }) - return file_errinfo_errinfo_proto_rawDescData -} - -var file_errinfo_errinfo_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_errinfo_errinfo_proto_goTypes = []interface{}{ - (*ErrorInfo)(nil), // 0: OpenIMServer.protobuf.ErrorInfo -} -var file_errinfo_errinfo_proto_depIdxs = []int32{ - 0, // [0:0] is the sub-list for method output_type - 0, // [0:0] is the sub-list for method input_type - 0, // [0:0] is the sub-list for extension type_name - 0, // [0:0] is the sub-list for extension extendee - 0, // [0:0] is the sub-list for field type_name -} - -func init() { file_errinfo_errinfo_proto_init() } -func file_errinfo_errinfo_proto_init() { - if File_errinfo_errinfo_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_errinfo_errinfo_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ErrorInfo); 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{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_errinfo_errinfo_proto_rawDesc, - NumEnums: 0, - NumMessages: 1, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_errinfo_errinfo_proto_goTypes, - DependencyIndexes: file_errinfo_errinfo_proto_depIdxs, - MessageInfos: file_errinfo_errinfo_proto_msgTypes, - }.Build() - File_errinfo_errinfo_proto = out.File - file_errinfo_errinfo_proto_rawDesc = nil - file_errinfo_errinfo_proto_goTypes = nil - file_errinfo_errinfo_proto_depIdxs = nil -} diff --git a/pkg/proto/errinfo/errinfo.proto b/pkg/proto/errinfo/errinfo.proto deleted file mode 100644 index 11fddec34..000000000 --- a/pkg/proto/errinfo/errinfo.proto +++ /dev/null @@ -1,27 +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. - -syntax = "proto3"; - -package OpenIMServer.protobuf; - -option go_package = "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/errinfo"; - -message ErrorInfo { - string path = 1; - uint32 line = 2; - string name = 3; - string cause = 4; - repeated string warp = 5; -} \ No newline at end of file diff --git a/pkg/proto/friend/friend.go b/pkg/proto/friend/friend.go deleted file mode 100644 index 197fc753c..000000000 --- a/pkg/proto/friend/friend.go +++ /dev/null @@ -1,176 +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. - -package friend - -import "github.com/OpenIMSDK/Open-IM-Server/pkg/errs" - -func (x *GetPaginationFriendsReq) Check() error { - if x.Pagination == nil { - return errs.ErrArgs.Wrap("pagination is empty") - } - if x.Pagination.PageNumber < 1 { - return errs.ErrArgs.Wrap("pageNumber is invalid") - } - if x.UserID == "" { - return errs.ErrArgs.Wrap("userID is empty") - } - return nil -} - -func (x *ApplyToAddFriendReq) Check() error { - if x.ToUserID == "" { - return errs.ErrArgs.Wrap("toUserID is empty") - } - if x.FromUserID == "" { - return errs.ErrArgs.Wrap("fromUserID is empty") - } - return nil -} - -func (x *ImportFriendReq) Check() error { - if x.OwnerUserID == "" { - return errs.ErrArgs.Wrap("ownerUserID is empty") - } - if x.FriendUserIDs == nil { - return errs.ErrArgs.Wrap("friendUserIDS is empty") - } - return nil -} - -func (x *GetPaginationFriendsApplyToReq) Check() error { - if x.UserID == "" { - return errs.ErrArgs.Wrap("userID is empty") - } - if x.Pagination == nil { - return errs.ErrArgs.Wrap("pagination is empty") - } - if x.Pagination.PageNumber < 1 { - return errs.ErrArgs.Wrap("pageNumber is invalid") - } - return nil -} - -func (x *GetDesignatedFriendsReq) Check() error { - if x.OwnerUserID == "" { - return errs.ErrArgs.Wrap("ownerUserID is empty") - } - if x.FriendUserIDs == nil { - return errs.ErrArgs.Wrap("friendUserIDS is empty") - } - return nil -} - -func (x *AddBlackReq) Check() error { - if x.OwnerUserID == "" { - return errs.ErrArgs.Wrap("ownerUserID is empty") - } - if x.BlackUserID == "" { - return errs.ErrArgs.Wrap("BlackUserID is empty") - } - return nil -} - -func (x *RemoveBlackReq) Check() error { - if x.OwnerUserID == "" { - return errs.ErrArgs.Wrap("ownerUserID is empty") - } - if x.BlackUserID == "" { - return errs.ErrArgs.Wrap("BlackUserID is empty") - } - return nil -} - -func (x *GetPaginationBlacksReq) Check() error { - if x.UserID == "" { - return errs.ErrArgs.Wrap("userID is empty") - } - if x.Pagination == nil { - return errs.ErrArgs.Wrap("pagination is empty") - } - if x.Pagination.PageNumber < 1 { - return errs.ErrArgs.Wrap("pageNumber is invalid") - } - return nil -} - -func (x *IsFriendReq) Check() error { - if x.UserID1 == "" { - return errs.ErrArgs.Wrap("userID1 is empty") - } - if x.UserID2 == "" { - return errs.ErrArgs.Wrap("userID2 is empty") - } - return nil -} - -func (x *IsBlackReq) Check() error { - if x.UserID1 == "" { - return errs.ErrArgs.Wrap("userID1 is empty") - } - if x.UserID2 == "" { - return errs.ErrArgs.Wrap("userID2 is empty") - } - return nil -} - -func (x *DeleteFriendReq) Check() error { - if x.OwnerUserID == "" { - return errs.ErrArgs.Wrap("userID1 is empty") - } - if x.FriendUserID == "" { - return errs.ErrArgs.Wrap("userID2 is empty") - } - return nil -} - -func (x *RespondFriendApplyReq) Check() error { - if x.ToUserID == "" { - return errs.ErrArgs.Wrap("toUserID is empty") - } - if x.FromUserID == "" { - return errs.ErrArgs.Wrap("fromUserID is empty") - } - return nil -} - -func (x *SetFriendRemarkReq) Check() error { - if x.OwnerUserID == "" { - return errs.ErrArgs.Wrap("ownerUserID is empty") - } - if x.FriendUserID == "" { - return errs.ErrArgs.Wrap("fromUserID is empty") - } - return nil -} - -func (x *GetPaginationFriendsApplyFromReq) Check() error { - if x.UserID == "" { - return errs.ErrArgs.Wrap("userID is empty") - } - if x.Pagination == nil { - return errs.ErrArgs.Wrap("pagination is empty") - } - if x.Pagination.PageNumber < 1 { - return errs.ErrArgs.Wrap("pageNumber is invalid") - } - return nil -} - -func (x *GetFriendIDsReq) Check() error { - if x.UserID == "" { - return errs.ErrArgs.Wrap("userID is empty") - } - return nil -} diff --git a/pkg/proto/friend/friend.pb.go b/pkg/proto/friend/friend.pb.go deleted file mode 100644 index 5745fcd3c..000000000 --- a/pkg/proto/friend/friend.pb.go +++ /dev/null @@ -1,2952 +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. - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.29.1 -// protoc v4.22.0 -// source: friend/friend.proto - -package friend - -import ( - context "context" - sdkws "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/sdkws" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type GetPaginationFriendsReq struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Pagination *sdkws.RequestPagination `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination"` - UserID string `protobuf:"bytes,2,opt,name=userID,proto3" json:"userID"` -} - -func (x *GetPaginationFriendsReq) Reset() { - *x = GetPaginationFriendsReq{} - if protoimpl.UnsafeEnabled { - mi := &file_friend_friend_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetPaginationFriendsReq) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetPaginationFriendsReq) ProtoMessage() {} - -func (x *GetPaginationFriendsReq) ProtoReflect() protoreflect.Message { - mi := &file_friend_friend_proto_msgTypes[0] - 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 GetPaginationFriendsReq.ProtoReflect.Descriptor instead. -func (*GetPaginationFriendsReq) Descriptor() ([]byte, []int) { - return file_friend_friend_proto_rawDescGZIP(), []int{0} -} - -func (x *GetPaginationFriendsReq) GetPagination() *sdkws.RequestPagination { - if x != nil { - return x.Pagination - } - return nil -} - -func (x *GetPaginationFriendsReq) GetUserID() string { - if x != nil { - return x.UserID - } - return "" -} - -type GetPaginationFriendsResp struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - FriendsInfo []*sdkws.FriendInfo `protobuf:"bytes,1,rep,name=friendsInfo,proto3" json:"friendsInfo"` - Total int32 `protobuf:"varint,2,opt,name=total,proto3" json:"total"` -} - -func (x *GetPaginationFriendsResp) Reset() { - *x = GetPaginationFriendsResp{} - if protoimpl.UnsafeEnabled { - mi := &file_friend_friend_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetPaginationFriendsResp) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetPaginationFriendsResp) ProtoMessage() {} - -func (x *GetPaginationFriendsResp) ProtoReflect() protoreflect.Message { - mi := &file_friend_friend_proto_msgTypes[1] - 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 GetPaginationFriendsResp.ProtoReflect.Descriptor instead. -func (*GetPaginationFriendsResp) Descriptor() ([]byte, []int) { - return file_friend_friend_proto_rawDescGZIP(), []int{1} -} - -func (x *GetPaginationFriendsResp) GetFriendsInfo() []*sdkws.FriendInfo { - if x != nil { - return x.FriendsInfo - } - return nil -} - -func (x *GetPaginationFriendsResp) GetTotal() int32 { - if x != nil { - return x.Total - } - return 0 -} - -type ApplyToAddFriendReq struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - FromUserID string `protobuf:"bytes,1,opt,name=fromUserID,proto3" json:"fromUserID"` - ToUserID string `protobuf:"bytes,2,opt,name=toUserID,proto3" json:"toUserID"` - ReqMsg string `protobuf:"bytes,3,opt,name=reqMsg,proto3" json:"reqMsg"` - Ex string `protobuf:"bytes,4,opt,name=ex,proto3" json:"ex"` -} - -func (x *ApplyToAddFriendReq) Reset() { - *x = ApplyToAddFriendReq{} - if protoimpl.UnsafeEnabled { - mi := &file_friend_friend_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ApplyToAddFriendReq) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ApplyToAddFriendReq) ProtoMessage() {} - -func (x *ApplyToAddFriendReq) ProtoReflect() protoreflect.Message { - mi := &file_friend_friend_proto_msgTypes[2] - 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 ApplyToAddFriendReq.ProtoReflect.Descriptor instead. -func (*ApplyToAddFriendReq) Descriptor() ([]byte, []int) { - return file_friend_friend_proto_rawDescGZIP(), []int{2} -} - -func (x *ApplyToAddFriendReq) GetFromUserID() string { - if x != nil { - return x.FromUserID - } - return "" -} - -func (x *ApplyToAddFriendReq) GetToUserID() string { - if x != nil { - return x.ToUserID - } - return "" -} - -func (x *ApplyToAddFriendReq) GetReqMsg() string { - if x != nil { - return x.ReqMsg - } - return "" -} - -func (x *ApplyToAddFriendReq) GetEx() string { - if x != nil { - return x.Ex - } - return "" -} - -type ApplyToAddFriendResp struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *ApplyToAddFriendResp) Reset() { - *x = ApplyToAddFriendResp{} - if protoimpl.UnsafeEnabled { - mi := &file_friend_friend_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ApplyToAddFriendResp) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ApplyToAddFriendResp) ProtoMessage() {} - -func (x *ApplyToAddFriendResp) ProtoReflect() protoreflect.Message { - mi := &file_friend_friend_proto_msgTypes[3] - 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 ApplyToAddFriendResp.ProtoReflect.Descriptor instead. -func (*ApplyToAddFriendResp) Descriptor() ([]byte, []int) { - return file_friend_friend_proto_rawDescGZIP(), []int{3} -} - -type ImportFriendReq struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - OwnerUserID string `protobuf:"bytes,1,opt,name=ownerUserID,proto3" json:"ownerUserID"` - FriendUserIDs []string `protobuf:"bytes,2,rep,name=friendUserIDs,proto3" json:"friendUserIDs"` -} - -func (x *ImportFriendReq) Reset() { - *x = ImportFriendReq{} - if protoimpl.UnsafeEnabled { - mi := &file_friend_friend_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ImportFriendReq) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ImportFriendReq) ProtoMessage() {} - -func (x *ImportFriendReq) ProtoReflect() protoreflect.Message { - mi := &file_friend_friend_proto_msgTypes[4] - 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 ImportFriendReq.ProtoReflect.Descriptor instead. -func (*ImportFriendReq) Descriptor() ([]byte, []int) { - return file_friend_friend_proto_rawDescGZIP(), []int{4} -} - -func (x *ImportFriendReq) GetOwnerUserID() string { - if x != nil { - return x.OwnerUserID - } - return "" -} - -func (x *ImportFriendReq) GetFriendUserIDs() []string { - if x != nil { - return x.FriendUserIDs - } - return nil -} - -type ImportFriendResp struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *ImportFriendResp) Reset() { - *x = ImportFriendResp{} - if protoimpl.UnsafeEnabled { - mi := &file_friend_friend_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ImportFriendResp) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ImportFriendResp) ProtoMessage() {} - -func (x *ImportFriendResp) ProtoReflect() protoreflect.Message { - mi := &file_friend_friend_proto_msgTypes[5] - 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 ImportFriendResp.ProtoReflect.Descriptor instead. -func (*ImportFriendResp) Descriptor() ([]byte, []int) { - return file_friend_friend_proto_rawDescGZIP(), []int{5} -} - -type GetPaginationFriendsApplyToReq struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - UserID string `protobuf:"bytes,1,opt,name=userID,proto3" json:"userID"` - Pagination *sdkws.RequestPagination `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination"` -} - -func (x *GetPaginationFriendsApplyToReq) Reset() { - *x = GetPaginationFriendsApplyToReq{} - if protoimpl.UnsafeEnabled { - mi := &file_friend_friend_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetPaginationFriendsApplyToReq) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetPaginationFriendsApplyToReq) ProtoMessage() {} - -func (x *GetPaginationFriendsApplyToReq) ProtoReflect() protoreflect.Message { - mi := &file_friend_friend_proto_msgTypes[6] - 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 GetPaginationFriendsApplyToReq.ProtoReflect.Descriptor instead. -func (*GetPaginationFriendsApplyToReq) Descriptor() ([]byte, []int) { - return file_friend_friend_proto_rawDescGZIP(), []int{6} -} - -func (x *GetPaginationFriendsApplyToReq) GetUserID() string { - if x != nil { - return x.UserID - } - return "" -} - -func (x *GetPaginationFriendsApplyToReq) GetPagination() *sdkws.RequestPagination { - if x != nil { - return x.Pagination - } - return nil -} - -type GetPaginationFriendsApplyToResp struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - FriendRequests []*sdkws.FriendRequest `protobuf:"bytes,1,rep,name=FriendRequests,proto3" json:"FriendRequests"` - Total int32 `protobuf:"varint,2,opt,name=total,proto3" json:"total"` -} - -func (x *GetPaginationFriendsApplyToResp) Reset() { - *x = GetPaginationFriendsApplyToResp{} - if protoimpl.UnsafeEnabled { - mi := &file_friend_friend_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetPaginationFriendsApplyToResp) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetPaginationFriendsApplyToResp) ProtoMessage() {} - -func (x *GetPaginationFriendsApplyToResp) ProtoReflect() protoreflect.Message { - mi := &file_friend_friend_proto_msgTypes[7] - 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 GetPaginationFriendsApplyToResp.ProtoReflect.Descriptor instead. -func (*GetPaginationFriendsApplyToResp) Descriptor() ([]byte, []int) { - return file_friend_friend_proto_rawDescGZIP(), []int{7} -} - -func (x *GetPaginationFriendsApplyToResp) GetFriendRequests() []*sdkws.FriendRequest { - if x != nil { - return x.FriendRequests - } - return nil -} - -func (x *GetPaginationFriendsApplyToResp) GetTotal() int32 { - if x != nil { - return x.Total - } - return 0 -} - -type GetDesignatedFriendsReq struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - OwnerUserID string `protobuf:"bytes,1,opt,name=ownerUserID,proto3" json:"ownerUserID"` - FriendUserIDs []string `protobuf:"bytes,2,rep,name=friendUserIDs,proto3" json:"friendUserIDs"` -} - -func (x *GetDesignatedFriendsReq) Reset() { - *x = GetDesignatedFriendsReq{} - if protoimpl.UnsafeEnabled { - mi := &file_friend_friend_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetDesignatedFriendsReq) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetDesignatedFriendsReq) ProtoMessage() {} - -func (x *GetDesignatedFriendsReq) ProtoReflect() protoreflect.Message { - mi := &file_friend_friend_proto_msgTypes[8] - 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 GetDesignatedFriendsReq.ProtoReflect.Descriptor instead. -func (*GetDesignatedFriendsReq) Descriptor() ([]byte, []int) { - return file_friend_friend_proto_rawDescGZIP(), []int{8} -} - -func (x *GetDesignatedFriendsReq) GetOwnerUserID() string { - if x != nil { - return x.OwnerUserID - } - return "" -} - -func (x *GetDesignatedFriendsReq) GetFriendUserIDs() []string { - if x != nil { - return x.FriendUserIDs - } - return nil -} - -type GetDesignatedFriendsResp struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - FriendsInfo []*sdkws.FriendInfo `protobuf:"bytes,1,rep,name=friendsInfo,proto3" json:"friendsInfo"` -} - -func (x *GetDesignatedFriendsResp) Reset() { - *x = GetDesignatedFriendsResp{} - if protoimpl.UnsafeEnabled { - mi := &file_friend_friend_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetDesignatedFriendsResp) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetDesignatedFriendsResp) ProtoMessage() {} - -func (x *GetDesignatedFriendsResp) ProtoReflect() protoreflect.Message { - mi := &file_friend_friend_proto_msgTypes[9] - 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 GetDesignatedFriendsResp.ProtoReflect.Descriptor instead. -func (*GetDesignatedFriendsResp) Descriptor() ([]byte, []int) { - return file_friend_friend_proto_rawDescGZIP(), []int{9} -} - -func (x *GetDesignatedFriendsResp) GetFriendsInfo() []*sdkws.FriendInfo { - if x != nil { - return x.FriendsInfo - } - return nil -} - -type AddBlackReq struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - OwnerUserID string `protobuf:"bytes,1,opt,name=ownerUserID,proto3" json:"ownerUserID"` - BlackUserID string `protobuf:"bytes,2,opt,name=blackUserID,proto3" json:"blackUserID"` -} - -func (x *AddBlackReq) Reset() { - *x = AddBlackReq{} - if protoimpl.UnsafeEnabled { - mi := &file_friend_friend_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *AddBlackReq) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*AddBlackReq) ProtoMessage() {} - -func (x *AddBlackReq) ProtoReflect() protoreflect.Message { - mi := &file_friend_friend_proto_msgTypes[10] - 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 AddBlackReq.ProtoReflect.Descriptor instead. -func (*AddBlackReq) Descriptor() ([]byte, []int) { - return file_friend_friend_proto_rawDescGZIP(), []int{10} -} - -func (x *AddBlackReq) GetOwnerUserID() string { - if x != nil { - return x.OwnerUserID - } - return "" -} - -func (x *AddBlackReq) GetBlackUserID() string { - if x != nil { - return x.BlackUserID - } - return "" -} - -type AddBlackResp struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *AddBlackResp) Reset() { - *x = AddBlackResp{} - if protoimpl.UnsafeEnabled { - mi := &file_friend_friend_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *AddBlackResp) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*AddBlackResp) ProtoMessage() {} - -func (x *AddBlackResp) ProtoReflect() protoreflect.Message { - mi := &file_friend_friend_proto_msgTypes[11] - 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 AddBlackResp.ProtoReflect.Descriptor instead. -func (*AddBlackResp) Descriptor() ([]byte, []int) { - return file_friend_friend_proto_rawDescGZIP(), []int{11} -} - -type RemoveBlackReq struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - OwnerUserID string `protobuf:"bytes,1,opt,name=ownerUserID,proto3" json:"ownerUserID"` - BlackUserID string `protobuf:"bytes,2,opt,name=blackUserID,proto3" json:"blackUserID"` -} - -func (x *RemoveBlackReq) Reset() { - *x = RemoveBlackReq{} - if protoimpl.UnsafeEnabled { - mi := &file_friend_friend_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RemoveBlackReq) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RemoveBlackReq) ProtoMessage() {} - -func (x *RemoveBlackReq) ProtoReflect() protoreflect.Message { - mi := &file_friend_friend_proto_msgTypes[12] - 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 RemoveBlackReq.ProtoReflect.Descriptor instead. -func (*RemoveBlackReq) Descriptor() ([]byte, []int) { - return file_friend_friend_proto_rawDescGZIP(), []int{12} -} - -func (x *RemoveBlackReq) GetOwnerUserID() string { - if x != nil { - return x.OwnerUserID - } - return "" -} - -func (x *RemoveBlackReq) GetBlackUserID() string { - if x != nil { - return x.BlackUserID - } - return "" -} - -type RemoveBlackResp struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *RemoveBlackResp) Reset() { - *x = RemoveBlackResp{} - if protoimpl.UnsafeEnabled { - mi := &file_friend_friend_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RemoveBlackResp) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RemoveBlackResp) ProtoMessage() {} - -func (x *RemoveBlackResp) ProtoReflect() protoreflect.Message { - mi := &file_friend_friend_proto_msgTypes[13] - 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 RemoveBlackResp.ProtoReflect.Descriptor instead. -func (*RemoveBlackResp) Descriptor() ([]byte, []int) { - return file_friend_friend_proto_rawDescGZIP(), []int{13} -} - -type GetPaginationBlacksReq struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - UserID string `protobuf:"bytes,1,opt,name=userID,proto3" json:"userID"` - Pagination *sdkws.RequestPagination `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination"` -} - -func (x *GetPaginationBlacksReq) Reset() { - *x = GetPaginationBlacksReq{} - if protoimpl.UnsafeEnabled { - mi := &file_friend_friend_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetPaginationBlacksReq) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetPaginationBlacksReq) ProtoMessage() {} - -func (x *GetPaginationBlacksReq) ProtoReflect() protoreflect.Message { - mi := &file_friend_friend_proto_msgTypes[14] - 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 GetPaginationBlacksReq.ProtoReflect.Descriptor instead. -func (*GetPaginationBlacksReq) Descriptor() ([]byte, []int) { - return file_friend_friend_proto_rawDescGZIP(), []int{14} -} - -func (x *GetPaginationBlacksReq) GetUserID() string { - if x != nil { - return x.UserID - } - return "" -} - -func (x *GetPaginationBlacksReq) GetPagination() *sdkws.RequestPagination { - if x != nil { - return x.Pagination - } - return nil -} - -type GetPaginationBlacksResp struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Blacks []*sdkws.BlackInfo `protobuf:"bytes,1,rep,name=blacks,proto3" json:"blacks"` - Total int32 `protobuf:"varint,2,opt,name=total,proto3" json:"total"` -} - -func (x *GetPaginationBlacksResp) Reset() { - *x = GetPaginationBlacksResp{} - if protoimpl.UnsafeEnabled { - mi := &file_friend_friend_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetPaginationBlacksResp) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetPaginationBlacksResp) ProtoMessage() {} - -func (x *GetPaginationBlacksResp) ProtoReflect() protoreflect.Message { - mi := &file_friend_friend_proto_msgTypes[15] - 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 GetPaginationBlacksResp.ProtoReflect.Descriptor instead. -func (*GetPaginationBlacksResp) Descriptor() ([]byte, []int) { - return file_friend_friend_proto_rawDescGZIP(), []int{15} -} - -func (x *GetPaginationBlacksResp) GetBlacks() []*sdkws.BlackInfo { - if x != nil { - return x.Blacks - } - return nil -} - -func (x *GetPaginationBlacksResp) GetTotal() int32 { - if x != nil { - return x.Total - } - return 0 -} - -type IsFriendReq struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - UserID1 string `protobuf:"bytes,1,opt,name=userID1,proto3" json:"userID1"` - UserID2 string `protobuf:"bytes,2,opt,name=userID2,proto3" json:"userID2"` -} - -func (x *IsFriendReq) Reset() { - *x = IsFriendReq{} - if protoimpl.UnsafeEnabled { - mi := &file_friend_friend_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *IsFriendReq) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*IsFriendReq) ProtoMessage() {} - -func (x *IsFriendReq) ProtoReflect() protoreflect.Message { - mi := &file_friend_friend_proto_msgTypes[16] - 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 IsFriendReq.ProtoReflect.Descriptor instead. -func (*IsFriendReq) Descriptor() ([]byte, []int) { - return file_friend_friend_proto_rawDescGZIP(), []int{16} -} - -func (x *IsFriendReq) GetUserID1() string { - if x != nil { - return x.UserID1 - } - return "" -} - -func (x *IsFriendReq) GetUserID2() string { - if x != nil { - return x.UserID2 - } - return "" -} - -type IsFriendResp struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - InUser1Friends bool `protobuf:"varint,1,opt,name=inUser1Friends,proto3" json:"inUser1Friends"` //如果userID2在userID1的好友列表中 true - InUser2Friends bool `protobuf:"varint,2,opt,name=inUser2Friends,proto3" json:"inUser2Friends"` //如果userID1在userID2的好友列表中 true -} - -func (x *IsFriendResp) Reset() { - *x = IsFriendResp{} - if protoimpl.UnsafeEnabled { - mi := &file_friend_friend_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *IsFriendResp) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*IsFriendResp) ProtoMessage() {} - -func (x *IsFriendResp) ProtoReflect() protoreflect.Message { - mi := &file_friend_friend_proto_msgTypes[17] - 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 IsFriendResp.ProtoReflect.Descriptor instead. -func (*IsFriendResp) Descriptor() ([]byte, []int) { - return file_friend_friend_proto_rawDescGZIP(), []int{17} -} - -func (x *IsFriendResp) GetInUser1Friends() bool { - if x != nil { - return x.InUser1Friends - } - return false -} - -func (x *IsFriendResp) GetInUser2Friends() bool { - if x != nil { - return x.InUser2Friends - } - return false -} - -type IsBlackReq struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - UserID1 string `protobuf:"bytes,1,opt,name=userID1,proto3" json:"userID1"` - UserID2 string `protobuf:"bytes,2,opt,name=userID2,proto3" json:"userID2"` -} - -func (x *IsBlackReq) Reset() { - *x = IsBlackReq{} - if protoimpl.UnsafeEnabled { - mi := &file_friend_friend_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *IsBlackReq) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*IsBlackReq) ProtoMessage() {} - -func (x *IsBlackReq) ProtoReflect() protoreflect.Message { - mi := &file_friend_friend_proto_msgTypes[18] - 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 IsBlackReq.ProtoReflect.Descriptor instead. -func (*IsBlackReq) Descriptor() ([]byte, []int) { - return file_friend_friend_proto_rawDescGZIP(), []int{18} -} - -func (x *IsBlackReq) GetUserID1() string { - if x != nil { - return x.UserID1 - } - return "" -} - -func (x *IsBlackReq) GetUserID2() string { - if x != nil { - return x.UserID2 - } - return "" -} - -type IsBlackResp struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - InUser1Blacks bool `protobuf:"varint,1,opt,name=inUser1Blacks,proto3" json:"inUser1Blacks"` //如果userID2在userID1的黑名单列表中 true - InUser2Blacks bool `protobuf:"varint,2,opt,name=inUser2Blacks,proto3" json:"inUser2Blacks"` //如果userID1在userID2的黑名单列表中 true -} - -func (x *IsBlackResp) Reset() { - *x = IsBlackResp{} - if protoimpl.UnsafeEnabled { - mi := &file_friend_friend_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *IsBlackResp) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*IsBlackResp) ProtoMessage() {} - -func (x *IsBlackResp) ProtoReflect() protoreflect.Message { - mi := &file_friend_friend_proto_msgTypes[19] - 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 IsBlackResp.ProtoReflect.Descriptor instead. -func (*IsBlackResp) Descriptor() ([]byte, []int) { - return file_friend_friend_proto_rawDescGZIP(), []int{19} -} - -func (x *IsBlackResp) GetInUser1Blacks() bool { - if x != nil { - return x.InUser1Blacks - } - return false -} - -func (x *IsBlackResp) GetInUser2Blacks() bool { - if x != nil { - return x.InUser2Blacks - } - return false -} - -type DeleteFriendReq struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - OwnerUserID string `protobuf:"bytes,1,opt,name=ownerUserID,proto3" json:"ownerUserID"` - FriendUserID string `protobuf:"bytes,2,opt,name=friendUserID,proto3" json:"friendUserID"` -} - -func (x *DeleteFriendReq) Reset() { - *x = DeleteFriendReq{} - if protoimpl.UnsafeEnabled { - mi := &file_friend_friend_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DeleteFriendReq) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DeleteFriendReq) ProtoMessage() {} - -func (x *DeleteFriendReq) ProtoReflect() protoreflect.Message { - mi := &file_friend_friend_proto_msgTypes[20] - 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 DeleteFriendReq.ProtoReflect.Descriptor instead. -func (*DeleteFriendReq) Descriptor() ([]byte, []int) { - return file_friend_friend_proto_rawDescGZIP(), []int{20} -} - -func (x *DeleteFriendReq) GetOwnerUserID() string { - if x != nil { - return x.OwnerUserID - } - return "" -} - -func (x *DeleteFriendReq) GetFriendUserID() string { - if x != nil { - return x.FriendUserID - } - return "" -} - -type DeleteFriendResp struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *DeleteFriendResp) Reset() { - *x = DeleteFriendResp{} - if protoimpl.UnsafeEnabled { - mi := &file_friend_friend_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DeleteFriendResp) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DeleteFriendResp) ProtoMessage() {} - -func (x *DeleteFriendResp) ProtoReflect() protoreflect.Message { - mi := &file_friend_friend_proto_msgTypes[21] - 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 DeleteFriendResp.ProtoReflect.Descriptor instead. -func (*DeleteFriendResp) Descriptor() ([]byte, []int) { - return file_friend_friend_proto_rawDescGZIP(), []int{21} -} - -// process -type RespondFriendApplyReq struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - FromUserID string `protobuf:"bytes,1,opt,name=fromUserID,proto3" json:"fromUserID"` //主动发起的申请者 - ToUserID string `protobuf:"bytes,2,opt,name=toUserID,proto3" json:"toUserID"` //被动添加者 - HandleResult int32 `protobuf:"varint,3,opt,name=handleResult,proto3" json:"handleResult"` - HandleMsg string `protobuf:"bytes,4,opt,name=handleMsg,proto3" json:"handleMsg"` -} - -func (x *RespondFriendApplyReq) Reset() { - *x = RespondFriendApplyReq{} - if protoimpl.UnsafeEnabled { - mi := &file_friend_friend_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RespondFriendApplyReq) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RespondFriendApplyReq) ProtoMessage() {} - -func (x *RespondFriendApplyReq) ProtoReflect() protoreflect.Message { - mi := &file_friend_friend_proto_msgTypes[22] - 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 RespondFriendApplyReq.ProtoReflect.Descriptor instead. -func (*RespondFriendApplyReq) Descriptor() ([]byte, []int) { - return file_friend_friend_proto_rawDescGZIP(), []int{22} -} - -func (x *RespondFriendApplyReq) GetFromUserID() string { - if x != nil { - return x.FromUserID - } - return "" -} - -func (x *RespondFriendApplyReq) GetToUserID() string { - if x != nil { - return x.ToUserID - } - return "" -} - -func (x *RespondFriendApplyReq) GetHandleResult() int32 { - if x != nil { - return x.HandleResult - } - return 0 -} - -func (x *RespondFriendApplyReq) GetHandleMsg() string { - if x != nil { - return x.HandleMsg - } - return "" -} - -type RespondFriendApplyResp struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *RespondFriendApplyResp) Reset() { - *x = RespondFriendApplyResp{} - if protoimpl.UnsafeEnabled { - mi := &file_friend_friend_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RespondFriendApplyResp) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RespondFriendApplyResp) ProtoMessage() {} - -func (x *RespondFriendApplyResp) ProtoReflect() protoreflect.Message { - mi := &file_friend_friend_proto_msgTypes[23] - 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 RespondFriendApplyResp.ProtoReflect.Descriptor instead. -func (*RespondFriendApplyResp) Descriptor() ([]byte, []int) { - return file_friend_friend_proto_rawDescGZIP(), []int{23} -} - -type SetFriendRemarkReq struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - OwnerUserID string `protobuf:"bytes,1,opt,name=ownerUserID,proto3" json:"ownerUserID"` - FriendUserID string `protobuf:"bytes,2,opt,name=friendUserID,proto3" json:"friendUserID"` - Remark string `protobuf:"bytes,3,opt,name=remark,proto3" json:"remark"` -} - -func (x *SetFriendRemarkReq) Reset() { - *x = SetFriendRemarkReq{} - if protoimpl.UnsafeEnabled { - mi := &file_friend_friend_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SetFriendRemarkReq) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SetFriendRemarkReq) ProtoMessage() {} - -func (x *SetFriendRemarkReq) ProtoReflect() protoreflect.Message { - mi := &file_friend_friend_proto_msgTypes[24] - 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 SetFriendRemarkReq.ProtoReflect.Descriptor instead. -func (*SetFriendRemarkReq) Descriptor() ([]byte, []int) { - return file_friend_friend_proto_rawDescGZIP(), []int{24} -} - -func (x *SetFriendRemarkReq) GetOwnerUserID() string { - if x != nil { - return x.OwnerUserID - } - return "" -} - -func (x *SetFriendRemarkReq) GetFriendUserID() string { - if x != nil { - return x.FriendUserID - } - return "" -} - -func (x *SetFriendRemarkReq) GetRemark() string { - if x != nil { - return x.Remark - } - return "" -} - -type SetFriendRemarkResp struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *SetFriendRemarkResp) Reset() { - *x = SetFriendRemarkResp{} - if protoimpl.UnsafeEnabled { - mi := &file_friend_friend_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SetFriendRemarkResp) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SetFriendRemarkResp) ProtoMessage() {} - -func (x *SetFriendRemarkResp) ProtoReflect() protoreflect.Message { - mi := &file_friend_friend_proto_msgTypes[25] - 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 SetFriendRemarkResp.ProtoReflect.Descriptor instead. -func (*SetFriendRemarkResp) Descriptor() ([]byte, []int) { - return file_friend_friend_proto_rawDescGZIP(), []int{25} -} - -type GetPaginationFriendsApplyFromReq struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - UserID string `protobuf:"bytes,1,opt,name=userID,proto3" json:"userID"` - Pagination *sdkws.RequestPagination `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination"` -} - -func (x *GetPaginationFriendsApplyFromReq) Reset() { - *x = GetPaginationFriendsApplyFromReq{} - if protoimpl.UnsafeEnabled { - mi := &file_friend_friend_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetPaginationFriendsApplyFromReq) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetPaginationFriendsApplyFromReq) ProtoMessage() {} - -func (x *GetPaginationFriendsApplyFromReq) ProtoReflect() protoreflect.Message { - mi := &file_friend_friend_proto_msgTypes[26] - 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 GetPaginationFriendsApplyFromReq.ProtoReflect.Descriptor instead. -func (*GetPaginationFriendsApplyFromReq) Descriptor() ([]byte, []int) { - return file_friend_friend_proto_rawDescGZIP(), []int{26} -} - -func (x *GetPaginationFriendsApplyFromReq) GetUserID() string { - if x != nil { - return x.UserID - } - return "" -} - -func (x *GetPaginationFriendsApplyFromReq) GetPagination() *sdkws.RequestPagination { - if x != nil { - return x.Pagination - } - return nil -} - -type GetPaginationFriendsApplyFromResp struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - FriendRequests []*sdkws.FriendRequest `protobuf:"bytes,1,rep,name=friendRequests,proto3" json:"friendRequests"` - Total int32 `protobuf:"varint,2,opt,name=total,proto3" json:"total"` -} - -func (x *GetPaginationFriendsApplyFromResp) Reset() { - *x = GetPaginationFriendsApplyFromResp{} - if protoimpl.UnsafeEnabled { - mi := &file_friend_friend_proto_msgTypes[27] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetPaginationFriendsApplyFromResp) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetPaginationFriendsApplyFromResp) ProtoMessage() {} - -func (x *GetPaginationFriendsApplyFromResp) ProtoReflect() protoreflect.Message { - mi := &file_friend_friend_proto_msgTypes[27] - 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 GetPaginationFriendsApplyFromResp.ProtoReflect.Descriptor instead. -func (*GetPaginationFriendsApplyFromResp) Descriptor() ([]byte, []int) { - return file_friend_friend_proto_rawDescGZIP(), []int{27} -} - -func (x *GetPaginationFriendsApplyFromResp) GetFriendRequests() []*sdkws.FriendRequest { - if x != nil { - return x.FriendRequests - } - return nil -} - -func (x *GetPaginationFriendsApplyFromResp) GetTotal() int32 { - if x != nil { - return x.Total - } - return 0 -} - -type GetFriendIDsReq struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - UserID string `protobuf:"bytes,1,opt,name=userID,proto3" json:"userID"` -} - -func (x *GetFriendIDsReq) Reset() { - *x = GetFriendIDsReq{} - if protoimpl.UnsafeEnabled { - mi := &file_friend_friend_proto_msgTypes[28] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetFriendIDsReq) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetFriendIDsReq) ProtoMessage() {} - -func (x *GetFriendIDsReq) ProtoReflect() protoreflect.Message { - mi := &file_friend_friend_proto_msgTypes[28] - 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 GetFriendIDsReq.ProtoReflect.Descriptor instead. -func (*GetFriendIDsReq) Descriptor() ([]byte, []int) { - return file_friend_friend_proto_rawDescGZIP(), []int{28} -} - -func (x *GetFriendIDsReq) GetUserID() string { - if x != nil { - return x.UserID - } - return "" -} - -type GetFriendIDsResp struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - FriendIDs []string `protobuf:"bytes,1,rep,name=friendIDs,proto3" json:"friendIDs"` -} - -func (x *GetFriendIDsResp) Reset() { - *x = GetFriendIDsResp{} - if protoimpl.UnsafeEnabled { - mi := &file_friend_friend_proto_msgTypes[29] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetFriendIDsResp) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetFriendIDsResp) ProtoMessage() {} - -func (x *GetFriendIDsResp) ProtoReflect() protoreflect.Message { - mi := &file_friend_friend_proto_msgTypes[29] - 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 GetFriendIDsResp.ProtoReflect.Descriptor instead. -func (*GetFriendIDsResp) Descriptor() ([]byte, []int) { - return file_friend_friend_proto_rawDescGZIP(), []int{29} -} - -func (x *GetFriendIDsResp) GetFriendIDs() []string { - if x != nil { - return x.FriendIDs - } - return nil -} - -var File_friend_friend_proto protoreflect.FileDescriptor - -var file_friend_friend_proto_rawDesc = []byte{ - 0x0a, 0x13, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x2f, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x13, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, - 0x76, 0x65, 0x72, 0x2e, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x1a, 0x11, 0x73, 0x64, 0x6b, 0x77, - 0x73, 0x2f, 0x73, 0x64, 0x6b, 0x77, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x78, 0x0a, - 0x17, 0x67, 0x65, 0x74, 0x50, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x46, 0x72, - 0x69, 0x65, 0x6e, 0x64, 0x73, 0x52, 0x65, 0x71, 0x12, 0x45, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, - 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x4f, - 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 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, 0x12, - 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x44, 0x22, 0x72, 0x0a, 0x18, 0x67, 0x65, 0x74, 0x50, 0x61, - 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x73, 0x52, - 0x65, 0x73, 0x70, 0x12, 0x40, 0x0a, 0x0b, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x73, 0x49, 0x6e, - 0x66, 0x6f, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, - 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x73, 0x64, 0x6b, 0x77, 0x73, 0x2e, 0x46, 0x72, - 0x69, 0x65, 0x6e, 0x64, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0b, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, - 0x73, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x22, 0x79, 0x0a, 0x13, 0x61, - 0x70, 0x70, 0x6c, 0x79, 0x54, 0x6f, 0x41, 0x64, 0x64, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x52, - 0x65, 0x71, 0x12, 0x1e, 0x0a, 0x0a, 0x66, 0x72, 0x6f, 0x6d, 0x55, 0x73, 0x65, 0x72, 0x49, 0x44, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x66, 0x72, 0x6f, 0x6d, 0x55, 0x73, 0x65, 0x72, - 0x49, 0x44, 0x12, 0x1a, 0x0a, 0x08, 0x74, 0x6f, 0x55, 0x73, 0x65, 0x72, 0x49, 0x44, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x74, 0x6f, 0x55, 0x73, 0x65, 0x72, 0x49, 0x44, 0x12, 0x16, - 0x0a, 0x06, 0x72, 0x65, 0x71, 0x4d, 0x73, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, - 0x72, 0x65, 0x71, 0x4d, 0x73, 0x67, 0x12, 0x0e, 0x0a, 0x02, 0x65, 0x78, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x02, 0x65, 0x78, 0x22, 0x16, 0x0a, 0x14, 0x61, 0x70, 0x70, 0x6c, 0x79, 0x54, - 0x6f, 0x41, 0x64, 0x64, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x70, 0x22, 0x59, - 0x0a, 0x0f, 0x69, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x52, 0x65, - 0x71, 0x12, 0x20, 0x0a, 0x0b, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x55, 0x73, 0x65, 0x72, 0x49, 0x44, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x55, 0x73, 0x65, - 0x72, 0x49, 0x44, 0x12, 0x24, 0x0a, 0x0d, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x55, 0x73, 0x65, - 0x72, 0x49, 0x44, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0d, 0x66, 0x72, 0x69, 0x65, - 0x6e, 0x64, 0x55, 0x73, 0x65, 0x72, 0x49, 0x44, 0x73, 0x22, 0x12, 0x0a, 0x10, 0x69, 0x6d, 0x70, - 0x6f, 0x72, 0x74, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x70, 0x22, 0x7f, 0x0a, - 0x1e, 0x67, 0x65, 0x74, 0x50, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x46, 0x72, - 0x69, 0x65, 0x6e, 0x64, 0x73, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x54, 0x6f, 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, 0x12, 0x45, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x4f, 0x70, - 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 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, 0x82, - 0x01, 0x0a, 0x1f, 0x67, 0x65, 0x74, 0x50, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x73, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x54, 0x6f, 0x52, 0x65, - 0x73, 0x70, 0x12, 0x49, 0x0a, 0x0e, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x4f, 0x70, 0x65, - 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x73, 0x64, 0x6b, 0x77, 0x73, 0x2e, - 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x0e, 0x46, - 0x72, 0x69, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x12, 0x14, 0x0a, - 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x74, 0x6f, - 0x74, 0x61, 0x6c, 0x22, 0x61, 0x0a, 0x17, 0x67, 0x65, 0x74, 0x44, 0x65, 0x73, 0x69, 0x67, 0x6e, - 0x61, 0x74, 0x65, 0x64, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x73, 0x52, 0x65, 0x71, 0x12, 0x20, - 0x0a, 0x0b, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x55, 0x73, 0x65, 0x72, 0x49, 0x44, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x55, 0x73, 0x65, 0x72, 0x49, 0x44, - 0x12, 0x24, 0x0a, 0x0d, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x55, 0x73, 0x65, 0x72, 0x49, 0x44, - 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0d, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x55, - 0x73, 0x65, 0x72, 0x49, 0x44, 0x73, 0x22, 0x5c, 0x0a, 0x18, 0x67, 0x65, 0x74, 0x44, 0x65, 0x73, - 0x69, 0x67, 0x6e, 0x61, 0x74, 0x65, 0x64, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x73, 0x52, 0x65, - 0x73, 0x70, 0x12, 0x40, 0x0a, 0x0b, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x73, 0x49, 0x6e, 0x66, - 0x6f, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, - 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x73, 0x64, 0x6b, 0x77, 0x73, 0x2e, 0x46, 0x72, 0x69, - 0x65, 0x6e, 0x64, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0b, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x73, - 0x49, 0x6e, 0x66, 0x6f, 0x22, 0x51, 0x0a, 0x0b, 0x61, 0x64, 0x64, 0x42, 0x6c, 0x61, 0x63, 0x6b, - 0x52, 0x65, 0x71, 0x12, 0x20, 0x0a, 0x0b, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x55, 0x73, 0x65, 0x72, - 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x55, - 0x73, 0x65, 0x72, 0x49, 0x44, 0x12, 0x20, 0x0a, 0x0b, 0x62, 0x6c, 0x61, 0x63, 0x6b, 0x55, 0x73, - 0x65, 0x72, 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x62, 0x6c, 0x61, 0x63, - 0x6b, 0x55, 0x73, 0x65, 0x72, 0x49, 0x44, 0x22, 0x0e, 0x0a, 0x0c, 0x61, 0x64, 0x64, 0x42, 0x6c, - 0x61, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x22, 0x54, 0x0a, 0x0e, 0x72, 0x65, 0x6d, 0x6f, 0x76, - 0x65, 0x42, 0x6c, 0x61, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x12, 0x20, 0x0a, 0x0b, 0x6f, 0x77, 0x6e, - 0x65, 0x72, 0x55, 0x73, 0x65, 0x72, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, - 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x55, 0x73, 0x65, 0x72, 0x49, 0x44, 0x12, 0x20, 0x0a, 0x0b, 0x62, - 0x6c, 0x61, 0x63, 0x6b, 0x55, 0x73, 0x65, 0x72, 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0b, 0x62, 0x6c, 0x61, 0x63, 0x6b, 0x55, 0x73, 0x65, 0x72, 0x49, 0x44, 0x22, 0x11, 0x0a, - 0x0f, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x42, 0x6c, 0x61, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, - 0x22, 0x77, 0x0a, 0x16, 0x67, 0x65, 0x74, 0x50, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x42, 0x6c, 0x61, 0x63, 0x6b, 0x73, 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, 0x12, 0x45, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, - 0x65, 0x72, 0x76, 0x65, 0x72, 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, 0x66, 0x0a, 0x17, 0x67, 0x65, 0x74, - 0x50, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x6c, 0x61, 0x63, 0x6b, 0x73, - 0x52, 0x65, 0x73, 0x70, 0x12, 0x35, 0x0a, 0x06, 0x62, 0x6c, 0x61, 0x63, 0x6b, 0x73, 0x18, 0x01, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, - 0x76, 0x65, 0x72, 0x2e, 0x73, 0x64, 0x6b, 0x77, 0x73, 0x2e, 0x42, 0x6c, 0x61, 0x63, 0x6b, 0x49, - 0x6e, 0x66, 0x6f, 0x52, 0x06, 0x62, 0x6c, 0x61, 0x63, 0x6b, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x74, - 0x6f, 0x74, 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x74, 0x6f, 0x74, 0x61, - 0x6c, 0x22, 0x41, 0x0a, 0x0b, 0x69, 0x73, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x71, - 0x12, 0x18, 0x0a, 0x07, 0x75, 0x73, 0x65, 0x72, 0x49, 0x44, 0x31, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x07, 0x75, 0x73, 0x65, 0x72, 0x49, 0x44, 0x31, 0x12, 0x18, 0x0a, 0x07, 0x75, 0x73, - 0x65, 0x72, 0x49, 0x44, 0x32, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x75, 0x73, 0x65, - 0x72, 0x49, 0x44, 0x32, 0x22, 0x5e, 0x0a, 0x0c, 0x69, 0x73, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, - 0x52, 0x65, 0x73, 0x70, 0x12, 0x26, 0x0a, 0x0e, 0x69, 0x6e, 0x55, 0x73, 0x65, 0x72, 0x31, 0x46, - 0x72, 0x69, 0x65, 0x6e, 0x64, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x69, 0x6e, - 0x55, 0x73, 0x65, 0x72, 0x31, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x73, 0x12, 0x26, 0x0a, 0x0e, - 0x69, 0x6e, 0x55, 0x73, 0x65, 0x72, 0x32, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x73, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x69, 0x6e, 0x55, 0x73, 0x65, 0x72, 0x32, 0x46, 0x72, 0x69, - 0x65, 0x6e, 0x64, 0x73, 0x22, 0x40, 0x0a, 0x0a, 0x69, 0x73, 0x42, 0x6c, 0x61, 0x63, 0x6b, 0x52, - 0x65, 0x71, 0x12, 0x18, 0x0a, 0x07, 0x75, 0x73, 0x65, 0x72, 0x49, 0x44, 0x31, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x07, 0x75, 0x73, 0x65, 0x72, 0x49, 0x44, 0x31, 0x12, 0x18, 0x0a, 0x07, - 0x75, 0x73, 0x65, 0x72, 0x49, 0x44, 0x32, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x75, - 0x73, 0x65, 0x72, 0x49, 0x44, 0x32, 0x22, 0x59, 0x0a, 0x0b, 0x69, 0x73, 0x42, 0x6c, 0x61, 0x63, - 0x6b, 0x52, 0x65, 0x73, 0x70, 0x12, 0x24, 0x0a, 0x0d, 0x69, 0x6e, 0x55, 0x73, 0x65, 0x72, 0x31, - 0x42, 0x6c, 0x61, 0x63, 0x6b, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x69, 0x6e, - 0x55, 0x73, 0x65, 0x72, 0x31, 0x42, 0x6c, 0x61, 0x63, 0x6b, 0x73, 0x12, 0x24, 0x0a, 0x0d, 0x69, - 0x6e, 0x55, 0x73, 0x65, 0x72, 0x32, 0x42, 0x6c, 0x61, 0x63, 0x6b, 0x73, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x08, 0x52, 0x0d, 0x69, 0x6e, 0x55, 0x73, 0x65, 0x72, 0x32, 0x42, 0x6c, 0x61, 0x63, 0x6b, - 0x73, 0x22, 0x57, 0x0a, 0x0f, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x46, 0x72, 0x69, 0x65, 0x6e, - 0x64, 0x52, 0x65, 0x71, 0x12, 0x20, 0x0a, 0x0b, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x55, 0x73, 0x65, - 0x72, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6f, 0x77, 0x6e, 0x65, 0x72, - 0x55, 0x73, 0x65, 0x72, 0x49, 0x44, 0x12, 0x22, 0x0a, 0x0c, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, - 0x55, 0x73, 0x65, 0x72, 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x66, 0x72, - 0x69, 0x65, 0x6e, 0x64, 0x55, 0x73, 0x65, 0x72, 0x49, 0x44, 0x22, 0x12, 0x0a, 0x10, 0x64, 0x65, - 0x6c, 0x65, 0x74, 0x65, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x70, 0x22, 0x95, - 0x01, 0x0a, 0x15, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x64, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, - 0x41, 0x70, 0x70, 0x6c, 0x79, 0x52, 0x65, 0x71, 0x12, 0x1e, 0x0a, 0x0a, 0x66, 0x72, 0x6f, 0x6d, - 0x55, 0x73, 0x65, 0x72, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x66, 0x72, - 0x6f, 0x6d, 0x55, 0x73, 0x65, 0x72, 0x49, 0x44, 0x12, 0x1a, 0x0a, 0x08, 0x74, 0x6f, 0x55, 0x73, - 0x65, 0x72, 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x74, 0x6f, 0x55, 0x73, - 0x65, 0x72, 0x49, 0x44, 0x12, 0x22, 0x0a, 0x0c, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x52, 0x65, - 0x73, 0x75, 0x6c, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, 0x68, 0x61, 0x6e, 0x64, - 0x6c, 0x65, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x68, 0x61, 0x6e, 0x64, - 0x6c, 0x65, 0x4d, 0x73, 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x68, 0x61, 0x6e, - 0x64, 0x6c, 0x65, 0x4d, 0x73, 0x67, 0x22, 0x18, 0x0a, 0x16, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x64, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x52, 0x65, 0x73, 0x70, - 0x22, 0x72, 0x0a, 0x12, 0x73, 0x65, 0x74, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x6d, - 0x61, 0x72, 0x6b, 0x52, 0x65, 0x71, 0x12, 0x20, 0x0a, 0x0b, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x55, - 0x73, 0x65, 0x72, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6f, 0x77, 0x6e, - 0x65, 0x72, 0x55, 0x73, 0x65, 0x72, 0x49, 0x44, 0x12, 0x22, 0x0a, 0x0c, 0x66, 0x72, 0x69, 0x65, - 0x6e, 0x64, 0x55, 0x73, 0x65, 0x72, 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, - 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x55, 0x73, 0x65, 0x72, 0x49, 0x44, 0x12, 0x16, 0x0a, 0x06, - 0x72, 0x65, 0x6d, 0x61, 0x72, 0x6b, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x65, - 0x6d, 0x61, 0x72, 0x6b, 0x22, 0x15, 0x0a, 0x13, 0x73, 0x65, 0x74, 0x46, 0x72, 0x69, 0x65, 0x6e, - 0x64, 0x52, 0x65, 0x6d, 0x61, 0x72, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x22, 0x81, 0x01, 0x0a, 0x20, - 0x67, 0x65, 0x74, 0x50, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x46, 0x72, 0x69, - 0x65, 0x6e, 0x64, 0x73, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x46, 0x72, 0x6f, 0x6d, 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, 0x12, 0x45, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, - 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x4f, - 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 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, - 0x84, 0x01, 0x0a, 0x21, 0x67, 0x65, 0x74, 0x50, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x73, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x46, 0x72, 0x6f, - 0x6d, 0x52, 0x65, 0x73, 0x70, 0x12, 0x49, 0x0a, 0x0e, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, - 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x73, 0x64, 0x6b, - 0x77, 0x73, 0x2e, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x52, 0x0e, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, - 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, - 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x22, 0x29, 0x0a, 0x0f, 0x67, 0x65, 0x74, 0x46, 0x72, 0x69, - 0x65, 0x6e, 0x64, 0x49, 0x44, 0x73, 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, 0x30, 0x0a, 0x10, 0x67, 0x65, 0x74, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x49, 0x44, - 0x73, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1c, 0x0a, 0x09, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x49, - 0x44, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, - 0x49, 0x44, 0x73, 0x32, 0xa0, 0x0c, 0x0a, 0x06, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x12, 0x67, - 0x0a, 0x10, 0x61, 0x70, 0x70, 0x6c, 0x79, 0x54, 0x6f, 0x41, 0x64, 0x64, 0x46, 0x72, 0x69, 0x65, - 0x6e, 0x64, 0x12, 0x28, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, - 0x72, 0x2e, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x2e, 0x61, 0x70, 0x70, 0x6c, 0x79, 0x54, 0x6f, - 0x41, 0x64, 0x64, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x1a, 0x29, 0x2e, 0x4f, - 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x66, 0x72, 0x69, 0x65, - 0x6e, 0x64, 0x2e, 0x61, 0x70, 0x70, 0x6c, 0x79, 0x54, 0x6f, 0x41, 0x64, 0x64, 0x46, 0x72, 0x69, - 0x65, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x70, 0x12, 0x88, 0x01, 0x0a, 0x1b, 0x67, 0x65, 0x74, 0x50, - 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x73, - 0x41, 0x70, 0x70, 0x6c, 0x79, 0x54, 0x6f, 0x12, 0x33, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, - 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x2e, 0x67, 0x65, - 0x74, 0x50, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x46, 0x72, 0x69, 0x65, 0x6e, - 0x64, 0x73, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x54, 0x6f, 0x52, 0x65, 0x71, 0x1a, 0x34, 0x2e, 0x4f, - 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x66, 0x72, 0x69, 0x65, - 0x6e, 0x64, 0x2e, 0x67, 0x65, 0x74, 0x50, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x73, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x54, 0x6f, 0x52, 0x65, - 0x73, 0x70, 0x12, 0x8e, 0x01, 0x0a, 0x1d, 0x67, 0x65, 0x74, 0x50, 0x61, 0x67, 0x69, 0x6e, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x73, 0x41, 0x70, 0x70, 0x6c, 0x79, - 0x46, 0x72, 0x6f, 0x6d, 0x12, 0x35, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, - 0x76, 0x65, 0x72, 0x2e, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x2e, 0x67, 0x65, 0x74, 0x50, 0x61, - 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x73, 0x41, - 0x70, 0x70, 0x6c, 0x79, 0x46, 0x72, 0x6f, 0x6d, 0x52, 0x65, 0x71, 0x1a, 0x36, 0x2e, 0x4f, 0x70, - 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x66, 0x72, 0x69, 0x65, 0x6e, - 0x64, 0x2e, 0x67, 0x65, 0x74, 0x50, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x46, - 0x72, 0x69, 0x65, 0x6e, 0x64, 0x73, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x46, 0x72, 0x6f, 0x6d, 0x52, - 0x65, 0x73, 0x70, 0x12, 0x4f, 0x0a, 0x08, 0x61, 0x64, 0x64, 0x42, 0x6c, 0x61, 0x63, 0x6b, 0x12, - 0x20, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x66, - 0x72, 0x69, 0x65, 0x6e, 0x64, 0x2e, 0x61, 0x64, 0x64, 0x42, 0x6c, 0x61, 0x63, 0x6b, 0x52, 0x65, - 0x71, 0x1a, 0x21, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, - 0x2e, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x2e, 0x61, 0x64, 0x64, 0x42, 0x6c, 0x61, 0x63, 0x6b, - 0x52, 0x65, 0x73, 0x70, 0x12, 0x58, 0x0a, 0x0b, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x42, 0x6c, - 0x61, 0x63, 0x6b, 0x12, 0x23, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, - 0x65, 0x72, 0x2e, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x2e, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, - 0x42, 0x6c, 0x61, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x1a, 0x24, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, - 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x2e, 0x72, - 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x42, 0x6c, 0x61, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x12, 0x4f, - 0x0a, 0x08, 0x69, 0x73, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x12, 0x20, 0x2e, 0x4f, 0x70, 0x65, - 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, - 0x2e, 0x69, 0x73, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x1a, 0x21, 0x2e, 0x4f, - 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x66, 0x72, 0x69, 0x65, - 0x6e, 0x64, 0x2e, 0x69, 0x73, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x70, 0x12, - 0x4c, 0x0a, 0x07, 0x69, 0x73, 0x42, 0x6c, 0x61, 0x63, 0x6b, 0x12, 0x1f, 0x2e, 0x4f, 0x70, 0x65, - 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, - 0x2e, 0x69, 0x73, 0x42, 0x6c, 0x61, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x1a, 0x20, 0x2e, 0x4f, 0x70, - 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x66, 0x72, 0x69, 0x65, 0x6e, - 0x64, 0x2e, 0x69, 0x73, 0x42, 0x6c, 0x61, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x12, 0x70, 0x0a, - 0x13, 0x67, 0x65, 0x74, 0x50, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x6c, - 0x61, 0x63, 0x6b, 0x73, 0x12, 0x2b, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, - 0x76, 0x65, 0x72, 0x2e, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x2e, 0x67, 0x65, 0x74, 0x50, 0x61, - 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x6c, 0x61, 0x63, 0x6b, 0x73, 0x52, 0x65, - 0x71, 0x1a, 0x2c, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, - 0x2e, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x2e, 0x67, 0x65, 0x74, 0x50, 0x61, 0x67, 0x69, 0x6e, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x6c, 0x61, 0x63, 0x6b, 0x73, 0x52, 0x65, 0x73, 0x70, 0x12, - 0x5b, 0x0a, 0x0c, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x12, - 0x24, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x66, - 0x72, 0x69, 0x65, 0x6e, 0x64, 0x2e, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x46, 0x72, 0x69, 0x65, - 0x6e, 0x64, 0x52, 0x65, 0x71, 0x1a, 0x25, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, - 0x72, 0x76, 0x65, 0x72, 0x2e, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x2e, 0x64, 0x65, 0x6c, 0x65, - 0x74, 0x65, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x70, 0x12, 0x6d, 0x0a, 0x12, - 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x64, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x41, 0x70, 0x70, - 0x6c, 0x79, 0x12, 0x2a, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, - 0x72, 0x2e, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x2e, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x64, - 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x52, 0x65, 0x71, 0x1a, 0x2b, - 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x66, 0x72, - 0x69, 0x65, 0x6e, 0x64, 0x2e, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x64, 0x46, 0x72, 0x69, 0x65, - 0x6e, 0x64, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x52, 0x65, 0x73, 0x70, 0x12, 0x64, 0x0a, 0x0f, 0x73, - 0x65, 0x74, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x6d, 0x61, 0x72, 0x6b, 0x12, 0x27, - 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x66, 0x72, - 0x69, 0x65, 0x6e, 0x64, 0x2e, 0x73, 0x65, 0x74, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x52, 0x65, - 0x6d, 0x61, 0x72, 0x6b, 0x52, 0x65, 0x71, 0x1a, 0x28, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, - 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x2e, 0x73, 0x65, - 0x74, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x6d, 0x61, 0x72, 0x6b, 0x52, 0x65, 0x73, - 0x70, 0x12, 0x5c, 0x0a, 0x0d, 0x69, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x46, 0x72, 0x69, 0x65, 0x6e, - 0x64, 0x73, 0x12, 0x24, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, - 0x72, 0x2e, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x2e, 0x69, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x46, - 0x72, 0x69, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x1a, 0x25, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, - 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x2e, 0x69, - 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x70, 0x12, - 0x73, 0x0a, 0x14, 0x67, 0x65, 0x74, 0x44, 0x65, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x65, 0x64, - 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x73, 0x12, 0x2c, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, - 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x2e, 0x67, 0x65, - 0x74, 0x44, 0x65, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x65, 0x64, 0x46, 0x72, 0x69, 0x65, 0x6e, - 0x64, 0x73, 0x52, 0x65, 0x71, 0x1a, 0x2d, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, - 0x72, 0x76, 0x65, 0x72, 0x2e, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x2e, 0x67, 0x65, 0x74, 0x44, - 0x65, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x65, 0x64, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x73, - 0x52, 0x65, 0x73, 0x70, 0x12, 0x73, 0x0a, 0x14, 0x67, 0x65, 0x74, 0x50, 0x61, 0x67, 0x69, 0x6e, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x73, 0x12, 0x2c, 0x2e, 0x4f, - 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x66, 0x72, 0x69, 0x65, - 0x6e, 0x64, 0x2e, 0x67, 0x65, 0x74, 0x50, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x73, 0x52, 0x65, 0x71, 0x1a, 0x2d, 0x2e, 0x4f, 0x70, 0x65, - 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, - 0x2e, 0x67, 0x65, 0x74, 0x50, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x46, 0x72, - 0x69, 0x65, 0x6e, 0x64, 0x73, 0x52, 0x65, 0x73, 0x70, 0x12, 0x5b, 0x0a, 0x0c, 0x67, 0x65, 0x74, - 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x49, 0x44, 0x73, 0x12, 0x24, 0x2e, 0x4f, 0x70, 0x65, 0x6e, - 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x2e, - 0x67, 0x65, 0x74, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x49, 0x44, 0x73, 0x52, 0x65, 0x71, 0x1a, - 0x25, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x66, - 0x72, 0x69, 0x65, 0x6e, 0x64, 0x2e, 0x67, 0x65, 0x74, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x49, - 0x44, 0x73, 0x52, 0x65, 0x73, 0x70, 0x42, 0x36, 0x5a, 0x34, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, - 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x44, 0x4b, 0x2f, 0x4f, - 0x70, 0x65, 0x6e, 0x2d, 0x49, 0x4d, 0x2d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2f, 0x70, 0x6b, - 0x67, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x62, 0x06, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_friend_friend_proto_rawDescOnce sync.Once - file_friend_friend_proto_rawDescData = file_friend_friend_proto_rawDesc -) - -func file_friend_friend_proto_rawDescGZIP() []byte { - file_friend_friend_proto_rawDescOnce.Do(func() { - file_friend_friend_proto_rawDescData = protoimpl.X.CompressGZIP(file_friend_friend_proto_rawDescData) - }) - return file_friend_friend_proto_rawDescData -} - -var file_friend_friend_proto_msgTypes = make([]protoimpl.MessageInfo, 30) -var file_friend_friend_proto_goTypes = []interface{}{ - (*GetPaginationFriendsReq)(nil), // 0: OpenIMServer.friend.getPaginationFriendsReq - (*GetPaginationFriendsResp)(nil), // 1: OpenIMServer.friend.getPaginationFriendsResp - (*ApplyToAddFriendReq)(nil), // 2: OpenIMServer.friend.applyToAddFriendReq - (*ApplyToAddFriendResp)(nil), // 3: OpenIMServer.friend.applyToAddFriendResp - (*ImportFriendReq)(nil), // 4: OpenIMServer.friend.importFriendReq - (*ImportFriendResp)(nil), // 5: OpenIMServer.friend.importFriendResp - (*GetPaginationFriendsApplyToReq)(nil), // 6: OpenIMServer.friend.getPaginationFriendsApplyToReq - (*GetPaginationFriendsApplyToResp)(nil), // 7: OpenIMServer.friend.getPaginationFriendsApplyToResp - (*GetDesignatedFriendsReq)(nil), // 8: OpenIMServer.friend.getDesignatedFriendsReq - (*GetDesignatedFriendsResp)(nil), // 9: OpenIMServer.friend.getDesignatedFriendsResp - (*AddBlackReq)(nil), // 10: OpenIMServer.friend.addBlackReq - (*AddBlackResp)(nil), // 11: OpenIMServer.friend.addBlackResp - (*RemoveBlackReq)(nil), // 12: OpenIMServer.friend.removeBlackReq - (*RemoveBlackResp)(nil), // 13: OpenIMServer.friend.removeBlackResp - (*GetPaginationBlacksReq)(nil), // 14: OpenIMServer.friend.getPaginationBlacksReq - (*GetPaginationBlacksResp)(nil), // 15: OpenIMServer.friend.getPaginationBlacksResp - (*IsFriendReq)(nil), // 16: OpenIMServer.friend.isFriendReq - (*IsFriendResp)(nil), // 17: OpenIMServer.friend.isFriendResp - (*IsBlackReq)(nil), // 18: OpenIMServer.friend.isBlackReq - (*IsBlackResp)(nil), // 19: OpenIMServer.friend.isBlackResp - (*DeleteFriendReq)(nil), // 20: OpenIMServer.friend.deleteFriendReq - (*DeleteFriendResp)(nil), // 21: OpenIMServer.friend.deleteFriendResp - (*RespondFriendApplyReq)(nil), // 22: OpenIMServer.friend.respondFriendApplyReq - (*RespondFriendApplyResp)(nil), // 23: OpenIMServer.friend.respondFriendApplyResp - (*SetFriendRemarkReq)(nil), // 24: OpenIMServer.friend.setFriendRemarkReq - (*SetFriendRemarkResp)(nil), // 25: OpenIMServer.friend.setFriendRemarkResp - (*GetPaginationFriendsApplyFromReq)(nil), // 26: OpenIMServer.friend.getPaginationFriendsApplyFromReq - (*GetPaginationFriendsApplyFromResp)(nil), // 27: OpenIMServer.friend.getPaginationFriendsApplyFromResp - (*GetFriendIDsReq)(nil), // 28: OpenIMServer.friend.getFriendIDsReq - (*GetFriendIDsResp)(nil), // 29: OpenIMServer.friend.getFriendIDsResp - (*sdkws.RequestPagination)(nil), // 30: OpenIMServer.sdkws.RequestPagination - (*sdkws.FriendInfo)(nil), // 31: OpenIMServer.sdkws.FriendInfo - (*sdkws.FriendRequest)(nil), // 32: OpenIMServer.sdkws.FriendRequest - (*sdkws.BlackInfo)(nil), // 33: OpenIMServer.sdkws.BlackInfo -} -var file_friend_friend_proto_depIdxs = []int32{ - 30, // 0: OpenIMServer.friend.getPaginationFriendsReq.pagination:type_name -> OpenIMServer.sdkws.RequestPagination - 31, // 1: OpenIMServer.friend.getPaginationFriendsResp.friendsInfo:type_name -> OpenIMServer.sdkws.FriendInfo - 30, // 2: OpenIMServer.friend.getPaginationFriendsApplyToReq.pagination:type_name -> OpenIMServer.sdkws.RequestPagination - 32, // 3: OpenIMServer.friend.getPaginationFriendsApplyToResp.FriendRequests:type_name -> OpenIMServer.sdkws.FriendRequest - 31, // 4: OpenIMServer.friend.getDesignatedFriendsResp.friendsInfo:type_name -> OpenIMServer.sdkws.FriendInfo - 30, // 5: OpenIMServer.friend.getPaginationBlacksReq.pagination:type_name -> OpenIMServer.sdkws.RequestPagination - 33, // 6: OpenIMServer.friend.getPaginationBlacksResp.blacks:type_name -> OpenIMServer.sdkws.BlackInfo - 30, // 7: OpenIMServer.friend.getPaginationFriendsApplyFromReq.pagination:type_name -> OpenIMServer.sdkws.RequestPagination - 32, // 8: OpenIMServer.friend.getPaginationFriendsApplyFromResp.friendRequests:type_name -> OpenIMServer.sdkws.FriendRequest - 2, // 9: OpenIMServer.friend.friend.applyToAddFriend:input_type -> OpenIMServer.friend.applyToAddFriendReq - 6, // 10: OpenIMServer.friend.friend.getPaginationFriendsApplyTo:input_type -> OpenIMServer.friend.getPaginationFriendsApplyToReq - 26, // 11: OpenIMServer.friend.friend.getPaginationFriendsApplyFrom:input_type -> OpenIMServer.friend.getPaginationFriendsApplyFromReq - 10, // 12: OpenIMServer.friend.friend.addBlack:input_type -> OpenIMServer.friend.addBlackReq - 12, // 13: OpenIMServer.friend.friend.removeBlack:input_type -> OpenIMServer.friend.removeBlackReq - 16, // 14: OpenIMServer.friend.friend.isFriend:input_type -> OpenIMServer.friend.isFriendReq - 18, // 15: OpenIMServer.friend.friend.isBlack:input_type -> OpenIMServer.friend.isBlackReq - 14, // 16: OpenIMServer.friend.friend.getPaginationBlacks:input_type -> OpenIMServer.friend.getPaginationBlacksReq - 20, // 17: OpenIMServer.friend.friend.deleteFriend:input_type -> OpenIMServer.friend.deleteFriendReq - 22, // 18: OpenIMServer.friend.friend.respondFriendApply:input_type -> OpenIMServer.friend.respondFriendApplyReq - 24, // 19: OpenIMServer.friend.friend.setFriendRemark:input_type -> OpenIMServer.friend.setFriendRemarkReq - 4, // 20: OpenIMServer.friend.friend.importFriends:input_type -> OpenIMServer.friend.importFriendReq - 8, // 21: OpenIMServer.friend.friend.getDesignatedFriends:input_type -> OpenIMServer.friend.getDesignatedFriendsReq - 0, // 22: OpenIMServer.friend.friend.getPaginationFriends:input_type -> OpenIMServer.friend.getPaginationFriendsReq - 28, // 23: OpenIMServer.friend.friend.getFriendIDs:input_type -> OpenIMServer.friend.getFriendIDsReq - 3, // 24: OpenIMServer.friend.friend.applyToAddFriend:output_type -> OpenIMServer.friend.applyToAddFriendResp - 7, // 25: OpenIMServer.friend.friend.getPaginationFriendsApplyTo:output_type -> OpenIMServer.friend.getPaginationFriendsApplyToResp - 27, // 26: OpenIMServer.friend.friend.getPaginationFriendsApplyFrom:output_type -> OpenIMServer.friend.getPaginationFriendsApplyFromResp - 11, // 27: OpenIMServer.friend.friend.addBlack:output_type -> OpenIMServer.friend.addBlackResp - 13, // 28: OpenIMServer.friend.friend.removeBlack:output_type -> OpenIMServer.friend.removeBlackResp - 17, // 29: OpenIMServer.friend.friend.isFriend:output_type -> OpenIMServer.friend.isFriendResp - 19, // 30: OpenIMServer.friend.friend.isBlack:output_type -> OpenIMServer.friend.isBlackResp - 15, // 31: OpenIMServer.friend.friend.getPaginationBlacks:output_type -> OpenIMServer.friend.getPaginationBlacksResp - 21, // 32: OpenIMServer.friend.friend.deleteFriend:output_type -> OpenIMServer.friend.deleteFriendResp - 23, // 33: OpenIMServer.friend.friend.respondFriendApply:output_type -> OpenIMServer.friend.respondFriendApplyResp - 25, // 34: OpenIMServer.friend.friend.setFriendRemark:output_type -> OpenIMServer.friend.setFriendRemarkResp - 5, // 35: OpenIMServer.friend.friend.importFriends:output_type -> OpenIMServer.friend.importFriendResp - 9, // 36: OpenIMServer.friend.friend.getDesignatedFriends:output_type -> OpenIMServer.friend.getDesignatedFriendsResp - 1, // 37: OpenIMServer.friend.friend.getPaginationFriends:output_type -> OpenIMServer.friend.getPaginationFriendsResp - 29, // 38: OpenIMServer.friend.friend.getFriendIDs:output_type -> OpenIMServer.friend.getFriendIDsResp - 24, // [24:39] is the sub-list for method output_type - 9, // [9:24] is the sub-list for method input_type - 9, // [9:9] is the sub-list for extension type_name - 9, // [9:9] is the sub-list for extension extendee - 0, // [0:9] is the sub-list for field type_name -} - -func init() { file_friend_friend_proto_init() } -func file_friend_friend_proto_init() { - if File_friend_friend_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_friend_friend_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetPaginationFriendsReq); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_friend_friend_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetPaginationFriendsResp); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_friend_friend_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ApplyToAddFriendReq); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_friend_friend_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ApplyToAddFriendResp); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_friend_friend_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ImportFriendReq); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_friend_friend_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ImportFriendResp); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_friend_friend_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetPaginationFriendsApplyToReq); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_friend_friend_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetPaginationFriendsApplyToResp); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_friend_friend_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetDesignatedFriendsReq); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_friend_friend_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetDesignatedFriendsResp); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_friend_friend_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AddBlackReq); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_friend_friend_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AddBlackResp); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_friend_friend_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RemoveBlackReq); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_friend_friend_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RemoveBlackResp); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_friend_friend_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetPaginationBlacksReq); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_friend_friend_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetPaginationBlacksResp); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_friend_friend_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*IsFriendReq); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_friend_friend_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*IsFriendResp); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_friend_friend_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*IsBlackReq); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_friend_friend_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*IsBlackResp); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_friend_friend_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeleteFriendReq); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_friend_friend_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeleteFriendResp); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_friend_friend_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RespondFriendApplyReq); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_friend_friend_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RespondFriendApplyResp); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_friend_friend_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SetFriendRemarkReq); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_friend_friend_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SetFriendRemarkResp); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_friend_friend_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetPaginationFriendsApplyFromReq); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_friend_friend_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetPaginationFriendsApplyFromResp); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_friend_friend_proto_msgTypes[28].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetFriendIDsReq); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_friend_friend_proto_msgTypes[29].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetFriendIDsResp); 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{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_friend_friend_proto_rawDesc, - NumEnums: 0, - NumMessages: 30, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_friend_friend_proto_goTypes, - DependencyIndexes: file_friend_friend_proto_depIdxs, - MessageInfos: file_friend_friend_proto_msgTypes, - }.Build() - File_friend_friend_proto = out.File - file_friend_friend_proto_rawDesc = nil - file_friend_friend_proto_goTypes = nil - file_friend_friend_proto_depIdxs = nil -} - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConnInterface - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion6 - -// FriendClient is the client API for Friend service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type FriendClient interface { - // 申请加好友 - ApplyToAddFriend(ctx context.Context, in *ApplyToAddFriendReq, opts ...grpc.CallOption) (*ApplyToAddFriendResp, error) - // 获取收到的好友申请列表 - GetPaginationFriendsApplyTo(ctx context.Context, in *GetPaginationFriendsApplyToReq, opts ...grpc.CallOption) (*GetPaginationFriendsApplyToResp, error) - // 获取主动发出去的好友申请列表 - GetPaginationFriendsApplyFrom(ctx context.Context, in *GetPaginationFriendsApplyFromReq, opts ...grpc.CallOption) (*GetPaginationFriendsApplyFromResp, error) - // 添加黑名单 - AddBlack(ctx context.Context, in *AddBlackReq, opts ...grpc.CallOption) (*AddBlackResp, error) - // 移除黑名单 - RemoveBlack(ctx context.Context, in *RemoveBlackReq, opts ...grpc.CallOption) (*RemoveBlackResp, error) - // 判断是否好友关系 - IsFriend(ctx context.Context, in *IsFriendReq, opts ...grpc.CallOption) (*IsFriendResp, error) - // 判断是否在黑名单中 - IsBlack(ctx context.Context, in *IsBlackReq, opts ...grpc.CallOption) (*IsBlackResp, error) - // 获取黑名单列表 - GetPaginationBlacks(ctx context.Context, in *GetPaginationBlacksReq, opts ...grpc.CallOption) (*GetPaginationBlacksResp, error) - // 删除好友 - DeleteFriend(ctx context.Context, in *DeleteFriendReq, opts ...grpc.CallOption) (*DeleteFriendResp, error) - // 对好友申请响应(同意或拒绝) - RespondFriendApply(ctx context.Context, in *RespondFriendApplyReq, opts ...grpc.CallOption) (*RespondFriendApplyResp, error) - // 设置好友备注 - SetFriendRemark(ctx context.Context, in *SetFriendRemarkReq, opts ...grpc.CallOption) (*SetFriendRemarkResp, error) - // 导入好友关系 - ImportFriends(ctx context.Context, in *ImportFriendReq, opts ...grpc.CallOption) (*ImportFriendResp, error) - // 翻页获取好友列表 无结果不返回错误 - GetDesignatedFriends(ctx context.Context, in *GetDesignatedFriendsReq, opts ...grpc.CallOption) (*GetDesignatedFriendsResp, error) - // 获取指定好友信息 有id不存在也返回错误 - GetPaginationFriends(ctx context.Context, in *GetPaginationFriendsReq, opts ...grpc.CallOption) (*GetPaginationFriendsResp, error) - // 获取好友ID列表 - GetFriendIDs(ctx context.Context, in *GetFriendIDsReq, opts ...grpc.CallOption) (*GetFriendIDsResp, error) -} - -type friendClient struct { - cc grpc.ClientConnInterface -} - -func NewFriendClient(cc grpc.ClientConnInterface) FriendClient { - return &friendClient{cc} -} - -func (c *friendClient) ApplyToAddFriend(ctx context.Context, in *ApplyToAddFriendReq, opts ...grpc.CallOption) (*ApplyToAddFriendResp, error) { - out := new(ApplyToAddFriendResp) - err := c.cc.Invoke(ctx, "/OpenIMServer.friend.friend/applyToAddFriend", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *friendClient) GetPaginationFriendsApplyTo(ctx context.Context, in *GetPaginationFriendsApplyToReq, opts ...grpc.CallOption) (*GetPaginationFriendsApplyToResp, error) { - out := new(GetPaginationFriendsApplyToResp) - err := c.cc.Invoke(ctx, "/OpenIMServer.friend.friend/getPaginationFriendsApplyTo", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *friendClient) GetPaginationFriendsApplyFrom(ctx context.Context, in *GetPaginationFriendsApplyFromReq, opts ...grpc.CallOption) (*GetPaginationFriendsApplyFromResp, error) { - out := new(GetPaginationFriendsApplyFromResp) - err := c.cc.Invoke(ctx, "/OpenIMServer.friend.friend/getPaginationFriendsApplyFrom", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *friendClient) AddBlack(ctx context.Context, in *AddBlackReq, opts ...grpc.CallOption) (*AddBlackResp, error) { - out := new(AddBlackResp) - err := c.cc.Invoke(ctx, "/OpenIMServer.friend.friend/addBlack", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *friendClient) RemoveBlack(ctx context.Context, in *RemoveBlackReq, opts ...grpc.CallOption) (*RemoveBlackResp, error) { - out := new(RemoveBlackResp) - err := c.cc.Invoke(ctx, "/OpenIMServer.friend.friend/removeBlack", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *friendClient) IsFriend(ctx context.Context, in *IsFriendReq, opts ...grpc.CallOption) (*IsFriendResp, error) { - out := new(IsFriendResp) - err := c.cc.Invoke(ctx, "/OpenIMServer.friend.friend/isFriend", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *friendClient) IsBlack(ctx context.Context, in *IsBlackReq, opts ...grpc.CallOption) (*IsBlackResp, error) { - out := new(IsBlackResp) - err := c.cc.Invoke(ctx, "/OpenIMServer.friend.friend/isBlack", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *friendClient) GetPaginationBlacks(ctx context.Context, in *GetPaginationBlacksReq, opts ...grpc.CallOption) (*GetPaginationBlacksResp, error) { - out := new(GetPaginationBlacksResp) - err := c.cc.Invoke(ctx, "/OpenIMServer.friend.friend/getPaginationBlacks", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *friendClient) DeleteFriend(ctx context.Context, in *DeleteFriendReq, opts ...grpc.CallOption) (*DeleteFriendResp, error) { - out := new(DeleteFriendResp) - err := c.cc.Invoke(ctx, "/OpenIMServer.friend.friend/deleteFriend", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *friendClient) RespondFriendApply(ctx context.Context, in *RespondFriendApplyReq, opts ...grpc.CallOption) (*RespondFriendApplyResp, error) { - out := new(RespondFriendApplyResp) - err := c.cc.Invoke(ctx, "/OpenIMServer.friend.friend/respondFriendApply", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *friendClient) SetFriendRemark(ctx context.Context, in *SetFriendRemarkReq, opts ...grpc.CallOption) (*SetFriendRemarkResp, error) { - out := new(SetFriendRemarkResp) - err := c.cc.Invoke(ctx, "/OpenIMServer.friend.friend/setFriendRemark", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *friendClient) ImportFriends(ctx context.Context, in *ImportFriendReq, opts ...grpc.CallOption) (*ImportFriendResp, error) { - out := new(ImportFriendResp) - err := c.cc.Invoke(ctx, "/OpenIMServer.friend.friend/importFriends", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *friendClient) GetDesignatedFriends(ctx context.Context, in *GetDesignatedFriendsReq, opts ...grpc.CallOption) (*GetDesignatedFriendsResp, error) { - out := new(GetDesignatedFriendsResp) - err := c.cc.Invoke(ctx, "/OpenIMServer.friend.friend/getDesignatedFriends", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *friendClient) GetPaginationFriends(ctx context.Context, in *GetPaginationFriendsReq, opts ...grpc.CallOption) (*GetPaginationFriendsResp, error) { - out := new(GetPaginationFriendsResp) - err := c.cc.Invoke(ctx, "/OpenIMServer.friend.friend/getPaginationFriends", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *friendClient) GetFriendIDs(ctx context.Context, in *GetFriendIDsReq, opts ...grpc.CallOption) (*GetFriendIDsResp, error) { - out := new(GetFriendIDsResp) - err := c.cc.Invoke(ctx, "/OpenIMServer.friend.friend/getFriendIDs", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// FriendServer is the server API for Friend service. -type FriendServer interface { - // 申请加好友 - ApplyToAddFriend(context.Context, *ApplyToAddFriendReq) (*ApplyToAddFriendResp, error) - // 获取收到的好友申请列表 - GetPaginationFriendsApplyTo(context.Context, *GetPaginationFriendsApplyToReq) (*GetPaginationFriendsApplyToResp, error) - // 获取主动发出去的好友申请列表 - GetPaginationFriendsApplyFrom(context.Context, *GetPaginationFriendsApplyFromReq) (*GetPaginationFriendsApplyFromResp, error) - // 添加黑名单 - AddBlack(context.Context, *AddBlackReq) (*AddBlackResp, error) - // 移除黑名单 - RemoveBlack(context.Context, *RemoveBlackReq) (*RemoveBlackResp, error) - // 判断是否好友关系 - IsFriend(context.Context, *IsFriendReq) (*IsFriendResp, error) - // 判断是否在黑名单中 - IsBlack(context.Context, *IsBlackReq) (*IsBlackResp, error) - // 获取黑名单列表 - GetPaginationBlacks(context.Context, *GetPaginationBlacksReq) (*GetPaginationBlacksResp, error) - // 删除好友 - DeleteFriend(context.Context, *DeleteFriendReq) (*DeleteFriendResp, error) - // 对好友申请响应(同意或拒绝) - RespondFriendApply(context.Context, *RespondFriendApplyReq) (*RespondFriendApplyResp, error) - // 设置好友备注 - SetFriendRemark(context.Context, *SetFriendRemarkReq) (*SetFriendRemarkResp, error) - // 导入好友关系 - ImportFriends(context.Context, *ImportFriendReq) (*ImportFriendResp, error) - // 翻页获取好友列表 无结果不返回错误 - GetDesignatedFriends(context.Context, *GetDesignatedFriendsReq) (*GetDesignatedFriendsResp, error) - // 获取指定好友信息 有id不存在也返回错误 - GetPaginationFriends(context.Context, *GetPaginationFriendsReq) (*GetPaginationFriendsResp, error) - // 获取好友ID列表 - GetFriendIDs(context.Context, *GetFriendIDsReq) (*GetFriendIDsResp, error) -} - -// UnimplementedFriendServer can be embedded to have forward compatible implementations. -type UnimplementedFriendServer struct { -} - -func (*UnimplementedFriendServer) ApplyToAddFriend(context.Context, *ApplyToAddFriendReq) (*ApplyToAddFriendResp, error) { - return nil, status.Errorf(codes.Unimplemented, "method ApplyToAddFriend not implemented") -} -func (*UnimplementedFriendServer) GetPaginationFriendsApplyTo(context.Context, *GetPaginationFriendsApplyToReq) (*GetPaginationFriendsApplyToResp, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetPaginationFriendsApplyTo not implemented") -} -func (*UnimplementedFriendServer) GetPaginationFriendsApplyFrom(context.Context, *GetPaginationFriendsApplyFromReq) (*GetPaginationFriendsApplyFromResp, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetPaginationFriendsApplyFrom not implemented") -} -func (*UnimplementedFriendServer) AddBlack(context.Context, *AddBlackReq) (*AddBlackResp, error) { - return nil, status.Errorf(codes.Unimplemented, "method AddBlack not implemented") -} -func (*UnimplementedFriendServer) RemoveBlack(context.Context, *RemoveBlackReq) (*RemoveBlackResp, error) { - return nil, status.Errorf(codes.Unimplemented, "method RemoveBlack not implemented") -} -func (*UnimplementedFriendServer) IsFriend(context.Context, *IsFriendReq) (*IsFriendResp, error) { - return nil, status.Errorf(codes.Unimplemented, "method IsFriend not implemented") -} -func (*UnimplementedFriendServer) IsBlack(context.Context, *IsBlackReq) (*IsBlackResp, error) { - return nil, status.Errorf(codes.Unimplemented, "method IsBlack not implemented") -} -func (*UnimplementedFriendServer) GetPaginationBlacks(context.Context, *GetPaginationBlacksReq) (*GetPaginationBlacksResp, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetPaginationBlacks not implemented") -} -func (*UnimplementedFriendServer) DeleteFriend(context.Context, *DeleteFriendReq) (*DeleteFriendResp, error) { - return nil, status.Errorf(codes.Unimplemented, "method DeleteFriend not implemented") -} -func (*UnimplementedFriendServer) RespondFriendApply(context.Context, *RespondFriendApplyReq) (*RespondFriendApplyResp, error) { - return nil, status.Errorf(codes.Unimplemented, "method RespondFriendApply not implemented") -} -func (*UnimplementedFriendServer) SetFriendRemark(context.Context, *SetFriendRemarkReq) (*SetFriendRemarkResp, error) { - return nil, status.Errorf(codes.Unimplemented, "method SetFriendRemark not implemented") -} -func (*UnimplementedFriendServer) ImportFriends(context.Context, *ImportFriendReq) (*ImportFriendResp, error) { - return nil, status.Errorf(codes.Unimplemented, "method ImportFriends not implemented") -} -func (*UnimplementedFriendServer) GetDesignatedFriends(context.Context, *GetDesignatedFriendsReq) (*GetDesignatedFriendsResp, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetDesignatedFriends not implemented") -} -func (*UnimplementedFriendServer) GetPaginationFriends(context.Context, *GetPaginationFriendsReq) (*GetPaginationFriendsResp, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetPaginationFriends not implemented") -} -func (*UnimplementedFriendServer) GetFriendIDs(context.Context, *GetFriendIDsReq) (*GetFriendIDsResp, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetFriendIDs not implemented") -} - -func RegisterFriendServer(s *grpc.Server, srv FriendServer) { - s.RegisterService(&_Friend_serviceDesc, srv) -} - -func _Friend_ApplyToAddFriend_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ApplyToAddFriendReq) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(FriendServer).ApplyToAddFriend(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/OpenIMServer.friend.friend/ApplyToAddFriend", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(FriendServer).ApplyToAddFriend(ctx, req.(*ApplyToAddFriendReq)) - } - return interceptor(ctx, in, info, handler) -} - -func _Friend_GetPaginationFriendsApplyTo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetPaginationFriendsApplyToReq) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(FriendServer).GetPaginationFriendsApplyTo(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/OpenIMServer.friend.friend/GetPaginationFriendsApplyTo", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(FriendServer).GetPaginationFriendsApplyTo(ctx, req.(*GetPaginationFriendsApplyToReq)) - } - return interceptor(ctx, in, info, handler) -} - -func _Friend_GetPaginationFriendsApplyFrom_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetPaginationFriendsApplyFromReq) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(FriendServer).GetPaginationFriendsApplyFrom(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/OpenIMServer.friend.friend/GetPaginationFriendsApplyFrom", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(FriendServer).GetPaginationFriendsApplyFrom(ctx, req.(*GetPaginationFriendsApplyFromReq)) - } - return interceptor(ctx, in, info, handler) -} - -func _Friend_AddBlack_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(AddBlackReq) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(FriendServer).AddBlack(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/OpenIMServer.friend.friend/AddBlack", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(FriendServer).AddBlack(ctx, req.(*AddBlackReq)) - } - return interceptor(ctx, in, info, handler) -} - -func _Friend_RemoveBlack_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(RemoveBlackReq) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(FriendServer).RemoveBlack(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/OpenIMServer.friend.friend/RemoveBlack", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(FriendServer).RemoveBlack(ctx, req.(*RemoveBlackReq)) - } - return interceptor(ctx, in, info, handler) -} - -func _Friend_IsFriend_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(IsFriendReq) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(FriendServer).IsFriend(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/OpenIMServer.friend.friend/IsFriend", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(FriendServer).IsFriend(ctx, req.(*IsFriendReq)) - } - return interceptor(ctx, in, info, handler) -} - -func _Friend_IsBlack_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(IsBlackReq) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(FriendServer).IsBlack(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/OpenIMServer.friend.friend/IsBlack", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(FriendServer).IsBlack(ctx, req.(*IsBlackReq)) - } - return interceptor(ctx, in, info, handler) -} - -func _Friend_GetPaginationBlacks_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetPaginationBlacksReq) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(FriendServer).GetPaginationBlacks(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/OpenIMServer.friend.friend/GetPaginationBlacks", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(FriendServer).GetPaginationBlacks(ctx, req.(*GetPaginationBlacksReq)) - } - return interceptor(ctx, in, info, handler) -} - -func _Friend_DeleteFriend_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DeleteFriendReq) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(FriendServer).DeleteFriend(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/OpenIMServer.friend.friend/DeleteFriend", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(FriendServer).DeleteFriend(ctx, req.(*DeleteFriendReq)) - } - return interceptor(ctx, in, info, handler) -} - -func _Friend_RespondFriendApply_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(RespondFriendApplyReq) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(FriendServer).RespondFriendApply(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/OpenIMServer.friend.friend/RespondFriendApply", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(FriendServer).RespondFriendApply(ctx, req.(*RespondFriendApplyReq)) - } - return interceptor(ctx, in, info, handler) -} - -func _Friend_SetFriendRemark_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(SetFriendRemarkReq) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(FriendServer).SetFriendRemark(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/OpenIMServer.friend.friend/SetFriendRemark", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(FriendServer).SetFriendRemark(ctx, req.(*SetFriendRemarkReq)) - } - return interceptor(ctx, in, info, handler) -} - -func _Friend_ImportFriends_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ImportFriendReq) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(FriendServer).ImportFriends(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/OpenIMServer.friend.friend/ImportFriends", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(FriendServer).ImportFriends(ctx, req.(*ImportFriendReq)) - } - return interceptor(ctx, in, info, handler) -} - -func _Friend_GetDesignatedFriends_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetDesignatedFriendsReq) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(FriendServer).GetDesignatedFriends(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/OpenIMServer.friend.friend/GetDesignatedFriends", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(FriendServer).GetDesignatedFriends(ctx, req.(*GetDesignatedFriendsReq)) - } - return interceptor(ctx, in, info, handler) -} - -func _Friend_GetPaginationFriends_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetPaginationFriendsReq) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(FriendServer).GetPaginationFriends(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/OpenIMServer.friend.friend/GetPaginationFriends", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(FriendServer).GetPaginationFriends(ctx, req.(*GetPaginationFriendsReq)) - } - return interceptor(ctx, in, info, handler) -} - -func _Friend_GetFriendIDs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetFriendIDsReq) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(FriendServer).GetFriendIDs(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/OpenIMServer.friend.friend/GetFriendIDs", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(FriendServer).GetFriendIDs(ctx, req.(*GetFriendIDsReq)) - } - return interceptor(ctx, in, info, handler) -} - -var _Friend_serviceDesc = grpc.ServiceDesc{ - ServiceName: "OpenIMServer.friend.friend", - HandlerType: (*FriendServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "applyToAddFriend", - Handler: _Friend_ApplyToAddFriend_Handler, - }, - { - MethodName: "getPaginationFriendsApplyTo", - Handler: _Friend_GetPaginationFriendsApplyTo_Handler, - }, - { - MethodName: "getPaginationFriendsApplyFrom", - Handler: _Friend_GetPaginationFriendsApplyFrom_Handler, - }, - { - MethodName: "addBlack", - Handler: _Friend_AddBlack_Handler, - }, - { - MethodName: "removeBlack", - Handler: _Friend_RemoveBlack_Handler, - }, - { - MethodName: "isFriend", - Handler: _Friend_IsFriend_Handler, - }, - { - MethodName: "isBlack", - Handler: _Friend_IsBlack_Handler, - }, - { - MethodName: "getPaginationBlacks", - Handler: _Friend_GetPaginationBlacks_Handler, - }, - { - MethodName: "deleteFriend", - Handler: _Friend_DeleteFriend_Handler, - }, - { - MethodName: "respondFriendApply", - Handler: _Friend_RespondFriendApply_Handler, - }, - { - MethodName: "setFriendRemark", - Handler: _Friend_SetFriendRemark_Handler, - }, - { - MethodName: "importFriends", - Handler: _Friend_ImportFriends_Handler, - }, - { - MethodName: "getDesignatedFriends", - Handler: _Friend_GetDesignatedFriends_Handler, - }, - { - MethodName: "getPaginationFriends", - Handler: _Friend_GetPaginationFriends_Handler, - }, - { - MethodName: "getFriendIDs", - Handler: _Friend_GetFriendIDs_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "friend/friend.proto", -} diff --git a/pkg/proto/friend/friend.proto b/pkg/proto/friend/friend.proto deleted file mode 100644 index 98a9e81e9..000000000 --- a/pkg/proto/friend/friend.proto +++ /dev/null @@ -1,187 +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. - -syntax = "proto3"; -package OpenIMServer.friend; -import "sdkws/sdkws.proto"; -option go_package = "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/friend"; - -message getPaginationFriendsReq{ - sdkws.RequestPagination pagination = 1; - string userID = 2; -} -message getPaginationFriendsResp{ - repeated sdkws.FriendInfo friendsInfo = 1; - int32 total = 2; -} - - -message applyToAddFriendReq{ - string fromUserID = 1; - string toUserID = 2; - string reqMsg = 3; - string ex = 4; -} -message applyToAddFriendResp{ -} - - -message importFriendReq{ - string ownerUserID = 1; - repeated string friendUserIDs = 2; -} - -message importFriendResp{ -} - - -message getPaginationFriendsApplyToReq{ - string userID = 1; - sdkws.RequestPagination pagination = 2; - -} -message getPaginationFriendsApplyToResp{ - repeated sdkws.FriendRequest FriendRequests = 1; - int32 total = 2; -} - - -message getDesignatedFriendsReq{ - string ownerUserID = 1; - repeated string friendUserIDs = 2; -} -message getDesignatedFriendsResp{ - repeated sdkws.FriendInfo friendsInfo = 1; -} - - -message addBlackReq{ - string ownerUserID = 1; - string blackUserID = 2; -} -message addBlackResp{ -} - - -message removeBlackReq{ - string ownerUserID = 1; - string blackUserID = 2; -} -message removeBlackResp{ -} - -message getPaginationBlacksReq{ - string userID = 1; - sdkws.RequestPagination pagination = 2; -} -message getPaginationBlacksResp{ - repeated sdkws.BlackInfo blacks= 1; - int32 total = 2; -} - - -message isFriendReq{ - string userID1 = 1; - string userID2 = 2; -} -message isFriendResp{ - bool inUser1Friends = 1; //如果userID2在userID1的好友列表中 true - bool inUser2Friends = 2; //如果userID1在userID2的好友列表中 true -} - - -message isBlackReq{ - string userID1 = 1; - string userID2 = 2; -} -message isBlackResp{ - bool inUser1Blacks = 1; //如果userID2在userID1的黑名单列表中 true - bool inUser2Blacks = 2; //如果userID1在userID2的黑名单列表中 true -} - - -message deleteFriendReq{ - string ownerUserID = 1; - string friendUserID = 2; -} -message deleteFriendResp{ -} - -//process -message respondFriendApplyReq{ - string fromUserID = 1; //主动发起的申请者 - string toUserID = 2; //被动添加者 - int32 handleResult = 3; - string handleMsg = 4; -} -message respondFriendApplyResp{ -} - -message setFriendRemarkReq{ - string ownerUserID = 1; - string friendUserID = 2; - string remark = 3; -} -message setFriendRemarkResp{ -} - -message getPaginationFriendsApplyFromReq{ - string userID = 1; - sdkws.RequestPagination pagination = 2; -} -message getPaginationFriendsApplyFromResp{ - repeated sdkws.FriendRequest friendRequests = 1; - int32 total = 2; -} - -message getFriendIDsReq { - string userID = 1; -} - -message getFriendIDsResp { - repeated string friendIDs = 1; -} - -service friend{ - //申请加好友 - rpc applyToAddFriend(applyToAddFriendReq) returns(applyToAddFriendResp); - //获取收到的好友申请列表 - rpc getPaginationFriendsApplyTo(getPaginationFriendsApplyToReq) returns(getPaginationFriendsApplyToResp); - //获取主动发出去的好友申请列表 - rpc getPaginationFriendsApplyFrom(getPaginationFriendsApplyFromReq) returns(getPaginationFriendsApplyFromResp); - //添加黑名单 - rpc addBlack(addBlackReq) returns(addBlackResp); - //移除黑名单 - rpc removeBlack(removeBlackReq) returns(removeBlackResp); - //判断是否好友关系 - rpc isFriend(isFriendReq) returns(isFriendResp); - //判断是否在黑名单中 - rpc isBlack(isBlackReq) returns(isBlackResp); - //获取黑名单列表 - rpc getPaginationBlacks(getPaginationBlacksReq) returns(getPaginationBlacksResp); - //删除好友 - rpc deleteFriend(deleteFriendReq) returns(deleteFriendResp); - //对好友申请响应(同意或拒绝) - rpc respondFriendApply(respondFriendApplyReq) returns(respondFriendApplyResp); - //设置好友备注 - rpc setFriendRemark(setFriendRemarkReq) returns(setFriendRemarkResp); - //导入好友关系 - rpc importFriends(importFriendReq) returns(importFriendResp); - //翻页获取好友列表 无结果不返回错误 - rpc getDesignatedFriends(getDesignatedFriendsReq) returns(getDesignatedFriendsResp); - //获取指定好友信息 有id不存在也返回错误 - rpc getPaginationFriends(getPaginationFriendsReq) returns (getPaginationFriendsResp); - // 获取好友ID列表 - rpc getFriendIDs(getFriendIDsReq) returns (getFriendIDsResp); -} \ No newline at end of file diff --git a/pkg/proto/gen.cmd b/pkg/proto/gen.cmd deleted file mode 100644 index 930a636ec..000000000 --- a/pkg/proto/gen.cmd +++ /dev/null @@ -1,13 +0,0 @@ -protoc --go_out=plugins=grpc:./auth --go_opt=module=github.com/OpenIMSDK/Open-IM-Server/pkg/proto/auth auth/auth.proto -protoc --go_out=plugins=grpc:./conversation --go_opt=module=github.com/OpenIMSDK/Open-IM-Server/pkg/proto/conversation conversation/conversation.proto -protoc --go_out=plugins=grpc:./errinfo --go_opt=module=github.com/OpenIMSDK/Open-IM-Server/pkg/proto/errinfo errinfo/errinfo.proto -protoc --go_out=plugins=grpc:./friend --go_opt=module=github.com/OpenIMSDK/Open-IM-Server/pkg/proto/friend friend/friend.proto -protoc --go_out=plugins=grpc:./group --go_opt=module=github.com/OpenIMSDK/Open-IM-Server/pkg/proto/group group/group.proto -protoc --go_out=plugins=grpc:./msg --go_opt=module=github.com/OpenIMSDK/Open-IM-Server/pkg/proto/msg msg/msg.proto -protoc --go_out=plugins=grpc:./msggateway --go_opt=module=github.com/OpenIMSDK/Open-IM-Server/pkg/proto/msggateway msggateway/msggateway.proto -protoc --go_out=plugins=grpc:./push --go_opt=module=github.com/OpenIMSDK/Open-IM-Server/pkg/proto/push push/push.proto -protoc --go_out=plugins=grpc:./sdkws --go_opt=module=github.com/OpenIMSDK/Open-IM-Server/pkg/proto/sdkws sdkws/sdkws.proto -protoc --go_out=plugins=grpc:./third --go_opt=module=github.com/OpenIMSDK/Open-IM-Server/pkg/proto/third third/third.proto -protoc --go_out=plugins=grpc:./user --go_opt=module=github.com/OpenIMSDK/Open-IM-Server/pkg/proto/user user/user.proto -protoc --go_out=plugins=grpc:./wrapperspb --go_opt=module=github.com/OpenIMSDK/Open-IM-Server/pkg/proto/wrapperspb wrapperspb/wrapperspb.proto -protoc --go_out=plugins=grpc:./statistics --go_opt=module=github.com/OpenIMSDK/Open-IM-Server/pkg/proto/statistics statistics/statistics.proto \ No newline at end of file diff --git a/pkg/proto/gen.sh b/pkg/proto/gen.sh deleted file mode 100644 index 3c06bbfa7..000000000 --- a/pkg/proto/gen.sh +++ /dev/null @@ -1,27 +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. - -protoc --go_out=plugins=grpc:./auth --go_opt=module=github.com/OpenIMSDK/Open-IM-Server/pkg/proto/auth auth/auth.proto -protoc --go_out=plugins=grpc:./conversation --go_opt=module=github.com/OpenIMSDK/Open-IM-Server/pkg/proto/conversation conversation/conversation.proto -protoc --go_out=plugins=grpc:./errinfo --go_opt=module=github.com/OpenIMSDK/Open-IM-Server/pkg/proto/errinfo errinfo/errinfo.proto -protoc --go_out=plugins=grpc:./friend --go_opt=module=github.com/OpenIMSDK/Open-IM-Server/pkg/proto/friend friend/friend.proto -protoc --go_out=plugins=grpc:./group --go_opt=module=github.com/OpenIMSDK/Open-IM-Server/pkg/proto/group group/group.proto -protoc --go_out=plugins=grpc:./msg --go_opt=module=github.com/OpenIMSDK/Open-IM-Server/pkg/proto/msg msg/msg.proto -protoc --go_out=plugins=grpc:./msggateway --go_opt=module=github.com/OpenIMSDK/Open-IM-Server/pkg/proto/msggateway msggateway/msggateway.proto -protoc --go_out=plugins=grpc:./push --go_opt=module=github.com/OpenIMSDK/Open-IM-Server/pkg/proto/push push/push.proto -protoc --go_out=plugins=grpc:./sdkws --go_opt=module=github.com/OpenIMSDK/Open-IM-Server/pkg/proto/sdkws sdkws/sdkws.proto -protoc --go_out=plugins=grpc:./third --go_opt=module=github.com/OpenIMSDK/Open-IM-Server/pkg/proto/third third/third.proto -protoc --go_out=plugins=grpc:./user --go_opt=module=github.com/OpenIMSDK/Open-IM-Server/pkg/proto/user user/user.proto -protoc --go_out=plugins=grpc:./wrapperspb --go_opt=module=github.com/OpenIMSDK/Open-IM-Server/pkg/proto/wrapperspb wrapperspb/wrapperspb.proto -protoc --go_out=plugins=grpc:./statistics --go_opt=module=github.com/OpenIMSDK/Open-IM-Server/pkg/proto/statistics statistics/statistics.proto \ No newline at end of file diff --git a/pkg/proto/group/group.go b/pkg/proto/group/group.go deleted file mode 100644 index 2cebc0df0..000000000 --- a/pkg/proto/group/group.go +++ /dev/null @@ -1,352 +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. - -package group - -import "github.com/OpenIMSDK/Open-IM-Server/pkg/errs" - -func (x *CreateGroupReq) Check() error { - if x.MemberUserIDs == nil { - return errs.ErrArgs.Wrap("memberUserIDS is empty") - } - if x.GroupInfo == nil { - return errs.ErrArgs.Wrap("groupInfo is empty") - } - if x.GroupInfo.GroupType > 2 || x.GroupInfo.GroupType < 0 { - return errs.ErrArgs.Wrap("GroupType is invalid") - } - if x.OwnerUserID == "" { - return errs.ErrArgs.Wrap("ownerUserID") - } - return nil -} - -func (x *GetGroupsInfoReq) Check() error { - if x.GroupIDs == nil { - return errs.ErrArgs.Wrap("GroupIDs") - } - return nil -} - -func (x *SetGroupInfoReq) Check() error { - if x.GroupInfoForSet == nil { - return errs.ErrArgs.Wrap("GroupInfoForSets is empty") - } - if x.GroupInfoForSet.GroupID == "" { - return errs.ErrArgs.Wrap("GroupID is empty") - } - return nil -} - -func (x *GetGroupApplicationListReq) Check() error { - if x.Pagination == nil { - return errs.ErrArgs.Wrap("pagination is empty") - } - if x.Pagination.PageNumber < 1 { - return errs.ErrArgs.Wrap("pageNumber is invalid") - } - if x.FromUserID == "" { - return errs.ErrArgs.Wrap("fromUserID is empty") - } - return nil -} - -func (x *GetUserReqApplicationListReq) Check() error { - if x.UserID == "" { - return errs.ErrArgs.Wrap("UserID is empty") - } - if x.Pagination == nil { - return errs.ErrArgs.Wrap("pagination is empty") - } - if x.Pagination.PageNumber < 1 { - return errs.ErrArgs.Wrap("pageNumber is invalid") - } - return nil -} - -func (x *TransferGroupOwnerReq) Check() error { - if x.GroupID == "" { - return errs.ErrArgs.Wrap("groupID is empty") - } - if x.OldOwnerUserID == "" { - return errs.ErrArgs.Wrap("oldOwnerUserID is empty") - } - if x.NewOwnerUserID == "" { - return errs.ErrArgs.Wrap("newOwnerUserID is empty") - } - return nil -} - -func (x *JoinGroupReq) Check() error { - if x.GroupID == "" { - return errs.ErrArgs.Wrap("groupID is empty") - } - if x.JoinSource < 2 || x.JoinSource > 4 { - return errs.ErrArgs.Wrap("joinSource is invalid") - } - if x.JoinSource == 2 { - if x.InviterUserID == "" { - return errs.ErrArgs.Wrap("inviterUserID is empty") - } - } - return nil -} - -func (x *GroupApplicationResponseReq) Check() error { - if x.GroupID == "" { - return errs.ErrArgs.Wrap("groupID is empty") - } - if x.FromUserID == "" { - return errs.ErrArgs.Wrap("fromUserID is empty") - } - if x.HandleResult > 1 || x.HandleResult < -1 { - return errs.ErrArgs.Wrap("handleResult is invalid") - } - return nil -} - -func (x *QuitGroupReq) Check() error { - if x.GroupID == "" { - return errs.ErrArgs.Wrap("groupID is empty") - } - return nil -} - -func (x *GetGroupMemberListReq) Check() error { - if x.GroupID == "" { - return errs.ErrArgs.Wrap("groupID is empty") - } - if x.Pagination == nil { - return errs.ErrArgs.Wrap("pagination is empty") - } - if x.Pagination.PageNumber < 1 { - return errs.ErrArgs.Wrap("pageNumber is invalid") - } - if x.Filter < 0 || x.Filter > 5 { - return errs.ErrArgs.Wrap("filter is invalid") - } - return nil -} - -func (x *GetGroupMembersInfoReq) Check() error { - if x.GroupID == "" { - return errs.ErrArgs.Wrap("groupID is empty") - } - if x.UserIDs == nil { - return errs.ErrArgs.Wrap("userIDs is empty") - } - return nil -} - -func (x *KickGroupMemberReq) Check() error { - if x.GroupID == "" { - return errs.ErrArgs.Wrap("groupID is empty") - } - if x.KickedUserIDs == nil { - return errs.ErrArgs.Wrap("kickUserIDs is empty") - } - return nil -} - -func (x *GetJoinedGroupListReq) Check() error { - if x.Pagination == nil { - return errs.ErrArgs.Wrap("pagination is empty") - } - if x.Pagination.PageNumber < 1 { - return errs.ErrArgs.Wrap("pageNumber is invalid") - } - if x.FromUserID == "" { - return errs.ErrArgs.Wrap("fromUserID is empty") - } - return nil -} - -func (x *InviteUserToGroupReq) Check() error { - if x.GroupID == "" { - return errs.ErrArgs.Wrap("groupID is empty") - } - if x.InvitedUserIDs == nil { - return errs.ErrArgs.Wrap("invitedUserIDs is empty") - } - return nil -} - -func (x *GetGroupAllMemberReq) Check() error { - if x.GroupID == "" { - return errs.ErrArgs.Wrap("groupID is empty") - } - if x.Pagination == nil { - return errs.ErrArgs.Wrap("pagination is empty") - } - if x.Pagination.PageNumber < 1 { - return errs.ErrArgs.Wrap("pageNumber is invalid") - } - return nil -} - -func (x *GetGroupsReq) Check() error { - if x.Pagination == nil { - return errs.ErrArgs.Wrap("pagination is empty") - } - if x.Pagination.PageNumber < 1 { - return errs.ErrArgs.Wrap("pageNumber is invalid") - } - return nil -} - -func (x *GetGroupMemberReq) Check() error { - if x.GroupID == "" { - return errs.ErrArgs.Wrap("groupID is empty") - } - return nil -} - -func (x *GetGroupMembersCMSReq) Check() error { - if x.GroupID == "" { - return errs.ErrArgs.Wrap("groupID is empty") - } - if x.Pagination == nil { - return errs.ErrArgs.Wrap("pagination is empty") - } - if x.Pagination.PageNumber < 1 { - return errs.ErrArgs.Wrap("pageNumber is invalid") - } - return nil -} - -func (x *DismissGroupReq) Check() error { - if x.GroupID == "" { - return errs.ErrArgs.Wrap("groupID is empty") - } - return nil -} - -func (x *MuteGroupMemberReq) Check() error { - if x.GroupID == "" { - return errs.ErrArgs.Wrap("groupID is empty") - } - if x.UserID == "" { - return errs.ErrArgs.Wrap("userID is empty") - } - if x.MutedSeconds <= 0 { - return errs.ErrArgs.Wrap("mutedSeconds is empty") - } - return nil -} - -func (x *CancelMuteGroupMemberReq) Check() error { - if x.GroupID == "" { - return errs.ErrArgs.Wrap("groupID is empty") - } - if x.UserID == "" { - return errs.ErrArgs.Wrap("userID is empty") - } - return nil -} - -func (x *MuteGroupReq) Check() error { - if x.GroupID == "" { - return errs.ErrArgs.Wrap("groupID is empty") - } - return nil -} - -func (x *CancelMuteGroupReq) Check() error { - if x.GroupID == "" { - return errs.ErrArgs.Wrap("groupID is empty") - } - return nil -} - -func (x *GetJoinedSuperGroupListReq) Check() error { - if x.UserID == "" { - return errs.ErrArgs.Wrap("userID is empty") - } - return nil -} - -func (x *GetSuperGroupsInfoReq) Check() error { - if x.GroupIDs == nil { - return errs.ErrArgs.Wrap("GroupIDs is empty") - } - return nil -} - -func (x *SetGroupMemberInfo) Check() error { - if x.GroupID == "" { - return errs.ErrArgs.Wrap("GroupID is empty") - } - if x.UserID == "" { - return errs.ErrArgs.Wrap("userID is empty") - } - return nil -} - -func (x *SetGroupMemberInfoReq) Check() error { - if x.Members == nil { - return errs.ErrArgs.Wrap("Members is empty") - } - return nil -} - -func (x *GetGroupAbstractInfoReq) Check() error { - if x.GroupIDs == nil { - return errs.ErrArgs.Wrap("GroupID is empty") - } - return nil -} - -func (x *GetUserInGroupMembersReq) Check() error { - if x.GroupIDs == nil { - return errs.ErrArgs.Wrap("GroupID is empty") - } - if x.UserID == "" { - return errs.ErrArgs.Wrap("userID is empty") - } - return nil -} - -func (x *GetGroupMemberUserIDsReq) Check() error { - if x.GroupID == "" { - return errs.ErrArgs.Wrap("GroupID is empty") - } - return nil -} - -func (x *GetGroupMemberRoleLevelReq) Check() error { - if x.GroupID == "" { - return errs.ErrArgs.Wrap("GroupID is empty") - } - if x.RoleLevels == nil { - return errs.ErrArgs.Wrap("rolesLevel is empty") - } - return nil -} - -func (x *GetGroupInfoCacheReq) Check() error { - if x.GroupID == "" { - return errs.ErrArgs.Wrap("GroupID is empty") - } - return nil -} - -func (x *GetGroupMemberCacheReq) Check() error { - if x.GroupID == "" { - return errs.ErrArgs.Wrap("GroupID is empty") - } - if x.GroupMemberID == "" { - return errs.ErrArgs.Wrap("GroupMemberID is empty") - } - return nil -} diff --git a/pkg/proto/group/group.pb.go b/pkg/proto/group/group.pb.go deleted file mode 100644 index f4230c794..000000000 --- a/pkg/proto/group/group.pb.go +++ /dev/null @@ -1,6376 +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. - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.29.1 -// protoc v4.22.0 -// source: group/group.proto - -package group - -import ( - context "context" - sdkws "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/sdkws" - wrapperspb "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/wrapperspb" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type CreateGroupReq struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - MemberUserIDs []string `protobuf:"bytes,1,rep,name=memberUserIDs,proto3" json:"memberUserIDs"` - GroupInfo *sdkws.GroupInfo `protobuf:"bytes,2,opt,name=groupInfo,proto3" json:"groupInfo"` - AdminUserIDs []string `protobuf:"bytes,3,rep,name=adminUserIDs,proto3" json:"adminUserIDs"` - OwnerUserID string `protobuf:"bytes,4,opt,name=ownerUserID,proto3" json:"ownerUserID"` //owner -} - -func (x *CreateGroupReq) Reset() { - *x = CreateGroupReq{} - if protoimpl.UnsafeEnabled { - mi := &file_group_group_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CreateGroupReq) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CreateGroupReq) ProtoMessage() {} - -func (x *CreateGroupReq) ProtoReflect() protoreflect.Message { - mi := &file_group_group_proto_msgTypes[0] - 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 CreateGroupReq.ProtoReflect.Descriptor instead. -func (*CreateGroupReq) Descriptor() ([]byte, []int) { - return file_group_group_proto_rawDescGZIP(), []int{0} -} - -func (x *CreateGroupReq) GetMemberUserIDs() []string { - if x != nil { - return x.MemberUserIDs - } - return nil -} - -func (x *CreateGroupReq) GetGroupInfo() *sdkws.GroupInfo { - if x != nil { - return x.GroupInfo - } - return nil -} - -func (x *CreateGroupReq) GetAdminUserIDs() []string { - if x != nil { - return x.AdminUserIDs - } - return nil -} - -func (x *CreateGroupReq) GetOwnerUserID() string { - if x != nil { - return x.OwnerUserID - } - return "" -} - -type CreateGroupResp struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - GroupInfo *sdkws.GroupInfo `protobuf:"bytes,1,opt,name=groupInfo,proto3" json:"groupInfo"` -} - -func (x *CreateGroupResp) Reset() { - *x = CreateGroupResp{} - if protoimpl.UnsafeEnabled { - mi := &file_group_group_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CreateGroupResp) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CreateGroupResp) ProtoMessage() {} - -func (x *CreateGroupResp) ProtoReflect() protoreflect.Message { - mi := &file_group_group_proto_msgTypes[1] - 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 CreateGroupResp.ProtoReflect.Descriptor instead. -func (*CreateGroupResp) Descriptor() ([]byte, []int) { - return file_group_group_proto_rawDescGZIP(), []int{1} -} - -func (x *CreateGroupResp) GetGroupInfo() *sdkws.GroupInfo { - if x != nil { - return x.GroupInfo - } - return nil -} - -type GetGroupsInfoReq struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - GroupIDs []string `protobuf:"bytes,1,rep,name=groupIDs,proto3" json:"groupIDs"` -} - -func (x *GetGroupsInfoReq) Reset() { - *x = GetGroupsInfoReq{} - if protoimpl.UnsafeEnabled { - mi := &file_group_group_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetGroupsInfoReq) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetGroupsInfoReq) ProtoMessage() {} - -func (x *GetGroupsInfoReq) ProtoReflect() protoreflect.Message { - mi := &file_group_group_proto_msgTypes[2] - 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 GetGroupsInfoReq.ProtoReflect.Descriptor instead. -func (*GetGroupsInfoReq) Descriptor() ([]byte, []int) { - return file_group_group_proto_rawDescGZIP(), []int{2} -} - -func (x *GetGroupsInfoReq) GetGroupIDs() []string { - if x != nil { - return x.GroupIDs - } - return nil -} - -type GetGroupsInfoResp struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - GroupInfos []*sdkws.GroupInfo `protobuf:"bytes,1,rep,name=groupInfos,proto3" json:"groupInfos"` -} - -func (x *GetGroupsInfoResp) Reset() { - *x = GetGroupsInfoResp{} - if protoimpl.UnsafeEnabled { - mi := &file_group_group_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetGroupsInfoResp) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetGroupsInfoResp) ProtoMessage() {} - -func (x *GetGroupsInfoResp) ProtoReflect() protoreflect.Message { - mi := &file_group_group_proto_msgTypes[3] - 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 GetGroupsInfoResp.ProtoReflect.Descriptor instead. -func (*GetGroupsInfoResp) Descriptor() ([]byte, []int) { - return file_group_group_proto_rawDescGZIP(), []int{3} -} - -func (x *GetGroupsInfoResp) GetGroupInfos() []*sdkws.GroupInfo { - if x != nil { - return x.GroupInfos - } - return nil -} - -type SetGroupInfoReq struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - GroupInfoForSet *sdkws.GroupInfoForSet `protobuf:"bytes,1,opt,name=groupInfoForSet,proto3" json:"groupInfoForSet"` -} - -func (x *SetGroupInfoReq) Reset() { - *x = SetGroupInfoReq{} - if protoimpl.UnsafeEnabled { - mi := &file_group_group_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SetGroupInfoReq) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SetGroupInfoReq) ProtoMessage() {} - -func (x *SetGroupInfoReq) ProtoReflect() protoreflect.Message { - mi := &file_group_group_proto_msgTypes[4] - 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 SetGroupInfoReq.ProtoReflect.Descriptor instead. -func (*SetGroupInfoReq) Descriptor() ([]byte, []int) { - return file_group_group_proto_rawDescGZIP(), []int{4} -} - -func (x *SetGroupInfoReq) GetGroupInfoForSet() *sdkws.GroupInfoForSet { - if x != nil { - return x.GroupInfoForSet - } - return nil -} - -type SetGroupInfoResp struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *SetGroupInfoResp) Reset() { - *x = SetGroupInfoResp{} - if protoimpl.UnsafeEnabled { - mi := &file_group_group_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SetGroupInfoResp) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SetGroupInfoResp) ProtoMessage() {} - -func (x *SetGroupInfoResp) ProtoReflect() protoreflect.Message { - mi := &file_group_group_proto_msgTypes[5] - 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 SetGroupInfoResp.ProtoReflect.Descriptor instead. -func (*SetGroupInfoResp) Descriptor() ([]byte, []int) { - return file_group_group_proto_rawDescGZIP(), []int{5} -} - -type GetGroupApplicationListReq struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Pagination *sdkws.RequestPagination `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination"` - FromUserID string `protobuf:"bytes,2,opt,name=fromUserID,proto3" json:"fromUserID"` //owner or admin -} - -func (x *GetGroupApplicationListReq) Reset() { - *x = GetGroupApplicationListReq{} - if protoimpl.UnsafeEnabled { - mi := &file_group_group_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetGroupApplicationListReq) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetGroupApplicationListReq) ProtoMessage() {} - -func (x *GetGroupApplicationListReq) ProtoReflect() protoreflect.Message { - mi := &file_group_group_proto_msgTypes[6] - 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 GetGroupApplicationListReq.ProtoReflect.Descriptor instead. -func (*GetGroupApplicationListReq) Descriptor() ([]byte, []int) { - return file_group_group_proto_rawDescGZIP(), []int{6} -} - -func (x *GetGroupApplicationListReq) GetPagination() *sdkws.RequestPagination { - if x != nil { - return x.Pagination - } - return nil -} - -func (x *GetGroupApplicationListReq) GetFromUserID() string { - if x != nil { - return x.FromUserID - } - return "" -} - -type GetGroupApplicationListResp struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Total uint32 `protobuf:"varint,1,opt,name=total,proto3" json:"total"` - GroupRequests []*sdkws.GroupRequest `protobuf:"bytes,2,rep,name=groupRequests,proto3" json:"groupRequests"` -} - -func (x *GetGroupApplicationListResp) Reset() { - *x = GetGroupApplicationListResp{} - if protoimpl.UnsafeEnabled { - mi := &file_group_group_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetGroupApplicationListResp) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetGroupApplicationListResp) ProtoMessage() {} - -func (x *GetGroupApplicationListResp) ProtoReflect() protoreflect.Message { - mi := &file_group_group_proto_msgTypes[7] - 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 GetGroupApplicationListResp.ProtoReflect.Descriptor instead. -func (*GetGroupApplicationListResp) Descriptor() ([]byte, []int) { - return file_group_group_proto_rawDescGZIP(), []int{7} -} - -func (x *GetGroupApplicationListResp) GetTotal() uint32 { - if x != nil { - return x.Total - } - return 0 -} - -func (x *GetGroupApplicationListResp) GetGroupRequests() []*sdkws.GroupRequest { - if x != nil { - return x.GroupRequests - } - return nil -} - -type GetUserReqApplicationListReq struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Pagination *sdkws.RequestPagination `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination"` - UserID string `protobuf:"bytes,2,opt,name=userID,proto3" json:"userID"` -} - -func (x *GetUserReqApplicationListReq) Reset() { - *x = GetUserReqApplicationListReq{} - if protoimpl.UnsafeEnabled { - mi := &file_group_group_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetUserReqApplicationListReq) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetUserReqApplicationListReq) ProtoMessage() {} - -func (x *GetUserReqApplicationListReq) ProtoReflect() protoreflect.Message { - mi := &file_group_group_proto_msgTypes[8] - 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 GetUserReqApplicationListReq.ProtoReflect.Descriptor instead. -func (*GetUserReqApplicationListReq) Descriptor() ([]byte, []int) { - return file_group_group_proto_rawDescGZIP(), []int{8} -} - -func (x *GetUserReqApplicationListReq) GetPagination() *sdkws.RequestPagination { - if x != nil { - return x.Pagination - } - return nil -} - -func (x *GetUserReqApplicationListReq) GetUserID() string { - if x != nil { - return x.UserID - } - return "" -} - -type GetUserReqApplicationListResp struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Total uint32 `protobuf:"varint,1,opt,name=total,proto3" json:"total"` - GroupRequests []*sdkws.GroupRequest `protobuf:"bytes,2,rep,name=groupRequests,proto3" json:"groupRequests"` -} - -func (x *GetUserReqApplicationListResp) Reset() { - *x = GetUserReqApplicationListResp{} - if protoimpl.UnsafeEnabled { - mi := &file_group_group_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetUserReqApplicationListResp) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetUserReqApplicationListResp) ProtoMessage() {} - -func (x *GetUserReqApplicationListResp) ProtoReflect() protoreflect.Message { - mi := &file_group_group_proto_msgTypes[9] - 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 GetUserReqApplicationListResp.ProtoReflect.Descriptor instead. -func (*GetUserReqApplicationListResp) Descriptor() ([]byte, []int) { - return file_group_group_proto_rawDescGZIP(), []int{9} -} - -func (x *GetUserReqApplicationListResp) GetTotal() uint32 { - if x != nil { - return x.Total - } - return 0 -} - -func (x *GetUserReqApplicationListResp) GetGroupRequests() []*sdkws.GroupRequest { - if x != nil { - return x.GroupRequests - } - return nil -} - -type TransferGroupOwnerReq struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - GroupID string `protobuf:"bytes,1,opt,name=groupID,proto3" json:"groupID"` - OldOwnerUserID string `protobuf:"bytes,2,opt,name=oldOwnerUserID,proto3" json:"oldOwnerUserID"` - NewOwnerUserID string `protobuf:"bytes,3,opt,name=newOwnerUserID,proto3" json:"newOwnerUserID"` -} - -func (x *TransferGroupOwnerReq) Reset() { - *x = TransferGroupOwnerReq{} - if protoimpl.UnsafeEnabled { - mi := &file_group_group_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *TransferGroupOwnerReq) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*TransferGroupOwnerReq) ProtoMessage() {} - -func (x *TransferGroupOwnerReq) ProtoReflect() protoreflect.Message { - mi := &file_group_group_proto_msgTypes[10] - 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 TransferGroupOwnerReq.ProtoReflect.Descriptor instead. -func (*TransferGroupOwnerReq) Descriptor() ([]byte, []int) { - return file_group_group_proto_rawDescGZIP(), []int{10} -} - -func (x *TransferGroupOwnerReq) GetGroupID() string { - if x != nil { - return x.GroupID - } - return "" -} - -func (x *TransferGroupOwnerReq) GetOldOwnerUserID() string { - if x != nil { - return x.OldOwnerUserID - } - return "" -} - -func (x *TransferGroupOwnerReq) GetNewOwnerUserID() string { - if x != nil { - return x.NewOwnerUserID - } - return "" -} - -type TransferGroupOwnerResp struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *TransferGroupOwnerResp) Reset() { - *x = TransferGroupOwnerResp{} - if protoimpl.UnsafeEnabled { - mi := &file_group_group_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *TransferGroupOwnerResp) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*TransferGroupOwnerResp) ProtoMessage() {} - -func (x *TransferGroupOwnerResp) ProtoReflect() protoreflect.Message { - mi := &file_group_group_proto_msgTypes[11] - 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 TransferGroupOwnerResp.ProtoReflect.Descriptor instead. -func (*TransferGroupOwnerResp) Descriptor() ([]byte, []int) { - return file_group_group_proto_rawDescGZIP(), []int{11} -} - -type JoinGroupReq struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - GroupID string `protobuf:"bytes,1,opt,name=groupID,proto3" json:"groupID"` - ReqMessage string `protobuf:"bytes,2,opt,name=reqMessage,proto3" json:"reqMessage"` - JoinSource int32 `protobuf:"varint,3,opt,name=joinSource,proto3" json:"joinSource"` - InviterUserID string `protobuf:"bytes,4,opt,name=inviterUserID,proto3" json:"inviterUserID"` -} - -func (x *JoinGroupReq) Reset() { - *x = JoinGroupReq{} - if protoimpl.UnsafeEnabled { - mi := &file_group_group_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *JoinGroupReq) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*JoinGroupReq) ProtoMessage() {} - -func (x *JoinGroupReq) ProtoReflect() protoreflect.Message { - mi := &file_group_group_proto_msgTypes[12] - 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 JoinGroupReq.ProtoReflect.Descriptor instead. -func (*JoinGroupReq) Descriptor() ([]byte, []int) { - return file_group_group_proto_rawDescGZIP(), []int{12} -} - -func (x *JoinGroupReq) GetGroupID() string { - if x != nil { - return x.GroupID - } - return "" -} - -func (x *JoinGroupReq) GetReqMessage() string { - if x != nil { - return x.ReqMessage - } - return "" -} - -func (x *JoinGroupReq) GetJoinSource() int32 { - if x != nil { - return x.JoinSource - } - return 0 -} - -func (x *JoinGroupReq) GetInviterUserID() string { - if x != nil { - return x.InviterUserID - } - return "" -} - -type JoinGroupResp struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *JoinGroupResp) Reset() { - *x = JoinGroupResp{} - if protoimpl.UnsafeEnabled { - mi := &file_group_group_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *JoinGroupResp) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*JoinGroupResp) ProtoMessage() {} - -func (x *JoinGroupResp) ProtoReflect() protoreflect.Message { - mi := &file_group_group_proto_msgTypes[13] - 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 JoinGroupResp.ProtoReflect.Descriptor instead. -func (*JoinGroupResp) Descriptor() ([]byte, []int) { - return file_group_group_proto_rawDescGZIP(), []int{13} -} - -type GroupApplicationResponseReq struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - GroupID string `protobuf:"bytes,1,opt,name=groupID,proto3" json:"groupID"` - FromUserID string `protobuf:"bytes,2,opt,name=fromUserID,proto3" json:"fromUserID"` // - HandledMsg string `protobuf:"bytes,3,opt,name=handledMsg,proto3" json:"handledMsg"` - HandleResult int32 `protobuf:"varint,4,opt,name=handleResult,proto3" json:"handleResult"` -} - -func (x *GroupApplicationResponseReq) Reset() { - *x = GroupApplicationResponseReq{} - if protoimpl.UnsafeEnabled { - mi := &file_group_group_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GroupApplicationResponseReq) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GroupApplicationResponseReq) ProtoMessage() {} - -func (x *GroupApplicationResponseReq) ProtoReflect() protoreflect.Message { - mi := &file_group_group_proto_msgTypes[14] - 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 GroupApplicationResponseReq.ProtoReflect.Descriptor instead. -func (*GroupApplicationResponseReq) Descriptor() ([]byte, []int) { - return file_group_group_proto_rawDescGZIP(), []int{14} -} - -func (x *GroupApplicationResponseReq) GetGroupID() string { - if x != nil { - return x.GroupID - } - return "" -} - -func (x *GroupApplicationResponseReq) GetFromUserID() string { - if x != nil { - return x.FromUserID - } - return "" -} - -func (x *GroupApplicationResponseReq) GetHandledMsg() string { - if x != nil { - return x.HandledMsg - } - return "" -} - -func (x *GroupApplicationResponseReq) GetHandleResult() int32 { - if x != nil { - return x.HandleResult - } - return 0 -} - -type GroupApplicationResponseResp struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *GroupApplicationResponseResp) Reset() { - *x = GroupApplicationResponseResp{} - if protoimpl.UnsafeEnabled { - mi := &file_group_group_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GroupApplicationResponseResp) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GroupApplicationResponseResp) ProtoMessage() {} - -func (x *GroupApplicationResponseResp) ProtoReflect() protoreflect.Message { - mi := &file_group_group_proto_msgTypes[15] - 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 GroupApplicationResponseResp.ProtoReflect.Descriptor instead. -func (*GroupApplicationResponseResp) Descriptor() ([]byte, []int) { - return file_group_group_proto_rawDescGZIP(), []int{15} -} - -type QuitGroupReq struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - GroupID string `protobuf:"bytes,1,opt,name=groupID,proto3" json:"groupID"` -} - -func (x *QuitGroupReq) Reset() { - *x = QuitGroupReq{} - if protoimpl.UnsafeEnabled { - mi := &file_group_group_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QuitGroupReq) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QuitGroupReq) ProtoMessage() {} - -func (x *QuitGroupReq) ProtoReflect() protoreflect.Message { - mi := &file_group_group_proto_msgTypes[16] - 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 QuitGroupReq.ProtoReflect.Descriptor instead. -func (*QuitGroupReq) Descriptor() ([]byte, []int) { - return file_group_group_proto_rawDescGZIP(), []int{16} -} - -func (x *QuitGroupReq) GetGroupID() string { - if x != nil { - return x.GroupID - } - return "" -} - -type QuitGroupResp struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *QuitGroupResp) Reset() { - *x = QuitGroupResp{} - if protoimpl.UnsafeEnabled { - mi := &file_group_group_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QuitGroupResp) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QuitGroupResp) ProtoMessage() {} - -func (x *QuitGroupResp) ProtoReflect() protoreflect.Message { - mi := &file_group_group_proto_msgTypes[17] - 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 QuitGroupResp.ProtoReflect.Descriptor instead. -func (*QuitGroupResp) Descriptor() ([]byte, []int) { - return file_group_group_proto_rawDescGZIP(), []int{17} -} - -type GetGroupMemberListReq struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Pagination *sdkws.RequestPagination `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination"` - GroupID string `protobuf:"bytes,2,opt,name=groupID,proto3" json:"groupID"` - Filter int32 `protobuf:"varint,3,opt,name=filter,proto3" json:"filter"` -} - -func (x *GetGroupMemberListReq) Reset() { - *x = GetGroupMemberListReq{} - if protoimpl.UnsafeEnabled { - mi := &file_group_group_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetGroupMemberListReq) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetGroupMemberListReq) ProtoMessage() {} - -func (x *GetGroupMemberListReq) ProtoReflect() protoreflect.Message { - mi := &file_group_group_proto_msgTypes[18] - 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 GetGroupMemberListReq.ProtoReflect.Descriptor instead. -func (*GetGroupMemberListReq) Descriptor() ([]byte, []int) { - return file_group_group_proto_rawDescGZIP(), []int{18} -} - -func (x *GetGroupMemberListReq) GetPagination() *sdkws.RequestPagination { - if x != nil { - return x.Pagination - } - return nil -} - -func (x *GetGroupMemberListReq) GetGroupID() string { - if x != nil { - return x.GroupID - } - return "" -} - -func (x *GetGroupMemberListReq) GetFilter() int32 { - if x != nil { - return x.Filter - } - return 0 -} - -type GetGroupMemberListResp struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Total uint32 `protobuf:"varint,1,opt,name=total,proto3" json:"total"` - Members []*sdkws.GroupMemberFullInfo `protobuf:"bytes,2,rep,name=members,proto3" json:"members"` -} - -func (x *GetGroupMemberListResp) Reset() { - *x = GetGroupMemberListResp{} - if protoimpl.UnsafeEnabled { - mi := &file_group_group_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetGroupMemberListResp) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetGroupMemberListResp) ProtoMessage() {} - -func (x *GetGroupMemberListResp) ProtoReflect() protoreflect.Message { - mi := &file_group_group_proto_msgTypes[19] - 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 GetGroupMemberListResp.ProtoReflect.Descriptor instead. -func (*GetGroupMemberListResp) Descriptor() ([]byte, []int) { - return file_group_group_proto_rawDescGZIP(), []int{19} -} - -func (x *GetGroupMemberListResp) GetTotal() uint32 { - if x != nil { - return x.Total - } - return 0 -} - -func (x *GetGroupMemberListResp) GetMembers() []*sdkws.GroupMemberFullInfo { - if x != nil { - return x.Members - } - return nil -} - -type GetGroupMembersInfoReq struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - GroupID string `protobuf:"bytes,1,opt,name=groupID,proto3" json:"groupID"` - UserIDs []string `protobuf:"bytes,2,rep,name=userIDs,proto3" json:"userIDs"` -} - -func (x *GetGroupMembersInfoReq) Reset() { - *x = GetGroupMembersInfoReq{} - if protoimpl.UnsafeEnabled { - mi := &file_group_group_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetGroupMembersInfoReq) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetGroupMembersInfoReq) ProtoMessage() {} - -func (x *GetGroupMembersInfoReq) ProtoReflect() protoreflect.Message { - mi := &file_group_group_proto_msgTypes[20] - 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 GetGroupMembersInfoReq.ProtoReflect.Descriptor instead. -func (*GetGroupMembersInfoReq) Descriptor() ([]byte, []int) { - return file_group_group_proto_rawDescGZIP(), []int{20} -} - -func (x *GetGroupMembersInfoReq) GetGroupID() string { - if x != nil { - return x.GroupID - } - return "" -} - -func (x *GetGroupMembersInfoReq) GetUserIDs() []string { - if x != nil { - return x.UserIDs - } - return nil -} - -type GetGroupMembersInfoResp struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Members []*sdkws.GroupMemberFullInfo `protobuf:"bytes,1,rep,name=members,proto3" json:"members"` -} - -func (x *GetGroupMembersInfoResp) Reset() { - *x = GetGroupMembersInfoResp{} - if protoimpl.UnsafeEnabled { - mi := &file_group_group_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetGroupMembersInfoResp) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetGroupMembersInfoResp) ProtoMessage() {} - -func (x *GetGroupMembersInfoResp) ProtoReflect() protoreflect.Message { - mi := &file_group_group_proto_msgTypes[21] - 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 GetGroupMembersInfoResp.ProtoReflect.Descriptor instead. -func (*GetGroupMembersInfoResp) Descriptor() ([]byte, []int) { - return file_group_group_proto_rawDescGZIP(), []int{21} -} - -func (x *GetGroupMembersInfoResp) GetMembers() []*sdkws.GroupMemberFullInfo { - if x != nil { - return x.Members - } - return nil -} - -type KickGroupMemberReq struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - GroupID string `protobuf:"bytes,1,opt,name=groupID,proto3" json:"groupID"` - KickedUserIDs []string `protobuf:"bytes,2,rep,name=kickedUserIDs,proto3" json:"kickedUserIDs"` - Reason string `protobuf:"bytes,3,opt,name=reason,proto3" json:"reason"` -} - -func (x *KickGroupMemberReq) Reset() { - *x = KickGroupMemberReq{} - if protoimpl.UnsafeEnabled { - mi := &file_group_group_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *KickGroupMemberReq) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*KickGroupMemberReq) ProtoMessage() {} - -func (x *KickGroupMemberReq) ProtoReflect() protoreflect.Message { - mi := &file_group_group_proto_msgTypes[22] - 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 KickGroupMemberReq.ProtoReflect.Descriptor instead. -func (*KickGroupMemberReq) Descriptor() ([]byte, []int) { - return file_group_group_proto_rawDescGZIP(), []int{22} -} - -func (x *KickGroupMemberReq) GetGroupID() string { - if x != nil { - return x.GroupID - } - return "" -} - -func (x *KickGroupMemberReq) GetKickedUserIDs() []string { - if x != nil { - return x.KickedUserIDs - } - return nil -} - -func (x *KickGroupMemberReq) GetReason() string { - if x != nil { - return x.Reason - } - return "" -} - -type KickGroupMemberResp struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *KickGroupMemberResp) Reset() { - *x = KickGroupMemberResp{} - if protoimpl.UnsafeEnabled { - mi := &file_group_group_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *KickGroupMemberResp) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*KickGroupMemberResp) ProtoMessage() {} - -func (x *KickGroupMemberResp) ProtoReflect() protoreflect.Message { - mi := &file_group_group_proto_msgTypes[23] - 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 KickGroupMemberResp.ProtoReflect.Descriptor instead. -func (*KickGroupMemberResp) Descriptor() ([]byte, []int) { - return file_group_group_proto_rawDescGZIP(), []int{23} -} - -type GetJoinedGroupListReq struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Pagination *sdkws.RequestPagination `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination"` - FromUserID string `protobuf:"bytes,2,opt,name=fromUserID,proto3" json:"fromUserID"` -} - -func (x *GetJoinedGroupListReq) Reset() { - *x = GetJoinedGroupListReq{} - if protoimpl.UnsafeEnabled { - mi := &file_group_group_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetJoinedGroupListReq) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetJoinedGroupListReq) ProtoMessage() {} - -func (x *GetJoinedGroupListReq) ProtoReflect() protoreflect.Message { - mi := &file_group_group_proto_msgTypes[24] - 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 GetJoinedGroupListReq.ProtoReflect.Descriptor instead. -func (*GetJoinedGroupListReq) Descriptor() ([]byte, []int) { - return file_group_group_proto_rawDescGZIP(), []int{24} -} - -func (x *GetJoinedGroupListReq) GetPagination() *sdkws.RequestPagination { - if x != nil { - return x.Pagination - } - return nil -} - -func (x *GetJoinedGroupListReq) GetFromUserID() string { - if x != nil { - return x.FromUserID - } - return "" -} - -type GetJoinedGroupListResp struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Total uint32 `protobuf:"varint,1,opt,name=total,proto3" json:"total"` - Groups []*sdkws.GroupInfo `protobuf:"bytes,2,rep,name=groups,proto3" json:"groups"` -} - -func (x *GetJoinedGroupListResp) Reset() { - *x = GetJoinedGroupListResp{} - if protoimpl.UnsafeEnabled { - mi := &file_group_group_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetJoinedGroupListResp) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetJoinedGroupListResp) ProtoMessage() {} - -func (x *GetJoinedGroupListResp) ProtoReflect() protoreflect.Message { - mi := &file_group_group_proto_msgTypes[25] - 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 GetJoinedGroupListResp.ProtoReflect.Descriptor instead. -func (*GetJoinedGroupListResp) Descriptor() ([]byte, []int) { - return file_group_group_proto_rawDescGZIP(), []int{25} -} - -func (x *GetJoinedGroupListResp) GetTotal() uint32 { - if x != nil { - return x.Total - } - return 0 -} - -func (x *GetJoinedGroupListResp) GetGroups() []*sdkws.GroupInfo { - if x != nil { - return x.Groups - } - return nil -} - -type InviteUserToGroupReq struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - GroupID string `protobuf:"bytes,1,opt,name=groupID,proto3" json:"groupID"` - Reason string `protobuf:"bytes,2,opt,name=reason,proto3" json:"reason"` - InvitedUserIDs []string `protobuf:"bytes,3,rep,name=invitedUserIDs,proto3" json:"invitedUserIDs"` -} - -func (x *InviteUserToGroupReq) Reset() { - *x = InviteUserToGroupReq{} - if protoimpl.UnsafeEnabled { - mi := &file_group_group_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *InviteUserToGroupReq) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*InviteUserToGroupReq) ProtoMessage() {} - -func (x *InviteUserToGroupReq) ProtoReflect() protoreflect.Message { - mi := &file_group_group_proto_msgTypes[26] - 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 InviteUserToGroupReq.ProtoReflect.Descriptor instead. -func (*InviteUserToGroupReq) Descriptor() ([]byte, []int) { - return file_group_group_proto_rawDescGZIP(), []int{26} -} - -func (x *InviteUserToGroupReq) GetGroupID() string { - if x != nil { - return x.GroupID - } - return "" -} - -func (x *InviteUserToGroupReq) GetReason() string { - if x != nil { - return x.Reason - } - return "" -} - -func (x *InviteUserToGroupReq) GetInvitedUserIDs() []string { - if x != nil { - return x.InvitedUserIDs - } - return nil -} - -type InviteUserToGroupResp struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *InviteUserToGroupResp) Reset() { - *x = InviteUserToGroupResp{} - if protoimpl.UnsafeEnabled { - mi := &file_group_group_proto_msgTypes[27] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *InviteUserToGroupResp) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*InviteUserToGroupResp) ProtoMessage() {} - -func (x *InviteUserToGroupResp) ProtoReflect() protoreflect.Message { - mi := &file_group_group_proto_msgTypes[27] - 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 InviteUserToGroupResp.ProtoReflect.Descriptor instead. -func (*InviteUserToGroupResp) Descriptor() ([]byte, []int) { - return file_group_group_proto_rawDescGZIP(), []int{27} -} - -type GetGroupAllMemberReq struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Pagination *sdkws.RequestPagination `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination"` - GroupID string `protobuf:"bytes,2,opt,name=groupID,proto3" json:"groupID"` -} - -func (x *GetGroupAllMemberReq) Reset() { - *x = GetGroupAllMemberReq{} - if protoimpl.UnsafeEnabled { - mi := &file_group_group_proto_msgTypes[28] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetGroupAllMemberReq) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetGroupAllMemberReq) ProtoMessage() {} - -func (x *GetGroupAllMemberReq) ProtoReflect() protoreflect.Message { - mi := &file_group_group_proto_msgTypes[28] - 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 GetGroupAllMemberReq.ProtoReflect.Descriptor instead. -func (*GetGroupAllMemberReq) Descriptor() ([]byte, []int) { - return file_group_group_proto_rawDescGZIP(), []int{28} -} - -func (x *GetGroupAllMemberReq) GetPagination() *sdkws.RequestPagination { - if x != nil { - return x.Pagination - } - return nil -} - -func (x *GetGroupAllMemberReq) GetGroupID() string { - if x != nil { - return x.GroupID - } - return "" -} - -type GetGroupAllMemberResp struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Members []*sdkws.GroupMemberFullInfo `protobuf:"bytes,1,rep,name=members,proto3" json:"members"` -} - -func (x *GetGroupAllMemberResp) Reset() { - *x = GetGroupAllMemberResp{} - if protoimpl.UnsafeEnabled { - mi := &file_group_group_proto_msgTypes[29] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetGroupAllMemberResp) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetGroupAllMemberResp) ProtoMessage() {} - -func (x *GetGroupAllMemberResp) ProtoReflect() protoreflect.Message { - mi := &file_group_group_proto_msgTypes[29] - 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 GetGroupAllMemberResp.ProtoReflect.Descriptor instead. -func (*GetGroupAllMemberResp) Descriptor() ([]byte, []int) { - return file_group_group_proto_rawDescGZIP(), []int{29} -} - -func (x *GetGroupAllMemberResp) GetMembers() []*sdkws.GroupMemberFullInfo { - if x != nil { - return x.Members - } - return nil -} - -type CMSGroup struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - GroupInfo *sdkws.GroupInfo `protobuf:"bytes,1,opt,name=groupInfo,proto3" json:"groupInfo"` - GroupOwnerUserName string `protobuf:"bytes,2,opt,name=groupOwnerUserName,proto3" json:"groupOwnerUserName"` - GroupOwnerUserID string `protobuf:"bytes,3,opt,name=groupOwnerUserID,proto3" json:"groupOwnerUserID"` -} - -func (x *CMSGroup) Reset() { - *x = CMSGroup{} - if protoimpl.UnsafeEnabled { - mi := &file_group_group_proto_msgTypes[30] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CMSGroup) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CMSGroup) ProtoMessage() {} - -func (x *CMSGroup) ProtoReflect() protoreflect.Message { - mi := &file_group_group_proto_msgTypes[30] - 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 CMSGroup.ProtoReflect.Descriptor instead. -func (*CMSGroup) Descriptor() ([]byte, []int) { - return file_group_group_proto_rawDescGZIP(), []int{30} -} - -func (x *CMSGroup) GetGroupInfo() *sdkws.GroupInfo { - if x != nil { - return x.GroupInfo - } - return nil -} - -func (x *CMSGroup) GetGroupOwnerUserName() string { - if x != nil { - return x.GroupOwnerUserName - } - return "" -} - -func (x *CMSGroup) GetGroupOwnerUserID() string { - if x != nil { - return x.GroupOwnerUserID - } - return "" -} - -type GetGroupsReq struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Pagination *sdkws.RequestPagination `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination"` - GroupName string `protobuf:"bytes,2,opt,name=groupName,proto3" json:"groupName"` - GroupID string `protobuf:"bytes,3,opt,name=groupID,proto3" json:"groupID"` -} - -func (x *GetGroupsReq) Reset() { - *x = GetGroupsReq{} - if protoimpl.UnsafeEnabled { - mi := &file_group_group_proto_msgTypes[31] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetGroupsReq) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetGroupsReq) ProtoMessage() {} - -func (x *GetGroupsReq) ProtoReflect() protoreflect.Message { - mi := &file_group_group_proto_msgTypes[31] - 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 GetGroupsReq.ProtoReflect.Descriptor instead. -func (*GetGroupsReq) Descriptor() ([]byte, []int) { - return file_group_group_proto_rawDescGZIP(), []int{31} -} - -func (x *GetGroupsReq) GetPagination() *sdkws.RequestPagination { - if x != nil { - return x.Pagination - } - return nil -} - -func (x *GetGroupsReq) GetGroupName() string { - if x != nil { - return x.GroupName - } - return "" -} - -func (x *GetGroupsReq) GetGroupID() string { - if x != nil { - return x.GroupID - } - return "" -} - -type GetGroupsResp struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Total uint32 `protobuf:"varint,1,opt,name=total,proto3" json:"total"` - Groups []*CMSGroup `protobuf:"bytes,2,rep,name=groups,proto3" json:"groups"` -} - -func (x *GetGroupsResp) Reset() { - *x = GetGroupsResp{} - if protoimpl.UnsafeEnabled { - mi := &file_group_group_proto_msgTypes[32] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetGroupsResp) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetGroupsResp) ProtoMessage() {} - -func (x *GetGroupsResp) ProtoReflect() protoreflect.Message { - mi := &file_group_group_proto_msgTypes[32] - 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 GetGroupsResp.ProtoReflect.Descriptor instead. -func (*GetGroupsResp) Descriptor() ([]byte, []int) { - return file_group_group_proto_rawDescGZIP(), []int{32} -} - -func (x *GetGroupsResp) GetTotal() uint32 { - if x != nil { - return x.Total - } - return 0 -} - -func (x *GetGroupsResp) GetGroups() []*CMSGroup { - if x != nil { - return x.Groups - } - return nil -} - -type GetGroupMemberReq struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - GroupID string `protobuf:"bytes,1,opt,name=groupID,proto3" json:"groupID"` -} - -func (x *GetGroupMemberReq) Reset() { - *x = GetGroupMemberReq{} - if protoimpl.UnsafeEnabled { - mi := &file_group_group_proto_msgTypes[33] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetGroupMemberReq) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetGroupMemberReq) ProtoMessage() {} - -func (x *GetGroupMemberReq) ProtoReflect() protoreflect.Message { - mi := &file_group_group_proto_msgTypes[33] - 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 GetGroupMemberReq.ProtoReflect.Descriptor instead. -func (*GetGroupMemberReq) Descriptor() ([]byte, []int) { - return file_group_group_proto_rawDescGZIP(), []int{33} -} - -func (x *GetGroupMemberReq) GetGroupID() string { - if x != nil { - return x.GroupID - } - return "" -} - -type GetGroupMembersCMSReq struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Pagination *sdkws.RequestPagination `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination"` - GroupID string `protobuf:"bytes,2,opt,name=groupID,proto3" json:"groupID"` - UserName string `protobuf:"bytes,3,opt,name=userName,proto3" json:"userName"` -} - -func (x *GetGroupMembersCMSReq) Reset() { - *x = GetGroupMembersCMSReq{} - if protoimpl.UnsafeEnabled { - mi := &file_group_group_proto_msgTypes[34] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetGroupMembersCMSReq) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetGroupMembersCMSReq) ProtoMessage() {} - -func (x *GetGroupMembersCMSReq) ProtoReflect() protoreflect.Message { - mi := &file_group_group_proto_msgTypes[34] - 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 GetGroupMembersCMSReq.ProtoReflect.Descriptor instead. -func (*GetGroupMembersCMSReq) Descriptor() ([]byte, []int) { - return file_group_group_proto_rawDescGZIP(), []int{34} -} - -func (x *GetGroupMembersCMSReq) GetPagination() *sdkws.RequestPagination { - if x != nil { - return x.Pagination - } - return nil -} - -func (x *GetGroupMembersCMSReq) GetGroupID() string { - if x != nil { - return x.GroupID - } - return "" -} - -func (x *GetGroupMembersCMSReq) GetUserName() string { - if x != nil { - return x.UserName - } - return "" -} - -type GetGroupMembersCMSResp struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Total uint32 `protobuf:"varint,1,opt,name=total,proto3" json:"total"` - Members []*sdkws.GroupMemberFullInfo `protobuf:"bytes,2,rep,name=members,proto3" json:"members"` -} - -func (x *GetGroupMembersCMSResp) Reset() { - *x = GetGroupMembersCMSResp{} - if protoimpl.UnsafeEnabled { - mi := &file_group_group_proto_msgTypes[35] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetGroupMembersCMSResp) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetGroupMembersCMSResp) ProtoMessage() {} - -func (x *GetGroupMembersCMSResp) ProtoReflect() protoreflect.Message { - mi := &file_group_group_proto_msgTypes[35] - 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 GetGroupMembersCMSResp.ProtoReflect.Descriptor instead. -func (*GetGroupMembersCMSResp) Descriptor() ([]byte, []int) { - return file_group_group_proto_rawDescGZIP(), []int{35} -} - -func (x *GetGroupMembersCMSResp) GetTotal() uint32 { - if x != nil { - return x.Total - } - return 0 -} - -func (x *GetGroupMembersCMSResp) GetMembers() []*sdkws.GroupMemberFullInfo { - if x != nil { - return x.Members - } - return nil -} - -type DismissGroupReq struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - GroupID string `protobuf:"bytes,1,opt,name=groupID,proto3" json:"groupID"` - DeleteMember bool `protobuf:"varint,2,opt,name=deleteMember,proto3" json:"deleteMember"` -} - -func (x *DismissGroupReq) Reset() { - *x = DismissGroupReq{} - if protoimpl.UnsafeEnabled { - mi := &file_group_group_proto_msgTypes[36] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DismissGroupReq) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DismissGroupReq) ProtoMessage() {} - -func (x *DismissGroupReq) ProtoReflect() protoreflect.Message { - mi := &file_group_group_proto_msgTypes[36] - 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 DismissGroupReq.ProtoReflect.Descriptor instead. -func (*DismissGroupReq) Descriptor() ([]byte, []int) { - return file_group_group_proto_rawDescGZIP(), []int{36} -} - -func (x *DismissGroupReq) GetGroupID() string { - if x != nil { - return x.GroupID - } - return "" -} - -func (x *DismissGroupReq) GetDeleteMember() bool { - if x != nil { - return x.DeleteMember - } - return false -} - -type DismissGroupResp struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *DismissGroupResp) Reset() { - *x = DismissGroupResp{} - if protoimpl.UnsafeEnabled { - mi := &file_group_group_proto_msgTypes[37] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DismissGroupResp) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DismissGroupResp) ProtoMessage() {} - -func (x *DismissGroupResp) ProtoReflect() protoreflect.Message { - mi := &file_group_group_proto_msgTypes[37] - 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 DismissGroupResp.ProtoReflect.Descriptor instead. -func (*DismissGroupResp) Descriptor() ([]byte, []int) { - return file_group_group_proto_rawDescGZIP(), []int{37} -} - -type MuteGroupMemberReq struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - GroupID string `protobuf:"bytes,1,opt,name=groupID,proto3" json:"groupID"` - UserID string `protobuf:"bytes,2,opt,name=userID,proto3" json:"userID"` - MutedSeconds uint32 `protobuf:"varint,3,opt,name=mutedSeconds,proto3" json:"mutedSeconds"` -} - -func (x *MuteGroupMemberReq) Reset() { - *x = MuteGroupMemberReq{} - if protoimpl.UnsafeEnabled { - mi := &file_group_group_proto_msgTypes[38] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MuteGroupMemberReq) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MuteGroupMemberReq) ProtoMessage() {} - -func (x *MuteGroupMemberReq) ProtoReflect() protoreflect.Message { - mi := &file_group_group_proto_msgTypes[38] - 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 MuteGroupMemberReq.ProtoReflect.Descriptor instead. -func (*MuteGroupMemberReq) Descriptor() ([]byte, []int) { - return file_group_group_proto_rawDescGZIP(), []int{38} -} - -func (x *MuteGroupMemberReq) GetGroupID() string { - if x != nil { - return x.GroupID - } - return "" -} - -func (x *MuteGroupMemberReq) GetUserID() string { - if x != nil { - return x.UserID - } - return "" -} - -func (x *MuteGroupMemberReq) GetMutedSeconds() uint32 { - if x != nil { - return x.MutedSeconds - } - return 0 -} - -type MuteGroupMemberResp struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *MuteGroupMemberResp) Reset() { - *x = MuteGroupMemberResp{} - if protoimpl.UnsafeEnabled { - mi := &file_group_group_proto_msgTypes[39] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MuteGroupMemberResp) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MuteGroupMemberResp) ProtoMessage() {} - -func (x *MuteGroupMemberResp) ProtoReflect() protoreflect.Message { - mi := &file_group_group_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 MuteGroupMemberResp.ProtoReflect.Descriptor instead. -func (*MuteGroupMemberResp) Descriptor() ([]byte, []int) { - return file_group_group_proto_rawDescGZIP(), []int{39} -} - -type CancelMuteGroupMemberReq struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - GroupID string `protobuf:"bytes,1,opt,name=groupID,proto3" json:"groupID"` - UserID string `protobuf:"bytes,2,opt,name=userID,proto3" json:"userID"` -} - -func (x *CancelMuteGroupMemberReq) Reset() { - *x = CancelMuteGroupMemberReq{} - if protoimpl.UnsafeEnabled { - mi := &file_group_group_proto_msgTypes[40] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CancelMuteGroupMemberReq) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CancelMuteGroupMemberReq) ProtoMessage() {} - -func (x *CancelMuteGroupMemberReq) ProtoReflect() protoreflect.Message { - mi := &file_group_group_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 CancelMuteGroupMemberReq.ProtoReflect.Descriptor instead. -func (*CancelMuteGroupMemberReq) Descriptor() ([]byte, []int) { - return file_group_group_proto_rawDescGZIP(), []int{40} -} - -func (x *CancelMuteGroupMemberReq) GetGroupID() string { - if x != nil { - return x.GroupID - } - return "" -} - -func (x *CancelMuteGroupMemberReq) GetUserID() string { - if x != nil { - return x.UserID - } - return "" -} - -type CancelMuteGroupMemberResp struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *CancelMuteGroupMemberResp) Reset() { - *x = CancelMuteGroupMemberResp{} - if protoimpl.UnsafeEnabled { - mi := &file_group_group_proto_msgTypes[41] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CancelMuteGroupMemberResp) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CancelMuteGroupMemberResp) ProtoMessage() {} - -func (x *CancelMuteGroupMemberResp) ProtoReflect() protoreflect.Message { - mi := &file_group_group_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 CancelMuteGroupMemberResp.ProtoReflect.Descriptor instead. -func (*CancelMuteGroupMemberResp) Descriptor() ([]byte, []int) { - return file_group_group_proto_rawDescGZIP(), []int{41} -} - -type MuteGroupReq struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - GroupID string `protobuf:"bytes,1,opt,name=groupID,proto3" json:"groupID"` -} - -func (x *MuteGroupReq) Reset() { - *x = MuteGroupReq{} - if protoimpl.UnsafeEnabled { - mi := &file_group_group_proto_msgTypes[42] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MuteGroupReq) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MuteGroupReq) ProtoMessage() {} - -func (x *MuteGroupReq) ProtoReflect() protoreflect.Message { - mi := &file_group_group_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 MuteGroupReq.ProtoReflect.Descriptor instead. -func (*MuteGroupReq) Descriptor() ([]byte, []int) { - return file_group_group_proto_rawDescGZIP(), []int{42} -} - -func (x *MuteGroupReq) GetGroupID() string { - if x != nil { - return x.GroupID - } - return "" -} - -type MuteGroupResp struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *MuteGroupResp) Reset() { - *x = MuteGroupResp{} - if protoimpl.UnsafeEnabled { - mi := &file_group_group_proto_msgTypes[43] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MuteGroupResp) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MuteGroupResp) ProtoMessage() {} - -func (x *MuteGroupResp) ProtoReflect() protoreflect.Message { - mi := &file_group_group_proto_msgTypes[43] - 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 MuteGroupResp.ProtoReflect.Descriptor instead. -func (*MuteGroupResp) Descriptor() ([]byte, []int) { - return file_group_group_proto_rawDescGZIP(), []int{43} -} - -type CancelMuteGroupReq struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - GroupID string `protobuf:"bytes,1,opt,name=groupID,proto3" json:"groupID"` -} - -func (x *CancelMuteGroupReq) Reset() { - *x = CancelMuteGroupReq{} - if protoimpl.UnsafeEnabled { - mi := &file_group_group_proto_msgTypes[44] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CancelMuteGroupReq) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CancelMuteGroupReq) ProtoMessage() {} - -func (x *CancelMuteGroupReq) ProtoReflect() protoreflect.Message { - mi := &file_group_group_proto_msgTypes[44] - 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 CancelMuteGroupReq.ProtoReflect.Descriptor instead. -func (*CancelMuteGroupReq) Descriptor() ([]byte, []int) { - return file_group_group_proto_rawDescGZIP(), []int{44} -} - -func (x *CancelMuteGroupReq) GetGroupID() string { - if x != nil { - return x.GroupID - } - return "" -} - -type CancelMuteGroupResp struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *CancelMuteGroupResp) Reset() { - *x = CancelMuteGroupResp{} - if protoimpl.UnsafeEnabled { - mi := &file_group_group_proto_msgTypes[45] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CancelMuteGroupResp) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CancelMuteGroupResp) ProtoMessage() {} - -func (x *CancelMuteGroupResp) ProtoReflect() protoreflect.Message { - mi := &file_group_group_proto_msgTypes[45] - 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 CancelMuteGroupResp.ProtoReflect.Descriptor instead. -func (*CancelMuteGroupResp) Descriptor() ([]byte, []int) { - return file_group_group_proto_rawDescGZIP(), []int{45} -} - -type GetJoinedSuperGroupListReq struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - UserID string `protobuf:"bytes,1,opt,name=userID,proto3" json:"userID"` -} - -func (x *GetJoinedSuperGroupListReq) Reset() { - *x = GetJoinedSuperGroupListReq{} - if protoimpl.UnsafeEnabled { - mi := &file_group_group_proto_msgTypes[46] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetJoinedSuperGroupListReq) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetJoinedSuperGroupListReq) ProtoMessage() {} - -func (x *GetJoinedSuperGroupListReq) ProtoReflect() protoreflect.Message { - mi := &file_group_group_proto_msgTypes[46] - 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 GetJoinedSuperGroupListReq.ProtoReflect.Descriptor instead. -func (*GetJoinedSuperGroupListReq) Descriptor() ([]byte, []int) { - return file_group_group_proto_rawDescGZIP(), []int{46} -} - -func (x *GetJoinedSuperGroupListReq) GetUserID() string { - if x != nil { - return x.UserID - } - return "" -} - -type GetJoinedSuperGroupListResp struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Groups []*sdkws.GroupInfo `protobuf:"bytes,1,rep,name=groups,proto3" json:"groups"` -} - -func (x *GetJoinedSuperGroupListResp) Reset() { - *x = GetJoinedSuperGroupListResp{} - if protoimpl.UnsafeEnabled { - mi := &file_group_group_proto_msgTypes[47] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetJoinedSuperGroupListResp) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetJoinedSuperGroupListResp) ProtoMessage() {} - -func (x *GetJoinedSuperGroupListResp) ProtoReflect() protoreflect.Message { - mi := &file_group_group_proto_msgTypes[47] - 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 GetJoinedSuperGroupListResp.ProtoReflect.Descriptor instead. -func (*GetJoinedSuperGroupListResp) Descriptor() ([]byte, []int) { - return file_group_group_proto_rawDescGZIP(), []int{47} -} - -func (x *GetJoinedSuperGroupListResp) GetGroups() []*sdkws.GroupInfo { - if x != nil { - return x.Groups - } - return nil -} - -type GetSuperGroupsInfoReq struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - GroupIDs []string `protobuf:"bytes,1,rep,name=groupIDs,proto3" json:"groupIDs"` -} - -func (x *GetSuperGroupsInfoReq) Reset() { - *x = GetSuperGroupsInfoReq{} - if protoimpl.UnsafeEnabled { - mi := &file_group_group_proto_msgTypes[48] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetSuperGroupsInfoReq) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetSuperGroupsInfoReq) ProtoMessage() {} - -func (x *GetSuperGroupsInfoReq) ProtoReflect() protoreflect.Message { - mi := &file_group_group_proto_msgTypes[48] - 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 GetSuperGroupsInfoReq.ProtoReflect.Descriptor instead. -func (*GetSuperGroupsInfoReq) Descriptor() ([]byte, []int) { - return file_group_group_proto_rawDescGZIP(), []int{48} -} - -func (x *GetSuperGroupsInfoReq) GetGroupIDs() []string { - if x != nil { - return x.GroupIDs - } - return nil -} - -type GetSuperGroupsInfoResp struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - GroupInfos []*sdkws.GroupInfo `protobuf:"bytes,1,rep,name=groupInfos,proto3" json:"groupInfos"` -} - -func (x *GetSuperGroupsInfoResp) Reset() { - *x = GetSuperGroupsInfoResp{} - if protoimpl.UnsafeEnabled { - mi := &file_group_group_proto_msgTypes[49] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetSuperGroupsInfoResp) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetSuperGroupsInfoResp) ProtoMessage() {} - -func (x *GetSuperGroupsInfoResp) ProtoReflect() protoreflect.Message { - mi := &file_group_group_proto_msgTypes[49] - 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 GetSuperGroupsInfoResp.ProtoReflect.Descriptor instead. -func (*GetSuperGroupsInfoResp) Descriptor() ([]byte, []int) { - return file_group_group_proto_rawDescGZIP(), []int{49} -} - -func (x *GetSuperGroupsInfoResp) GetGroupInfos() []*sdkws.GroupInfo { - if x != nil { - return x.GroupInfos - } - return nil -} - -type SetGroupMemberInfo struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - GroupID string `protobuf:"bytes,1,opt,name=groupID,proto3" json:"groupID"` - UserID string `protobuf:"bytes,2,opt,name=userID,proto3" json:"userID"` - Nickname *wrapperspb.StringValue `protobuf:"bytes,3,opt,name=nickname,proto3" json:"nickname"` - FaceURL *wrapperspb.StringValue `protobuf:"bytes,4,opt,name=faceURL,proto3" json:"faceURL"` - RoleLevel *wrapperspb.Int32Value `protobuf:"bytes,5,opt,name=roleLevel,proto3" json:"roleLevel"` - Ex *wrapperspb.StringValue `protobuf:"bytes,6,opt,name=ex,proto3" json:"ex"` -} - -func (x *SetGroupMemberInfo) Reset() { - *x = SetGroupMemberInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_group_group_proto_msgTypes[50] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SetGroupMemberInfo) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SetGroupMemberInfo) ProtoMessage() {} - -func (x *SetGroupMemberInfo) ProtoReflect() protoreflect.Message { - mi := &file_group_group_proto_msgTypes[50] - 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 SetGroupMemberInfo.ProtoReflect.Descriptor instead. -func (*SetGroupMemberInfo) Descriptor() ([]byte, []int) { - return file_group_group_proto_rawDescGZIP(), []int{50} -} - -func (x *SetGroupMemberInfo) GetGroupID() string { - if x != nil { - return x.GroupID - } - return "" -} - -func (x *SetGroupMemberInfo) GetUserID() string { - if x != nil { - return x.UserID - } - return "" -} - -func (x *SetGroupMemberInfo) GetNickname() *wrapperspb.StringValue { - if x != nil { - return x.Nickname - } - return nil -} - -func (x *SetGroupMemberInfo) GetFaceURL() *wrapperspb.StringValue { - if x != nil { - return x.FaceURL - } - return nil -} - -func (x *SetGroupMemberInfo) GetRoleLevel() *wrapperspb.Int32Value { - if x != nil { - return x.RoleLevel - } - return nil -} - -func (x *SetGroupMemberInfo) GetEx() *wrapperspb.StringValue { - if x != nil { - return x.Ex - } - return nil -} - -type SetGroupMemberInfoReq struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Members []*SetGroupMemberInfo `protobuf:"bytes,1,rep,name=members,proto3" json:"members"` -} - -func (x *SetGroupMemberInfoReq) Reset() { - *x = SetGroupMemberInfoReq{} - if protoimpl.UnsafeEnabled { - mi := &file_group_group_proto_msgTypes[51] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SetGroupMemberInfoReq) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SetGroupMemberInfoReq) ProtoMessage() {} - -func (x *SetGroupMemberInfoReq) ProtoReflect() protoreflect.Message { - mi := &file_group_group_proto_msgTypes[51] - 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 SetGroupMemberInfoReq.ProtoReflect.Descriptor instead. -func (*SetGroupMemberInfoReq) Descriptor() ([]byte, []int) { - return file_group_group_proto_rawDescGZIP(), []int{51} -} - -func (x *SetGroupMemberInfoReq) GetMembers() []*SetGroupMemberInfo { - if x != nil { - return x.Members - } - return nil -} - -type SetGroupMemberInfoResp struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *SetGroupMemberInfoResp) Reset() { - *x = SetGroupMemberInfoResp{} - if protoimpl.UnsafeEnabled { - mi := &file_group_group_proto_msgTypes[52] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SetGroupMemberInfoResp) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SetGroupMemberInfoResp) ProtoMessage() {} - -func (x *SetGroupMemberInfoResp) ProtoReflect() protoreflect.Message { - mi := &file_group_group_proto_msgTypes[52] - 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 SetGroupMemberInfoResp.ProtoReflect.Descriptor instead. -func (*SetGroupMemberInfoResp) Descriptor() ([]byte, []int) { - return file_group_group_proto_rawDescGZIP(), []int{52} -} - -type GetGroupAbstractInfoReq struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - GroupIDs []string `protobuf:"bytes,1,rep,name=groupIDs,proto3" json:"groupIDs"` -} - -func (x *GetGroupAbstractInfoReq) Reset() { - *x = GetGroupAbstractInfoReq{} - if protoimpl.UnsafeEnabled { - mi := &file_group_group_proto_msgTypes[53] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetGroupAbstractInfoReq) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetGroupAbstractInfoReq) ProtoMessage() {} - -func (x *GetGroupAbstractInfoReq) ProtoReflect() protoreflect.Message { - mi := &file_group_group_proto_msgTypes[53] - 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 GetGroupAbstractInfoReq.ProtoReflect.Descriptor instead. -func (*GetGroupAbstractInfoReq) Descriptor() ([]byte, []int) { - return file_group_group_proto_rawDescGZIP(), []int{53} -} - -func (x *GetGroupAbstractInfoReq) GetGroupIDs() []string { - if x != nil { - return x.GroupIDs - } - return nil -} - -type GroupAbstractInfo struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - GroupID string `protobuf:"bytes,1,opt,name=groupID,proto3" json:"groupID"` - GroupMemberNumber uint32 `protobuf:"varint,2,opt,name=groupMemberNumber,proto3" json:"groupMemberNumber"` - GroupMemberListHash uint64 `protobuf:"varint,3,opt,name=groupMemberListHash,proto3" json:"groupMemberListHash"` -} - -func (x *GroupAbstractInfo) Reset() { - *x = GroupAbstractInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_group_group_proto_msgTypes[54] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GroupAbstractInfo) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GroupAbstractInfo) ProtoMessage() {} - -func (x *GroupAbstractInfo) ProtoReflect() protoreflect.Message { - mi := &file_group_group_proto_msgTypes[54] - 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 GroupAbstractInfo.ProtoReflect.Descriptor instead. -func (*GroupAbstractInfo) Descriptor() ([]byte, []int) { - return file_group_group_proto_rawDescGZIP(), []int{54} -} - -func (x *GroupAbstractInfo) GetGroupID() string { - if x != nil { - return x.GroupID - } - return "" -} - -func (x *GroupAbstractInfo) GetGroupMemberNumber() uint32 { - if x != nil { - return x.GroupMemberNumber - } - return 0 -} - -func (x *GroupAbstractInfo) GetGroupMemberListHash() uint64 { - if x != nil { - return x.GroupMemberListHash - } - return 0 -} - -type GetGroupAbstractInfoResp struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - GroupAbstractInfos []*GroupAbstractInfo `protobuf:"bytes,1,rep,name=groupAbstractInfos,proto3" json:"groupAbstractInfos"` -} - -func (x *GetGroupAbstractInfoResp) Reset() { - *x = GetGroupAbstractInfoResp{} - if protoimpl.UnsafeEnabled { - mi := &file_group_group_proto_msgTypes[55] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetGroupAbstractInfoResp) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetGroupAbstractInfoResp) ProtoMessage() {} - -func (x *GetGroupAbstractInfoResp) ProtoReflect() protoreflect.Message { - mi := &file_group_group_proto_msgTypes[55] - 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 GetGroupAbstractInfoResp.ProtoReflect.Descriptor instead. -func (*GetGroupAbstractInfoResp) Descriptor() ([]byte, []int) { - return file_group_group_proto_rawDescGZIP(), []int{55} -} - -func (x *GetGroupAbstractInfoResp) GetGroupAbstractInfos() []*GroupAbstractInfo { - if x != nil { - return x.GroupAbstractInfos - } - return nil -} - -type GetUserInGroupMembersReq struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - UserID string `protobuf:"bytes,1,opt,name=userID,proto3" json:"userID"` - GroupIDs []string `protobuf:"bytes,2,rep,name=groupIDs,proto3" json:"groupIDs"` -} - -func (x *GetUserInGroupMembersReq) Reset() { - *x = GetUserInGroupMembersReq{} - if protoimpl.UnsafeEnabled { - mi := &file_group_group_proto_msgTypes[56] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetUserInGroupMembersReq) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetUserInGroupMembersReq) ProtoMessage() {} - -func (x *GetUserInGroupMembersReq) ProtoReflect() protoreflect.Message { - mi := &file_group_group_proto_msgTypes[56] - 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 GetUserInGroupMembersReq.ProtoReflect.Descriptor instead. -func (*GetUserInGroupMembersReq) Descriptor() ([]byte, []int) { - return file_group_group_proto_rawDescGZIP(), []int{56} -} - -func (x *GetUserInGroupMembersReq) GetUserID() string { - if x != nil { - return x.UserID - } - return "" -} - -func (x *GetUserInGroupMembersReq) GetGroupIDs() []string { - if x != nil { - return x.GroupIDs - } - return nil -} - -type GetUserInGroupMembersResp struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Members []*sdkws.GroupMemberFullInfo `protobuf:"bytes,1,rep,name=members,proto3" json:"members"` -} - -func (x *GetUserInGroupMembersResp) Reset() { - *x = GetUserInGroupMembersResp{} - if protoimpl.UnsafeEnabled { - mi := &file_group_group_proto_msgTypes[57] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetUserInGroupMembersResp) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetUserInGroupMembersResp) ProtoMessage() {} - -func (x *GetUserInGroupMembersResp) ProtoReflect() protoreflect.Message { - mi := &file_group_group_proto_msgTypes[57] - 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 GetUserInGroupMembersResp.ProtoReflect.Descriptor instead. -func (*GetUserInGroupMembersResp) Descriptor() ([]byte, []int) { - return file_group_group_proto_rawDescGZIP(), []int{57} -} - -func (x *GetUserInGroupMembersResp) GetMembers() []*sdkws.GroupMemberFullInfo { - if x != nil { - return x.Members - } - return nil -} - -type GetGroupMemberUserIDsReq struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - GroupID string `protobuf:"bytes,1,opt,name=groupID,proto3" json:"groupID"` -} - -func (x *GetGroupMemberUserIDsReq) Reset() { - *x = GetGroupMemberUserIDsReq{} - if protoimpl.UnsafeEnabled { - mi := &file_group_group_proto_msgTypes[58] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetGroupMemberUserIDsReq) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetGroupMemberUserIDsReq) ProtoMessage() {} - -func (x *GetGroupMemberUserIDsReq) ProtoReflect() protoreflect.Message { - mi := &file_group_group_proto_msgTypes[58] - 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 GetGroupMemberUserIDsReq.ProtoReflect.Descriptor instead. -func (*GetGroupMemberUserIDsReq) Descriptor() ([]byte, []int) { - return file_group_group_proto_rawDescGZIP(), []int{58} -} - -func (x *GetGroupMemberUserIDsReq) GetGroupID() string { - if x != nil { - return x.GroupID - } - return "" -} - -type GetGroupMemberUserIDsResp struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - UserIDs []string `protobuf:"bytes,1,rep,name=userIDs,proto3" json:"userIDs"` -} - -func (x *GetGroupMemberUserIDsResp) Reset() { - *x = GetGroupMemberUserIDsResp{} - if protoimpl.UnsafeEnabled { - mi := &file_group_group_proto_msgTypes[59] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetGroupMemberUserIDsResp) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetGroupMemberUserIDsResp) ProtoMessage() {} - -func (x *GetGroupMemberUserIDsResp) ProtoReflect() protoreflect.Message { - mi := &file_group_group_proto_msgTypes[59] - 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 GetGroupMemberUserIDsResp.ProtoReflect.Descriptor instead. -func (*GetGroupMemberUserIDsResp) Descriptor() ([]byte, []int) { - return file_group_group_proto_rawDescGZIP(), []int{59} -} - -func (x *GetGroupMemberUserIDsResp) GetUserIDs() []string { - if x != nil { - return x.UserIDs - } - return nil -} - -type GetGroupMemberRoleLevelReq struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - GroupID string `protobuf:"bytes,1,opt,name=groupID,proto3" json:"groupID"` - RoleLevels []int32 `protobuf:"varint,2,rep,packed,name=roleLevels,proto3" json:"roleLevels"` -} - -func (x *GetGroupMemberRoleLevelReq) Reset() { - *x = GetGroupMemberRoleLevelReq{} - if protoimpl.UnsafeEnabled { - mi := &file_group_group_proto_msgTypes[60] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetGroupMemberRoleLevelReq) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetGroupMemberRoleLevelReq) ProtoMessage() {} - -func (x *GetGroupMemberRoleLevelReq) ProtoReflect() protoreflect.Message { - mi := &file_group_group_proto_msgTypes[60] - 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 GetGroupMemberRoleLevelReq.ProtoReflect.Descriptor instead. -func (*GetGroupMemberRoleLevelReq) Descriptor() ([]byte, []int) { - return file_group_group_proto_rawDescGZIP(), []int{60} -} - -func (x *GetGroupMemberRoleLevelReq) GetGroupID() string { - if x != nil { - return x.GroupID - } - return "" -} - -func (x *GetGroupMemberRoleLevelReq) GetRoleLevels() []int32 { - if x != nil { - return x.RoleLevels - } - return nil -} - -type GetGroupMemberRoleLevelResp struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Members []*sdkws.GroupMemberFullInfo `protobuf:"bytes,1,rep,name=members,proto3" json:"members"` -} - -func (x *GetGroupMemberRoleLevelResp) Reset() { - *x = GetGroupMemberRoleLevelResp{} - if protoimpl.UnsafeEnabled { - mi := &file_group_group_proto_msgTypes[61] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetGroupMemberRoleLevelResp) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetGroupMemberRoleLevelResp) ProtoMessage() {} - -func (x *GetGroupMemberRoleLevelResp) ProtoReflect() protoreflect.Message { - mi := &file_group_group_proto_msgTypes[61] - 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 GetGroupMemberRoleLevelResp.ProtoReflect.Descriptor instead. -func (*GetGroupMemberRoleLevelResp) Descriptor() ([]byte, []int) { - return file_group_group_proto_rawDescGZIP(), []int{61} -} - -func (x *GetGroupMemberRoleLevelResp) GetMembers() []*sdkws.GroupMemberFullInfo { - if x != nil { - return x.Members - } - return nil -} - -type GetGroupInfoCacheReq struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - GroupID string `protobuf:"bytes,1,opt,name=groupID,proto3" json:"groupID"` -} - -func (x *GetGroupInfoCacheReq) Reset() { - *x = GetGroupInfoCacheReq{} - if protoimpl.UnsafeEnabled { - mi := &file_group_group_proto_msgTypes[62] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetGroupInfoCacheReq) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetGroupInfoCacheReq) ProtoMessage() {} - -func (x *GetGroupInfoCacheReq) ProtoReflect() protoreflect.Message { - mi := &file_group_group_proto_msgTypes[62] - 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 GetGroupInfoCacheReq.ProtoReflect.Descriptor instead. -func (*GetGroupInfoCacheReq) Descriptor() ([]byte, []int) { - return file_group_group_proto_rawDescGZIP(), []int{62} -} - -func (x *GetGroupInfoCacheReq) GetGroupID() string { - if x != nil { - return x.GroupID - } - return "" -} - -type GetGroupInfoCacheResp struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - GroupInfo *sdkws.GroupInfo `protobuf:"bytes,1,opt,name=groupInfo,proto3" json:"groupInfo"` -} - -func (x *GetGroupInfoCacheResp) Reset() { - *x = GetGroupInfoCacheResp{} - if protoimpl.UnsafeEnabled { - mi := &file_group_group_proto_msgTypes[63] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetGroupInfoCacheResp) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetGroupInfoCacheResp) ProtoMessage() {} - -func (x *GetGroupInfoCacheResp) ProtoReflect() protoreflect.Message { - mi := &file_group_group_proto_msgTypes[63] - 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 GetGroupInfoCacheResp.ProtoReflect.Descriptor instead. -func (*GetGroupInfoCacheResp) Descriptor() ([]byte, []int) { - return file_group_group_proto_rawDescGZIP(), []int{63} -} - -func (x *GetGroupInfoCacheResp) GetGroupInfo() *sdkws.GroupInfo { - if x != nil { - return x.GroupInfo - } - return nil -} - -type GetGroupMemberCacheReq struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - GroupID string `protobuf:"bytes,1,opt,name=groupID,proto3" json:"groupID"` - GroupMemberID string `protobuf:"bytes,2,opt,name=groupMemberID,proto3" json:"groupMemberID"` -} - -func (x *GetGroupMemberCacheReq) Reset() { - *x = GetGroupMemberCacheReq{} - if protoimpl.UnsafeEnabled { - mi := &file_group_group_proto_msgTypes[64] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetGroupMemberCacheReq) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetGroupMemberCacheReq) ProtoMessage() {} - -func (x *GetGroupMemberCacheReq) ProtoReflect() protoreflect.Message { - mi := &file_group_group_proto_msgTypes[64] - 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 GetGroupMemberCacheReq.ProtoReflect.Descriptor instead. -func (*GetGroupMemberCacheReq) Descriptor() ([]byte, []int) { - return file_group_group_proto_rawDescGZIP(), []int{64} -} - -func (x *GetGroupMemberCacheReq) GetGroupID() string { - if x != nil { - return x.GroupID - } - return "" -} - -func (x *GetGroupMemberCacheReq) GetGroupMemberID() string { - if x != nil { - return x.GroupMemberID - } - return "" -} - -type GetGroupMemberCacheResp struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Member *sdkws.GroupMemberFullInfo `protobuf:"bytes,1,opt,name=member,proto3" json:"member"` -} - -func (x *GetGroupMemberCacheResp) Reset() { - *x = GetGroupMemberCacheResp{} - if protoimpl.UnsafeEnabled { - mi := &file_group_group_proto_msgTypes[65] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetGroupMemberCacheResp) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetGroupMemberCacheResp) ProtoMessage() {} - -func (x *GetGroupMemberCacheResp) ProtoReflect() protoreflect.Message { - mi := &file_group_group_proto_msgTypes[65] - 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 GetGroupMemberCacheResp.ProtoReflect.Descriptor instead. -func (*GetGroupMemberCacheResp) Descriptor() ([]byte, []int) { - return file_group_group_proto_rawDescGZIP(), []int{65} -} - -func (x *GetGroupMemberCacheResp) GetMember() *sdkws.GroupMemberFullInfo { - if x != nil { - return x.Member - } - return nil -} - -type GroupCreateCountReq struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Start int64 `protobuf:"varint,1,opt,name=start,proto3" json:"start"` - End int64 `protobuf:"varint,2,opt,name=end,proto3" json:"end"` -} - -func (x *GroupCreateCountReq) Reset() { - *x = GroupCreateCountReq{} - if protoimpl.UnsafeEnabled { - mi := &file_group_group_proto_msgTypes[66] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GroupCreateCountReq) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GroupCreateCountReq) ProtoMessage() {} - -func (x *GroupCreateCountReq) ProtoReflect() protoreflect.Message { - mi := &file_group_group_proto_msgTypes[66] - 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 GroupCreateCountReq.ProtoReflect.Descriptor instead. -func (*GroupCreateCountReq) Descriptor() ([]byte, []int) { - return file_group_group_proto_rawDescGZIP(), []int{66} -} - -func (x *GroupCreateCountReq) GetStart() int64 { - if x != nil { - return x.Start - } - return 0 -} - -func (x *GroupCreateCountReq) GetEnd() int64 { - if x != nil { - return x.End - } - return 0 -} - -type GroupCreateCountResp struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Total int64 `protobuf:"varint,1,opt,name=total,proto3" json:"total"` - Before int64 `protobuf:"varint,2,opt,name=before,proto3" json:"before"` - Count map[string]int64 `protobuf:"bytes,3,rep,name=count,proto3" json:"count" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` -} - -func (x *GroupCreateCountResp) Reset() { - *x = GroupCreateCountResp{} - if protoimpl.UnsafeEnabled { - mi := &file_group_group_proto_msgTypes[67] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GroupCreateCountResp) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GroupCreateCountResp) ProtoMessage() {} - -func (x *GroupCreateCountResp) ProtoReflect() protoreflect.Message { - mi := &file_group_group_proto_msgTypes[67] - 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 GroupCreateCountResp.ProtoReflect.Descriptor instead. -func (*GroupCreateCountResp) Descriptor() ([]byte, []int) { - return file_group_group_proto_rawDescGZIP(), []int{67} -} - -func (x *GroupCreateCountResp) GetTotal() int64 { - if x != nil { - return x.Total - } - return 0 -} - -func (x *GroupCreateCountResp) GetBefore() int64 { - if x != nil { - return x.Before - } - return 0 -} - -func (x *GroupCreateCountResp) GetCount() map[string]int64 { - if x != nil { - return x.Count - } - return nil -} - -var File_group_group_proto protoreflect.FileDescriptor - -var file_group_group_proto_rawDesc = []byte{ - 0x0a, 0x11, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x12, 0x12, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, - 0x72, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 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, 0xb9, 0x01, 0x0a, 0x0e, 0x43, 0x72, 0x65, 0x61, - 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x12, 0x24, 0x0a, 0x0d, 0x6d, 0x65, - 0x6d, 0x62, 0x65, 0x72, 0x55, 0x73, 0x65, 0x72, 0x49, 0x44, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, - 0x09, 0x52, 0x0d, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x55, 0x73, 0x65, 0x72, 0x49, 0x44, 0x73, - 0x12, 0x3b, 0x0a, 0x09, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x6e, 0x66, 0x6f, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, - 0x65, 0x72, 0x2e, 0x73, 0x64, 0x6b, 0x77, 0x73, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x6e, - 0x66, 0x6f, 0x52, 0x09, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x22, 0x0a, - 0x0c, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x55, 0x73, 0x65, 0x72, 0x49, 0x44, 0x73, 0x18, 0x03, 0x20, - 0x03, 0x28, 0x09, 0x52, 0x0c, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x55, 0x73, 0x65, 0x72, 0x49, 0x44, - 0x73, 0x12, 0x20, 0x0a, 0x0b, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x55, 0x73, 0x65, 0x72, 0x49, 0x44, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x55, 0x73, 0x65, - 0x72, 0x49, 0x44, 0x22, 0x4e, 0x0a, 0x0f, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, - 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x12, 0x3b, 0x0a, 0x09, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x49, - 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x4f, 0x70, 0x65, 0x6e, - 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x73, 0x64, 0x6b, 0x77, 0x73, 0x2e, 0x47, - 0x72, 0x6f, 0x75, 0x70, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x09, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x49, - 0x6e, 0x66, 0x6f, 0x22, 0x2e, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, - 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x12, 0x1a, 0x0a, 0x08, 0x67, 0x72, 0x6f, 0x75, 0x70, - 0x49, 0x44, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x67, 0x72, 0x6f, 0x75, 0x70, - 0x49, 0x44, 0x73, 0x22, 0x52, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, - 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x12, 0x3d, 0x0a, 0x0a, 0x67, 0x72, 0x6f, 0x75, - 0x70, 0x49, 0x6e, 0x66, 0x6f, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x4f, - 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x73, 0x64, 0x6b, 0x77, - 0x73, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0a, 0x67, 0x72, 0x6f, - 0x75, 0x70, 0x49, 0x6e, 0x66, 0x6f, 0x73, 0x22, 0x60, 0x0a, 0x0f, 0x53, 0x65, 0x74, 0x47, 0x72, - 0x6f, 0x75, 0x70, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x12, 0x4d, 0x0a, 0x0f, 0x67, 0x72, - 0x6f, 0x75, 0x70, 0x49, 0x6e, 0x66, 0x6f, 0x46, 0x6f, 0x72, 0x53, 0x65, 0x74, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, - 0x65, 0x72, 0x2e, 0x73, 0x64, 0x6b, 0x77, 0x73, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x6e, - 0x66, 0x6f, 0x46, 0x6f, 0x72, 0x53, 0x65, 0x74, 0x52, 0x0f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x49, - 0x6e, 0x66, 0x6f, 0x46, 0x6f, 0x72, 0x53, 0x65, 0x74, 0x22, 0x12, 0x0a, 0x10, 0x53, 0x65, 0x74, - 0x47, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x22, 0x83, 0x01, - 0x0a, 0x1a, 0x47, 0x65, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x63, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x12, 0x45, 0x0a, 0x0a, - 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x25, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 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, 0x12, 0x1e, 0x0a, 0x0a, 0x66, 0x72, 0x6f, 0x6d, 0x55, 0x73, 0x65, 0x72, 0x49, - 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x66, 0x72, 0x6f, 0x6d, 0x55, 0x73, 0x65, - 0x72, 0x49, 0x44, 0x22, 0x7b, 0x0a, 0x1b, 0x47, 0x65, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x41, - 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x69, 0x73, 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, 0x46, 0x0a, 0x0d, 0x67, 0x72, 0x6f, 0x75, - 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x20, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x73, - 0x64, 0x6b, 0x77, 0x73, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x52, 0x0d, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, - 0x22, 0x7d, 0x0a, 0x1c, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x41, 0x70, - 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, - 0x12, 0x45, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, - 0x76, 0x65, 0x72, 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, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, - 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x44, 0x22, - 0x7d, 0x0a, 0x1d, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x41, 0x70, 0x70, - 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x69, 0x73, 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, 0x46, 0x0a, 0x0d, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, - 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x73, 0x64, 0x6b, - 0x77, 0x73, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, - 0x0d, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x22, 0x81, - 0x01, 0x0a, 0x15, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x47, 0x72, 0x6f, 0x75, 0x70, - 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x52, 0x65, 0x71, 0x12, 0x18, 0x0a, 0x07, 0x67, 0x72, 0x6f, 0x75, - 0x70, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x67, 0x72, 0x6f, 0x75, 0x70, - 0x49, 0x44, 0x12, 0x26, 0x0a, 0x0e, 0x6f, 0x6c, 0x64, 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x55, 0x73, - 0x65, 0x72, 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x6f, 0x6c, 0x64, 0x4f, - 0x77, 0x6e, 0x65, 0x72, 0x55, 0x73, 0x65, 0x72, 0x49, 0x44, 0x12, 0x26, 0x0a, 0x0e, 0x6e, 0x65, - 0x77, 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x55, 0x73, 0x65, 0x72, 0x49, 0x44, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0e, 0x6e, 0x65, 0x77, 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x55, 0x73, 0x65, 0x72, - 0x49, 0x44, 0x22, 0x18, 0x0a, 0x16, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x47, 0x72, - 0x6f, 0x75, 0x70, 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x22, 0x8e, 0x01, 0x0a, - 0x0c, 0x4a, 0x6f, 0x69, 0x6e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x12, 0x18, 0x0a, - 0x07, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, - 0x67, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x44, 0x12, 0x1e, 0x0a, 0x0a, 0x72, 0x65, 0x71, 0x4d, 0x65, - 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x72, 0x65, 0x71, - 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x6a, 0x6f, 0x69, 0x6e, 0x53, - 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x6a, 0x6f, 0x69, - 0x6e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x24, 0x0a, 0x0d, 0x69, 0x6e, 0x76, 0x69, 0x74, - 0x65, 0x72, 0x55, 0x73, 0x65, 0x72, 0x49, 0x44, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, - 0x69, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x72, 0x55, 0x73, 0x65, 0x72, 0x49, 0x44, 0x22, 0x0f, 0x0a, - 0x0d, 0x4a, 0x6f, 0x69, 0x6e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x22, 0x9b, - 0x01, 0x0a, 0x1b, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x65, 0x71, 0x12, 0x18, - 0x0a, 0x07, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x07, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x44, 0x12, 0x1e, 0x0a, 0x0a, 0x66, 0x72, 0x6f, 0x6d, - 0x55, 0x73, 0x65, 0x72, 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x66, 0x72, - 0x6f, 0x6d, 0x55, 0x73, 0x65, 0x72, 0x49, 0x44, 0x12, 0x1e, 0x0a, 0x0a, 0x68, 0x61, 0x6e, 0x64, - 0x6c, 0x65, 0x64, 0x4d, 0x73, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x68, 0x61, - 0x6e, 0x64, 0x6c, 0x65, 0x64, 0x4d, 0x73, 0x67, 0x12, 0x22, 0x0a, 0x0c, 0x68, 0x61, 0x6e, 0x64, - 0x6c, 0x65, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, - 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x1e, 0x0a, 0x1c, - 0x47, 0x72, 0x6f, 0x75, 0x70, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x65, 0x73, 0x70, 0x22, 0x28, 0x0a, 0x0c, - 0x51, 0x75, 0x69, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x12, 0x18, 0x0a, 0x07, - 0x67, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x67, - 0x72, 0x6f, 0x75, 0x70, 0x49, 0x44, 0x22, 0x0f, 0x0a, 0x0d, 0x51, 0x75, 0x69, 0x74, 0x47, 0x72, - 0x6f, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x22, 0x90, 0x01, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x47, - 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, - 0x71, 0x12, 0x45, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, - 0x72, 0x76, 0x65, 0x72, 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, 0x12, 0x18, 0x0a, 0x07, 0x67, 0x72, 0x6f, 0x75, - 0x70, 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x67, 0x72, 0x6f, 0x75, 0x70, - 0x49, 0x44, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x05, 0x52, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x22, 0x71, 0x0a, 0x16, 0x47, 0x65, - 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x4c, 0x69, 0x73, 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, 0x41, 0x0a, 0x07, 0x6d, 0x65, - 0x6d, 0x62, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x4f, 0x70, - 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x73, 0x64, 0x6b, 0x77, 0x73, - 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x46, 0x75, 0x6c, 0x6c, - 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x07, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x22, 0x4c, 0x0a, - 0x16, 0x47, 0x65, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, - 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x12, 0x18, 0x0a, 0x07, 0x67, 0x72, 0x6f, 0x75, 0x70, - 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x49, - 0x44, 0x12, 0x18, 0x0a, 0x07, 0x75, 0x73, 0x65, 0x72, 0x49, 0x44, 0x73, 0x18, 0x02, 0x20, 0x03, - 0x28, 0x09, 0x52, 0x07, 0x75, 0x73, 0x65, 0x72, 0x49, 0x44, 0x73, 0x22, 0x5c, 0x0a, 0x17, 0x47, - 0x65, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x49, 0x6e, - 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x12, 0x41, 0x0a, 0x07, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, - 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, - 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x73, 0x64, 0x6b, 0x77, 0x73, 0x2e, 0x47, 0x72, 0x6f, - 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x46, 0x75, 0x6c, 0x6c, 0x49, 0x6e, 0x66, 0x6f, - 0x52, 0x07, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x22, 0x6c, 0x0a, 0x12, 0x4b, 0x69, 0x63, - 0x6b, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x65, 0x71, 0x12, - 0x18, 0x0a, 0x07, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x07, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x44, 0x12, 0x24, 0x0a, 0x0d, 0x6b, 0x69, 0x63, - 0x6b, 0x65, 0x64, 0x55, 0x73, 0x65, 0x72, 0x49, 0x44, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, - 0x52, 0x0d, 0x6b, 0x69, 0x63, 0x6b, 0x65, 0x64, 0x55, 0x73, 0x65, 0x72, 0x49, 0x44, 0x73, 0x12, - 0x16, 0x0a, 0x06, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x06, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x22, 0x15, 0x0a, 0x13, 0x4b, 0x69, 0x63, 0x6b, 0x47, - 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x22, 0x7e, - 0x0a, 0x15, 0x47, 0x65, 0x74, 0x4a, 0x6f, 0x69, 0x6e, 0x65, 0x64, 0x47, 0x72, 0x6f, 0x75, 0x70, - 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x12, 0x45, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x4f, 0x70, - 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 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, 0x12, 0x1e, - 0x0a, 0x0a, 0x66, 0x72, 0x6f, 0x6d, 0x55, 0x73, 0x65, 0x72, 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0a, 0x66, 0x72, 0x6f, 0x6d, 0x55, 0x73, 0x65, 0x72, 0x49, 0x44, 0x22, 0x65, - 0x0a, 0x16, 0x47, 0x65, 0x74, 0x4a, 0x6f, 0x69, 0x6e, 0x65, 0x64, 0x47, 0x72, 0x6f, 0x75, 0x70, - 0x4c, 0x69, 0x73, 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, 0x35, - 0x0a, 0x06, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, - 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x73, 0x64, - 0x6b, 0x77, 0x73, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x06, 0x67, - 0x72, 0x6f, 0x75, 0x70, 0x73, 0x22, 0x70, 0x0a, 0x14, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x55, - 0x73, 0x65, 0x72, 0x54, 0x6f, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x12, 0x18, 0x0a, - 0x07, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, - 0x67, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x44, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x61, 0x73, 0x6f, - 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x12, - 0x26, 0x0a, 0x0e, 0x69, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x64, 0x55, 0x73, 0x65, 0x72, 0x49, 0x44, - 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0e, 0x69, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x64, - 0x55, 0x73, 0x65, 0x72, 0x49, 0x44, 0x73, 0x22, 0x17, 0x0a, 0x15, 0x49, 0x6e, 0x76, 0x69, 0x74, - 0x65, 0x55, 0x73, 0x65, 0x72, 0x54, 0x6f, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, - 0x22, 0x77, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x41, 0x6c, 0x6c, 0x4d, - 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x65, 0x71, 0x12, 0x45, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, - 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x4f, - 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 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, 0x12, - 0x18, 0x0a, 0x07, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x07, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x44, 0x22, 0x5a, 0x0a, 0x15, 0x47, 0x65, 0x74, - 0x47, 0x72, 0x6f, 0x75, 0x70, 0x41, 0x6c, 0x6c, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x65, - 0x73, 0x70, 0x12, 0x41, 0x0a, 0x07, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, - 0x65, 0x72, 0x2e, 0x73, 0x64, 0x6b, 0x77, 0x73, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, - 0x6d, 0x62, 0x65, 0x72, 0x46, 0x75, 0x6c, 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x07, 0x6d, 0x65, - 0x6d, 0x62, 0x65, 0x72, 0x73, 0x22, 0xa3, 0x01, 0x0a, 0x08, 0x43, 0x4d, 0x53, 0x47, 0x72, 0x6f, - 0x75, 0x70, 0x12, 0x3b, 0x0a, 0x09, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x6e, 0x66, 0x6f, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, - 0x72, 0x76, 0x65, 0x72, 0x2e, 0x73, 0x64, 0x6b, 0x77, 0x73, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, - 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x09, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x6e, 0x66, 0x6f, 0x12, - 0x2e, 0x0a, 0x12, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x55, 0x73, 0x65, - 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x67, 0x72, 0x6f, - 0x75, 0x70, 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x55, 0x73, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, - 0x2a, 0x0a, 0x10, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x55, 0x73, 0x65, - 0x72, 0x49, 0x44, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x67, 0x72, 0x6f, 0x75, 0x70, - 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x55, 0x73, 0x65, 0x72, 0x49, 0x44, 0x22, 0x8d, 0x01, 0x0a, 0x0c, - 0x47, 0x65, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x52, 0x65, 0x71, 0x12, 0x45, 0x0a, 0x0a, - 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x25, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 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, 0x12, 0x1c, 0x0a, 0x09, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x4e, 0x61, 0x6d, 0x65, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x4e, 0x61, 0x6d, - 0x65, 0x12, 0x18, 0x0a, 0x07, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x44, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x07, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x44, 0x22, 0x5b, 0x0a, 0x0d, 0x47, - 0x65, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 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, 0x34, 0x0a, 0x06, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x18, 0x02, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, - 0x72, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x43, 0x4d, 0x53, 0x47, 0x72, 0x6f, 0x75, 0x70, - 0x52, 0x06, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x22, 0x2d, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x47, - 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x65, 0x71, 0x12, 0x18, 0x0a, - 0x07, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, - 0x67, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x44, 0x22, 0x94, 0x01, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x47, - 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x43, 0x4d, 0x53, 0x52, 0x65, - 0x71, 0x12, 0x45, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, - 0x72, 0x76, 0x65, 0x72, 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, 0x12, 0x18, 0x0a, 0x07, 0x67, 0x72, 0x6f, 0x75, - 0x70, 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x67, 0x72, 0x6f, 0x75, 0x70, - 0x49, 0x44, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x71, - 0x0a, 0x16, 0x47, 0x65, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, - 0x73, 0x43, 0x4d, 0x53, 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, 0x41, - 0x0a, 0x07, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x27, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x73, - 0x64, 0x6b, 0x77, 0x73, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, - 0x46, 0x75, 0x6c, 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x07, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, - 0x73, 0x22, 0x4f, 0x0a, 0x0f, 0x44, 0x69, 0x73, 0x6d, 0x69, 0x73, 0x73, 0x47, 0x72, 0x6f, 0x75, - 0x70, 0x52, 0x65, 0x71, 0x12, 0x18, 0x0a, 0x07, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x44, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x44, 0x12, 0x22, - 0x0a, 0x0c, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4d, 0x65, 0x6d, 0x62, - 0x65, 0x72, 0x22, 0x12, 0x0a, 0x10, 0x44, 0x69, 0x73, 0x6d, 0x69, 0x73, 0x73, 0x47, 0x72, 0x6f, - 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x22, 0x6a, 0x0a, 0x12, 0x4d, 0x75, 0x74, 0x65, 0x47, 0x72, - 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x65, 0x71, 0x12, 0x18, 0x0a, 0x07, - 0x67, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x67, - 0x72, 0x6f, 0x75, 0x70, 0x49, 0x44, 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, 0x22, - 0x0a, 0x0c, 0x6d, 0x75, 0x74, 0x65, 0x64, 0x53, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0c, 0x6d, 0x75, 0x74, 0x65, 0x64, 0x53, 0x65, 0x63, 0x6f, 0x6e, - 0x64, 0x73, 0x22, 0x15, 0x0a, 0x13, 0x4d, 0x75, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, - 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x22, 0x4c, 0x0a, 0x18, 0x43, 0x61, 0x6e, - 0x63, 0x65, 0x6c, 0x4d, 0x75, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, - 0x65, 0x72, 0x52, 0x65, 0x71, 0x12, 0x18, 0x0a, 0x07, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x44, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x44, 0x12, - 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x44, 0x22, 0x1b, 0x0a, 0x19, 0x43, 0x61, 0x6e, 0x63, 0x65, - 0x6c, 0x4d, 0x75, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, - 0x52, 0x65, 0x73, 0x70, 0x22, 0x28, 0x0a, 0x0c, 0x4d, 0x75, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, - 0x70, 0x52, 0x65, 0x71, 0x12, 0x18, 0x0a, 0x07, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x44, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x44, 0x22, 0x0f, - 0x0a, 0x0d, 0x4d, 0x75, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x22, - 0x2e, 0x0a, 0x12, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x4d, 0x75, 0x74, 0x65, 0x47, 0x72, 0x6f, - 0x75, 0x70, 0x52, 0x65, 0x71, 0x12, 0x18, 0x0a, 0x07, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x44, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x44, 0x22, - 0x15, 0x0a, 0x13, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x4d, 0x75, 0x74, 0x65, 0x47, 0x72, 0x6f, - 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x22, 0x34, 0x0a, 0x1a, 0x47, 0x65, 0x74, 0x4a, 0x6f, 0x69, - 0x6e, 0x65, 0x64, 0x53, 0x75, 0x70, 0x65, 0x72, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4c, 0x69, 0x73, - 0x74, 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, 0x54, 0x0a, 0x1b, - 0x47, 0x65, 0x74, 0x4a, 0x6f, 0x69, 0x6e, 0x65, 0x64, 0x53, 0x75, 0x70, 0x65, 0x72, 0x47, 0x72, - 0x6f, 0x75, 0x70, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x35, 0x0a, 0x06, 0x67, - 0x72, 0x6f, 0x75, 0x70, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x4f, 0x70, - 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x73, 0x64, 0x6b, 0x77, 0x73, - 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x06, 0x67, 0x72, 0x6f, 0x75, - 0x70, 0x73, 0x22, 0x33, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x53, 0x75, 0x70, 0x65, 0x72, 0x47, 0x72, - 0x6f, 0x75, 0x70, 0x73, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x12, 0x1a, 0x0a, 0x08, 0x67, - 0x72, 0x6f, 0x75, 0x70, 0x49, 0x44, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x67, - 0x72, 0x6f, 0x75, 0x70, 0x49, 0x44, 0x73, 0x22, 0x57, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x53, 0x75, - 0x70, 0x65, 0x72, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, - 0x70, 0x12, 0x3d, 0x0a, 0x0a, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x6e, 0x66, 0x6f, 0x73, 0x18, - 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, - 0x72, 0x76, 0x65, 0x72, 0x2e, 0x73, 0x64, 0x6b, 0x77, 0x73, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, - 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0a, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x6e, 0x66, 0x6f, 0x73, - 0x22, 0xb9, 0x02, 0x0a, 0x12, 0x53, 0x65, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, - 0x62, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x18, 0x0a, 0x07, 0x67, 0x72, 0x6f, 0x75, 0x70, - 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x49, - 0x44, 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, 0x3e, 0x0a, 0x08, 0x6e, 0x69, 0x63, - 0x6b, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x4f, 0x70, - 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, - 0x08, 0x6e, 0x69, 0x63, 0x6b, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x3c, 0x0a, 0x07, 0x66, 0x61, 0x63, - 0x65, 0x55, 0x52, 0x4c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x4f, 0x70, 0x65, - 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x07, - 0x66, 0x61, 0x63, 0x65, 0x55, 0x52, 0x4c, 0x12, 0x3f, 0x0a, 0x09, 0x72, 0x6f, 0x6c, 0x65, 0x4c, - 0x65, 0x76, 0x65, 0x6c, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x4f, 0x70, 0x65, - 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x09, 0x72, - 0x6f, 0x6c, 0x65, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x32, 0x0a, 0x02, 0x65, 0x78, 0x18, 0x06, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, - 0x76, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, - 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x02, 0x65, 0x78, 0x22, 0x59, 0x0a, 0x15, - 0x53, 0x65, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x49, 0x6e, - 0x66, 0x6f, 0x52, 0x65, 0x71, 0x12, 0x40, 0x0a, 0x07, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, - 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, - 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x53, 0x65, 0x74, 0x47, - 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x07, - 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x22, 0x18, 0x0a, 0x16, 0x53, 0x65, 0x74, 0x47, 0x72, - 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, - 0x70, 0x22, 0x35, 0x0a, 0x17, 0x47, 0x65, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x41, 0x62, 0x73, - 0x74, 0x72, 0x61, 0x63, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x12, 0x1a, 0x0a, 0x08, - 0x67, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x44, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, - 0x67, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x44, 0x73, 0x22, 0x8d, 0x01, 0x0a, 0x11, 0x47, 0x72, 0x6f, - 0x75, 0x70, 0x41, 0x62, 0x73, 0x74, 0x72, 0x61, 0x63, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x18, - 0x0a, 0x07, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x07, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x44, 0x12, 0x2c, 0x0a, 0x11, 0x67, 0x72, 0x6f, 0x75, - 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0d, 0x52, 0x11, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, - 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x30, 0x0a, 0x13, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x4d, - 0x65, 0x6d, 0x62, 0x65, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x48, 0x61, 0x73, 0x68, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x04, 0x52, 0x13, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, - 0x4c, 0x69, 0x73, 0x74, 0x48, 0x61, 0x73, 0x68, 0x22, 0x71, 0x0a, 0x18, 0x47, 0x65, 0x74, 0x47, - 0x72, 0x6f, 0x75, 0x70, 0x41, 0x62, 0x73, 0x74, 0x72, 0x61, 0x63, 0x74, 0x49, 0x6e, 0x66, 0x6f, - 0x52, 0x65, 0x73, 0x70, 0x12, 0x55, 0x0a, 0x12, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x41, 0x62, 0x73, - 0x74, 0x72, 0x61, 0x63, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x25, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, - 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x41, 0x62, 0x73, 0x74, 0x72, - 0x61, 0x63, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x12, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x41, 0x62, - 0x73, 0x74, 0x72, 0x61, 0x63, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x73, 0x22, 0x4e, 0x0a, 0x18, 0x47, - 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, - 0x62, 0x65, 0x72, 0x73, 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, 0x12, - 0x1a, 0x0a, 0x08, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x44, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, - 0x09, 0x52, 0x08, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x44, 0x73, 0x22, 0x5e, 0x0a, 0x19, 0x47, - 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, - 0x62, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x12, 0x41, 0x0a, 0x07, 0x6d, 0x65, 0x6d, 0x62, - 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x4f, 0x70, 0x65, 0x6e, - 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x73, 0x64, 0x6b, 0x77, 0x73, 0x2e, 0x47, - 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x46, 0x75, 0x6c, 0x6c, 0x49, 0x6e, - 0x66, 0x6f, 0x52, 0x07, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x22, 0x34, 0x0a, 0x18, 0x47, - 0x65, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x55, 0x73, 0x65, - 0x72, 0x49, 0x44, 0x73, 0x52, 0x65, 0x71, 0x12, 0x18, 0x0a, 0x07, 0x67, 0x72, 0x6f, 0x75, 0x70, - 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x49, - 0x44, 0x22, 0x35, 0x0a, 0x19, 0x47, 0x65, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, - 0x62, 0x65, 0x72, 0x55, 0x73, 0x65, 0x72, 0x49, 0x44, 0x73, 0x52, 0x65, 0x73, 0x70, 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, 0x56, 0x0a, 0x1a, 0x47, 0x65, 0x74, 0x47, - 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x6f, 0x6c, 0x65, 0x4c, 0x65, - 0x76, 0x65, 0x6c, 0x52, 0x65, 0x71, 0x12, 0x18, 0x0a, 0x07, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x49, - 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x44, - 0x12, 0x1e, 0x0a, 0x0a, 0x72, 0x6f, 0x6c, 0x65, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x73, 0x18, 0x02, - 0x20, 0x03, 0x28, 0x05, 0x52, 0x0a, 0x72, 0x6f, 0x6c, 0x65, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x73, - 0x22, 0x60, 0x0a, 0x1b, 0x47, 0x65, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, - 0x65, 0x72, 0x52, 0x6f, 0x6c, 0x65, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x12, - 0x41, 0x0a, 0x07, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x27, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, - 0x73, 0x64, 0x6b, 0x77, 0x73, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, - 0x72, 0x46, 0x75, 0x6c, 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x07, 0x6d, 0x65, 0x6d, 0x62, 0x65, - 0x72, 0x73, 0x22, 0x30, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x6e, - 0x66, 0x6f, 0x43, 0x61, 0x63, 0x68, 0x65, 0x52, 0x65, 0x71, 0x12, 0x18, 0x0a, 0x07, 0x67, 0x72, - 0x6f, 0x75, 0x70, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x67, 0x72, 0x6f, - 0x75, 0x70, 0x49, 0x44, 0x22, 0x54, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, - 0x49, 0x6e, 0x66, 0x6f, 0x43, 0x61, 0x63, 0x68, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x3b, 0x0a, - 0x09, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x1d, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, - 0x73, 0x64, 0x6b, 0x77, 0x73, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x6e, 0x66, 0x6f, 0x52, - 0x09, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0x58, 0x0a, 0x16, 0x47, 0x65, - 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x43, 0x61, 0x63, 0x68, - 0x65, 0x52, 0x65, 0x71, 0x12, 0x18, 0x0a, 0x07, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x44, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x44, 0x12, 0x24, - 0x0a, 0x0d, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x49, 0x44, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, - 0x65, 0x72, 0x49, 0x44, 0x22, 0x5a, 0x0a, 0x17, 0x47, 0x65, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, - 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x43, 0x61, 0x63, 0x68, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, - 0x3f, 0x0a, 0x06, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x27, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x73, - 0x64, 0x6b, 0x77, 0x73, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, - 0x46, 0x75, 0x6c, 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x06, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, - 0x22, 0x3d, 0x0a, 0x13, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, - 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x12, 0x10, 0x0a, - 0x03, 0x65, 0x6e, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x65, 0x6e, 0x64, 0x22, - 0xc9, 0x01, 0x0a, 0x14, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, - 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x74, 0x61, - 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x12, 0x16, - 0x0a, 0x06, 0x62, 0x65, 0x66, 0x6f, 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, - 0x62, 0x65, 0x66, 0x6f, 0x72, 0x65, 0x12, 0x49, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, - 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, - 0x72, 0x76, 0x65, 0x72, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, - 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x2e, - 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, - 0x74, 0x1a, 0x38, 0x0a, 0x0a, 0x43, 0x6f, 0x75, 0x6e, 0x74, 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, 0x03, - 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x32, 0xdb, 0x19, 0x0a, 0x05, - 0x67, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x56, 0x0a, 0x0b, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x47, - 0x72, 0x6f, 0x75, 0x70, 0x12, 0x22, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, - 0x76, 0x65, 0x72, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, - 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x1a, 0x23, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, - 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x43, 0x72, - 0x65, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x12, 0x50, 0x0a, - 0x09, 0x6a, 0x6f, 0x69, 0x6e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x20, 0x2e, 0x4f, 0x70, 0x65, - 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, - 0x4a, 0x6f, 0x69, 0x6e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x1a, 0x21, 0x2e, 0x4f, - 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x67, 0x72, 0x6f, 0x75, - 0x70, 0x2e, 0x4a, 0x6f, 0x69, 0x6e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x12, - 0x50, 0x0a, 0x09, 0x71, 0x75, 0x69, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x20, 0x2e, 0x4f, - 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x67, 0x72, 0x6f, 0x75, - 0x70, 0x2e, 0x51, 0x75, 0x69, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x1a, 0x21, - 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x67, 0x72, - 0x6f, 0x75, 0x70, 0x2e, 0x51, 0x75, 0x69, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x73, - 0x70, 0x12, 0x5c, 0x0a, 0x0d, 0x67, 0x65, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x49, 0x6e, - 0x66, 0x6f, 0x12, 0x24, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, - 0x72, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x47, 0x65, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, - 0x73, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x1a, 0x25, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, - 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x47, 0x65, - 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x12, - 0x59, 0x0a, 0x0c, 0x73, 0x65, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x6e, 0x66, 0x6f, 0x12, - 0x23, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x67, - 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x53, 0x65, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x6e, 0x66, - 0x6f, 0x52, 0x65, 0x71, 0x1a, 0x24, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, - 0x76, 0x65, 0x72, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x53, 0x65, 0x74, 0x47, 0x72, 0x6f, - 0x75, 0x70, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x12, 0x7a, 0x0a, 0x17, 0x67, 0x65, - 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x2e, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, - 0x72, 0x76, 0x65, 0x72, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x47, 0x65, 0x74, 0x47, 0x72, - 0x6f, 0x75, 0x70, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x69, - 0x73, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x2f, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, - 0x72, 0x76, 0x65, 0x72, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x47, 0x65, 0x74, 0x47, 0x72, - 0x6f, 0x75, 0x70, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x69, - 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x80, 0x01, 0x0a, 0x19, 0x67, 0x65, 0x74, 0x55, 0x73, - 0x65, 0x72, 0x52, 0x65, 0x71, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x4c, 0x69, 0x73, 0x74, 0x12, 0x30, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, - 0x76, 0x65, 0x72, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, - 0x72, 0x52, 0x65, 0x71, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, - 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x31, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, - 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x47, 0x65, 0x74, 0x55, - 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x6b, 0x0a, 0x12, 0x74, 0x72, 0x61, - 0x6e, 0x73, 0x66, 0x65, 0x72, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x12, - 0x29, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x67, - 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x47, 0x72, 0x6f, - 0x75, 0x70, 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x52, 0x65, 0x71, 0x1a, 0x2a, 0x2e, 0x4f, 0x70, 0x65, - 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, - 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4f, 0x77, 0x6e, - 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x12, 0x7d, 0x0a, 0x18, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x41, - 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x2f, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, - 0x72, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x41, 0x70, 0x70, - 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x52, 0x65, 0x71, 0x1a, 0x30, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, - 0x65, 0x72, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x41, 0x70, - 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x6b, 0x0a, 0x12, 0x67, 0x65, 0x74, 0x47, 0x72, 0x6f, 0x75, - 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x29, 0x2e, 0x4f, 0x70, - 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, - 0x2e, 0x47, 0x65, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x4c, - 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x2a, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, - 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x47, 0x65, 0x74, 0x47, - 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, - 0x73, 0x70, 0x12, 0x6e, 0x0a, 0x13, 0x67, 0x65, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, - 0x6d, 0x62, 0x65, 0x72, 0x73, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x2a, 0x2e, 0x4f, 0x70, 0x65, 0x6e, - 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x47, - 0x65, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x49, 0x6e, - 0x66, 0x6f, 0x52, 0x65, 0x71, 0x1a, 0x2b, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, - 0x72, 0x76, 0x65, 0x72, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x47, 0x65, 0x74, 0x47, 0x72, - 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, - 0x73, 0x70, 0x12, 0x62, 0x0a, 0x0f, 0x6b, 0x69, 0x63, 0x6b, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, - 0x65, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x26, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, - 0x72, 0x76, 0x65, 0x72, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x4b, 0x69, 0x63, 0x6b, 0x47, - 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x65, 0x71, 0x1a, 0x27, 0x2e, - 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x67, 0x72, 0x6f, - 0x75, 0x70, 0x2e, 0x4b, 0x69, 0x63, 0x6b, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, - 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x12, 0x6b, 0x0a, 0x12, 0x67, 0x65, 0x74, 0x4a, 0x6f, 0x69, - 0x6e, 0x65, 0x64, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x29, 0x2e, 0x4f, - 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x67, 0x72, 0x6f, 0x75, - 0x70, 0x2e, 0x47, 0x65, 0x74, 0x4a, 0x6f, 0x69, 0x6e, 0x65, 0x64, 0x47, 0x72, 0x6f, 0x75, 0x70, - 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x2a, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, - 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x47, 0x65, 0x74, - 0x4a, 0x6f, 0x69, 0x6e, 0x65, 0x64, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4c, 0x69, 0x73, 0x74, 0x52, - 0x65, 0x73, 0x70, 0x12, 0x68, 0x0a, 0x11, 0x69, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x55, 0x73, 0x65, - 0x72, 0x54, 0x6f, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x28, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, - 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x49, 0x6e, - 0x76, 0x69, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x54, 0x6f, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, - 0x65, 0x71, 0x1a, 0x29, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, - 0x72, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x55, 0x73, - 0x65, 0x72, 0x54, 0x6f, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x12, 0x50, 0x0a, - 0x09, 0x67, 0x65, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x12, 0x20, 0x2e, 0x4f, 0x70, 0x65, - 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, - 0x47, 0x65, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x52, 0x65, 0x71, 0x1a, 0x21, 0x2e, 0x4f, - 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x67, 0x72, 0x6f, 0x75, - 0x70, 0x2e, 0x47, 0x65, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x52, 0x65, 0x73, 0x70, 0x12, - 0x6b, 0x0a, 0x12, 0x67, 0x65, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, - 0x72, 0x73, 0x43, 0x4d, 0x53, 0x12, 0x29, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, - 0x72, 0x76, 0x65, 0x72, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x47, 0x65, 0x74, 0x47, 0x72, - 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x43, 0x4d, 0x53, 0x52, 0x65, 0x71, - 0x1a, 0x2a, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, - 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x47, 0x65, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, - 0x6d, 0x62, 0x65, 0x72, 0x73, 0x43, 0x4d, 0x53, 0x52, 0x65, 0x73, 0x70, 0x12, 0x59, 0x0a, 0x0c, - 0x64, 0x69, 0x73, 0x6d, 0x69, 0x73, 0x73, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x23, 0x2e, 0x4f, - 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x67, 0x72, 0x6f, 0x75, - 0x70, 0x2e, 0x44, 0x69, 0x73, 0x6d, 0x69, 0x73, 0x73, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, - 0x71, 0x1a, 0x24, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, - 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x44, 0x69, 0x73, 0x6d, 0x69, 0x73, 0x73, 0x47, 0x72, - 0x6f, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x12, 0x62, 0x0a, 0x0f, 0x6d, 0x75, 0x74, 0x65, 0x47, - 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x26, 0x2e, 0x4f, 0x70, 0x65, - 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, - 0x4d, 0x75, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, - 0x65, 0x71, 0x1a, 0x27, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, - 0x72, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x4d, 0x75, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, - 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x12, 0x74, 0x0a, 0x15, 0x63, - 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x4d, 0x75, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, - 0x6d, 0x62, 0x65, 0x72, 0x12, 0x2c, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, - 0x76, 0x65, 0x72, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, - 0x4d, 0x75, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, - 0x65, 0x71, 0x1a, 0x2d, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, - 0x72, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x4d, 0x75, - 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x65, 0x73, - 0x70, 0x12, 0x50, 0x0a, 0x09, 0x6d, 0x75, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x20, - 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x67, 0x72, - 0x6f, 0x75, 0x70, 0x2e, 0x4d, 0x75, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, - 0x1a, 0x21, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, - 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x4d, 0x75, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, - 0x65, 0x73, 0x70, 0x12, 0x62, 0x0a, 0x0f, 0x63, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x4d, 0x75, 0x74, - 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x26, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, - 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x43, 0x61, 0x6e, 0x63, - 0x65, 0x6c, 0x4d, 0x75, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x1a, 0x27, - 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x67, 0x72, - 0x6f, 0x75, 0x70, 0x2e, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x4d, 0x75, 0x74, 0x65, 0x47, 0x72, - 0x6f, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x12, 0x7a, 0x0a, 0x17, 0x67, 0x65, 0x74, 0x4a, 0x6f, - 0x69, 0x6e, 0x65, 0x64, 0x53, 0x75, 0x70, 0x65, 0x72, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4c, 0x69, - 0x73, 0x74, 0x12, 0x2e, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, - 0x72, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x47, 0x65, 0x74, 0x4a, 0x6f, 0x69, 0x6e, 0x65, - 0x64, 0x53, 0x75, 0x70, 0x65, 0x72, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4c, 0x69, 0x73, 0x74, 0x52, - 0x65, 0x71, 0x1a, 0x2f, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, - 0x72, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x47, 0x65, 0x74, 0x4a, 0x6f, 0x69, 0x6e, 0x65, - 0x64, 0x53, 0x75, 0x70, 0x65, 0x72, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4c, 0x69, 0x73, 0x74, 0x52, - 0x65, 0x73, 0x70, 0x12, 0x6b, 0x0a, 0x12, 0x67, 0x65, 0x74, 0x53, 0x75, 0x70, 0x65, 0x72, 0x47, - 0x72, 0x6f, 0x75, 0x70, 0x73, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x29, 0x2e, 0x4f, 0x70, 0x65, 0x6e, - 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x47, - 0x65, 0x74, 0x53, 0x75, 0x70, 0x65, 0x72, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x49, 0x6e, 0x66, - 0x6f, 0x52, 0x65, 0x71, 0x1a, 0x2a, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, - 0x76, 0x65, 0x72, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x75, 0x70, - 0x65, 0x72, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, - 0x12, 0x6b, 0x0a, 0x12, 0x73, 0x65, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, - 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x29, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, - 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x53, 0x65, 0x74, 0x47, - 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, - 0x71, 0x1a, 0x2a, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, - 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x53, 0x65, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, - 0x65, 0x6d, 0x62, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x12, 0x71, 0x0a, - 0x14, 0x67, 0x65, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x41, 0x62, 0x73, 0x74, 0x72, 0x61, 0x63, - 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x2b, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, - 0x72, 0x76, 0x65, 0x72, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x47, 0x65, 0x74, 0x47, 0x72, - 0x6f, 0x75, 0x70, 0x41, 0x62, 0x73, 0x74, 0x72, 0x61, 0x63, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, - 0x65, 0x71, 0x1a, 0x2c, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, - 0x72, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x47, 0x65, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, - 0x41, 0x62, 0x73, 0x74, 0x72, 0x61, 0x63, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, - 0x12, 0x74, 0x0a, 0x15, 0x67, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x47, 0x72, 0x6f, - 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x12, 0x2c, 0x2e, 0x4f, 0x70, 0x65, 0x6e, - 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x47, - 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, - 0x62, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x1a, 0x2d, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, - 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x47, 0x65, 0x74, - 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, - 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x12, 0x74, 0x0a, 0x15, 0x67, 0x65, 0x74, 0x47, 0x72, 0x6f, - 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x55, 0x73, 0x65, 0x72, 0x49, 0x44, 0x73, 0x12, - 0x2c, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x67, - 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x47, 0x65, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, - 0x62, 0x65, 0x72, 0x55, 0x73, 0x65, 0x72, 0x49, 0x44, 0x73, 0x52, 0x65, 0x71, 0x1a, 0x2d, 0x2e, - 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x67, 0x72, 0x6f, - 0x75, 0x70, 0x2e, 0x47, 0x65, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, - 0x72, 0x55, 0x73, 0x65, 0x72, 0x49, 0x44, 0x73, 0x52, 0x65, 0x73, 0x70, 0x12, 0x7a, 0x0a, 0x17, - 0x47, 0x65, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x6f, - 0x6c, 0x65, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x2e, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, - 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x47, 0x65, 0x74, - 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x6f, 0x6c, 0x65, 0x4c, - 0x65, 0x76, 0x65, 0x6c, 0x52, 0x65, 0x71, 0x1a, 0x2f, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, - 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x47, 0x65, 0x74, - 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x6f, 0x6c, 0x65, 0x4c, - 0x65, 0x76, 0x65, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x12, 0x68, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x47, - 0x72, 0x6f, 0x75, 0x70, 0x49, 0x6e, 0x66, 0x6f, 0x43, 0x61, 0x63, 0x68, 0x65, 0x12, 0x28, 0x2e, - 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x67, 0x72, 0x6f, - 0x75, 0x70, 0x2e, 0x47, 0x65, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x6e, 0x66, 0x6f, 0x43, - 0x61, 0x63, 0x68, 0x65, 0x52, 0x65, 0x71, 0x1a, 0x29, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, - 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x47, 0x65, 0x74, - 0x47, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x6e, 0x66, 0x6f, 0x43, 0x61, 0x63, 0x68, 0x65, 0x52, 0x65, - 0x73, 0x70, 0x12, 0x6e, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, - 0x6d, 0x62, 0x65, 0x72, 0x43, 0x61, 0x63, 0x68, 0x65, 0x12, 0x2a, 0x2e, 0x4f, 0x70, 0x65, 0x6e, - 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x47, - 0x65, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x43, 0x61, 0x63, - 0x68, 0x65, 0x52, 0x65, 0x71, 0x1a, 0x2b, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, - 0x72, 0x76, 0x65, 0x72, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x47, 0x65, 0x74, 0x47, 0x72, - 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x43, 0x61, 0x63, 0x68, 0x65, 0x52, 0x65, - 0x73, 0x70, 0x12, 0x65, 0x0a, 0x10, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x43, 0x72, 0x65, 0x61, 0x74, - 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x27, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, - 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x47, 0x72, 0x6f, 0x75, - 0x70, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x1a, - 0x28, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x67, - 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, - 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x42, 0x35, 0x5a, 0x33, 0x67, 0x69, 0x74, - 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x44, - 0x4b, 0x2f, 0x4f, 0x70, 0x65, 0x6e, 0x2d, 0x49, 0x4d, 0x2d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, - 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x72, 0x6f, 0x75, 0x70, - 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_group_group_proto_rawDescOnce sync.Once - file_group_group_proto_rawDescData = file_group_group_proto_rawDesc -) - -func file_group_group_proto_rawDescGZIP() []byte { - file_group_group_proto_rawDescOnce.Do(func() { - file_group_group_proto_rawDescData = protoimpl.X.CompressGZIP(file_group_group_proto_rawDescData) - }) - return file_group_group_proto_rawDescData -} - -var file_group_group_proto_msgTypes = make([]protoimpl.MessageInfo, 69) -var file_group_group_proto_goTypes = []interface{}{ - (*CreateGroupReq)(nil), // 0: OpenIMServer.group.CreateGroupReq - (*CreateGroupResp)(nil), // 1: OpenIMServer.group.CreateGroupResp - (*GetGroupsInfoReq)(nil), // 2: OpenIMServer.group.GetGroupsInfoReq - (*GetGroupsInfoResp)(nil), // 3: OpenIMServer.group.GetGroupsInfoResp - (*SetGroupInfoReq)(nil), // 4: OpenIMServer.group.SetGroupInfoReq - (*SetGroupInfoResp)(nil), // 5: OpenIMServer.group.SetGroupInfoResp - (*GetGroupApplicationListReq)(nil), // 6: OpenIMServer.group.GetGroupApplicationListReq - (*GetGroupApplicationListResp)(nil), // 7: OpenIMServer.group.GetGroupApplicationListResp - (*GetUserReqApplicationListReq)(nil), // 8: OpenIMServer.group.GetUserReqApplicationListReq - (*GetUserReqApplicationListResp)(nil), // 9: OpenIMServer.group.GetUserReqApplicationListResp - (*TransferGroupOwnerReq)(nil), // 10: OpenIMServer.group.TransferGroupOwnerReq - (*TransferGroupOwnerResp)(nil), // 11: OpenIMServer.group.TransferGroupOwnerResp - (*JoinGroupReq)(nil), // 12: OpenIMServer.group.JoinGroupReq - (*JoinGroupResp)(nil), // 13: OpenIMServer.group.JoinGroupResp - (*GroupApplicationResponseReq)(nil), // 14: OpenIMServer.group.GroupApplicationResponseReq - (*GroupApplicationResponseResp)(nil), // 15: OpenIMServer.group.GroupApplicationResponseResp - (*QuitGroupReq)(nil), // 16: OpenIMServer.group.QuitGroupReq - (*QuitGroupResp)(nil), // 17: OpenIMServer.group.QuitGroupResp - (*GetGroupMemberListReq)(nil), // 18: OpenIMServer.group.GetGroupMemberListReq - (*GetGroupMemberListResp)(nil), // 19: OpenIMServer.group.GetGroupMemberListResp - (*GetGroupMembersInfoReq)(nil), // 20: OpenIMServer.group.GetGroupMembersInfoReq - (*GetGroupMembersInfoResp)(nil), // 21: OpenIMServer.group.GetGroupMembersInfoResp - (*KickGroupMemberReq)(nil), // 22: OpenIMServer.group.KickGroupMemberReq - (*KickGroupMemberResp)(nil), // 23: OpenIMServer.group.KickGroupMemberResp - (*GetJoinedGroupListReq)(nil), // 24: OpenIMServer.group.GetJoinedGroupListReq - (*GetJoinedGroupListResp)(nil), // 25: OpenIMServer.group.GetJoinedGroupListResp - (*InviteUserToGroupReq)(nil), // 26: OpenIMServer.group.InviteUserToGroupReq - (*InviteUserToGroupResp)(nil), // 27: OpenIMServer.group.InviteUserToGroupResp - (*GetGroupAllMemberReq)(nil), // 28: OpenIMServer.group.GetGroupAllMemberReq - (*GetGroupAllMemberResp)(nil), // 29: OpenIMServer.group.GetGroupAllMemberResp - (*CMSGroup)(nil), // 30: OpenIMServer.group.CMSGroup - (*GetGroupsReq)(nil), // 31: OpenIMServer.group.GetGroupsReq - (*GetGroupsResp)(nil), // 32: OpenIMServer.group.GetGroupsResp - (*GetGroupMemberReq)(nil), // 33: OpenIMServer.group.GetGroupMemberReq - (*GetGroupMembersCMSReq)(nil), // 34: OpenIMServer.group.GetGroupMembersCMSReq - (*GetGroupMembersCMSResp)(nil), // 35: OpenIMServer.group.GetGroupMembersCMSResp - (*DismissGroupReq)(nil), // 36: OpenIMServer.group.DismissGroupReq - (*DismissGroupResp)(nil), // 37: OpenIMServer.group.DismissGroupResp - (*MuteGroupMemberReq)(nil), // 38: OpenIMServer.group.MuteGroupMemberReq - (*MuteGroupMemberResp)(nil), // 39: OpenIMServer.group.MuteGroupMemberResp - (*CancelMuteGroupMemberReq)(nil), // 40: OpenIMServer.group.CancelMuteGroupMemberReq - (*CancelMuteGroupMemberResp)(nil), // 41: OpenIMServer.group.CancelMuteGroupMemberResp - (*MuteGroupReq)(nil), // 42: OpenIMServer.group.MuteGroupReq - (*MuteGroupResp)(nil), // 43: OpenIMServer.group.MuteGroupResp - (*CancelMuteGroupReq)(nil), // 44: OpenIMServer.group.CancelMuteGroupReq - (*CancelMuteGroupResp)(nil), // 45: OpenIMServer.group.CancelMuteGroupResp - (*GetJoinedSuperGroupListReq)(nil), // 46: OpenIMServer.group.GetJoinedSuperGroupListReq - (*GetJoinedSuperGroupListResp)(nil), // 47: OpenIMServer.group.GetJoinedSuperGroupListResp - (*GetSuperGroupsInfoReq)(nil), // 48: OpenIMServer.group.GetSuperGroupsInfoReq - (*GetSuperGroupsInfoResp)(nil), // 49: OpenIMServer.group.GetSuperGroupsInfoResp - (*SetGroupMemberInfo)(nil), // 50: OpenIMServer.group.SetGroupMemberInfo - (*SetGroupMemberInfoReq)(nil), // 51: OpenIMServer.group.SetGroupMemberInfoReq - (*SetGroupMemberInfoResp)(nil), // 52: OpenIMServer.group.SetGroupMemberInfoResp - (*GetGroupAbstractInfoReq)(nil), // 53: OpenIMServer.group.GetGroupAbstractInfoReq - (*GroupAbstractInfo)(nil), // 54: OpenIMServer.group.GroupAbstractInfo - (*GetGroupAbstractInfoResp)(nil), // 55: OpenIMServer.group.GetGroupAbstractInfoResp - (*GetUserInGroupMembersReq)(nil), // 56: OpenIMServer.group.GetUserInGroupMembersReq - (*GetUserInGroupMembersResp)(nil), // 57: OpenIMServer.group.GetUserInGroupMembersResp - (*GetGroupMemberUserIDsReq)(nil), // 58: OpenIMServer.group.GetGroupMemberUserIDsReq - (*GetGroupMemberUserIDsResp)(nil), // 59: OpenIMServer.group.GetGroupMemberUserIDsResp - (*GetGroupMemberRoleLevelReq)(nil), // 60: OpenIMServer.group.GetGroupMemberRoleLevelReq - (*GetGroupMemberRoleLevelResp)(nil), // 61: OpenIMServer.group.GetGroupMemberRoleLevelResp - (*GetGroupInfoCacheReq)(nil), // 62: OpenIMServer.group.GetGroupInfoCacheReq - (*GetGroupInfoCacheResp)(nil), // 63: OpenIMServer.group.GetGroupInfoCacheResp - (*GetGroupMemberCacheReq)(nil), // 64: OpenIMServer.group.GetGroupMemberCacheReq - (*GetGroupMemberCacheResp)(nil), // 65: OpenIMServer.group.GetGroupMemberCacheResp - (*GroupCreateCountReq)(nil), // 66: OpenIMServer.group.GroupCreateCountReq - (*GroupCreateCountResp)(nil), // 67: OpenIMServer.group.GroupCreateCountResp - nil, // 68: OpenIMServer.group.GroupCreateCountResp.CountEntry - (*sdkws.GroupInfo)(nil), // 69: OpenIMServer.sdkws.GroupInfo - (*sdkws.GroupInfoForSet)(nil), // 70: OpenIMServer.sdkws.GroupInfoForSet - (*sdkws.RequestPagination)(nil), // 71: OpenIMServer.sdkws.RequestPagination - (*sdkws.GroupRequest)(nil), // 72: OpenIMServer.sdkws.GroupRequest - (*sdkws.GroupMemberFullInfo)(nil), // 73: OpenIMServer.sdkws.GroupMemberFullInfo - (*wrapperspb.StringValue)(nil), // 74: OpenIMServer.protobuf.StringValue - (*wrapperspb.Int32Value)(nil), // 75: OpenIMServer.protobuf.Int32Value -} -var file_group_group_proto_depIdxs = []int32{ - 69, // 0: OpenIMServer.group.CreateGroupReq.groupInfo:type_name -> OpenIMServer.sdkws.GroupInfo - 69, // 1: OpenIMServer.group.CreateGroupResp.groupInfo:type_name -> OpenIMServer.sdkws.GroupInfo - 69, // 2: OpenIMServer.group.GetGroupsInfoResp.groupInfos:type_name -> OpenIMServer.sdkws.GroupInfo - 70, // 3: OpenIMServer.group.SetGroupInfoReq.groupInfoForSet:type_name -> OpenIMServer.sdkws.GroupInfoForSet - 71, // 4: OpenIMServer.group.GetGroupApplicationListReq.pagination:type_name -> OpenIMServer.sdkws.RequestPagination - 72, // 5: OpenIMServer.group.GetGroupApplicationListResp.groupRequests:type_name -> OpenIMServer.sdkws.GroupRequest - 71, // 6: OpenIMServer.group.GetUserReqApplicationListReq.pagination:type_name -> OpenIMServer.sdkws.RequestPagination - 72, // 7: OpenIMServer.group.GetUserReqApplicationListResp.groupRequests:type_name -> OpenIMServer.sdkws.GroupRequest - 71, // 8: OpenIMServer.group.GetGroupMemberListReq.pagination:type_name -> OpenIMServer.sdkws.RequestPagination - 73, // 9: OpenIMServer.group.GetGroupMemberListResp.members:type_name -> OpenIMServer.sdkws.GroupMemberFullInfo - 73, // 10: OpenIMServer.group.GetGroupMembersInfoResp.members:type_name -> OpenIMServer.sdkws.GroupMemberFullInfo - 71, // 11: OpenIMServer.group.GetJoinedGroupListReq.pagination:type_name -> OpenIMServer.sdkws.RequestPagination - 69, // 12: OpenIMServer.group.GetJoinedGroupListResp.groups:type_name -> OpenIMServer.sdkws.GroupInfo - 71, // 13: OpenIMServer.group.GetGroupAllMemberReq.pagination:type_name -> OpenIMServer.sdkws.RequestPagination - 73, // 14: OpenIMServer.group.GetGroupAllMemberResp.members:type_name -> OpenIMServer.sdkws.GroupMemberFullInfo - 69, // 15: OpenIMServer.group.CMSGroup.groupInfo:type_name -> OpenIMServer.sdkws.GroupInfo - 71, // 16: OpenIMServer.group.GetGroupsReq.pagination:type_name -> OpenIMServer.sdkws.RequestPagination - 30, // 17: OpenIMServer.group.GetGroupsResp.groups:type_name -> OpenIMServer.group.CMSGroup - 71, // 18: OpenIMServer.group.GetGroupMembersCMSReq.pagination:type_name -> OpenIMServer.sdkws.RequestPagination - 73, // 19: OpenIMServer.group.GetGroupMembersCMSResp.members:type_name -> OpenIMServer.sdkws.GroupMemberFullInfo - 69, // 20: OpenIMServer.group.GetJoinedSuperGroupListResp.groups:type_name -> OpenIMServer.sdkws.GroupInfo - 69, // 21: OpenIMServer.group.GetSuperGroupsInfoResp.groupInfos:type_name -> OpenIMServer.sdkws.GroupInfo - 74, // 22: OpenIMServer.group.SetGroupMemberInfo.nickname:type_name -> OpenIMServer.protobuf.StringValue - 74, // 23: OpenIMServer.group.SetGroupMemberInfo.faceURL:type_name -> OpenIMServer.protobuf.StringValue - 75, // 24: OpenIMServer.group.SetGroupMemberInfo.roleLevel:type_name -> OpenIMServer.protobuf.Int32Value - 74, // 25: OpenIMServer.group.SetGroupMemberInfo.ex:type_name -> OpenIMServer.protobuf.StringValue - 50, // 26: OpenIMServer.group.SetGroupMemberInfoReq.members:type_name -> OpenIMServer.group.SetGroupMemberInfo - 54, // 27: OpenIMServer.group.GetGroupAbstractInfoResp.groupAbstractInfos:type_name -> OpenIMServer.group.GroupAbstractInfo - 73, // 28: OpenIMServer.group.GetUserInGroupMembersResp.members:type_name -> OpenIMServer.sdkws.GroupMemberFullInfo - 73, // 29: OpenIMServer.group.GetGroupMemberRoleLevelResp.members:type_name -> OpenIMServer.sdkws.GroupMemberFullInfo - 69, // 30: OpenIMServer.group.GetGroupInfoCacheResp.groupInfo:type_name -> OpenIMServer.sdkws.GroupInfo - 73, // 31: OpenIMServer.group.GetGroupMemberCacheResp.member:type_name -> OpenIMServer.sdkws.GroupMemberFullInfo - 68, // 32: OpenIMServer.group.GroupCreateCountResp.count:type_name -> OpenIMServer.group.GroupCreateCountResp.CountEntry - 0, // 33: OpenIMServer.group.group.createGroup:input_type -> OpenIMServer.group.CreateGroupReq - 12, // 34: OpenIMServer.group.group.joinGroup:input_type -> OpenIMServer.group.JoinGroupReq - 16, // 35: OpenIMServer.group.group.quitGroup:input_type -> OpenIMServer.group.QuitGroupReq - 2, // 36: OpenIMServer.group.group.getGroupsInfo:input_type -> OpenIMServer.group.GetGroupsInfoReq - 4, // 37: OpenIMServer.group.group.setGroupInfo:input_type -> OpenIMServer.group.SetGroupInfoReq - 6, // 38: OpenIMServer.group.group.getGroupApplicationList:input_type -> OpenIMServer.group.GetGroupApplicationListReq - 8, // 39: OpenIMServer.group.group.getUserReqApplicationList:input_type -> OpenIMServer.group.GetUserReqApplicationListReq - 10, // 40: OpenIMServer.group.group.transferGroupOwner:input_type -> OpenIMServer.group.TransferGroupOwnerReq - 14, // 41: OpenIMServer.group.group.groupApplicationResponse:input_type -> OpenIMServer.group.GroupApplicationResponseReq - 18, // 42: OpenIMServer.group.group.getGroupMemberList:input_type -> OpenIMServer.group.GetGroupMemberListReq - 20, // 43: OpenIMServer.group.group.getGroupMembersInfo:input_type -> OpenIMServer.group.GetGroupMembersInfoReq - 22, // 44: OpenIMServer.group.group.kickGroupMember:input_type -> OpenIMServer.group.KickGroupMemberReq - 24, // 45: OpenIMServer.group.group.getJoinedGroupList:input_type -> OpenIMServer.group.GetJoinedGroupListReq - 26, // 46: OpenIMServer.group.group.inviteUserToGroup:input_type -> OpenIMServer.group.InviteUserToGroupReq - 31, // 47: OpenIMServer.group.group.getGroups:input_type -> OpenIMServer.group.GetGroupsReq - 34, // 48: OpenIMServer.group.group.getGroupMembersCMS:input_type -> OpenIMServer.group.GetGroupMembersCMSReq - 36, // 49: OpenIMServer.group.group.dismissGroup:input_type -> OpenIMServer.group.DismissGroupReq - 38, // 50: OpenIMServer.group.group.muteGroupMember:input_type -> OpenIMServer.group.MuteGroupMemberReq - 40, // 51: OpenIMServer.group.group.cancelMuteGroupMember:input_type -> OpenIMServer.group.CancelMuteGroupMemberReq - 42, // 52: OpenIMServer.group.group.muteGroup:input_type -> OpenIMServer.group.MuteGroupReq - 44, // 53: OpenIMServer.group.group.cancelMuteGroup:input_type -> OpenIMServer.group.CancelMuteGroupReq - 46, // 54: OpenIMServer.group.group.getJoinedSuperGroupList:input_type -> OpenIMServer.group.GetJoinedSuperGroupListReq - 48, // 55: OpenIMServer.group.group.getSuperGroupsInfo:input_type -> OpenIMServer.group.GetSuperGroupsInfoReq - 51, // 56: OpenIMServer.group.group.setGroupMemberInfo:input_type -> OpenIMServer.group.SetGroupMemberInfoReq - 53, // 57: OpenIMServer.group.group.getGroupAbstractInfo:input_type -> OpenIMServer.group.GetGroupAbstractInfoReq - 56, // 58: OpenIMServer.group.group.getUserInGroupMembers:input_type -> OpenIMServer.group.GetUserInGroupMembersReq - 58, // 59: OpenIMServer.group.group.getGroupMemberUserIDs:input_type -> OpenIMServer.group.GetGroupMemberUserIDsReq - 60, // 60: OpenIMServer.group.group.GetGroupMemberRoleLevel:input_type -> OpenIMServer.group.GetGroupMemberRoleLevelReq - 62, // 61: OpenIMServer.group.group.GetGroupInfoCache:input_type -> OpenIMServer.group.GetGroupInfoCacheReq - 64, // 62: OpenIMServer.group.group.GetGroupMemberCache:input_type -> OpenIMServer.group.GetGroupMemberCacheReq - 66, // 63: OpenIMServer.group.group.GroupCreateCount:input_type -> OpenIMServer.group.GroupCreateCountReq - 1, // 64: OpenIMServer.group.group.createGroup:output_type -> OpenIMServer.group.CreateGroupResp - 13, // 65: OpenIMServer.group.group.joinGroup:output_type -> OpenIMServer.group.JoinGroupResp - 17, // 66: OpenIMServer.group.group.quitGroup:output_type -> OpenIMServer.group.QuitGroupResp - 3, // 67: OpenIMServer.group.group.getGroupsInfo:output_type -> OpenIMServer.group.GetGroupsInfoResp - 5, // 68: OpenIMServer.group.group.setGroupInfo:output_type -> OpenIMServer.group.SetGroupInfoResp - 7, // 69: OpenIMServer.group.group.getGroupApplicationList:output_type -> OpenIMServer.group.GetGroupApplicationListResp - 9, // 70: OpenIMServer.group.group.getUserReqApplicationList:output_type -> OpenIMServer.group.GetUserReqApplicationListResp - 11, // 71: OpenIMServer.group.group.transferGroupOwner:output_type -> OpenIMServer.group.TransferGroupOwnerResp - 15, // 72: OpenIMServer.group.group.groupApplicationResponse:output_type -> OpenIMServer.group.GroupApplicationResponseResp - 19, // 73: OpenIMServer.group.group.getGroupMemberList:output_type -> OpenIMServer.group.GetGroupMemberListResp - 21, // 74: OpenIMServer.group.group.getGroupMembersInfo:output_type -> OpenIMServer.group.GetGroupMembersInfoResp - 23, // 75: OpenIMServer.group.group.kickGroupMember:output_type -> OpenIMServer.group.KickGroupMemberResp - 25, // 76: OpenIMServer.group.group.getJoinedGroupList:output_type -> OpenIMServer.group.GetJoinedGroupListResp - 27, // 77: OpenIMServer.group.group.inviteUserToGroup:output_type -> OpenIMServer.group.InviteUserToGroupResp - 32, // 78: OpenIMServer.group.group.getGroups:output_type -> OpenIMServer.group.GetGroupsResp - 35, // 79: OpenIMServer.group.group.getGroupMembersCMS:output_type -> OpenIMServer.group.GetGroupMembersCMSResp - 37, // 80: OpenIMServer.group.group.dismissGroup:output_type -> OpenIMServer.group.DismissGroupResp - 39, // 81: OpenIMServer.group.group.muteGroupMember:output_type -> OpenIMServer.group.MuteGroupMemberResp - 41, // 82: OpenIMServer.group.group.cancelMuteGroupMember:output_type -> OpenIMServer.group.CancelMuteGroupMemberResp - 43, // 83: OpenIMServer.group.group.muteGroup:output_type -> OpenIMServer.group.MuteGroupResp - 45, // 84: OpenIMServer.group.group.cancelMuteGroup:output_type -> OpenIMServer.group.CancelMuteGroupResp - 47, // 85: OpenIMServer.group.group.getJoinedSuperGroupList:output_type -> OpenIMServer.group.GetJoinedSuperGroupListResp - 49, // 86: OpenIMServer.group.group.getSuperGroupsInfo:output_type -> OpenIMServer.group.GetSuperGroupsInfoResp - 52, // 87: OpenIMServer.group.group.setGroupMemberInfo:output_type -> OpenIMServer.group.SetGroupMemberInfoResp - 55, // 88: OpenIMServer.group.group.getGroupAbstractInfo:output_type -> OpenIMServer.group.GetGroupAbstractInfoResp - 57, // 89: OpenIMServer.group.group.getUserInGroupMembers:output_type -> OpenIMServer.group.GetUserInGroupMembersResp - 59, // 90: OpenIMServer.group.group.getGroupMemberUserIDs:output_type -> OpenIMServer.group.GetGroupMemberUserIDsResp - 61, // 91: OpenIMServer.group.group.GetGroupMemberRoleLevel:output_type -> OpenIMServer.group.GetGroupMemberRoleLevelResp - 63, // 92: OpenIMServer.group.group.GetGroupInfoCache:output_type -> OpenIMServer.group.GetGroupInfoCacheResp - 65, // 93: OpenIMServer.group.group.GetGroupMemberCache:output_type -> OpenIMServer.group.GetGroupMemberCacheResp - 67, // 94: OpenIMServer.group.group.GroupCreateCount:output_type -> OpenIMServer.group.GroupCreateCountResp - 64, // [64:95] is the sub-list for method output_type - 33, // [33:64] is the sub-list for method input_type - 33, // [33:33] is the sub-list for extension type_name - 33, // [33:33] is the sub-list for extension extendee - 0, // [0:33] is the sub-list for field type_name -} - -func init() { file_group_group_proto_init() } -func file_group_group_proto_init() { - if File_group_group_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_group_group_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CreateGroupReq); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_group_group_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CreateGroupResp); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_group_group_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetGroupsInfoReq); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_group_group_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetGroupsInfoResp); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_group_group_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SetGroupInfoReq); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_group_group_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SetGroupInfoResp); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_group_group_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetGroupApplicationListReq); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_group_group_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetGroupApplicationListResp); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_group_group_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetUserReqApplicationListReq); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_group_group_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetUserReqApplicationListResp); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_group_group_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TransferGroupOwnerReq); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_group_group_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TransferGroupOwnerResp); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_group_group_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*JoinGroupReq); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_group_group_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*JoinGroupResp); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_group_group_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GroupApplicationResponseReq); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_group_group_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GroupApplicationResponseResp); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_group_group_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QuitGroupReq); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_group_group_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QuitGroupResp); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_group_group_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetGroupMemberListReq); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_group_group_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetGroupMemberListResp); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_group_group_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetGroupMembersInfoReq); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_group_group_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetGroupMembersInfoResp); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_group_group_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*KickGroupMemberReq); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_group_group_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*KickGroupMemberResp); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_group_group_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetJoinedGroupListReq); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_group_group_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetJoinedGroupListResp); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_group_group_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*InviteUserToGroupReq); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_group_group_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*InviteUserToGroupResp); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_group_group_proto_msgTypes[28].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetGroupAllMemberReq); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_group_group_proto_msgTypes[29].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetGroupAllMemberResp); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_group_group_proto_msgTypes[30].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CMSGroup); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_group_group_proto_msgTypes[31].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetGroupsReq); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_group_group_proto_msgTypes[32].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetGroupsResp); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_group_group_proto_msgTypes[33].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetGroupMemberReq); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_group_group_proto_msgTypes[34].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetGroupMembersCMSReq); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_group_group_proto_msgTypes[35].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetGroupMembersCMSResp); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_group_group_proto_msgTypes[36].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DismissGroupReq); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_group_group_proto_msgTypes[37].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DismissGroupResp); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_group_group_proto_msgTypes[38].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MuteGroupMemberReq); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_group_group_proto_msgTypes[39].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MuteGroupMemberResp); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_group_group_proto_msgTypes[40].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CancelMuteGroupMemberReq); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_group_group_proto_msgTypes[41].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CancelMuteGroupMemberResp); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_group_group_proto_msgTypes[42].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MuteGroupReq); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_group_group_proto_msgTypes[43].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MuteGroupResp); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_group_group_proto_msgTypes[44].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CancelMuteGroupReq); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_group_group_proto_msgTypes[45].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CancelMuteGroupResp); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_group_group_proto_msgTypes[46].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetJoinedSuperGroupListReq); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_group_group_proto_msgTypes[47].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetJoinedSuperGroupListResp); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_group_group_proto_msgTypes[48].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetSuperGroupsInfoReq); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_group_group_proto_msgTypes[49].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetSuperGroupsInfoResp); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_group_group_proto_msgTypes[50].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SetGroupMemberInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_group_group_proto_msgTypes[51].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SetGroupMemberInfoReq); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_group_group_proto_msgTypes[52].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SetGroupMemberInfoResp); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_group_group_proto_msgTypes[53].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetGroupAbstractInfoReq); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_group_group_proto_msgTypes[54].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GroupAbstractInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_group_group_proto_msgTypes[55].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetGroupAbstractInfoResp); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_group_group_proto_msgTypes[56].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetUserInGroupMembersReq); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_group_group_proto_msgTypes[57].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetUserInGroupMembersResp); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_group_group_proto_msgTypes[58].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetGroupMemberUserIDsReq); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_group_group_proto_msgTypes[59].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetGroupMemberUserIDsResp); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_group_group_proto_msgTypes[60].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetGroupMemberRoleLevelReq); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_group_group_proto_msgTypes[61].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetGroupMemberRoleLevelResp); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_group_group_proto_msgTypes[62].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetGroupInfoCacheReq); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_group_group_proto_msgTypes[63].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetGroupInfoCacheResp); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_group_group_proto_msgTypes[64].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetGroupMemberCacheReq); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_group_group_proto_msgTypes[65].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetGroupMemberCacheResp); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_group_group_proto_msgTypes[66].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GroupCreateCountReq); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_group_group_proto_msgTypes[67].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GroupCreateCountResp); 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{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_group_group_proto_rawDesc, - NumEnums: 0, - NumMessages: 69, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_group_group_proto_goTypes, - DependencyIndexes: file_group_group_proto_depIdxs, - MessageInfos: file_group_group_proto_msgTypes, - }.Build() - File_group_group_proto = out.File - file_group_group_proto_rawDesc = nil - file_group_group_proto_goTypes = nil - file_group_group_proto_depIdxs = nil -} - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConnInterface - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion6 - -// GroupClient is the client API for Group service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type GroupClient interface { - // 创建群 - CreateGroup(ctx context.Context, in *CreateGroupReq, opts ...grpc.CallOption) (*CreateGroupResp, error) - // 申请加群 - JoinGroup(ctx context.Context, in *JoinGroupReq, opts ...grpc.CallOption) (*JoinGroupResp, error) - // 退出群 - QuitGroup(ctx context.Context, in *QuitGroupReq, opts ...grpc.CallOption) (*QuitGroupResp, error) - // 获取指定群信息 - GetGroupsInfo(ctx context.Context, in *GetGroupsInfoReq, opts ...grpc.CallOption) (*GetGroupsInfoResp, error) - // 设置群信息 - SetGroupInfo(ctx context.Context, in *SetGroupInfoReq, opts ...grpc.CallOption) (*SetGroupInfoResp, error) - // (以管理员或群主身份)获取群的加群申请 - GetGroupApplicationList(ctx context.Context, in *GetGroupApplicationListReq, opts ...grpc.CallOption) (*GetGroupApplicationListResp, error) - // 获取用户自己的主动加群申请 - GetUserReqApplicationList(ctx context.Context, in *GetUserReqApplicationListReq, opts ...grpc.CallOption) (*GetUserReqApplicationListResp, error) - // 转让群主 - TransferGroupOwner(ctx context.Context, in *TransferGroupOwnerReq, opts ...grpc.CallOption) (*TransferGroupOwnerResp, error) - // 群主或管理员处理进群申请 - GroupApplicationResponse(ctx context.Context, in *GroupApplicationResponseReq, opts ...grpc.CallOption) (*GroupApplicationResponseResp, error) - // 获取某个群的群成员 - GetGroupMemberList(ctx context.Context, in *GetGroupMemberListReq, opts ...grpc.CallOption) (*GetGroupMemberListResp, error) - // 获取某个群的指定群成员 - GetGroupMembersInfo(ctx context.Context, in *GetGroupMembersInfoReq, opts ...grpc.CallOption) (*GetGroupMembersInfoResp, error) - // 踢出群 - KickGroupMember(ctx context.Context, in *KickGroupMemberReq, opts ...grpc.CallOption) (*KickGroupMemberResp, error) - // 获取某个人已加入群 - GetJoinedGroupList(ctx context.Context, in *GetJoinedGroupListReq, opts ...grpc.CallOption) (*GetJoinedGroupListResp, error) - // 邀请某些人进群 - InviteUserToGroup(ctx context.Context, in *InviteUserToGroupReq, opts ...grpc.CallOption) (*InviteUserToGroupResp, error) - GetGroups(ctx context.Context, in *GetGroupsReq, opts ...grpc.CallOption) (*GetGroupsResp, error) - GetGroupMembersCMS(ctx context.Context, in *GetGroupMembersCMSReq, opts ...grpc.CallOption) (*GetGroupMembersCMSResp, error) - // 解散群 - DismissGroup(ctx context.Context, in *DismissGroupReq, opts ...grpc.CallOption) (*DismissGroupResp, error) - // 对某个群成员禁言 - MuteGroupMember(ctx context.Context, in *MuteGroupMemberReq, opts ...grpc.CallOption) (*MuteGroupMemberResp, error) - // 对某个群成员取消禁言 - CancelMuteGroupMember(ctx context.Context, in *CancelMuteGroupMemberReq, opts ...grpc.CallOption) (*CancelMuteGroupMemberResp, error) - // 对某个群禁言 - MuteGroup(ctx context.Context, in *MuteGroupReq, opts ...grpc.CallOption) (*MuteGroupResp, error) - // 对某个群取消禁言 - CancelMuteGroup(ctx context.Context, in *CancelMuteGroupReq, opts ...grpc.CallOption) (*CancelMuteGroupResp, error) - // 获取某个用户加入的超级群 - GetJoinedSuperGroupList(ctx context.Context, in *GetJoinedSuperGroupListReq, opts ...grpc.CallOption) (*GetJoinedSuperGroupListResp, error) - // 获取指定的超级群信息 - GetSuperGroupsInfo(ctx context.Context, in *GetSuperGroupsInfoReq, opts ...grpc.CallOption) (*GetSuperGroupsInfoResp, error) - // 设置群成员昵称 - // 设置群成员信息 - SetGroupMemberInfo(ctx context.Context, in *SetGroupMemberInfoReq, opts ...grpc.CallOption) (*SetGroupMemberInfoResp, error) - // 获取群信息hash值 - GetGroupAbstractInfo(ctx context.Context, in *GetGroupAbstractInfoReq, opts ...grpc.CallOption) (*GetGroupAbstractInfoResp, error) - // 获取某个用户在指定群中的信息 - GetUserInGroupMembers(ctx context.Context, in *GetUserInGroupMembersReq, opts ...grpc.CallOption) (*GetUserInGroupMembersResp, error) - // 获取群成员用户ID - GetGroupMemberUserIDs(ctx context.Context, in *GetGroupMemberUserIDsReq, opts ...grpc.CallOption) (*GetGroupMemberUserIDsResp, error) - // 查询群组中对应级别的成员 - GetGroupMemberRoleLevel(ctx context.Context, in *GetGroupMemberRoleLevelReq, opts ...grpc.CallOption) (*GetGroupMemberRoleLevelResp, error) - GetGroupInfoCache(ctx context.Context, in *GetGroupInfoCacheReq, opts ...grpc.CallOption) (*GetGroupInfoCacheResp, error) - GetGroupMemberCache(ctx context.Context, in *GetGroupMemberCacheReq, opts ...grpc.CallOption) (*GetGroupMemberCacheResp, error) - GroupCreateCount(ctx context.Context, in *GroupCreateCountReq, opts ...grpc.CallOption) (*GroupCreateCountResp, error) -} - -type groupClient struct { - cc grpc.ClientConnInterface -} - -func NewGroupClient(cc grpc.ClientConnInterface) GroupClient { - return &groupClient{cc} -} - -func (c *groupClient) CreateGroup(ctx context.Context, in *CreateGroupReq, opts ...grpc.CallOption) (*CreateGroupResp, error) { - out := new(CreateGroupResp) - err := c.cc.Invoke(ctx, "/OpenIMServer.group.group/createGroup", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *groupClient) JoinGroup(ctx context.Context, in *JoinGroupReq, opts ...grpc.CallOption) (*JoinGroupResp, error) { - out := new(JoinGroupResp) - err := c.cc.Invoke(ctx, "/OpenIMServer.group.group/joinGroup", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *groupClient) QuitGroup(ctx context.Context, in *QuitGroupReq, opts ...grpc.CallOption) (*QuitGroupResp, error) { - out := new(QuitGroupResp) - err := c.cc.Invoke(ctx, "/OpenIMServer.group.group/quitGroup", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *groupClient) GetGroupsInfo(ctx context.Context, in *GetGroupsInfoReq, opts ...grpc.CallOption) (*GetGroupsInfoResp, error) { - out := new(GetGroupsInfoResp) - err := c.cc.Invoke(ctx, "/OpenIMServer.group.group/getGroupsInfo", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *groupClient) SetGroupInfo(ctx context.Context, in *SetGroupInfoReq, opts ...grpc.CallOption) (*SetGroupInfoResp, error) { - out := new(SetGroupInfoResp) - err := c.cc.Invoke(ctx, "/OpenIMServer.group.group/setGroupInfo", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *groupClient) GetGroupApplicationList(ctx context.Context, in *GetGroupApplicationListReq, opts ...grpc.CallOption) (*GetGroupApplicationListResp, error) { - out := new(GetGroupApplicationListResp) - err := c.cc.Invoke(ctx, "/OpenIMServer.group.group/getGroupApplicationList", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *groupClient) GetUserReqApplicationList(ctx context.Context, in *GetUserReqApplicationListReq, opts ...grpc.CallOption) (*GetUserReqApplicationListResp, error) { - out := new(GetUserReqApplicationListResp) - err := c.cc.Invoke(ctx, "/OpenIMServer.group.group/getUserReqApplicationList", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *groupClient) TransferGroupOwner(ctx context.Context, in *TransferGroupOwnerReq, opts ...grpc.CallOption) (*TransferGroupOwnerResp, error) { - out := new(TransferGroupOwnerResp) - err := c.cc.Invoke(ctx, "/OpenIMServer.group.group/transferGroupOwner", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *groupClient) GroupApplicationResponse(ctx context.Context, in *GroupApplicationResponseReq, opts ...grpc.CallOption) (*GroupApplicationResponseResp, error) { - out := new(GroupApplicationResponseResp) - err := c.cc.Invoke(ctx, "/OpenIMServer.group.group/groupApplicationResponse", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *groupClient) GetGroupMemberList(ctx context.Context, in *GetGroupMemberListReq, opts ...grpc.CallOption) (*GetGroupMemberListResp, error) { - out := new(GetGroupMemberListResp) - err := c.cc.Invoke(ctx, "/OpenIMServer.group.group/getGroupMemberList", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *groupClient) GetGroupMembersInfo(ctx context.Context, in *GetGroupMembersInfoReq, opts ...grpc.CallOption) (*GetGroupMembersInfoResp, error) { - out := new(GetGroupMembersInfoResp) - err := c.cc.Invoke(ctx, "/OpenIMServer.group.group/getGroupMembersInfo", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *groupClient) KickGroupMember(ctx context.Context, in *KickGroupMemberReq, opts ...grpc.CallOption) (*KickGroupMemberResp, error) { - out := new(KickGroupMemberResp) - err := c.cc.Invoke(ctx, "/OpenIMServer.group.group/kickGroupMember", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *groupClient) GetJoinedGroupList(ctx context.Context, in *GetJoinedGroupListReq, opts ...grpc.CallOption) (*GetJoinedGroupListResp, error) { - out := new(GetJoinedGroupListResp) - err := c.cc.Invoke(ctx, "/OpenIMServer.group.group/getJoinedGroupList", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *groupClient) InviteUserToGroup(ctx context.Context, in *InviteUserToGroupReq, opts ...grpc.CallOption) (*InviteUserToGroupResp, error) { - out := new(InviteUserToGroupResp) - err := c.cc.Invoke(ctx, "/OpenIMServer.group.group/inviteUserToGroup", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *groupClient) GetGroups(ctx context.Context, in *GetGroupsReq, opts ...grpc.CallOption) (*GetGroupsResp, error) { - out := new(GetGroupsResp) - err := c.cc.Invoke(ctx, "/OpenIMServer.group.group/getGroups", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *groupClient) GetGroupMembersCMS(ctx context.Context, in *GetGroupMembersCMSReq, opts ...grpc.CallOption) (*GetGroupMembersCMSResp, error) { - out := new(GetGroupMembersCMSResp) - err := c.cc.Invoke(ctx, "/OpenIMServer.group.group/getGroupMembersCMS", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *groupClient) DismissGroup(ctx context.Context, in *DismissGroupReq, opts ...grpc.CallOption) (*DismissGroupResp, error) { - out := new(DismissGroupResp) - err := c.cc.Invoke(ctx, "/OpenIMServer.group.group/dismissGroup", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *groupClient) MuteGroupMember(ctx context.Context, in *MuteGroupMemberReq, opts ...grpc.CallOption) (*MuteGroupMemberResp, error) { - out := new(MuteGroupMemberResp) - err := c.cc.Invoke(ctx, "/OpenIMServer.group.group/muteGroupMember", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *groupClient) CancelMuteGroupMember(ctx context.Context, in *CancelMuteGroupMemberReq, opts ...grpc.CallOption) (*CancelMuteGroupMemberResp, error) { - out := new(CancelMuteGroupMemberResp) - err := c.cc.Invoke(ctx, "/OpenIMServer.group.group/cancelMuteGroupMember", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *groupClient) MuteGroup(ctx context.Context, in *MuteGroupReq, opts ...grpc.CallOption) (*MuteGroupResp, error) { - out := new(MuteGroupResp) - err := c.cc.Invoke(ctx, "/OpenIMServer.group.group/muteGroup", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *groupClient) CancelMuteGroup(ctx context.Context, in *CancelMuteGroupReq, opts ...grpc.CallOption) (*CancelMuteGroupResp, error) { - out := new(CancelMuteGroupResp) - err := c.cc.Invoke(ctx, "/OpenIMServer.group.group/cancelMuteGroup", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *groupClient) GetJoinedSuperGroupList(ctx context.Context, in *GetJoinedSuperGroupListReq, opts ...grpc.CallOption) (*GetJoinedSuperGroupListResp, error) { - out := new(GetJoinedSuperGroupListResp) - err := c.cc.Invoke(ctx, "/OpenIMServer.group.group/getJoinedSuperGroupList", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *groupClient) GetSuperGroupsInfo(ctx context.Context, in *GetSuperGroupsInfoReq, opts ...grpc.CallOption) (*GetSuperGroupsInfoResp, error) { - out := new(GetSuperGroupsInfoResp) - err := c.cc.Invoke(ctx, "/OpenIMServer.group.group/getSuperGroupsInfo", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *groupClient) SetGroupMemberInfo(ctx context.Context, in *SetGroupMemberInfoReq, opts ...grpc.CallOption) (*SetGroupMemberInfoResp, error) { - out := new(SetGroupMemberInfoResp) - err := c.cc.Invoke(ctx, "/OpenIMServer.group.group/setGroupMemberInfo", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *groupClient) GetGroupAbstractInfo(ctx context.Context, in *GetGroupAbstractInfoReq, opts ...grpc.CallOption) (*GetGroupAbstractInfoResp, error) { - out := new(GetGroupAbstractInfoResp) - err := c.cc.Invoke(ctx, "/OpenIMServer.group.group/getGroupAbstractInfo", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *groupClient) GetUserInGroupMembers(ctx context.Context, in *GetUserInGroupMembersReq, opts ...grpc.CallOption) (*GetUserInGroupMembersResp, error) { - out := new(GetUserInGroupMembersResp) - err := c.cc.Invoke(ctx, "/OpenIMServer.group.group/getUserInGroupMembers", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *groupClient) GetGroupMemberUserIDs(ctx context.Context, in *GetGroupMemberUserIDsReq, opts ...grpc.CallOption) (*GetGroupMemberUserIDsResp, error) { - out := new(GetGroupMemberUserIDsResp) - err := c.cc.Invoke(ctx, "/OpenIMServer.group.group/getGroupMemberUserIDs", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *groupClient) GetGroupMemberRoleLevel(ctx context.Context, in *GetGroupMemberRoleLevelReq, opts ...grpc.CallOption) (*GetGroupMemberRoleLevelResp, error) { - out := new(GetGroupMemberRoleLevelResp) - err := c.cc.Invoke(ctx, "/OpenIMServer.group.group/GetGroupMemberRoleLevel", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *groupClient) GetGroupInfoCache(ctx context.Context, in *GetGroupInfoCacheReq, opts ...grpc.CallOption) (*GetGroupInfoCacheResp, error) { - out := new(GetGroupInfoCacheResp) - err := c.cc.Invoke(ctx, "/OpenIMServer.group.group/GetGroupInfoCache", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *groupClient) GetGroupMemberCache(ctx context.Context, in *GetGroupMemberCacheReq, opts ...grpc.CallOption) (*GetGroupMemberCacheResp, error) { - out := new(GetGroupMemberCacheResp) - err := c.cc.Invoke(ctx, "/OpenIMServer.group.group/GetGroupMemberCache", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *groupClient) GroupCreateCount(ctx context.Context, in *GroupCreateCountReq, opts ...grpc.CallOption) (*GroupCreateCountResp, error) { - out := new(GroupCreateCountResp) - err := c.cc.Invoke(ctx, "/OpenIMServer.group.group/GroupCreateCount", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// GroupServer is the server API for Group service. -type GroupServer interface { - // 创建群 - CreateGroup(context.Context, *CreateGroupReq) (*CreateGroupResp, error) - // 申请加群 - JoinGroup(context.Context, *JoinGroupReq) (*JoinGroupResp, error) - // 退出群 - QuitGroup(context.Context, *QuitGroupReq) (*QuitGroupResp, error) - // 获取指定群信息 - GetGroupsInfo(context.Context, *GetGroupsInfoReq) (*GetGroupsInfoResp, error) - // 设置群信息 - SetGroupInfo(context.Context, *SetGroupInfoReq) (*SetGroupInfoResp, error) - // (以管理员或群主身份)获取群的加群申请 - GetGroupApplicationList(context.Context, *GetGroupApplicationListReq) (*GetGroupApplicationListResp, error) - // 获取用户自己的主动加群申请 - GetUserReqApplicationList(context.Context, *GetUserReqApplicationListReq) (*GetUserReqApplicationListResp, error) - // 转让群主 - TransferGroupOwner(context.Context, *TransferGroupOwnerReq) (*TransferGroupOwnerResp, error) - // 群主或管理员处理进群申请 - GroupApplicationResponse(context.Context, *GroupApplicationResponseReq) (*GroupApplicationResponseResp, error) - // 获取某个群的群成员 - GetGroupMemberList(context.Context, *GetGroupMemberListReq) (*GetGroupMemberListResp, error) - // 获取某个群的指定群成员 - GetGroupMembersInfo(context.Context, *GetGroupMembersInfoReq) (*GetGroupMembersInfoResp, error) - // 踢出群 - KickGroupMember(context.Context, *KickGroupMemberReq) (*KickGroupMemberResp, error) - // 获取某个人已加入群 - GetJoinedGroupList(context.Context, *GetJoinedGroupListReq) (*GetJoinedGroupListResp, error) - // 邀请某些人进群 - InviteUserToGroup(context.Context, *InviteUserToGroupReq) (*InviteUserToGroupResp, error) - GetGroups(context.Context, *GetGroupsReq) (*GetGroupsResp, error) - GetGroupMembersCMS(context.Context, *GetGroupMembersCMSReq) (*GetGroupMembersCMSResp, error) - // 解散群 - DismissGroup(context.Context, *DismissGroupReq) (*DismissGroupResp, error) - // 对某个群成员禁言 - MuteGroupMember(context.Context, *MuteGroupMemberReq) (*MuteGroupMemberResp, error) - // 对某个群成员取消禁言 - CancelMuteGroupMember(context.Context, *CancelMuteGroupMemberReq) (*CancelMuteGroupMemberResp, error) - // 对某个群禁言 - MuteGroup(context.Context, *MuteGroupReq) (*MuteGroupResp, error) - // 对某个群取消禁言 - CancelMuteGroup(context.Context, *CancelMuteGroupReq) (*CancelMuteGroupResp, error) - // 获取某个用户加入的超级群 - GetJoinedSuperGroupList(context.Context, *GetJoinedSuperGroupListReq) (*GetJoinedSuperGroupListResp, error) - // 获取指定的超级群信息 - GetSuperGroupsInfo(context.Context, *GetSuperGroupsInfoReq) (*GetSuperGroupsInfoResp, error) - // 设置群成员昵称 - // 设置群成员信息 - SetGroupMemberInfo(context.Context, *SetGroupMemberInfoReq) (*SetGroupMemberInfoResp, error) - // 获取群信息hash值 - GetGroupAbstractInfo(context.Context, *GetGroupAbstractInfoReq) (*GetGroupAbstractInfoResp, error) - // 获取某个用户在指定群中的信息 - GetUserInGroupMembers(context.Context, *GetUserInGroupMembersReq) (*GetUserInGroupMembersResp, error) - // 获取群成员用户ID - GetGroupMemberUserIDs(context.Context, *GetGroupMemberUserIDsReq) (*GetGroupMemberUserIDsResp, error) - // 查询群组中对应级别的成员 - GetGroupMemberRoleLevel(context.Context, *GetGroupMemberRoleLevelReq) (*GetGroupMemberRoleLevelResp, error) - GetGroupInfoCache(context.Context, *GetGroupInfoCacheReq) (*GetGroupInfoCacheResp, error) - GetGroupMemberCache(context.Context, *GetGroupMemberCacheReq) (*GetGroupMemberCacheResp, error) - GroupCreateCount(context.Context, *GroupCreateCountReq) (*GroupCreateCountResp, error) -} - -// UnimplementedGroupServer can be embedded to have forward compatible implementations. -type UnimplementedGroupServer struct { -} - -func (*UnimplementedGroupServer) CreateGroup(context.Context, *CreateGroupReq) (*CreateGroupResp, error) { - return nil, status.Errorf(codes.Unimplemented, "method CreateGroup not implemented") -} -func (*UnimplementedGroupServer) JoinGroup(context.Context, *JoinGroupReq) (*JoinGroupResp, error) { - return nil, status.Errorf(codes.Unimplemented, "method JoinGroup not implemented") -} -func (*UnimplementedGroupServer) QuitGroup(context.Context, *QuitGroupReq) (*QuitGroupResp, error) { - return nil, status.Errorf(codes.Unimplemented, "method QuitGroup not implemented") -} -func (*UnimplementedGroupServer) GetGroupsInfo(context.Context, *GetGroupsInfoReq) (*GetGroupsInfoResp, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetGroupsInfo not implemented") -} -func (*UnimplementedGroupServer) SetGroupInfo(context.Context, *SetGroupInfoReq) (*SetGroupInfoResp, error) { - return nil, status.Errorf(codes.Unimplemented, "method SetGroupInfo not implemented") -} -func (*UnimplementedGroupServer) GetGroupApplicationList(context.Context, *GetGroupApplicationListReq) (*GetGroupApplicationListResp, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetGroupApplicationList not implemented") -} -func (*UnimplementedGroupServer) GetUserReqApplicationList(context.Context, *GetUserReqApplicationListReq) (*GetUserReqApplicationListResp, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetUserReqApplicationList not implemented") -} -func (*UnimplementedGroupServer) TransferGroupOwner(context.Context, *TransferGroupOwnerReq) (*TransferGroupOwnerResp, error) { - return nil, status.Errorf(codes.Unimplemented, "method TransferGroupOwner not implemented") -} -func (*UnimplementedGroupServer) GroupApplicationResponse(context.Context, *GroupApplicationResponseReq) (*GroupApplicationResponseResp, error) { - return nil, status.Errorf(codes.Unimplemented, "method GroupApplicationResponse not implemented") -} -func (*UnimplementedGroupServer) GetGroupMemberList(context.Context, *GetGroupMemberListReq) (*GetGroupMemberListResp, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetGroupMemberList not implemented") -} -func (*UnimplementedGroupServer) GetGroupMembersInfo(context.Context, *GetGroupMembersInfoReq) (*GetGroupMembersInfoResp, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetGroupMembersInfo not implemented") -} -func (*UnimplementedGroupServer) KickGroupMember(context.Context, *KickGroupMemberReq) (*KickGroupMemberResp, error) { - return nil, status.Errorf(codes.Unimplemented, "method KickGroupMember not implemented") -} -func (*UnimplementedGroupServer) GetJoinedGroupList(context.Context, *GetJoinedGroupListReq) (*GetJoinedGroupListResp, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetJoinedGroupList not implemented") -} -func (*UnimplementedGroupServer) InviteUserToGroup(context.Context, *InviteUserToGroupReq) (*InviteUserToGroupResp, error) { - return nil, status.Errorf(codes.Unimplemented, "method InviteUserToGroup not implemented") -} -func (*UnimplementedGroupServer) GetGroups(context.Context, *GetGroupsReq) (*GetGroupsResp, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetGroups not implemented") -} -func (*UnimplementedGroupServer) GetGroupMembersCMS(context.Context, *GetGroupMembersCMSReq) (*GetGroupMembersCMSResp, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetGroupMembersCMS not implemented") -} -func (*UnimplementedGroupServer) DismissGroup(context.Context, *DismissGroupReq) (*DismissGroupResp, error) { - return nil, status.Errorf(codes.Unimplemented, "method DismissGroup not implemented") -} -func (*UnimplementedGroupServer) MuteGroupMember(context.Context, *MuteGroupMemberReq) (*MuteGroupMemberResp, error) { - return nil, status.Errorf(codes.Unimplemented, "method MuteGroupMember not implemented") -} -func (*UnimplementedGroupServer) CancelMuteGroupMember(context.Context, *CancelMuteGroupMemberReq) (*CancelMuteGroupMemberResp, error) { - return nil, status.Errorf(codes.Unimplemented, "method CancelMuteGroupMember not implemented") -} -func (*UnimplementedGroupServer) MuteGroup(context.Context, *MuteGroupReq) (*MuteGroupResp, error) { - return nil, status.Errorf(codes.Unimplemented, "method MuteGroup not implemented") -} -func (*UnimplementedGroupServer) CancelMuteGroup(context.Context, *CancelMuteGroupReq) (*CancelMuteGroupResp, error) { - return nil, status.Errorf(codes.Unimplemented, "method CancelMuteGroup not implemented") -} -func (*UnimplementedGroupServer) GetJoinedSuperGroupList(context.Context, *GetJoinedSuperGroupListReq) (*GetJoinedSuperGroupListResp, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetJoinedSuperGroupList not implemented") -} -func (*UnimplementedGroupServer) GetSuperGroupsInfo(context.Context, *GetSuperGroupsInfoReq) (*GetSuperGroupsInfoResp, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetSuperGroupsInfo not implemented") -} -func (*UnimplementedGroupServer) SetGroupMemberInfo(context.Context, *SetGroupMemberInfoReq) (*SetGroupMemberInfoResp, error) { - return nil, status.Errorf(codes.Unimplemented, "method SetGroupMemberInfo not implemented") -} -func (*UnimplementedGroupServer) GetGroupAbstractInfo(context.Context, *GetGroupAbstractInfoReq) (*GetGroupAbstractInfoResp, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetGroupAbstractInfo not implemented") -} -func (*UnimplementedGroupServer) GetUserInGroupMembers(context.Context, *GetUserInGroupMembersReq) (*GetUserInGroupMembersResp, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetUserInGroupMembers not implemented") -} -func (*UnimplementedGroupServer) GetGroupMemberUserIDs(context.Context, *GetGroupMemberUserIDsReq) (*GetGroupMemberUserIDsResp, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetGroupMemberUserIDs not implemented") -} -func (*UnimplementedGroupServer) GetGroupMemberRoleLevel(context.Context, *GetGroupMemberRoleLevelReq) (*GetGroupMemberRoleLevelResp, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetGroupMemberRoleLevel not implemented") -} -func (*UnimplementedGroupServer) GetGroupInfoCache(context.Context, *GetGroupInfoCacheReq) (*GetGroupInfoCacheResp, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetGroupInfoCache not implemented") -} -func (*UnimplementedGroupServer) GetGroupMemberCache(context.Context, *GetGroupMemberCacheReq) (*GetGroupMemberCacheResp, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetGroupMemberCache not implemented") -} -func (*UnimplementedGroupServer) GroupCreateCount(context.Context, *GroupCreateCountReq) (*GroupCreateCountResp, error) { - return nil, status.Errorf(codes.Unimplemented, "method GroupCreateCount not implemented") -} - -func RegisterGroupServer(s *grpc.Server, srv GroupServer) { - s.RegisterService(&_Group_serviceDesc, srv) -} - -func _Group_CreateGroup_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(CreateGroupReq) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(GroupServer).CreateGroup(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/OpenIMServer.group.group/CreateGroup", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(GroupServer).CreateGroup(ctx, req.(*CreateGroupReq)) - } - return interceptor(ctx, in, info, handler) -} - -func _Group_JoinGroup_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(JoinGroupReq) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(GroupServer).JoinGroup(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/OpenIMServer.group.group/JoinGroup", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(GroupServer).JoinGroup(ctx, req.(*JoinGroupReq)) - } - return interceptor(ctx, in, info, handler) -} - -func _Group_QuitGroup_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QuitGroupReq) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(GroupServer).QuitGroup(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/OpenIMServer.group.group/QuitGroup", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(GroupServer).QuitGroup(ctx, req.(*QuitGroupReq)) - } - return interceptor(ctx, in, info, handler) -} - -func _Group_GetGroupsInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetGroupsInfoReq) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(GroupServer).GetGroupsInfo(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/OpenIMServer.group.group/GetGroupsInfo", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(GroupServer).GetGroupsInfo(ctx, req.(*GetGroupsInfoReq)) - } - return interceptor(ctx, in, info, handler) -} - -func _Group_SetGroupInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(SetGroupInfoReq) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(GroupServer).SetGroupInfo(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/OpenIMServer.group.group/SetGroupInfo", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(GroupServer).SetGroupInfo(ctx, req.(*SetGroupInfoReq)) - } - return interceptor(ctx, in, info, handler) -} - -func _Group_GetGroupApplicationList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetGroupApplicationListReq) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(GroupServer).GetGroupApplicationList(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/OpenIMServer.group.group/GetGroupApplicationList", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(GroupServer).GetGroupApplicationList(ctx, req.(*GetGroupApplicationListReq)) - } - return interceptor(ctx, in, info, handler) -} - -func _Group_GetUserReqApplicationList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetUserReqApplicationListReq) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(GroupServer).GetUserReqApplicationList(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/OpenIMServer.group.group/GetUserReqApplicationList", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(GroupServer).GetUserReqApplicationList(ctx, req.(*GetUserReqApplicationListReq)) - } - return interceptor(ctx, in, info, handler) -} - -func _Group_TransferGroupOwner_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(TransferGroupOwnerReq) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(GroupServer).TransferGroupOwner(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/OpenIMServer.group.group/TransferGroupOwner", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(GroupServer).TransferGroupOwner(ctx, req.(*TransferGroupOwnerReq)) - } - return interceptor(ctx, in, info, handler) -} - -func _Group_GroupApplicationResponse_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GroupApplicationResponseReq) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(GroupServer).GroupApplicationResponse(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/OpenIMServer.group.group/GroupApplicationResponse", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(GroupServer).GroupApplicationResponse(ctx, req.(*GroupApplicationResponseReq)) - } - return interceptor(ctx, in, info, handler) -} - -func _Group_GetGroupMemberList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetGroupMemberListReq) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(GroupServer).GetGroupMemberList(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/OpenIMServer.group.group/GetGroupMemberList", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(GroupServer).GetGroupMemberList(ctx, req.(*GetGroupMemberListReq)) - } - return interceptor(ctx, in, info, handler) -} - -func _Group_GetGroupMembersInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetGroupMembersInfoReq) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(GroupServer).GetGroupMembersInfo(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/OpenIMServer.group.group/GetGroupMembersInfo", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(GroupServer).GetGroupMembersInfo(ctx, req.(*GetGroupMembersInfoReq)) - } - return interceptor(ctx, in, info, handler) -} - -func _Group_KickGroupMember_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(KickGroupMemberReq) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(GroupServer).KickGroupMember(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/OpenIMServer.group.group/KickGroupMember", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(GroupServer).KickGroupMember(ctx, req.(*KickGroupMemberReq)) - } - return interceptor(ctx, in, info, handler) -} - -func _Group_GetJoinedGroupList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetJoinedGroupListReq) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(GroupServer).GetJoinedGroupList(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/OpenIMServer.group.group/GetJoinedGroupList", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(GroupServer).GetJoinedGroupList(ctx, req.(*GetJoinedGroupListReq)) - } - return interceptor(ctx, in, info, handler) -} - -func _Group_InviteUserToGroup_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(InviteUserToGroupReq) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(GroupServer).InviteUserToGroup(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/OpenIMServer.group.group/InviteUserToGroup", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(GroupServer).InviteUserToGroup(ctx, req.(*InviteUserToGroupReq)) - } - return interceptor(ctx, in, info, handler) -} - -func _Group_GetGroups_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetGroupsReq) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(GroupServer).GetGroups(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/OpenIMServer.group.group/GetGroups", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(GroupServer).GetGroups(ctx, req.(*GetGroupsReq)) - } - return interceptor(ctx, in, info, handler) -} - -func _Group_GetGroupMembersCMS_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetGroupMembersCMSReq) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(GroupServer).GetGroupMembersCMS(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/OpenIMServer.group.group/GetGroupMembersCMS", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(GroupServer).GetGroupMembersCMS(ctx, req.(*GetGroupMembersCMSReq)) - } - return interceptor(ctx, in, info, handler) -} - -func _Group_DismissGroup_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DismissGroupReq) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(GroupServer).DismissGroup(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/OpenIMServer.group.group/DismissGroup", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(GroupServer).DismissGroup(ctx, req.(*DismissGroupReq)) - } - return interceptor(ctx, in, info, handler) -} - -func _Group_MuteGroupMember_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MuteGroupMemberReq) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(GroupServer).MuteGroupMember(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/OpenIMServer.group.group/MuteGroupMember", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(GroupServer).MuteGroupMember(ctx, req.(*MuteGroupMemberReq)) - } - return interceptor(ctx, in, info, handler) -} - -func _Group_CancelMuteGroupMember_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(CancelMuteGroupMemberReq) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(GroupServer).CancelMuteGroupMember(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/OpenIMServer.group.group/CancelMuteGroupMember", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(GroupServer).CancelMuteGroupMember(ctx, req.(*CancelMuteGroupMemberReq)) - } - return interceptor(ctx, in, info, handler) -} - -func _Group_MuteGroup_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MuteGroupReq) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(GroupServer).MuteGroup(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/OpenIMServer.group.group/MuteGroup", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(GroupServer).MuteGroup(ctx, req.(*MuteGroupReq)) - } - return interceptor(ctx, in, info, handler) -} - -func _Group_CancelMuteGroup_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(CancelMuteGroupReq) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(GroupServer).CancelMuteGroup(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/OpenIMServer.group.group/CancelMuteGroup", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(GroupServer).CancelMuteGroup(ctx, req.(*CancelMuteGroupReq)) - } - return interceptor(ctx, in, info, handler) -} - -func _Group_GetJoinedSuperGroupList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetJoinedSuperGroupListReq) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(GroupServer).GetJoinedSuperGroupList(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/OpenIMServer.group.group/GetJoinedSuperGroupList", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(GroupServer).GetJoinedSuperGroupList(ctx, req.(*GetJoinedSuperGroupListReq)) - } - return interceptor(ctx, in, info, handler) -} - -func _Group_GetSuperGroupsInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetSuperGroupsInfoReq) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(GroupServer).GetSuperGroupsInfo(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/OpenIMServer.group.group/GetSuperGroupsInfo", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(GroupServer).GetSuperGroupsInfo(ctx, req.(*GetSuperGroupsInfoReq)) - } - return interceptor(ctx, in, info, handler) -} - -func _Group_SetGroupMemberInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(SetGroupMemberInfoReq) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(GroupServer).SetGroupMemberInfo(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/OpenIMServer.group.group/SetGroupMemberInfo", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(GroupServer).SetGroupMemberInfo(ctx, req.(*SetGroupMemberInfoReq)) - } - return interceptor(ctx, in, info, handler) -} - -func _Group_GetGroupAbstractInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetGroupAbstractInfoReq) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(GroupServer).GetGroupAbstractInfo(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/OpenIMServer.group.group/GetGroupAbstractInfo", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(GroupServer).GetGroupAbstractInfo(ctx, req.(*GetGroupAbstractInfoReq)) - } - return interceptor(ctx, in, info, handler) -} - -func _Group_GetUserInGroupMembers_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetUserInGroupMembersReq) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(GroupServer).GetUserInGroupMembers(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/OpenIMServer.group.group/GetUserInGroupMembers", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(GroupServer).GetUserInGroupMembers(ctx, req.(*GetUserInGroupMembersReq)) - } - return interceptor(ctx, in, info, handler) -} - -func _Group_GetGroupMemberUserIDs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetGroupMemberUserIDsReq) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(GroupServer).GetGroupMemberUserIDs(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/OpenIMServer.group.group/GetGroupMemberUserIDs", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(GroupServer).GetGroupMemberUserIDs(ctx, req.(*GetGroupMemberUserIDsReq)) - } - return interceptor(ctx, in, info, handler) -} - -func _Group_GetGroupMemberRoleLevel_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetGroupMemberRoleLevelReq) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(GroupServer).GetGroupMemberRoleLevel(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/OpenIMServer.group.group/GetGroupMemberRoleLevel", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(GroupServer).GetGroupMemberRoleLevel(ctx, req.(*GetGroupMemberRoleLevelReq)) - } - return interceptor(ctx, in, info, handler) -} - -func _Group_GetGroupInfoCache_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetGroupInfoCacheReq) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(GroupServer).GetGroupInfoCache(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/OpenIMServer.group.group/GetGroupInfoCache", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(GroupServer).GetGroupInfoCache(ctx, req.(*GetGroupInfoCacheReq)) - } - return interceptor(ctx, in, info, handler) -} - -func _Group_GetGroupMemberCache_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetGroupMemberCacheReq) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(GroupServer).GetGroupMemberCache(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/OpenIMServer.group.group/GetGroupMemberCache", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(GroupServer).GetGroupMemberCache(ctx, req.(*GetGroupMemberCacheReq)) - } - return interceptor(ctx, in, info, handler) -} - -func _Group_GroupCreateCount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GroupCreateCountReq) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(GroupServer).GroupCreateCount(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/OpenIMServer.group.group/GroupCreateCount", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(GroupServer).GroupCreateCount(ctx, req.(*GroupCreateCountReq)) - } - return interceptor(ctx, in, info, handler) -} - -var _Group_serviceDesc = grpc.ServiceDesc{ - ServiceName: "OpenIMServer.group.group", - HandlerType: (*GroupServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "createGroup", - Handler: _Group_CreateGroup_Handler, - }, - { - MethodName: "joinGroup", - Handler: _Group_JoinGroup_Handler, - }, - { - MethodName: "quitGroup", - Handler: _Group_QuitGroup_Handler, - }, - { - MethodName: "getGroupsInfo", - Handler: _Group_GetGroupsInfo_Handler, - }, - { - MethodName: "setGroupInfo", - Handler: _Group_SetGroupInfo_Handler, - }, - { - MethodName: "getGroupApplicationList", - Handler: _Group_GetGroupApplicationList_Handler, - }, - { - MethodName: "getUserReqApplicationList", - Handler: _Group_GetUserReqApplicationList_Handler, - }, - { - MethodName: "transferGroupOwner", - Handler: _Group_TransferGroupOwner_Handler, - }, - { - MethodName: "groupApplicationResponse", - Handler: _Group_GroupApplicationResponse_Handler, - }, - { - MethodName: "getGroupMemberList", - Handler: _Group_GetGroupMemberList_Handler, - }, - { - MethodName: "getGroupMembersInfo", - Handler: _Group_GetGroupMembersInfo_Handler, - }, - { - MethodName: "kickGroupMember", - Handler: _Group_KickGroupMember_Handler, - }, - { - MethodName: "getJoinedGroupList", - Handler: _Group_GetJoinedGroupList_Handler, - }, - { - MethodName: "inviteUserToGroup", - Handler: _Group_InviteUserToGroup_Handler, - }, - { - MethodName: "getGroups", - Handler: _Group_GetGroups_Handler, - }, - { - MethodName: "getGroupMembersCMS", - Handler: _Group_GetGroupMembersCMS_Handler, - }, - { - MethodName: "dismissGroup", - Handler: _Group_DismissGroup_Handler, - }, - { - MethodName: "muteGroupMember", - Handler: _Group_MuteGroupMember_Handler, - }, - { - MethodName: "cancelMuteGroupMember", - Handler: _Group_CancelMuteGroupMember_Handler, - }, - { - MethodName: "muteGroup", - Handler: _Group_MuteGroup_Handler, - }, - { - MethodName: "cancelMuteGroup", - Handler: _Group_CancelMuteGroup_Handler, - }, - { - MethodName: "getJoinedSuperGroupList", - Handler: _Group_GetJoinedSuperGroupList_Handler, - }, - { - MethodName: "getSuperGroupsInfo", - Handler: _Group_GetSuperGroupsInfo_Handler, - }, - { - MethodName: "setGroupMemberInfo", - Handler: _Group_SetGroupMemberInfo_Handler, - }, - { - MethodName: "getGroupAbstractInfo", - Handler: _Group_GetGroupAbstractInfo_Handler, - }, - { - MethodName: "getUserInGroupMembers", - Handler: _Group_GetUserInGroupMembers_Handler, - }, - { - MethodName: "getGroupMemberUserIDs", - Handler: _Group_GetGroupMemberUserIDs_Handler, - }, - { - MethodName: "GetGroupMemberRoleLevel", - Handler: _Group_GetGroupMemberRoleLevel_Handler, - }, - { - MethodName: "GetGroupInfoCache", - Handler: _Group_GetGroupInfoCache_Handler, - }, - { - MethodName: "GetGroupMemberCache", - Handler: _Group_GetGroupMemberCache_Handler, - }, - { - MethodName: "GroupCreateCount", - Handler: _Group_GroupCreateCount_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "group/group.proto", -} diff --git a/pkg/proto/group/group.proto b/pkg/proto/group/group.proto deleted file mode 100644 index 9379ebe86..000000000 --- a/pkg/proto/group/group.proto +++ /dev/null @@ -1,417 +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. - -syntax = "proto3"; -package OpenIMServer.group; -import "sdkws/sdkws.proto"; -import "wrapperspb/wrapperspb.proto"; -option go_package = "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/group"; - - - -message CreateGroupReq{ - repeated string memberUserIDs = 1; - sdkws.GroupInfo groupInfo = 2; - repeated string adminUserIDs = 3; - string ownerUserID = 4; //owner -} -message CreateGroupResp{ - sdkws.GroupInfo groupInfo = 1; -} - - -message GetGroupsInfoReq{ - repeated string groupIDs = 1; -} -message GetGroupsInfoResp{ - repeated sdkws.GroupInfo groupInfos = 1; -} - - -message SetGroupInfoReq{ - sdkws.GroupInfoForSet groupInfoForSet = 1; -} -message SetGroupInfoResp{ -} - - -message GetGroupApplicationListReq { - sdkws.RequestPagination pagination = 1; - string fromUserID = 2; //owner or admin -} -message GetGroupApplicationListResp { - uint32 total = 1; - repeated sdkws.GroupRequest groupRequests = 2; -} - -message GetUserReqApplicationListReq{ - sdkws.RequestPagination pagination = 1; - string userID = 2; -} - -message GetUserReqApplicationListResp{ - uint32 total = 1; - repeated sdkws.GroupRequest groupRequests = 2; -} - - -message TransferGroupOwnerReq { - string groupID = 1; - string oldOwnerUserID = 2; - string newOwnerUserID = 3; -} -message TransferGroupOwnerResp{ - -} - -message JoinGroupReq{ - string groupID = 1; - string reqMessage = 2; - int32 joinSource = 3; - string inviterUserID = 4; -} -message JoinGroupResp{ -} - - -message GroupApplicationResponseReq{ - string groupID = 1; - string fromUserID = 2; // - string handledMsg = 3; - int32 handleResult = 4; -} -message GroupApplicationResponseResp{ - -} - - - -message QuitGroupReq{ - string groupID = 1; -} -message QuitGroupResp{ -} - - -message GetGroupMemberListReq { - sdkws.RequestPagination pagination = 1; - string groupID = 2; - int32 filter = 3; -} - -message GetGroupMemberListResp { - uint32 total = 1; - repeated sdkws.GroupMemberFullInfo members = 2; -} - - -message GetGroupMembersInfoReq { - string groupID = 1; - repeated string userIDs = 2; -} - -message GetGroupMembersInfoResp { - repeated sdkws.GroupMemberFullInfo members = 1; -} - -message KickGroupMemberReq { - string groupID = 1; - repeated string kickedUserIDs = 2; - string reason = 3; -} - -message KickGroupMemberResp { - -} - - -message GetJoinedGroupListReq { - sdkws.RequestPagination pagination = 1; - string fromUserID = 2; -} -message GetJoinedGroupListResp{ - uint32 total = 1; - repeated sdkws.GroupInfo groups = 2; -} - - -message InviteUserToGroupReq { - string groupID = 1; - string reason = 2; - repeated string invitedUserIDs = 3; -} -message InviteUserToGroupResp { - -} - - -message GetGroupAllMemberReq { - sdkws.RequestPagination pagination = 1; - string groupID = 2; -} -message GetGroupAllMemberResp { - repeated sdkws.GroupMemberFullInfo members = 1; -} - -message CMSGroup { - sdkws.GroupInfo groupInfo = 1; - string groupOwnerUserName = 2; - string groupOwnerUserID = 3; -} - - -message GetGroupsReq { - sdkws.RequestPagination pagination = 1; - string groupName = 2; - string groupID = 3; -} - -message GetGroupsResp { - uint32 total = 1; - repeated CMSGroup groups = 2; -} - -message GetGroupMemberReq { - string groupID = 1; -} - -message GetGroupMembersCMSReq { - sdkws.RequestPagination pagination = 1; - string groupID = 2; - string userName = 3; -} - -message GetGroupMembersCMSResp { - uint32 total = 1; - repeated sdkws.GroupMemberFullInfo members = 2; -} - -message DismissGroupReq{ - string groupID = 1; - bool deleteMember = 2; -} - -message DismissGroupResp{ -} - - -message MuteGroupMemberReq{ - string groupID = 1; - string userID = 2; - uint32 mutedSeconds = 3; -} - -message MuteGroupMemberResp{ -} - - - -message CancelMuteGroupMemberReq{ - string groupID = 1; - string userID = 2; -} - -message CancelMuteGroupMemberResp{ -} - - -message MuteGroupReq{ - string groupID = 1; -} - -message MuteGroupResp{ -} - - - -message CancelMuteGroupReq{ - string groupID = 1; -} - -message CancelMuteGroupResp{ -} - -message GetJoinedSuperGroupListReq { - string userID = 1; -} - -message GetJoinedSuperGroupListResp { - repeated sdkws.GroupInfo groups = 1; -} - -message GetSuperGroupsInfoReq { - repeated string groupIDs = 1; -} - -message GetSuperGroupsInfoResp { - repeated sdkws.GroupInfo groupInfos = 1; -} - -message SetGroupMemberInfo{ - string groupID = 1; - string userID = 2; - OpenIMServer.protobuf.StringValue nickname = 3; - OpenIMServer.protobuf.StringValue faceURL = 4; - OpenIMServer.protobuf.Int32Value roleLevel = 5; - OpenIMServer.protobuf.StringValue ex = 6; -} - -message SetGroupMemberInfoReq{ - repeated SetGroupMemberInfo members = 1; -} - -message SetGroupMemberInfoResp{ - -} - -message GetGroupAbstractInfoReq{ - repeated string groupIDs = 1; -} - -message GroupAbstractInfo{ - string groupID = 1; - uint32 groupMemberNumber = 2; - uint64 groupMemberListHash = 3; -} - -message GetGroupAbstractInfoResp{ - repeated GroupAbstractInfo groupAbstractInfos = 1; -} - -message GetUserInGroupMembersReq { - string userID = 1; - repeated string groupIDs = 2; -} - -message GetUserInGroupMembersResp{ - repeated sdkws.GroupMemberFullInfo members = 1; -} - -message GetGroupMemberUserIDsReq{ - string groupID = 1; -} - -message GetGroupMemberUserIDsResp{ - repeated string userIDs = 1; -} - -message GetGroupMemberRoleLevelReq{ - string groupID = 1; - repeated int32 roleLevels = 2; -} - -message GetGroupMemberRoleLevelResp { - repeated sdkws.GroupMemberFullInfo members = 1; -} - -message GetGroupInfoCacheReq { - string groupID = 1; -} - -message GetGroupInfoCacheResp { - sdkws.GroupInfo groupInfo = 1; -} - -message GetGroupMemberCacheReq { - string groupID = 1; - string groupMemberID = 2; -} - -message GetGroupMemberCacheResp { - sdkws.GroupMemberFullInfo member = 1; -} - -message GroupCreateCountReq { - int64 start = 1; - int64 end = 2; -} - -message GroupCreateCountResp { - int64 total = 1; - int64 before = 2; - map count = 3; -} - -service group{ - //创建群 - rpc createGroup(CreateGroupReq) returns(CreateGroupResp); - //申请加群 - rpc joinGroup(JoinGroupReq) returns(JoinGroupResp); - //退出群 - rpc quitGroup(QuitGroupReq) returns(QuitGroupResp); - //获取指定群信息 - rpc getGroupsInfo(GetGroupsInfoReq) returns(GetGroupsInfoResp); - //设置群信息 - rpc setGroupInfo(SetGroupInfoReq) returns(SetGroupInfoResp); - //(以管理员或群主身份)获取群的加群申请 - rpc getGroupApplicationList(GetGroupApplicationListReq) returns(GetGroupApplicationListResp); - //获取用户自己的主动加群申请 - rpc getUserReqApplicationList(GetUserReqApplicationListReq) returns(GetUserReqApplicationListResp); - //转让群主 - rpc transferGroupOwner(TransferGroupOwnerReq) returns(TransferGroupOwnerResp); - //群主或管理员处理进群申请 - rpc groupApplicationResponse(GroupApplicationResponseReq) returns(GroupApplicationResponseResp); - //获取某个群的群成员 - rpc getGroupMemberList(GetGroupMemberListReq) returns(GetGroupMemberListResp); - //获取某个群的指定群成员 - rpc getGroupMembersInfo(GetGroupMembersInfoReq) returns(GetGroupMembersInfoResp); - //踢出群 - rpc kickGroupMember(KickGroupMemberReq) returns (KickGroupMemberResp); - //获取某个人已加入群 - rpc getJoinedGroupList(GetJoinedGroupListReq) returns (GetJoinedGroupListResp); - //邀请某些人进群 - rpc inviteUserToGroup(InviteUserToGroupReq) returns (InviteUserToGroupResp); - - rpc getGroups(GetGroupsReq) returns(GetGroupsResp); - rpc getGroupMembersCMS(GetGroupMembersCMSReq) returns(GetGroupMembersCMSResp); - - //解散群 - rpc dismissGroup(DismissGroupReq) returns(DismissGroupResp); - //对某个群成员禁言 - rpc muteGroupMember(MuteGroupMemberReq) returns(MuteGroupMemberResp); - //对某个群成员取消禁言 - rpc cancelMuteGroupMember(CancelMuteGroupMemberReq) returns(CancelMuteGroupMemberResp); - //对某个群禁言 - rpc muteGroup(MuteGroupReq) returns(MuteGroupResp); - //对某个群取消禁言 - rpc cancelMuteGroup(CancelMuteGroupReq) returns(CancelMuteGroupResp); - - //获取某个用户加入的超级群 - rpc getJoinedSuperGroupList(GetJoinedSuperGroupListReq) returns (GetJoinedSuperGroupListResp); - //获取指定的超级群信息 - rpc getSuperGroupsInfo(GetSuperGroupsInfoReq) returns (GetSuperGroupsInfoResp); - //设置群成员昵称 - //设置群成员信息 - rpc setGroupMemberInfo(SetGroupMemberInfoReq) returns (SetGroupMemberInfoResp); - //获取群信息hash值 - rpc getGroupAbstractInfo(GetGroupAbstractInfoReq) returns (GetGroupAbstractInfoResp); - //获取某个用户在指定群中的信息 - rpc getUserInGroupMembers(GetUserInGroupMembersReq) returns (GetUserInGroupMembersResp); - //获取群成员用户ID - rpc getGroupMemberUserIDs(GetGroupMemberUserIDsReq) returns (GetGroupMemberUserIDsResp); - //查询群组中对应级别的成员 - rpc GetGroupMemberRoleLevel(GetGroupMemberRoleLevelReq)returns (GetGroupMemberRoleLevelResp); - - rpc GetGroupInfoCache(GetGroupInfoCacheReq) returns (GetGroupInfoCacheResp); - rpc GetGroupMemberCache(GetGroupMemberCacheReq) returns (GetGroupMemberCacheResp); - - rpc GroupCreateCount(GroupCreateCountReq) returns (GroupCreateCountResp); -} - - - - - - - diff --git a/pkg/proto/msg/msg.go b/pkg/proto/msg/msg.go deleted file mode 100644 index 03c9da915..000000000 --- a/pkg/proto/msg/msg.go +++ /dev/null @@ -1,217 +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. - -package msg - -import "github.com/OpenIMSDK/Open-IM-Server/pkg/errs" - -func (x *GetMaxAndMinSeqReq) Check() error { - if x.UserID == "" { - return errs.ErrArgs.Wrap("userID is empty") - } - return nil -} - -func (x *SendMsgReq) Check() error { - if x.MsgData == nil { - return errs.ErrArgs.Wrap("MsgData is empty") - } - if err := x.MsgData.Check(); err != nil { - return err - } - return nil -} - -func (x *SetSendMsgStatusReq) Check() error { - if x.Status < 0 || x.Status > 3 { - return errs.ErrArgs.Wrap("status is invalid") - } - return nil -} - -func (x *GetSendMsgStatusReq) Check() error { - return nil -} - -//func (x *ModifyMessageReactionExtensionsReq) Check() error { -// if x.ConversationID == "" { -// return errs.ErrArgs.Wrap("conversationID is empty") -// } -// if x.SessionType < 1 || x.SessionType > 4 { -// return errs.ErrArgs.Wrap("sessionType is invalid") -// } -// if x.ReactionExtensions == nil { -// return errs.ErrArgs.Wrap("reactionExtensions is empty") -// } -// return nil -//} -// -//func (x *SetMessageReactionExtensionsReq) Check() error { -// if x.ConversationID == "" { -// return errs.ErrArgs.Wrap("conversationID is empty") -// } -// if x.SessionType < 1 || x.SessionType > 4 { -// return errs.ErrArgs.Wrap("sessionType is invalid") -// } -// if x.ReactionExtensions == nil { -// return errs.ErrArgs.Wrap("reactionExtensions is empty") -// } -// return nil -//} -// -//func (x *GetMessagesReactionExtensionsReq) Check() error { -// if x.ConversationID == "" { -// return errs.ErrArgs.Wrap("conversationID is empty") -// } -// if x.SessionType < 1 || x.SessionType > 4 { -// return errs.ErrArgs.Wrap("sessionType is invalid") -// } -// if x.MessageReactionKeys == nil { -// return errs.ErrArgs.Wrap("MessageReactionKeys is empty") -// } -// if x.TypeKeys == nil { -// return errs.ErrArgs.Wrap("TypeKeys is empty") -// } -// return nil -//} -// -//func (x *DeleteMessagesReactionExtensionsReq) Check() error { -// if x.ConversationID == "" { -// return errs.ErrArgs.Wrap("conversationID is empty") -// } -// if x.SessionType < 1 || x.SessionType > 4 { -// return errs.ErrArgs.Wrap("sessionType is invalid") -// } -// if x.ReactionExtensions == nil { -// return errs.ErrArgs.Wrap("ReactionExtensions is empty") -// } -// return nil -//} - -func (x *DelMsgsReq) Check() error { - return nil -} - -func (x *RevokeMsgReq) Check() error { - if x.ConversationID == "" { - return errs.ErrArgs.Wrap("conversationID is empty") - } - if x.Seq < 1 { - return errs.ErrArgs.Wrap("seq is invalid") - } - if x.UserID == "" { - return errs.ErrArgs.Wrap("userID is empty") - } - return nil -} - -func (x *MarkMsgsAsReadReq) Check() error { - if x.ConversationID == "" { - return errs.ErrArgs.Wrap("conversationID is empty") - } - if x.Seqs == nil { - return errs.ErrArgs.Wrap("seqs is empty") - } - if x.UserID == "" { - return errs.ErrArgs.Wrap("userID is empty") - } - for _, seq := range x.Seqs { - if seq == 0 { - return errs.ErrArgs.Wrap("seqs has 0 value is invalid") - } - } - return nil -} - -func (x *MarkConversationAsReadReq) Check() error { - if x.ConversationID == "" { - return errs.ErrArgs.Wrap("conversationID is empty") - } - if x.UserID == "" { - return errs.ErrArgs.Wrap("userID is empty") - } - if x.HasReadSeq < 1 { - return errs.ErrArgs.Wrap("hasReadSeq is invalid") - } - for _, seq := range x.Seqs { - if seq == 0 { - return errs.ErrArgs.Wrap("seqs has 0 value is invalid") - } - } - return nil -} - -func (x *SetConversationHasReadSeqReq) Check() error { - if x.ConversationID == "" { - return errs.ErrArgs.Wrap("conversationID is empty") - } - if x.UserID == "" { - return errs.ErrArgs.Wrap("userID is empty") - } - if x.HasReadSeq < 1 { - return errs.ErrArgs.Wrap("hasReadSeq is invalid") - } - return nil -} - -func (x *ClearConversationsMsgReq) Check() error { - if x.ConversationIDs == nil { - return errs.ErrArgs.Wrap("conversationIDs is empty") - } - if x.UserID == "" { - return errs.ErrArgs.Wrap("userID is empty") - } - return nil -} - -func (x *UserClearAllMsgReq) Check() error { - if x.UserID == "" { - return errs.ErrArgs.Wrap("userID is empty") - } - return nil -} - -func (x *DeleteMsgsReq) Check() error { - if x.ConversationID == "" { - return errs.ErrArgs.Wrap("conversationID is empty") - } - if x.UserID == "" { - return errs.ErrArgs.Wrap("userID is empty") - } - if x.Seqs == nil { - return errs.ErrArgs.Wrap("seqs is empty") - } - return nil -} - -func (x *DeleteMsgPhysicalReq) Check() error { - if x.ConversationIDs == nil { - return errs.ErrArgs.Wrap("conversationIDs is empty") - } - return nil -} - -func (x *GetConversationMaxSeqReq) Check() error { - if x.ConversationID == "" { - return errs.ErrArgs.Wrap("conversationID is empty") - } - return nil -} - -func (x *GetConversationsHasReadAndMaxSeqReq) Check() error { - if x.UserID == "" { - return errs.ErrArgs.Wrap("userID is empty") - } - return nil -} diff --git a/pkg/proto/msg/msg.pb.go b/pkg/proto/msg/msg.pb.go deleted file mode 100644 index db1f019c2..000000000 --- a/pkg/proto/msg/msg.pb.go +++ /dev/null @@ -1,4807 +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. - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.29.1 -// protoc v4.22.0 -// source: msg/msg.proto - -package msg - -import ( - context "context" - sdkws "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/sdkws" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type MsgDataToMQ struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token"` - MsgData *sdkws.MsgData `protobuf:"bytes,2,opt,name=msgData,proto3" json:"msgData"` -} - -func (x *MsgDataToMQ) Reset() { - *x = MsgDataToMQ{} - if protoimpl.UnsafeEnabled { - mi := &file_msg_msg_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgDataToMQ) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgDataToMQ) ProtoMessage() {} - -func (x *MsgDataToMQ) ProtoReflect() protoreflect.Message { - mi := &file_msg_msg_proto_msgTypes[0] - 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 MsgDataToMQ.ProtoReflect.Descriptor instead. -func (*MsgDataToMQ) Descriptor() ([]byte, []int) { - return file_msg_msg_proto_rawDescGZIP(), []int{0} -} - -func (x *MsgDataToMQ) GetToken() string { - if x != nil { - return x.Token - } - return "" -} - -func (x *MsgDataToMQ) GetMsgData() *sdkws.MsgData { - if x != nil { - return x.MsgData - } - return nil -} - -type MsgDataToDB struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - MsgData *sdkws.MsgData `protobuf:"bytes,1,opt,name=msgData,proto3" json:"msgData"` -} - -func (x *MsgDataToDB) Reset() { - *x = MsgDataToDB{} - if protoimpl.UnsafeEnabled { - mi := &file_msg_msg_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgDataToDB) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgDataToDB) ProtoMessage() {} - -func (x *MsgDataToDB) ProtoReflect() protoreflect.Message { - mi := &file_msg_msg_proto_msgTypes[1] - 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 MsgDataToDB.ProtoReflect.Descriptor instead. -func (*MsgDataToDB) Descriptor() ([]byte, []int) { - return file_msg_msg_proto_rawDescGZIP(), []int{1} -} - -func (x *MsgDataToDB) GetMsgData() *sdkws.MsgData { - if x != nil { - return x.MsgData - } - return nil -} - -type PushMsgDataToMQ struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - MsgData *sdkws.MsgData `protobuf:"bytes,1,opt,name=msgData,proto3" json:"msgData"` - ConversationID string `protobuf:"bytes,2,opt,name=conversationID,proto3" json:"conversationID"` -} - -func (x *PushMsgDataToMQ) Reset() { - *x = PushMsgDataToMQ{} - if protoimpl.UnsafeEnabled { - mi := &file_msg_msg_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *PushMsgDataToMQ) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*PushMsgDataToMQ) ProtoMessage() {} - -func (x *PushMsgDataToMQ) ProtoReflect() protoreflect.Message { - mi := &file_msg_msg_proto_msgTypes[2] - 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 PushMsgDataToMQ.ProtoReflect.Descriptor instead. -func (*PushMsgDataToMQ) Descriptor() ([]byte, []int) { - return file_msg_msg_proto_rawDescGZIP(), []int{2} -} - -func (x *PushMsgDataToMQ) GetMsgData() *sdkws.MsgData { - if x != nil { - return x.MsgData - } - return nil -} - -func (x *PushMsgDataToMQ) GetConversationID() string { - if x != nil { - return x.ConversationID - } - return "" -} - -type MsgDataToMongoByMQ struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - LastSeq int64 `protobuf:"varint,1,opt,name=lastSeq,proto3" json:"lastSeq"` - ConversationID string `protobuf:"bytes,2,opt,name=conversationID,proto3" json:"conversationID"` - MsgData []*sdkws.MsgData `protobuf:"bytes,3,rep,name=msgData,proto3" json:"msgData"` -} - -func (x *MsgDataToMongoByMQ) Reset() { - *x = MsgDataToMongoByMQ{} - if protoimpl.UnsafeEnabled { - mi := &file_msg_msg_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgDataToMongoByMQ) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgDataToMongoByMQ) ProtoMessage() {} - -func (x *MsgDataToMongoByMQ) ProtoReflect() protoreflect.Message { - mi := &file_msg_msg_proto_msgTypes[3] - 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 MsgDataToMongoByMQ.ProtoReflect.Descriptor instead. -func (*MsgDataToMongoByMQ) Descriptor() ([]byte, []int) { - return file_msg_msg_proto_rawDescGZIP(), []int{3} -} - -func (x *MsgDataToMongoByMQ) GetLastSeq() int64 { - if x != nil { - return x.LastSeq - } - return 0 -} - -func (x *MsgDataToMongoByMQ) GetConversationID() string { - if x != nil { - return x.ConversationID - } - return "" -} - -func (x *MsgDataToMongoByMQ) GetMsgData() []*sdkws.MsgData { - if x != nil { - return x.MsgData - } - return nil -} - -type GetMaxAndMinSeqReq struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - UserID string `protobuf:"bytes,1,opt,name=UserID,proto3" json:"UserID"` -} - -func (x *GetMaxAndMinSeqReq) Reset() { - *x = GetMaxAndMinSeqReq{} - if protoimpl.UnsafeEnabled { - mi := &file_msg_msg_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetMaxAndMinSeqReq) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetMaxAndMinSeqReq) ProtoMessage() {} - -func (x *GetMaxAndMinSeqReq) ProtoReflect() protoreflect.Message { - mi := &file_msg_msg_proto_msgTypes[4] - 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 GetMaxAndMinSeqReq.ProtoReflect.Descriptor instead. -func (*GetMaxAndMinSeqReq) Descriptor() ([]byte, []int) { - return file_msg_msg_proto_rawDescGZIP(), []int{4} -} - -func (x *GetMaxAndMinSeqReq) GetUserID() string { - if x != nil { - return x.UserID - } - return "" -} - -type GetMaxAndMinSeqResp struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - MaxSeq int64 `protobuf:"varint,1,opt,name=MaxSeq,proto3" json:"MaxSeq"` - MinSeq int64 `protobuf:"varint,2,opt,name=MinSeq,proto3" json:"MinSeq"` -} - -func (x *GetMaxAndMinSeqResp) Reset() { - *x = GetMaxAndMinSeqResp{} - if protoimpl.UnsafeEnabled { - mi := &file_msg_msg_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetMaxAndMinSeqResp) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetMaxAndMinSeqResp) ProtoMessage() {} - -func (x *GetMaxAndMinSeqResp) ProtoReflect() protoreflect.Message { - mi := &file_msg_msg_proto_msgTypes[5] - 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 GetMaxAndMinSeqResp.ProtoReflect.Descriptor instead. -func (*GetMaxAndMinSeqResp) Descriptor() ([]byte, []int) { - return file_msg_msg_proto_rawDescGZIP(), []int{5} -} - -func (x *GetMaxAndMinSeqResp) GetMaxSeq() int64 { - if x != nil { - return x.MaxSeq - } - return 0 -} - -func (x *GetMaxAndMinSeqResp) GetMinSeq() int64 { - if x != nil { - return x.MinSeq - } - return 0 -} - -type SendMsgReq struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - MsgData *sdkws.MsgData `protobuf:"bytes,3,opt,name=msgData,proto3" json:"msgData"` -} - -func (x *SendMsgReq) Reset() { - *x = SendMsgReq{} - if protoimpl.UnsafeEnabled { - mi := &file_msg_msg_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SendMsgReq) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SendMsgReq) ProtoMessage() {} - -func (x *SendMsgReq) ProtoReflect() protoreflect.Message { - mi := &file_msg_msg_proto_msgTypes[6] - 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 SendMsgReq.ProtoReflect.Descriptor instead. -func (*SendMsgReq) Descriptor() ([]byte, []int) { - return file_msg_msg_proto_rawDescGZIP(), []int{6} -} - -func (x *SendMsgReq) GetMsgData() *sdkws.MsgData { - if x != nil { - return x.MsgData - } - return nil -} - -type SendMsgResp struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - ServerMsgID string `protobuf:"bytes,1,opt,name=serverMsgID,proto3" json:"serverMsgID"` - ClientMsgID string `protobuf:"bytes,2,opt,name=clientMsgID,proto3" json:"clientMsgID"` - SendTime int64 `protobuf:"varint,3,opt,name=sendTime,proto3" json:"sendTime"` -} - -func (x *SendMsgResp) Reset() { - *x = SendMsgResp{} - if protoimpl.UnsafeEnabled { - mi := &file_msg_msg_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SendMsgResp) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SendMsgResp) ProtoMessage() {} - -func (x *SendMsgResp) ProtoReflect() protoreflect.Message { - mi := &file_msg_msg_proto_msgTypes[7] - 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 SendMsgResp.ProtoReflect.Descriptor instead. -func (*SendMsgResp) Descriptor() ([]byte, []int) { - return file_msg_msg_proto_rawDescGZIP(), []int{7} -} - -func (x *SendMsgResp) GetServerMsgID() string { - if x != nil { - return x.ServerMsgID - } - return "" -} - -func (x *SendMsgResp) GetClientMsgID() string { - if x != nil { - return x.ClientMsgID - } - return "" -} - -func (x *SendMsgResp) GetSendTime() int64 { - if x != nil { - return x.SendTime - } - return 0 -} - -type SetSendMsgStatusReq struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Status int32 `protobuf:"varint,1,opt,name=status,proto3" json:"status"` -} - -func (x *SetSendMsgStatusReq) Reset() { - *x = SetSendMsgStatusReq{} - if protoimpl.UnsafeEnabled { - mi := &file_msg_msg_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SetSendMsgStatusReq) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SetSendMsgStatusReq) ProtoMessage() {} - -func (x *SetSendMsgStatusReq) ProtoReflect() protoreflect.Message { - mi := &file_msg_msg_proto_msgTypes[8] - 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 SetSendMsgStatusReq.ProtoReflect.Descriptor instead. -func (*SetSendMsgStatusReq) Descriptor() ([]byte, []int) { - return file_msg_msg_proto_rawDescGZIP(), []int{8} -} - -func (x *SetSendMsgStatusReq) GetStatus() int32 { - if x != nil { - return x.Status - } - return 0 -} - -type SetSendMsgStatusResp struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *SetSendMsgStatusResp) Reset() { - *x = SetSendMsgStatusResp{} - if protoimpl.UnsafeEnabled { - mi := &file_msg_msg_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SetSendMsgStatusResp) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SetSendMsgStatusResp) ProtoMessage() {} - -func (x *SetSendMsgStatusResp) ProtoReflect() protoreflect.Message { - mi := &file_msg_msg_proto_msgTypes[9] - 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 SetSendMsgStatusResp.ProtoReflect.Descriptor instead. -func (*SetSendMsgStatusResp) Descriptor() ([]byte, []int) { - return file_msg_msg_proto_rawDescGZIP(), []int{9} -} - -type GetSendMsgStatusReq struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *GetSendMsgStatusReq) Reset() { - *x = GetSendMsgStatusReq{} - if protoimpl.UnsafeEnabled { - mi := &file_msg_msg_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetSendMsgStatusReq) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetSendMsgStatusReq) ProtoMessage() {} - -func (x *GetSendMsgStatusReq) ProtoReflect() protoreflect.Message { - mi := &file_msg_msg_proto_msgTypes[10] - 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 GetSendMsgStatusReq.ProtoReflect.Descriptor instead. -func (*GetSendMsgStatusReq) Descriptor() ([]byte, []int) { - return file_msg_msg_proto_rawDescGZIP(), []int{10} -} - -type GetSendMsgStatusResp struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Status int32 `protobuf:"varint,1,opt,name=status,proto3" json:"status"` -} - -func (x *GetSendMsgStatusResp) Reset() { - *x = GetSendMsgStatusResp{} - if protoimpl.UnsafeEnabled { - mi := &file_msg_msg_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetSendMsgStatusResp) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetSendMsgStatusResp) ProtoMessage() {} - -func (x *GetSendMsgStatusResp) ProtoReflect() protoreflect.Message { - mi := &file_msg_msg_proto_msgTypes[11] - 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 GetSendMsgStatusResp.ProtoReflect.Descriptor instead. -func (*GetSendMsgStatusResp) Descriptor() ([]byte, []int) { - return file_msg_msg_proto_rawDescGZIP(), []int{11} -} - -func (x *GetSendMsgStatusResp) GetStatus() int32 { - if x != nil { - return x.Status - } - return 0 -} - -type MsgDataToModifyByMQ struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Messages []*sdkws.MsgData `protobuf:"bytes,1,rep,name=messages,proto3" json:"messages"` - ConversationID string `protobuf:"bytes,2,opt,name=conversationID,proto3" json:"conversationID"` -} - -func (x *MsgDataToModifyByMQ) Reset() { - *x = MsgDataToModifyByMQ{} - if protoimpl.UnsafeEnabled { - mi := &file_msg_msg_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgDataToModifyByMQ) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgDataToModifyByMQ) ProtoMessage() {} - -func (x *MsgDataToModifyByMQ) ProtoReflect() protoreflect.Message { - mi := &file_msg_msg_proto_msgTypes[12] - 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 MsgDataToModifyByMQ.ProtoReflect.Descriptor instead. -func (*MsgDataToModifyByMQ) Descriptor() ([]byte, []int) { - return file_msg_msg_proto_rawDescGZIP(), []int{12} -} - -func (x *MsgDataToModifyByMQ) GetMessages() []*sdkws.MsgData { - if x != nil { - return x.Messages - } - return nil -} - -func (x *MsgDataToModifyByMQ) GetConversationID() string { - if x != nil { - return x.ConversationID - } - return "" -} - -type DelMsgsReq struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *DelMsgsReq) Reset() { - *x = DelMsgsReq{} - if protoimpl.UnsafeEnabled { - mi := &file_msg_msg_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DelMsgsReq) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DelMsgsReq) ProtoMessage() {} - -func (x *DelMsgsReq) ProtoReflect() protoreflect.Message { - mi := &file_msg_msg_proto_msgTypes[13] - 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 DelMsgsReq.ProtoReflect.Descriptor instead. -func (*DelMsgsReq) Descriptor() ([]byte, []int) { - return file_msg_msg_proto_rawDescGZIP(), []int{13} -} - -type DelMsgsResp struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *DelMsgsResp) Reset() { - *x = DelMsgsResp{} - if protoimpl.UnsafeEnabled { - mi := &file_msg_msg_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DelMsgsResp) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DelMsgsResp) ProtoMessage() {} - -func (x *DelMsgsResp) ProtoReflect() protoreflect.Message { - mi := &file_msg_msg_proto_msgTypes[14] - 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 DelMsgsResp.ProtoReflect.Descriptor instead. -func (*DelMsgsResp) Descriptor() ([]byte, []int) { - return file_msg_msg_proto_rawDescGZIP(), []int{14} -} - -type RevokeMsgReq struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - ConversationID string `protobuf:"bytes,1,opt,name=conversationID,proto3" json:"conversationID"` - Seq int64 `protobuf:"varint,2,opt,name=seq,proto3" json:"seq"` - UserID string `protobuf:"bytes,3,opt,name=userID,proto3" json:"userID"` -} - -func (x *RevokeMsgReq) Reset() { - *x = RevokeMsgReq{} - if protoimpl.UnsafeEnabled { - mi := &file_msg_msg_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RevokeMsgReq) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RevokeMsgReq) ProtoMessage() {} - -func (x *RevokeMsgReq) ProtoReflect() protoreflect.Message { - mi := &file_msg_msg_proto_msgTypes[15] - 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 RevokeMsgReq.ProtoReflect.Descriptor instead. -func (*RevokeMsgReq) Descriptor() ([]byte, []int) { - return file_msg_msg_proto_rawDescGZIP(), []int{15} -} - -func (x *RevokeMsgReq) GetConversationID() string { - if x != nil { - return x.ConversationID - } - return "" -} - -func (x *RevokeMsgReq) GetSeq() int64 { - if x != nil { - return x.Seq - } - return 0 -} - -func (x *RevokeMsgReq) GetUserID() string { - if x != nil { - return x.UserID - } - return "" -} - -type RevokeMsgResp struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *RevokeMsgResp) Reset() { - *x = RevokeMsgResp{} - if protoimpl.UnsafeEnabled { - mi := &file_msg_msg_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RevokeMsgResp) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RevokeMsgResp) ProtoMessage() {} - -func (x *RevokeMsgResp) ProtoReflect() protoreflect.Message { - mi := &file_msg_msg_proto_msgTypes[16] - 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 RevokeMsgResp.ProtoReflect.Descriptor instead. -func (*RevokeMsgResp) Descriptor() ([]byte, []int) { - return file_msg_msg_proto_rawDescGZIP(), []int{16} -} - -type MarkMsgsAsReadReq struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - ConversationID string `protobuf:"bytes,1,opt,name=conversationID,proto3" json:"conversationID"` - Seqs []int64 `protobuf:"varint,2,rep,packed,name=seqs,proto3" json:"seqs"` - UserID string `protobuf:"bytes,3,opt,name=userID,proto3" json:"userID"` -} - -func (x *MarkMsgsAsReadReq) Reset() { - *x = MarkMsgsAsReadReq{} - if protoimpl.UnsafeEnabled { - mi := &file_msg_msg_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MarkMsgsAsReadReq) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MarkMsgsAsReadReq) ProtoMessage() {} - -func (x *MarkMsgsAsReadReq) ProtoReflect() protoreflect.Message { - mi := &file_msg_msg_proto_msgTypes[17] - 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 MarkMsgsAsReadReq.ProtoReflect.Descriptor instead. -func (*MarkMsgsAsReadReq) Descriptor() ([]byte, []int) { - return file_msg_msg_proto_rawDescGZIP(), []int{17} -} - -func (x *MarkMsgsAsReadReq) GetConversationID() string { - if x != nil { - return x.ConversationID - } - return "" -} - -func (x *MarkMsgsAsReadReq) GetSeqs() []int64 { - if x != nil { - return x.Seqs - } - return nil -} - -func (x *MarkMsgsAsReadReq) GetUserID() string { - if x != nil { - return x.UserID - } - return "" -} - -type MarkMsgsAsReadResp struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *MarkMsgsAsReadResp) Reset() { - *x = MarkMsgsAsReadResp{} - if protoimpl.UnsafeEnabled { - mi := &file_msg_msg_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MarkMsgsAsReadResp) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MarkMsgsAsReadResp) ProtoMessage() {} - -func (x *MarkMsgsAsReadResp) ProtoReflect() protoreflect.Message { - mi := &file_msg_msg_proto_msgTypes[18] - 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 MarkMsgsAsReadResp.ProtoReflect.Descriptor instead. -func (*MarkMsgsAsReadResp) Descriptor() ([]byte, []int) { - return file_msg_msg_proto_rawDescGZIP(), []int{18} -} - -type MarkConversationAsReadReq struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - ConversationID string `protobuf:"bytes,1,opt,name=conversationID,proto3" json:"conversationID"` - UserID string `protobuf:"bytes,2,opt,name=userID,proto3" json:"userID"` - HasReadSeq int64 `protobuf:"varint,3,opt,name=hasReadSeq,proto3" json:"hasReadSeq"` - Seqs []int64 `protobuf:"varint,4,rep,packed,name=seqs,proto3" json:"seqs"` -} - -func (x *MarkConversationAsReadReq) Reset() { - *x = MarkConversationAsReadReq{} - if protoimpl.UnsafeEnabled { - mi := &file_msg_msg_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MarkConversationAsReadReq) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MarkConversationAsReadReq) ProtoMessage() {} - -func (x *MarkConversationAsReadReq) ProtoReflect() protoreflect.Message { - mi := &file_msg_msg_proto_msgTypes[19] - 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 MarkConversationAsReadReq.ProtoReflect.Descriptor instead. -func (*MarkConversationAsReadReq) Descriptor() ([]byte, []int) { - return file_msg_msg_proto_rawDescGZIP(), []int{19} -} - -func (x *MarkConversationAsReadReq) GetConversationID() string { - if x != nil { - return x.ConversationID - } - return "" -} - -func (x *MarkConversationAsReadReq) GetUserID() string { - if x != nil { - return x.UserID - } - return "" -} - -func (x *MarkConversationAsReadReq) GetHasReadSeq() int64 { - if x != nil { - return x.HasReadSeq - } - return 0 -} - -func (x *MarkConversationAsReadReq) GetSeqs() []int64 { - if x != nil { - return x.Seqs - } - return nil -} - -type MarkConversationAsReadResp struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *MarkConversationAsReadResp) Reset() { - *x = MarkConversationAsReadResp{} - if protoimpl.UnsafeEnabled { - mi := &file_msg_msg_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MarkConversationAsReadResp) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MarkConversationAsReadResp) ProtoMessage() {} - -func (x *MarkConversationAsReadResp) ProtoReflect() protoreflect.Message { - mi := &file_msg_msg_proto_msgTypes[20] - 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 MarkConversationAsReadResp.ProtoReflect.Descriptor instead. -func (*MarkConversationAsReadResp) Descriptor() ([]byte, []int) { - return file_msg_msg_proto_rawDescGZIP(), []int{20} -} - -type SetConversationHasReadSeqReq struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - ConversationID string `protobuf:"bytes,1,opt,name=conversationID,proto3" json:"conversationID"` - UserID string `protobuf:"bytes,2,opt,name=userID,proto3" json:"userID"` - HasReadSeq int64 `protobuf:"varint,3,opt,name=hasReadSeq,proto3" json:"hasReadSeq"` -} - -func (x *SetConversationHasReadSeqReq) Reset() { - *x = SetConversationHasReadSeqReq{} - if protoimpl.UnsafeEnabled { - mi := &file_msg_msg_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SetConversationHasReadSeqReq) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SetConversationHasReadSeqReq) ProtoMessage() {} - -func (x *SetConversationHasReadSeqReq) ProtoReflect() protoreflect.Message { - mi := &file_msg_msg_proto_msgTypes[21] - 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 SetConversationHasReadSeqReq.ProtoReflect.Descriptor instead. -func (*SetConversationHasReadSeqReq) Descriptor() ([]byte, []int) { - return file_msg_msg_proto_rawDescGZIP(), []int{21} -} - -func (x *SetConversationHasReadSeqReq) GetConversationID() string { - if x != nil { - return x.ConversationID - } - return "" -} - -func (x *SetConversationHasReadSeqReq) GetUserID() string { - if x != nil { - return x.UserID - } - return "" -} - -func (x *SetConversationHasReadSeqReq) GetHasReadSeq() int64 { - if x != nil { - return x.HasReadSeq - } - return 0 -} - -type SetConversationHasReadSeqResp struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *SetConversationHasReadSeqResp) Reset() { - *x = SetConversationHasReadSeqResp{} - if protoimpl.UnsafeEnabled { - mi := &file_msg_msg_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SetConversationHasReadSeqResp) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SetConversationHasReadSeqResp) ProtoMessage() {} - -func (x *SetConversationHasReadSeqResp) ProtoReflect() protoreflect.Message { - mi := &file_msg_msg_proto_msgTypes[22] - 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 SetConversationHasReadSeqResp.ProtoReflect.Descriptor instead. -func (*SetConversationHasReadSeqResp) Descriptor() ([]byte, []int) { - return file_msg_msg_proto_rawDescGZIP(), []int{22} -} - -type DeleteSyncOpt struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - IsSyncSelf bool `protobuf:"varint,3,opt,name=IsSyncSelf,proto3" json:"IsSyncSelf"` - IsSyncOther bool `protobuf:"varint,4,opt,name=IsSyncOther,proto3" json:"IsSyncOther"` -} - -func (x *DeleteSyncOpt) Reset() { - *x = DeleteSyncOpt{} - if protoimpl.UnsafeEnabled { - mi := &file_msg_msg_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DeleteSyncOpt) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DeleteSyncOpt) ProtoMessage() {} - -func (x *DeleteSyncOpt) ProtoReflect() protoreflect.Message { - mi := &file_msg_msg_proto_msgTypes[23] - 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 DeleteSyncOpt.ProtoReflect.Descriptor instead. -func (*DeleteSyncOpt) Descriptor() ([]byte, []int) { - return file_msg_msg_proto_rawDescGZIP(), []int{23} -} - -func (x *DeleteSyncOpt) GetIsSyncSelf() bool { - if x != nil { - return x.IsSyncSelf - } - return false -} - -func (x *DeleteSyncOpt) GetIsSyncOther() bool { - if x != nil { - return x.IsSyncOther - } - return false -} - -type ClearConversationsMsgReq struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - ConversationIDs []string `protobuf:"bytes,1,rep,name=conversationIDs,proto3" json:"conversationIDs"` - UserID string `protobuf:"bytes,2,opt,name=userID,proto3" json:"userID"` - DeleteSyncOpt *DeleteSyncOpt `protobuf:"bytes,3,opt,name=deleteSyncOpt,proto3" json:"deleteSyncOpt"` -} - -func (x *ClearConversationsMsgReq) Reset() { - *x = ClearConversationsMsgReq{} - if protoimpl.UnsafeEnabled { - mi := &file_msg_msg_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ClearConversationsMsgReq) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ClearConversationsMsgReq) ProtoMessage() {} - -func (x *ClearConversationsMsgReq) ProtoReflect() protoreflect.Message { - mi := &file_msg_msg_proto_msgTypes[24] - 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 ClearConversationsMsgReq.ProtoReflect.Descriptor instead. -func (*ClearConversationsMsgReq) Descriptor() ([]byte, []int) { - return file_msg_msg_proto_rawDescGZIP(), []int{24} -} - -func (x *ClearConversationsMsgReq) GetConversationIDs() []string { - if x != nil { - return x.ConversationIDs - } - return nil -} - -func (x *ClearConversationsMsgReq) GetUserID() string { - if x != nil { - return x.UserID - } - return "" -} - -func (x *ClearConversationsMsgReq) GetDeleteSyncOpt() *DeleteSyncOpt { - if x != nil { - return x.DeleteSyncOpt - } - return nil -} - -type ClearConversationsMsgResp struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *ClearConversationsMsgResp) Reset() { - *x = ClearConversationsMsgResp{} - if protoimpl.UnsafeEnabled { - mi := &file_msg_msg_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ClearConversationsMsgResp) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ClearConversationsMsgResp) ProtoMessage() {} - -func (x *ClearConversationsMsgResp) ProtoReflect() protoreflect.Message { - mi := &file_msg_msg_proto_msgTypes[25] - 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 ClearConversationsMsgResp.ProtoReflect.Descriptor instead. -func (*ClearConversationsMsgResp) Descriptor() ([]byte, []int) { - return file_msg_msg_proto_rawDescGZIP(), []int{25} -} - -type UserClearAllMsgReq struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - UserID string `protobuf:"bytes,1,opt,name=userID,proto3" json:"userID"` - DeleteSyncOpt *DeleteSyncOpt `protobuf:"bytes,3,opt,name=deleteSyncOpt,proto3" json:"deleteSyncOpt"` -} - -func (x *UserClearAllMsgReq) Reset() { - *x = UserClearAllMsgReq{} - if protoimpl.UnsafeEnabled { - mi := &file_msg_msg_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *UserClearAllMsgReq) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*UserClearAllMsgReq) ProtoMessage() {} - -func (x *UserClearAllMsgReq) ProtoReflect() protoreflect.Message { - mi := &file_msg_msg_proto_msgTypes[26] - 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 UserClearAllMsgReq.ProtoReflect.Descriptor instead. -func (*UserClearAllMsgReq) Descriptor() ([]byte, []int) { - return file_msg_msg_proto_rawDescGZIP(), []int{26} -} - -func (x *UserClearAllMsgReq) GetUserID() string { - if x != nil { - return x.UserID - } - return "" -} - -func (x *UserClearAllMsgReq) GetDeleteSyncOpt() *DeleteSyncOpt { - if x != nil { - return x.DeleteSyncOpt - } - return nil -} - -type UserClearAllMsgResp struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *UserClearAllMsgResp) Reset() { - *x = UserClearAllMsgResp{} - if protoimpl.UnsafeEnabled { - mi := &file_msg_msg_proto_msgTypes[27] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *UserClearAllMsgResp) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*UserClearAllMsgResp) ProtoMessage() {} - -func (x *UserClearAllMsgResp) ProtoReflect() protoreflect.Message { - mi := &file_msg_msg_proto_msgTypes[27] - 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 UserClearAllMsgResp.ProtoReflect.Descriptor instead. -func (*UserClearAllMsgResp) Descriptor() ([]byte, []int) { - return file_msg_msg_proto_rawDescGZIP(), []int{27} -} - -type DeleteMsgsReq struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - ConversationID string `protobuf:"bytes,1,opt,name=conversationID,proto3" json:"conversationID"` - Seqs []int64 `protobuf:"varint,2,rep,packed,name=seqs,proto3" json:"seqs"` - UserID string `protobuf:"bytes,3,opt,name=userID,proto3" json:"userID"` - DeleteSyncOpt *DeleteSyncOpt `protobuf:"bytes,4,opt,name=deleteSyncOpt,proto3" json:"deleteSyncOpt"` -} - -func (x *DeleteMsgsReq) Reset() { - *x = DeleteMsgsReq{} - if protoimpl.UnsafeEnabled { - mi := &file_msg_msg_proto_msgTypes[28] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DeleteMsgsReq) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DeleteMsgsReq) ProtoMessage() {} - -func (x *DeleteMsgsReq) ProtoReflect() protoreflect.Message { - mi := &file_msg_msg_proto_msgTypes[28] - 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 DeleteMsgsReq.ProtoReflect.Descriptor instead. -func (*DeleteMsgsReq) Descriptor() ([]byte, []int) { - return file_msg_msg_proto_rawDescGZIP(), []int{28} -} - -func (x *DeleteMsgsReq) GetConversationID() string { - if x != nil { - return x.ConversationID - } - return "" -} - -func (x *DeleteMsgsReq) GetSeqs() []int64 { - if x != nil { - return x.Seqs - } - return nil -} - -func (x *DeleteMsgsReq) GetUserID() string { - if x != nil { - return x.UserID - } - return "" -} - -func (x *DeleteMsgsReq) GetDeleteSyncOpt() *DeleteSyncOpt { - if x != nil { - return x.DeleteSyncOpt - } - return nil -} - -type DeleteMsgsResp struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *DeleteMsgsResp) Reset() { - *x = DeleteMsgsResp{} - if protoimpl.UnsafeEnabled { - mi := &file_msg_msg_proto_msgTypes[29] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DeleteMsgsResp) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DeleteMsgsResp) ProtoMessage() {} - -func (x *DeleteMsgsResp) ProtoReflect() protoreflect.Message { - mi := &file_msg_msg_proto_msgTypes[29] - 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 DeleteMsgsResp.ProtoReflect.Descriptor instead. -func (*DeleteMsgsResp) Descriptor() ([]byte, []int) { - return file_msg_msg_proto_rawDescGZIP(), []int{29} -} - -type DeleteMsgPhysicalReq struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - ConversationIDs []string `protobuf:"bytes,1,rep,name=conversationIDs,proto3" json:"conversationIDs"` - Timestamp int64 `protobuf:"varint,2,opt,name=timestamp,proto3" json:"timestamp"` -} - -func (x *DeleteMsgPhysicalReq) Reset() { - *x = DeleteMsgPhysicalReq{} - if protoimpl.UnsafeEnabled { - mi := &file_msg_msg_proto_msgTypes[30] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DeleteMsgPhysicalReq) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DeleteMsgPhysicalReq) ProtoMessage() {} - -func (x *DeleteMsgPhysicalReq) ProtoReflect() protoreflect.Message { - mi := &file_msg_msg_proto_msgTypes[30] - 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 DeleteMsgPhysicalReq.ProtoReflect.Descriptor instead. -func (*DeleteMsgPhysicalReq) Descriptor() ([]byte, []int) { - return file_msg_msg_proto_rawDescGZIP(), []int{30} -} - -func (x *DeleteMsgPhysicalReq) GetConversationIDs() []string { - if x != nil { - return x.ConversationIDs - } - return nil -} - -func (x *DeleteMsgPhysicalReq) GetTimestamp() int64 { - if x != nil { - return x.Timestamp - } - return 0 -} - -type DeleteMsgPhysicalResp struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *DeleteMsgPhysicalResp) Reset() { - *x = DeleteMsgPhysicalResp{} - if protoimpl.UnsafeEnabled { - mi := &file_msg_msg_proto_msgTypes[31] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DeleteMsgPhysicalResp) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DeleteMsgPhysicalResp) ProtoMessage() {} - -func (x *DeleteMsgPhysicalResp) ProtoReflect() protoreflect.Message { - mi := &file_msg_msg_proto_msgTypes[31] - 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 DeleteMsgPhysicalResp.ProtoReflect.Descriptor instead. -func (*DeleteMsgPhysicalResp) Descriptor() ([]byte, []int) { - return file_msg_msg_proto_rawDescGZIP(), []int{31} -} - -type DeleteMsgPhysicalBySeqReq struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - ConversationID string `protobuf:"bytes,1,opt,name=conversationID,proto3" json:"conversationID"` - Seqs []int64 `protobuf:"varint,2,rep,packed,name=seqs,proto3" json:"seqs"` -} - -func (x *DeleteMsgPhysicalBySeqReq) Reset() { - *x = DeleteMsgPhysicalBySeqReq{} - if protoimpl.UnsafeEnabled { - mi := &file_msg_msg_proto_msgTypes[32] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DeleteMsgPhysicalBySeqReq) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DeleteMsgPhysicalBySeqReq) ProtoMessage() {} - -func (x *DeleteMsgPhysicalBySeqReq) ProtoReflect() protoreflect.Message { - mi := &file_msg_msg_proto_msgTypes[32] - 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 DeleteMsgPhysicalBySeqReq.ProtoReflect.Descriptor instead. -func (*DeleteMsgPhysicalBySeqReq) Descriptor() ([]byte, []int) { - return file_msg_msg_proto_rawDescGZIP(), []int{32} -} - -func (x *DeleteMsgPhysicalBySeqReq) GetConversationID() string { - if x != nil { - return x.ConversationID - } - return "" -} - -func (x *DeleteMsgPhysicalBySeqReq) GetSeqs() []int64 { - if x != nil { - return x.Seqs - } - return nil -} - -type DeleteMsgPhysicalBySeqResp struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *DeleteMsgPhysicalBySeqResp) Reset() { - *x = DeleteMsgPhysicalBySeqResp{} - if protoimpl.UnsafeEnabled { - mi := &file_msg_msg_proto_msgTypes[33] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DeleteMsgPhysicalBySeqResp) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DeleteMsgPhysicalBySeqResp) ProtoMessage() {} - -func (x *DeleteMsgPhysicalBySeqResp) ProtoReflect() protoreflect.Message { - mi := &file_msg_msg_proto_msgTypes[33] - 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 DeleteMsgPhysicalBySeqResp.ProtoReflect.Descriptor instead. -func (*DeleteMsgPhysicalBySeqResp) Descriptor() ([]byte, []int) { - return file_msg_msg_proto_rawDescGZIP(), []int{33} -} - -type GetConversationMaxSeqReq struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - ConversationID string `protobuf:"bytes,1,opt,name=conversationID,proto3" json:"conversationID"` -} - -func (x *GetConversationMaxSeqReq) Reset() { - *x = GetConversationMaxSeqReq{} - if protoimpl.UnsafeEnabled { - mi := &file_msg_msg_proto_msgTypes[34] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetConversationMaxSeqReq) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetConversationMaxSeqReq) ProtoMessage() {} - -func (x *GetConversationMaxSeqReq) ProtoReflect() protoreflect.Message { - mi := &file_msg_msg_proto_msgTypes[34] - 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 GetConversationMaxSeqReq.ProtoReflect.Descriptor instead. -func (*GetConversationMaxSeqReq) Descriptor() ([]byte, []int) { - return file_msg_msg_proto_rawDescGZIP(), []int{34} -} - -func (x *GetConversationMaxSeqReq) GetConversationID() string { - if x != nil { - return x.ConversationID - } - return "" -} - -type GetConversationMaxSeqResp struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - MaxSeq int64 `protobuf:"varint,1,opt,name=maxSeq,proto3" json:"maxSeq"` -} - -func (x *GetConversationMaxSeqResp) Reset() { - *x = GetConversationMaxSeqResp{} - if protoimpl.UnsafeEnabled { - mi := &file_msg_msg_proto_msgTypes[35] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetConversationMaxSeqResp) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetConversationMaxSeqResp) ProtoMessage() {} - -func (x *GetConversationMaxSeqResp) ProtoReflect() protoreflect.Message { - mi := &file_msg_msg_proto_msgTypes[35] - 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 GetConversationMaxSeqResp.ProtoReflect.Descriptor instead. -func (*GetConversationMaxSeqResp) Descriptor() ([]byte, []int) { - return file_msg_msg_proto_rawDescGZIP(), []int{35} -} - -func (x *GetConversationMaxSeqResp) GetMaxSeq() int64 { - if x != nil { - return x.MaxSeq - } - return 0 -} - -type GetConversationsHasReadAndMaxSeqReq struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - UserID string `protobuf:"bytes,1,opt,name=userID,proto3" json:"userID"` -} - -func (x *GetConversationsHasReadAndMaxSeqReq) Reset() { - *x = GetConversationsHasReadAndMaxSeqReq{} - if protoimpl.UnsafeEnabled { - mi := &file_msg_msg_proto_msgTypes[36] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetConversationsHasReadAndMaxSeqReq) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetConversationsHasReadAndMaxSeqReq) ProtoMessage() {} - -func (x *GetConversationsHasReadAndMaxSeqReq) ProtoReflect() protoreflect.Message { - mi := &file_msg_msg_proto_msgTypes[36] - 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 GetConversationsHasReadAndMaxSeqReq.ProtoReflect.Descriptor instead. -func (*GetConversationsHasReadAndMaxSeqReq) Descriptor() ([]byte, []int) { - return file_msg_msg_proto_rawDescGZIP(), []int{36} -} - -func (x *GetConversationsHasReadAndMaxSeqReq) GetUserID() string { - if x != nil { - return x.UserID - } - return "" -} - -type Seqs struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - MaxSeq int64 `protobuf:"varint,1,opt,name=maxSeq,proto3" json:"maxSeq"` - HasReadSeq int64 `protobuf:"varint,2,opt,name=hasReadSeq,proto3" json:"hasReadSeq"` -} - -func (x *Seqs) Reset() { - *x = Seqs{} - if protoimpl.UnsafeEnabled { - mi := &file_msg_msg_proto_msgTypes[37] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Seqs) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Seqs) ProtoMessage() {} - -func (x *Seqs) ProtoReflect() protoreflect.Message { - mi := &file_msg_msg_proto_msgTypes[37] - 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 Seqs.ProtoReflect.Descriptor instead. -func (*Seqs) Descriptor() ([]byte, []int) { - return file_msg_msg_proto_rawDescGZIP(), []int{37} -} - -func (x *Seqs) GetMaxSeq() int64 { - if x != nil { - return x.MaxSeq - } - return 0 -} - -func (x *Seqs) GetHasReadSeq() int64 { - if x != nil { - return x.HasReadSeq - } - return 0 -} - -type GetConversationsHasReadAndMaxSeqResp struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Seqs map[string]*Seqs `protobuf:"bytes,1,rep,name=seqs,proto3" json:"seqs" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` -} - -func (x *GetConversationsHasReadAndMaxSeqResp) Reset() { - *x = GetConversationsHasReadAndMaxSeqResp{} - if protoimpl.UnsafeEnabled { - mi := &file_msg_msg_proto_msgTypes[38] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetConversationsHasReadAndMaxSeqResp) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetConversationsHasReadAndMaxSeqResp) ProtoMessage() {} - -func (x *GetConversationsHasReadAndMaxSeqResp) ProtoReflect() protoreflect.Message { - mi := &file_msg_msg_proto_msgTypes[38] - 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 GetConversationsHasReadAndMaxSeqResp.ProtoReflect.Descriptor instead. -func (*GetConversationsHasReadAndMaxSeqResp) Descriptor() ([]byte, []int) { - return file_msg_msg_proto_rawDescGZIP(), []int{38} -} - -func (x *GetConversationsHasReadAndMaxSeqResp) GetSeqs() map[string]*Seqs { - if x != nil { - return x.Seqs - } - return nil -} - -type GetActiveUserReq struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Start int64 `protobuf:"varint,1,opt,name=start,proto3" json:"start"` - End int64 `protobuf:"varint,2,opt,name=end,proto3" json:"end"` - Ase bool `protobuf:"varint,3,opt,name=ase,proto3" json:"ase"` - Group bool `protobuf:"varint,4,opt,name=group,proto3" json:"group"` - Pagination *sdkws.RequestPagination `protobuf:"bytes,5,opt,name=pagination,proto3" json:"pagination"` -} - -func (x *GetActiveUserReq) Reset() { - *x = GetActiveUserReq{} - if protoimpl.UnsafeEnabled { - mi := &file_msg_msg_proto_msgTypes[39] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetActiveUserReq) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetActiveUserReq) ProtoMessage() {} - -func (x *GetActiveUserReq) ProtoReflect() protoreflect.Message { - mi := &file_msg_msg_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 GetActiveUserReq.ProtoReflect.Descriptor instead. -func (*GetActiveUserReq) Descriptor() ([]byte, []int) { - return file_msg_msg_proto_rawDescGZIP(), []int{39} -} - -func (x *GetActiveUserReq) GetStart() int64 { - if x != nil { - return x.Start - } - return 0 -} - -func (x *GetActiveUserReq) GetEnd() int64 { - if x != nil { - return x.End - } - return 0 -} - -func (x *GetActiveUserReq) GetAse() bool { - if x != nil { - return x.Ase - } - return false -} - -func (x *GetActiveUserReq) GetGroup() bool { - if x != nil { - return x.Group - } - return false -} - -func (x *GetActiveUserReq) GetPagination() *sdkws.RequestPagination { - if x != nil { - return x.Pagination - } - return nil -} - -type ActiveUser struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - User *sdkws.UserInfo `protobuf:"bytes,1,opt,name=user,proto3" json:"user"` - Count int64 `protobuf:"varint,2,opt,name=count,proto3" json:"count"` -} - -func (x *ActiveUser) Reset() { - *x = ActiveUser{} - if protoimpl.UnsafeEnabled { - mi := &file_msg_msg_proto_msgTypes[40] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ActiveUser) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ActiveUser) ProtoMessage() {} - -func (x *ActiveUser) ProtoReflect() protoreflect.Message { - mi := &file_msg_msg_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 ActiveUser.ProtoReflect.Descriptor instead. -func (*ActiveUser) Descriptor() ([]byte, []int) { - return file_msg_msg_proto_rawDescGZIP(), []int{40} -} - -func (x *ActiveUser) GetUser() *sdkws.UserInfo { - if x != nil { - return x.User - } - return nil -} - -func (x *ActiveUser) GetCount() int64 { - if x != nil { - return x.Count - } - return 0 -} - -type GetActiveUserResp struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - MsgCount int64 `protobuf:"varint,1,opt,name=msgCount,proto3" json:"msgCount"` - UserCount int64 `protobuf:"varint,2,opt,name=userCount,proto3" json:"userCount"` - DateCount map[string]int64 `protobuf:"bytes,3,rep,name=dateCount,proto3" json:"dateCount" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` - Users []*ActiveUser `protobuf:"bytes,4,rep,name=users,proto3" json:"users"` -} - -func (x *GetActiveUserResp) Reset() { - *x = GetActiveUserResp{} - if protoimpl.UnsafeEnabled { - mi := &file_msg_msg_proto_msgTypes[41] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetActiveUserResp) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetActiveUserResp) ProtoMessage() {} - -func (x *GetActiveUserResp) ProtoReflect() protoreflect.Message { - mi := &file_msg_msg_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 GetActiveUserResp.ProtoReflect.Descriptor instead. -func (*GetActiveUserResp) Descriptor() ([]byte, []int) { - return file_msg_msg_proto_rawDescGZIP(), []int{41} -} - -func (x *GetActiveUserResp) GetMsgCount() int64 { - if x != nil { - return x.MsgCount - } - return 0 -} - -func (x *GetActiveUserResp) GetUserCount() int64 { - if x != nil { - return x.UserCount - } - return 0 -} - -func (x *GetActiveUserResp) GetDateCount() map[string]int64 { - if x != nil { - return x.DateCount - } - return nil -} - -func (x *GetActiveUserResp) GetUsers() []*ActiveUser { - if x != nil { - return x.Users - } - return nil -} - -type GetActiveGroupReq struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Start int64 `protobuf:"varint,1,opt,name=start,proto3" json:"start"` - End int64 `protobuf:"varint,2,opt,name=end,proto3" json:"end"` - Ase bool `protobuf:"varint,3,opt,name=ase,proto3" json:"ase"` - Pagination *sdkws.RequestPagination `protobuf:"bytes,4,opt,name=pagination,proto3" json:"pagination"` -} - -func (x *GetActiveGroupReq) Reset() { - *x = GetActiveGroupReq{} - if protoimpl.UnsafeEnabled { - mi := &file_msg_msg_proto_msgTypes[42] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetActiveGroupReq) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetActiveGroupReq) ProtoMessage() {} - -func (x *GetActiveGroupReq) ProtoReflect() protoreflect.Message { - mi := &file_msg_msg_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 GetActiveGroupReq.ProtoReflect.Descriptor instead. -func (*GetActiveGroupReq) Descriptor() ([]byte, []int) { - return file_msg_msg_proto_rawDescGZIP(), []int{42} -} - -func (x *GetActiveGroupReq) GetStart() int64 { - if x != nil { - return x.Start - } - return 0 -} - -func (x *GetActiveGroupReq) GetEnd() int64 { - if x != nil { - return x.End - } - return 0 -} - -func (x *GetActiveGroupReq) GetAse() bool { - if x != nil { - return x.Ase - } - return false -} - -func (x *GetActiveGroupReq) GetPagination() *sdkws.RequestPagination { - if x != nil { - return x.Pagination - } - return nil -} - -type ActiveGroup struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Group *sdkws.GroupInfo `protobuf:"bytes,1,opt,name=group,proto3" json:"group"` - Count int64 `protobuf:"varint,2,opt,name=count,proto3" json:"count"` -} - -func (x *ActiveGroup) Reset() { - *x = ActiveGroup{} - if protoimpl.UnsafeEnabled { - mi := &file_msg_msg_proto_msgTypes[43] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ActiveGroup) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ActiveGroup) ProtoMessage() {} - -func (x *ActiveGroup) ProtoReflect() protoreflect.Message { - mi := &file_msg_msg_proto_msgTypes[43] - 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 ActiveGroup.ProtoReflect.Descriptor instead. -func (*ActiveGroup) Descriptor() ([]byte, []int) { - return file_msg_msg_proto_rawDescGZIP(), []int{43} -} - -func (x *ActiveGroup) GetGroup() *sdkws.GroupInfo { - if x != nil { - return x.Group - } - return nil -} - -func (x *ActiveGroup) GetCount() int64 { - if x != nil { - return x.Count - } - return 0 -} - -type GetActiveGroupResp struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - MsgCount int64 `protobuf:"varint,1,opt,name=msgCount,proto3" json:"msgCount"` - GroupCount int64 `protobuf:"varint,2,opt,name=groupCount,proto3" json:"groupCount"` - DateCount map[string]int64 `protobuf:"bytes,3,rep,name=dateCount,proto3" json:"dateCount" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` - Groups []*ActiveGroup `protobuf:"bytes,4,rep,name=groups,proto3" json:"groups"` -} - -func (x *GetActiveGroupResp) Reset() { - *x = GetActiveGroupResp{} - if protoimpl.UnsafeEnabled { - mi := &file_msg_msg_proto_msgTypes[44] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetActiveGroupResp) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetActiveGroupResp) ProtoMessage() {} - -func (x *GetActiveGroupResp) ProtoReflect() protoreflect.Message { - mi := &file_msg_msg_proto_msgTypes[44] - 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 GetActiveGroupResp.ProtoReflect.Descriptor instead. -func (*GetActiveGroupResp) Descriptor() ([]byte, []int) { - return file_msg_msg_proto_rawDescGZIP(), []int{44} -} - -func (x *GetActiveGroupResp) GetMsgCount() int64 { - if x != nil { - return x.MsgCount - } - return 0 -} - -func (x *GetActiveGroupResp) GetGroupCount() int64 { - if x != nil { - return x.GroupCount - } - return 0 -} - -func (x *GetActiveGroupResp) GetDateCount() map[string]int64 { - if x != nil { - return x.DateCount - } - return nil -} - -func (x *GetActiveGroupResp) GetGroups() []*ActiveGroup { - if x != nil { - return x.Groups - } - return nil -} - -type SearchMessageReq struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - SendID string `protobuf:"bytes,1,opt,name=sendID,proto3" json:"sendID"` //发送者ID - RecvID string `protobuf:"bytes,2,opt,name=recvID,proto3" json:"recvID"` //接收者ID - MsgType int32 `protobuf:"varint,3,opt,name=msgType,proto3" json:"msgType"` - SendTime string `protobuf:"bytes,4,opt,name=sendTime,proto3" json:"sendTime"` - SessionType int32 `protobuf:"varint,5,opt,name=sessionType,proto3" json:"sessionType"` - Pagination *sdkws.RequestPagination `protobuf:"bytes,6,opt,name=pagination,proto3" json:"pagination"` -} - -func (x *SearchMessageReq) Reset() { - *x = SearchMessageReq{} - if protoimpl.UnsafeEnabled { - mi := &file_msg_msg_proto_msgTypes[45] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SearchMessageReq) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SearchMessageReq) ProtoMessage() {} - -func (x *SearchMessageReq) ProtoReflect() protoreflect.Message { - mi := &file_msg_msg_proto_msgTypes[45] - 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 SearchMessageReq.ProtoReflect.Descriptor instead. -func (*SearchMessageReq) Descriptor() ([]byte, []int) { - return file_msg_msg_proto_rawDescGZIP(), []int{45} -} - -func (x *SearchMessageReq) GetSendID() string { - if x != nil { - return x.SendID - } - return "" -} - -func (x *SearchMessageReq) GetRecvID() string { - if x != nil { - return x.RecvID - } - return "" -} - -func (x *SearchMessageReq) GetMsgType() int32 { - if x != nil { - return x.MsgType - } - return 0 -} - -func (x *SearchMessageReq) GetSendTime() string { - if x != nil { - return x.SendTime - } - return "" -} - -func (x *SearchMessageReq) GetSessionType() int32 { - if x != nil { - return x.SessionType - } - return 0 -} - -func (x *SearchMessageReq) GetPagination() *sdkws.RequestPagination { - if x != nil { - return x.Pagination - } - return nil -} - -type SearchMessageResp struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - ChatLogs []*ChatLog `protobuf:"bytes,1,rep,name=chatLogs,proto3" json:"chatLogs"` - ChatLogsNum int32 `protobuf:"varint,2,opt,name=chatLogsNum,proto3" json:"chatLogsNum"` -} - -func (x *SearchMessageResp) Reset() { - *x = SearchMessageResp{} - if protoimpl.UnsafeEnabled { - mi := &file_msg_msg_proto_msgTypes[46] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SearchMessageResp) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SearchMessageResp) ProtoMessage() {} - -func (x *SearchMessageResp) ProtoReflect() protoreflect.Message { - mi := &file_msg_msg_proto_msgTypes[46] - 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 SearchMessageResp.ProtoReflect.Descriptor instead. -func (*SearchMessageResp) Descriptor() ([]byte, []int) { - return file_msg_msg_proto_rawDescGZIP(), []int{46} -} - -func (x *SearchMessageResp) GetChatLogs() []*ChatLog { - if x != nil { - return x.ChatLogs - } - return nil -} - -func (x *SearchMessageResp) GetChatLogsNum() int32 { - if x != nil { - return x.ChatLogsNum - } - return 0 -} - -type ChatLog struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - ServerMsgID string `protobuf:"bytes,1,opt,name=serverMsgID,proto3" json:"serverMsgID"` - ClientMsgID string `protobuf:"bytes,2,opt,name=clientMsgID,proto3" json:"clientMsgID"` - SendID string `protobuf:"bytes,3,opt,name=sendID,proto3" json:"sendID"` - RecvID string `protobuf:"bytes,4,opt,name=recvID,proto3" json:"recvID"` - GroupID string `protobuf:"bytes,5,opt,name=groupID,proto3" json:"groupID"` - RecvNickname string `protobuf:"bytes,6,opt,name=recvNickname,proto3" json:"recvNickname"` - SenderPlatformID int32 `protobuf:"varint,7,opt,name=senderPlatformID,proto3" json:"senderPlatformID"` - SenderNickname string `protobuf:"bytes,8,opt,name=senderNickname,proto3" json:"senderNickname"` - SenderFaceURL string `protobuf:"bytes,9,opt,name=senderFaceURL,proto3" json:"senderFaceURL"` - GroupName string `protobuf:"bytes,10,opt,name=groupName,proto3" json:"groupName"` - SessionType int32 `protobuf:"varint,11,opt,name=sessionType,proto3" json:"sessionType"` - MsgFrom int32 `protobuf:"varint,12,opt,name=msgFrom,proto3" json:"msgFrom"` - ContentType int32 `protobuf:"varint,13,opt,name=contentType,proto3" json:"contentType"` - Content string `protobuf:"bytes,14,opt,name=content,proto3" json:"content"` - Status int32 `protobuf:"varint,15,opt,name=status,proto3" json:"status"` - SendTime int64 `protobuf:"varint,16,opt,name=sendTime,proto3" json:"sendTime"` - CreateTime int64 `protobuf:"varint,17,opt,name=createTime,proto3" json:"createTime"` - Ex string `protobuf:"bytes,18,opt,name=ex,proto3" json:"ex"` - GroupFaceURL string `protobuf:"bytes,19,opt,name=groupFaceURL,proto3" json:"groupFaceURL"` - GroupMemberCount uint32 `protobuf:"varint,20,opt,name=groupMemberCount,proto3" json:"groupMemberCount"` - Seq int64 `protobuf:"varint,21,opt,name=seq,proto3" json:"seq"` - GroupOwner string `protobuf:"bytes,22,opt,name=groupOwner,proto3" json:"groupOwner"` - GroupType int32 `protobuf:"varint,23,opt,name=groupType,proto3" json:"groupType"` -} - -func (x *ChatLog) Reset() { - *x = ChatLog{} - if protoimpl.UnsafeEnabled { - mi := &file_msg_msg_proto_msgTypes[47] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ChatLog) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ChatLog) ProtoMessage() {} - -func (x *ChatLog) ProtoReflect() protoreflect.Message { - mi := &file_msg_msg_proto_msgTypes[47] - 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 ChatLog.ProtoReflect.Descriptor instead. -func (*ChatLog) Descriptor() ([]byte, []int) { - return file_msg_msg_proto_rawDescGZIP(), []int{47} -} - -func (x *ChatLog) GetServerMsgID() string { - if x != nil { - return x.ServerMsgID - } - return "" -} - -func (x *ChatLog) GetClientMsgID() string { - if x != nil { - return x.ClientMsgID - } - return "" -} - -func (x *ChatLog) GetSendID() string { - if x != nil { - return x.SendID - } - return "" -} - -func (x *ChatLog) GetRecvID() string { - if x != nil { - return x.RecvID - } - return "" -} - -func (x *ChatLog) GetGroupID() string { - if x != nil { - return x.GroupID - } - return "" -} - -func (x *ChatLog) GetRecvNickname() string { - if x != nil { - return x.RecvNickname - } - return "" -} - -func (x *ChatLog) GetSenderPlatformID() int32 { - if x != nil { - return x.SenderPlatformID - } - return 0 -} - -func (x *ChatLog) GetSenderNickname() string { - if x != nil { - return x.SenderNickname - } - return "" -} - -func (x *ChatLog) GetSenderFaceURL() string { - if x != nil { - return x.SenderFaceURL - } - return "" -} - -func (x *ChatLog) GetGroupName() string { - if x != nil { - return x.GroupName - } - return "" -} - -func (x *ChatLog) GetSessionType() int32 { - if x != nil { - return x.SessionType - } - return 0 -} - -func (x *ChatLog) GetMsgFrom() int32 { - if x != nil { - return x.MsgFrom - } - return 0 -} - -func (x *ChatLog) GetContentType() int32 { - if x != nil { - return x.ContentType - } - return 0 -} - -func (x *ChatLog) GetContent() string { - if x != nil { - return x.Content - } - return "" -} - -func (x *ChatLog) GetStatus() int32 { - if x != nil { - return x.Status - } - return 0 -} - -func (x *ChatLog) GetSendTime() int64 { - if x != nil { - return x.SendTime - } - return 0 -} - -func (x *ChatLog) GetCreateTime() int64 { - if x != nil { - return x.CreateTime - } - return 0 -} - -func (x *ChatLog) GetEx() string { - if x != nil { - return x.Ex - } - return "" -} - -func (x *ChatLog) GetGroupFaceURL() string { - if x != nil { - return x.GroupFaceURL - } - return "" -} - -func (x *ChatLog) GetGroupMemberCount() uint32 { - if x != nil { - return x.GroupMemberCount - } - return 0 -} - -func (x *ChatLog) GetSeq() int64 { - if x != nil { - return x.Seq - } - return 0 -} - -func (x *ChatLog) GetGroupOwner() string { - if x != nil { - return x.GroupOwner - } - return "" -} - -func (x *ChatLog) GetGroupType() int32 { - if x != nil { - return x.GroupType - } - return 0 -} - -type BatchSendMessageReq struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - RecvIDList []string `protobuf:"bytes,1,rep,name=recvIDList,proto3" json:"recvIDList"` - MsgData *sdkws.MsgData `protobuf:"bytes,2,opt,name=msgData,proto3" json:"msgData"` -} - -func (x *BatchSendMessageReq) Reset() { - *x = BatchSendMessageReq{} - if protoimpl.UnsafeEnabled { - mi := &file_msg_msg_proto_msgTypes[48] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *BatchSendMessageReq) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*BatchSendMessageReq) ProtoMessage() {} - -func (x *BatchSendMessageReq) ProtoReflect() protoreflect.Message { - mi := &file_msg_msg_proto_msgTypes[48] - 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 BatchSendMessageReq.ProtoReflect.Descriptor instead. -func (*BatchSendMessageReq) Descriptor() ([]byte, []int) { - return file_msg_msg_proto_rawDescGZIP(), []int{48} -} - -func (x *BatchSendMessageReq) GetRecvIDList() []string { - if x != nil { - return x.RecvIDList - } - return nil -} - -func (x *BatchSendMessageReq) GetMsgData() *sdkws.MsgData { - if x != nil { - return x.MsgData - } - return nil -} - -type BatchSendMessageResp struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *BatchSendMessageResp) Reset() { - *x = BatchSendMessageResp{} - if protoimpl.UnsafeEnabled { - mi := &file_msg_msg_proto_msgTypes[49] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *BatchSendMessageResp) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*BatchSendMessageResp) ProtoMessage() {} - -func (x *BatchSendMessageResp) ProtoReflect() protoreflect.Message { - mi := &file_msg_msg_proto_msgTypes[49] - 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 BatchSendMessageResp.ProtoReflect.Descriptor instead. -func (*BatchSendMessageResp) Descriptor() ([]byte, []int) { - return file_msg_msg_proto_rawDescGZIP(), []int{49} -} - -var File_msg_msg_proto protoreflect.FileDescriptor - -var file_msg_msg_proto_rawDesc = []byte{ - 0x0a, 0x0d, 0x6d, 0x73, 0x67, 0x2f, 0x6d, 0x73, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, - 0x10, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x6d, 0x73, - 0x67, 0x1a, 0x11, 0x73, 0x64, 0x6b, 0x77, 0x73, 0x2f, 0x73, 0x64, 0x6b, 0x77, 0x73, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x5a, 0x0a, 0x0b, 0x4d, 0x73, 0x67, 0x44, 0x61, 0x74, 0x61, 0x54, - 0x6f, 0x4d, 0x51, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x35, 0x0a, 0x07, 0x6d, 0x73, 0x67, - 0x44, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x4f, 0x70, 0x65, - 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x73, 0x64, 0x6b, 0x77, 0x73, 0x2e, - 0x4d, 0x73, 0x67, 0x44, 0x61, 0x74, 0x61, 0x52, 0x07, 0x6d, 0x73, 0x67, 0x44, 0x61, 0x74, 0x61, - 0x22, 0x44, 0x0a, 0x0b, 0x4d, 0x73, 0x67, 0x44, 0x61, 0x74, 0x61, 0x54, 0x6f, 0x44, 0x42, 0x12, - 0x35, 0x0a, 0x07, 0x6d, 0x73, 0x67, 0x44, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x1b, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, - 0x73, 0x64, 0x6b, 0x77, 0x73, 0x2e, 0x4d, 0x73, 0x67, 0x44, 0x61, 0x74, 0x61, 0x52, 0x07, 0x6d, - 0x73, 0x67, 0x44, 0x61, 0x74, 0x61, 0x22, 0x70, 0x0a, 0x0f, 0x50, 0x75, 0x73, 0x68, 0x4d, 0x73, - 0x67, 0x44, 0x61, 0x74, 0x61, 0x54, 0x6f, 0x4d, 0x51, 0x12, 0x35, 0x0a, 0x07, 0x6d, 0x73, 0x67, - 0x44, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x4f, 0x70, 0x65, - 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x73, 0x64, 0x6b, 0x77, 0x73, 0x2e, - 0x4d, 0x73, 0x67, 0x44, 0x61, 0x74, 0x61, 0x52, 0x07, 0x6d, 0x73, 0x67, 0x44, 0x61, 0x74, 0x61, - 0x12, 0x26, 0x0a, 0x0e, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, - 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x22, 0x8d, 0x01, 0x0a, 0x12, 0x4d, 0x73, 0x67, - 0x44, 0x61, 0x74, 0x61, 0x54, 0x6f, 0x4d, 0x6f, 0x6e, 0x67, 0x6f, 0x42, 0x79, 0x4d, 0x51, 0x12, - 0x18, 0x0a, 0x07, 0x6c, 0x61, 0x73, 0x74, 0x53, 0x65, 0x71, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, - 0x52, 0x07, 0x6c, 0x61, 0x73, 0x74, 0x53, 0x65, 0x71, 0x12, 0x26, 0x0a, 0x0e, 0x63, 0x6f, 0x6e, - 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0e, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, - 0x44, 0x12, 0x35, 0x0a, 0x07, 0x6d, 0x73, 0x67, 0x44, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, - 0x72, 0x2e, 0x73, 0x64, 0x6b, 0x77, 0x73, 0x2e, 0x4d, 0x73, 0x67, 0x44, 0x61, 0x74, 0x61, 0x52, - 0x07, 0x6d, 0x73, 0x67, 0x44, 0x61, 0x74, 0x61, 0x22, 0x2c, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x4d, - 0x61, 0x78, 0x41, 0x6e, 0x64, 0x4d, 0x69, 0x6e, 0x53, 0x65, 0x71, 0x52, 0x65, 0x71, 0x12, 0x16, - 0x0a, 0x06, 0x55, 0x73, 0x65, 0x72, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, - 0x55, 0x73, 0x65, 0x72, 0x49, 0x44, 0x22, 0x45, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x4d, 0x61, 0x78, - 0x41, 0x6e, 0x64, 0x4d, 0x69, 0x6e, 0x53, 0x65, 0x71, 0x52, 0x65, 0x73, 0x70, 0x12, 0x16, 0x0a, - 0x06, 0x4d, 0x61, 0x78, 0x53, 0x65, 0x71, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x4d, - 0x61, 0x78, 0x53, 0x65, 0x71, 0x12, 0x16, 0x0a, 0x06, 0x4d, 0x69, 0x6e, 0x53, 0x65, 0x71, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x4d, 0x69, 0x6e, 0x53, 0x65, 0x71, 0x22, 0x43, 0x0a, - 0x0a, 0x53, 0x65, 0x6e, 0x64, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x71, 0x12, 0x35, 0x0a, 0x07, 0x6d, - 0x73, 0x67, 0x44, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x4f, - 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x73, 0x64, 0x6b, 0x77, - 0x73, 0x2e, 0x4d, 0x73, 0x67, 0x44, 0x61, 0x74, 0x61, 0x52, 0x07, 0x6d, 0x73, 0x67, 0x44, 0x61, - 0x74, 0x61, 0x22, 0x6d, 0x0a, 0x0b, 0x53, 0x65, 0x6e, 0x64, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x73, - 0x70, 0x12, 0x20, 0x0a, 0x0b, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x4d, 0x73, 0x67, 0x49, 0x44, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x4d, 0x73, - 0x67, 0x49, 0x44, 0x12, 0x20, 0x0a, 0x0b, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x4d, 0x73, 0x67, - 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, - 0x4d, 0x73, 0x67, 0x49, 0x44, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x65, 0x6e, 0x64, 0x54, 0x69, 0x6d, - 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x73, 0x65, 0x6e, 0x64, 0x54, 0x69, 0x6d, - 0x65, 0x22, 0x2d, 0x0a, 0x13, 0x53, 0x65, 0x74, 0x53, 0x65, 0x6e, 0x64, 0x4d, 0x73, 0x67, 0x53, - 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, - 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, - 0x22, 0x16, 0x0a, 0x14, 0x53, 0x65, 0x74, 0x53, 0x65, 0x6e, 0x64, 0x4d, 0x73, 0x67, 0x53, 0x74, - 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x22, 0x15, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x53, - 0x65, 0x6e, 0x64, 0x4d, 0x73, 0x67, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x22, - 0x2e, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x53, 0x65, 0x6e, 0x64, 0x4d, 0x73, 0x67, 0x53, 0x74, 0x61, - 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, - 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, - 0x76, 0x0a, 0x13, 0x4d, 0x73, 0x67, 0x44, 0x61, 0x74, 0x61, 0x54, 0x6f, 0x4d, 0x6f, 0x64, 0x69, - 0x66, 0x79, 0x42, 0x79, 0x4d, 0x51, 0x12, 0x37, 0x0a, 0x08, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, - 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, - 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x73, 0x64, 0x6b, 0x77, 0x73, 0x2e, 0x4d, 0x73, - 0x67, 0x44, 0x61, 0x74, 0x61, 0x52, 0x08, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x12, - 0x26, 0x0a, 0x0e, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, - 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x22, 0x0c, 0x0a, 0x0a, 0x44, 0x65, 0x6c, 0x4d, 0x73, - 0x67, 0x73, 0x52, 0x65, 0x71, 0x22, 0x0d, 0x0a, 0x0b, 0x44, 0x65, 0x6c, 0x4d, 0x73, 0x67, 0x73, - 0x52, 0x65, 0x73, 0x70, 0x22, 0x60, 0x0a, 0x0c, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x4d, 0x73, - 0x67, 0x52, 0x65, 0x71, 0x12, 0x26, 0x0a, 0x0e, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x63, 0x6f, - 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x12, 0x10, 0x0a, 0x03, - 0x73, 0x65, 0x71, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x73, 0x65, 0x71, 0x12, 0x16, - 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x44, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, - 0x75, 0x73, 0x65, 0x72, 0x49, 0x44, 0x22, 0x0f, 0x0a, 0x0d, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, - 0x4d, 0x73, 0x67, 0x52, 0x65, 0x73, 0x70, 0x22, 0x67, 0x0a, 0x11, 0x4d, 0x61, 0x72, 0x6b, 0x4d, - 0x73, 0x67, 0x73, 0x41, 0x73, 0x52, 0x65, 0x61, 0x64, 0x52, 0x65, 0x71, 0x12, 0x26, 0x0a, 0x0e, - 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x49, 0x44, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x65, 0x71, 0x73, 0x18, 0x02, 0x20, 0x03, - 0x28, 0x03, 0x52, 0x04, 0x73, 0x65, 0x71, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, - 0x49, 0x44, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x44, - 0x22, 0x14, 0x0a, 0x12, 0x4d, 0x61, 0x72, 0x6b, 0x4d, 0x73, 0x67, 0x73, 0x41, 0x73, 0x52, 0x65, - 0x61, 0x64, 0x52, 0x65, 0x73, 0x70, 0x22, 0x8f, 0x01, 0x0a, 0x19, 0x4d, 0x61, 0x72, 0x6b, 0x43, - 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x73, 0x52, 0x65, 0x61, - 0x64, 0x52, 0x65, 0x71, 0x12, 0x26, 0x0a, 0x0e, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x63, 0x6f, - 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 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, 0x1e, 0x0a, 0x0a, 0x68, 0x61, 0x73, 0x52, 0x65, 0x61, 0x64, 0x53, - 0x65, 0x71, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x68, 0x61, 0x73, 0x52, 0x65, 0x61, - 0x64, 0x53, 0x65, 0x71, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x65, 0x71, 0x73, 0x18, 0x04, 0x20, 0x03, - 0x28, 0x03, 0x52, 0x04, 0x73, 0x65, 0x71, 0x73, 0x22, 0x1c, 0x0a, 0x1a, 0x4d, 0x61, 0x72, 0x6b, - 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x73, 0x52, 0x65, - 0x61, 0x64, 0x52, 0x65, 0x73, 0x70, 0x22, 0x7e, 0x0a, 0x1c, 0x53, 0x65, 0x74, 0x43, 0x6f, 0x6e, - 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x61, 0x73, 0x52, 0x65, 0x61, 0x64, - 0x53, 0x65, 0x71, 0x52, 0x65, 0x71, 0x12, 0x26, 0x0a, 0x0e, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, - 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, - 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 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, 0x1e, 0x0a, 0x0a, 0x68, 0x61, 0x73, 0x52, 0x65, 0x61, - 0x64, 0x53, 0x65, 0x71, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x68, 0x61, 0x73, 0x52, - 0x65, 0x61, 0x64, 0x53, 0x65, 0x71, 0x22, 0x1f, 0x0a, 0x1d, 0x53, 0x65, 0x74, 0x43, 0x6f, 0x6e, - 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x61, 0x73, 0x52, 0x65, 0x61, 0x64, - 0x53, 0x65, 0x71, 0x52, 0x65, 0x73, 0x70, 0x22, 0x51, 0x0a, 0x0d, 0x44, 0x65, 0x6c, 0x65, 0x74, - 0x65, 0x53, 0x79, 0x6e, 0x63, 0x4f, 0x70, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x49, 0x73, 0x53, 0x79, - 0x6e, 0x63, 0x53, 0x65, 0x6c, 0x66, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x49, 0x73, - 0x53, 0x79, 0x6e, 0x63, 0x53, 0x65, 0x6c, 0x66, 0x12, 0x20, 0x0a, 0x0b, 0x49, 0x73, 0x53, 0x79, - 0x6e, 0x63, 0x4f, 0x74, 0x68, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x49, - 0x73, 0x53, 0x79, 0x6e, 0x63, 0x4f, 0x74, 0x68, 0x65, 0x72, 0x22, 0xa3, 0x01, 0x0a, 0x18, 0x43, - 0x6c, 0x65, 0x61, 0x72, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x71, 0x12, 0x28, 0x0a, 0x0f, 0x63, 0x6f, 0x6e, 0x76, 0x65, - 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, - 0x52, 0x0f, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, - 0x73, 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, 0x45, 0x0a, 0x0d, 0x64, 0x65, 0x6c, - 0x65, 0x74, 0x65, 0x53, 0x79, 0x6e, 0x63, 0x4f, 0x70, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x1f, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, - 0x6d, 0x73, 0x67, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x79, 0x6e, 0x63, 0x4f, 0x70, - 0x74, 0x52, 0x0d, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x79, 0x6e, 0x63, 0x4f, 0x70, 0x74, - 0x22, 0x1b, 0x0a, 0x19, 0x43, 0x6c, 0x65, 0x61, 0x72, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x73, 0x70, 0x22, 0x73, 0x0a, - 0x12, 0x55, 0x73, 0x65, 0x72, 0x43, 0x6c, 0x65, 0x61, 0x72, 0x41, 0x6c, 0x6c, 0x4d, 0x73, 0x67, - 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, 0x12, 0x45, 0x0a, 0x0d, 0x64, - 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x79, 0x6e, 0x63, 0x4f, 0x70, 0x74, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, - 0x72, 0x2e, 0x6d, 0x73, 0x67, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x79, 0x6e, 0x63, - 0x4f, 0x70, 0x74, 0x52, 0x0d, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x79, 0x6e, 0x63, 0x4f, - 0x70, 0x74, 0x22, 0x15, 0x0a, 0x13, 0x55, 0x73, 0x65, 0x72, 0x43, 0x6c, 0x65, 0x61, 0x72, 0x41, - 0x6c, 0x6c, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x73, 0x70, 0x22, 0xaa, 0x01, 0x0a, 0x0d, 0x44, 0x65, - 0x6c, 0x65, 0x74, 0x65, 0x4d, 0x73, 0x67, 0x73, 0x52, 0x65, 0x71, 0x12, 0x26, 0x0a, 0x0e, 0x63, - 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0e, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x49, 0x44, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x65, 0x71, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, - 0x03, 0x52, 0x04, 0x73, 0x65, 0x71, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, - 0x44, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x44, 0x12, - 0x45, 0x0a, 0x0d, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x79, 0x6e, 0x63, 0x4f, 0x70, 0x74, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, - 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x6d, 0x73, 0x67, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, - 0x53, 0x79, 0x6e, 0x63, 0x4f, 0x70, 0x74, 0x52, 0x0d, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, - 0x79, 0x6e, 0x63, 0x4f, 0x70, 0x74, 0x22, 0x10, 0x0a, 0x0e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, - 0x4d, 0x73, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x22, 0x5e, 0x0a, 0x14, 0x44, 0x65, 0x6c, 0x65, - 0x74, 0x65, 0x4d, 0x73, 0x67, 0x50, 0x68, 0x79, 0x73, 0x69, 0x63, 0x61, 0x6c, 0x52, 0x65, 0x71, - 0x12, 0x28, 0x0a, 0x0f, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x49, 0x44, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0f, 0x63, 0x6f, 0x6e, 0x76, 0x65, - 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, - 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x74, - 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x22, 0x17, 0x0a, 0x15, 0x44, 0x65, 0x6c, 0x65, - 0x74, 0x65, 0x4d, 0x73, 0x67, 0x50, 0x68, 0x79, 0x73, 0x69, 0x63, 0x61, 0x6c, 0x52, 0x65, 0x73, - 0x70, 0x22, 0x57, 0x0a, 0x19, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4d, 0x73, 0x67, 0x50, 0x68, - 0x79, 0x73, 0x69, 0x63, 0x61, 0x6c, 0x42, 0x79, 0x53, 0x65, 0x71, 0x52, 0x65, 0x71, 0x12, 0x26, - 0x0a, 0x0e, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x65, 0x71, 0x73, 0x18, 0x02, - 0x20, 0x03, 0x28, 0x03, 0x52, 0x04, 0x73, 0x65, 0x71, 0x73, 0x22, 0x1c, 0x0a, 0x1a, 0x44, 0x65, - 0x6c, 0x65, 0x74, 0x65, 0x4d, 0x73, 0x67, 0x50, 0x68, 0x79, 0x73, 0x69, 0x63, 0x61, 0x6c, 0x42, - 0x79, 0x53, 0x65, 0x71, 0x52, 0x65, 0x73, 0x70, 0x22, 0x42, 0x0a, 0x18, 0x47, 0x65, 0x74, 0x43, - 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x78, 0x53, 0x65, - 0x71, 0x52, 0x65, 0x71, 0x12, 0x26, 0x0a, 0x0e, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x63, 0x6f, - 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x22, 0x33, 0x0a, 0x19, - 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, - 0x61, 0x78, 0x53, 0x65, 0x71, 0x52, 0x65, 0x73, 0x70, 0x12, 0x16, 0x0a, 0x06, 0x6d, 0x61, 0x78, - 0x53, 0x65, 0x71, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x6d, 0x61, 0x78, 0x53, 0x65, - 0x71, 0x22, 0x3d, 0x0a, 0x23, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x48, 0x61, 0x73, 0x52, 0x65, 0x61, 0x64, 0x41, 0x6e, 0x64, 0x4d, - 0x61, 0x78, 0x53, 0x65, 0x71, 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, 0x3e, 0x0a, 0x04, 0x53, 0x65, 0x71, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x6d, 0x61, 0x78, 0x53, - 0x65, 0x71, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x6d, 0x61, 0x78, 0x53, 0x65, 0x71, - 0x12, 0x1e, 0x0a, 0x0a, 0x68, 0x61, 0x73, 0x52, 0x65, 0x61, 0x64, 0x53, 0x65, 0x71, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x68, 0x61, 0x73, 0x52, 0x65, 0x61, 0x64, 0x53, 0x65, 0x71, - 0x22, 0xcd, 0x01, 0x0a, 0x24, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x48, 0x61, 0x73, 0x52, 0x65, 0x61, 0x64, 0x41, 0x6e, 0x64, 0x4d, - 0x61, 0x78, 0x53, 0x65, 0x71, 0x52, 0x65, 0x73, 0x70, 0x12, 0x54, 0x0a, 0x04, 0x73, 0x65, 0x71, - 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x40, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, - 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x6d, 0x73, 0x67, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6f, - 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x48, 0x61, 0x73, 0x52, 0x65, - 0x61, 0x64, 0x41, 0x6e, 0x64, 0x4d, 0x61, 0x78, 0x53, 0x65, 0x71, 0x52, 0x65, 0x73, 0x70, 0x2e, - 0x53, 0x65, 0x71, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x04, 0x73, 0x65, 0x71, 0x73, 0x1a, - 0x4f, 0x0a, 0x09, 0x53, 0x65, 0x71, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, - 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x2c, - 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, - 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x6d, 0x73, 0x67, - 0x2e, 0x53, 0x65, 0x71, 0x73, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, - 0x22, 0xa9, 0x01, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x55, 0x73, - 0x65, 0x72, 0x52, 0x65, 0x71, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x65, - 0x6e, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x65, 0x6e, 0x64, 0x12, 0x10, 0x0a, - 0x03, 0x61, 0x73, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x03, 0x61, 0x73, 0x65, 0x12, - 0x14, 0x0a, 0x05, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, - 0x67, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x45, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x4f, 0x70, 0x65, 0x6e, - 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 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, 0x54, 0x0a, 0x0a, - 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x55, 0x73, 0x65, 0x72, 0x12, 0x30, 0x0a, 0x04, 0x75, 0x73, - 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, - 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x73, 0x64, 0x6b, 0x77, 0x73, 0x2e, 0x55, 0x73, - 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x04, 0x75, 0x73, 0x65, 0x72, 0x12, 0x14, 0x0a, 0x05, - 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x63, 0x6f, 0x75, - 0x6e, 0x74, 0x22, 0x91, 0x02, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, - 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1a, 0x0a, 0x08, 0x6d, 0x73, 0x67, 0x43, - 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x6d, 0x73, 0x67, 0x43, - 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x75, 0x73, 0x65, 0x72, 0x43, 0x6f, 0x75, 0x6e, - 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x75, 0x73, 0x65, 0x72, 0x43, 0x6f, 0x75, - 0x6e, 0x74, 0x12, 0x50, 0x0a, 0x09, 0x64, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x18, - 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, - 0x72, 0x76, 0x65, 0x72, 0x2e, 0x6d, 0x73, 0x67, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x63, 0x74, 0x69, - 0x76, 0x65, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x2e, 0x44, 0x61, 0x74, 0x65, 0x43, - 0x6f, 0x75, 0x6e, 0x74, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x09, 0x64, 0x61, 0x74, 0x65, 0x43, - 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x32, 0x0a, 0x05, 0x75, 0x73, 0x65, 0x72, 0x73, 0x18, 0x04, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, - 0x65, 0x72, 0x2e, 0x6d, 0x73, 0x67, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x55, 0x73, 0x65, - 0x72, 0x52, 0x05, 0x75, 0x73, 0x65, 0x72, 0x73, 0x1a, 0x3c, 0x0a, 0x0e, 0x44, 0x61, 0x74, 0x65, - 0x43, 0x6f, 0x75, 0x6e, 0x74, 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, 0x03, 0x52, 0x05, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x94, 0x01, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x41, 0x63, - 0x74, 0x69, 0x76, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x12, 0x14, 0x0a, 0x05, - 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x73, 0x74, 0x61, - 0x72, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x65, 0x6e, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, - 0x03, 0x65, 0x6e, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x61, 0x73, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x08, 0x52, 0x03, 0x61, 0x73, 0x65, 0x12, 0x45, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x4f, 0x70, 0x65, - 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 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, 0x58, 0x0a, - 0x0b, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x33, 0x0a, 0x05, - 0x67, 0x72, 0x6f, 0x75, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x4f, 0x70, - 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x73, 0x64, 0x6b, 0x77, 0x73, - 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x05, 0x67, 0x72, 0x6f, 0x75, - 0x70, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, - 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x98, 0x02, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x41, - 0x63, 0x74, 0x69, 0x76, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1a, - 0x0a, 0x08, 0x6d, 0x73, 0x67, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, - 0x52, 0x08, 0x6d, 0x73, 0x67, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x67, 0x72, - 0x6f, 0x75, 0x70, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, - 0x67, 0x72, 0x6f, 0x75, 0x70, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x51, 0x0a, 0x09, 0x64, 0x61, - 0x74, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x33, 0x2e, - 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x6d, 0x73, 0x67, - 0x2e, 0x47, 0x65, 0x74, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, - 0x65, 0x73, 0x70, 0x2e, 0x44, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x45, 0x6e, 0x74, - 0x72, 0x79, 0x52, 0x09, 0x64, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x35, 0x0a, - 0x06, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, - 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x6d, 0x73, 0x67, - 0x2e, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x06, 0x67, 0x72, - 0x6f, 0x75, 0x70, 0x73, 0x1a, 0x3c, 0x0a, 0x0e, 0x44, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x75, 0x6e, - 0x74, 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, 0x03, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, - 0x38, 0x01, 0x22, 0xe1, 0x01, 0x0a, 0x10, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x4d, 0x65, 0x73, - 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x49, - 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x49, 0x44, 0x12, - 0x16, 0x0a, 0x06, 0x72, 0x65, 0x63, 0x76, 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x06, 0x72, 0x65, 0x63, 0x76, 0x49, 0x44, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x73, 0x67, 0x54, 0x79, - 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x6d, 0x73, 0x67, 0x54, 0x79, 0x70, - 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x65, 0x6e, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x08, 0x73, 0x65, 0x6e, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x20, 0x0a, - 0x0b, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x18, 0x05, 0x20, 0x01, - 0x28, 0x05, 0x52, 0x0b, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, - 0x45, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, - 0x65, 0x72, 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, 0x6c, 0x0a, 0x11, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, - 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x35, 0x0a, 0x08, 0x63, - 0x68, 0x61, 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, - 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x6d, 0x73, 0x67, - 0x2e, 0x43, 0x68, 0x61, 0x74, 0x4c, 0x6f, 0x67, 0x52, 0x08, 0x63, 0x68, 0x61, 0x74, 0x4c, 0x6f, - 0x67, 0x73, 0x12, 0x20, 0x0a, 0x0b, 0x63, 0x68, 0x61, 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x4e, 0x75, - 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x63, 0x68, 0x61, 0x74, 0x4c, 0x6f, 0x67, - 0x73, 0x4e, 0x75, 0x6d, 0x22, 0xcf, 0x05, 0x0a, 0x07, 0x43, 0x68, 0x61, 0x74, 0x4c, 0x6f, 0x67, - 0x12, 0x20, 0x0a, 0x0b, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x4d, 0x73, 0x67, 0x49, 0x44, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x4d, 0x73, 0x67, - 0x49, 0x44, 0x12, 0x20, 0x0a, 0x0b, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x4d, 0x73, 0x67, 0x49, - 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x4d, - 0x73, 0x67, 0x49, 0x44, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x49, 0x44, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x49, 0x44, 0x12, 0x16, 0x0a, 0x06, - 0x72, 0x65, 0x63, 0x76, 0x49, 0x44, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x65, - 0x63, 0x76, 0x49, 0x44, 0x12, 0x18, 0x0a, 0x07, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x44, 0x18, - 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x44, 0x12, 0x22, - 0x0a, 0x0c, 0x72, 0x65, 0x63, 0x76, 0x4e, 0x69, 0x63, 0x6b, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x06, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x72, 0x65, 0x63, 0x76, 0x4e, 0x69, 0x63, 0x6b, 0x6e, 0x61, - 0x6d, 0x65, 0x12, 0x2a, 0x0a, 0x10, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x50, 0x6c, 0x61, 0x74, - 0x66, 0x6f, 0x72, 0x6d, 0x49, 0x44, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x10, 0x73, 0x65, - 0x6e, 0x64, 0x65, 0x72, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x49, 0x44, 0x12, 0x26, - 0x0a, 0x0e, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x4e, 0x69, 0x63, 0x6b, 0x6e, 0x61, 0x6d, 0x65, - 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x4e, 0x69, - 0x63, 0x6b, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x24, 0x0a, 0x0d, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, - 0x46, 0x61, 0x63, 0x65, 0x55, 0x52, 0x4c, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x73, - 0x65, 0x6e, 0x64, 0x65, 0x72, 0x46, 0x61, 0x63, 0x65, 0x55, 0x52, 0x4c, 0x12, 0x1c, 0x0a, 0x09, - 0x67, 0x72, 0x6f, 0x75, 0x70, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x09, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x73, 0x65, - 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x05, 0x52, - 0x0b, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x18, 0x0a, 0x07, - 0x6d, 0x73, 0x67, 0x46, 0x72, 0x6f, 0x6d, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x6d, - 0x73, 0x67, 0x46, 0x72, 0x6f, 0x6d, 0x12, 0x20, 0x0a, 0x0b, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, - 0x74, 0x54, 0x79, 0x70, 0x65, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x63, 0x6f, 0x6e, - 0x74, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, - 0x65, 0x6e, 0x74, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, - 0x6e, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x0f, 0x20, 0x01, - 0x28, 0x05, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x65, - 0x6e, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x10, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x73, 0x65, - 0x6e, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, - 0x54, 0x69, 0x6d, 0x65, 0x18, 0x11, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x63, 0x72, 0x65, 0x61, - 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x65, 0x78, 0x18, 0x12, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x02, 0x65, 0x78, 0x12, 0x22, 0x0a, 0x0c, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x46, - 0x61, 0x63, 0x65, 0x55, 0x52, 0x4c, 0x18, 0x13, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x67, 0x72, - 0x6f, 0x75, 0x70, 0x46, 0x61, 0x63, 0x65, 0x55, 0x52, 0x4c, 0x12, 0x2a, 0x0a, 0x10, 0x67, 0x72, - 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x14, - 0x20, 0x01, 0x28, 0x0d, 0x52, 0x10, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, - 0x72, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x73, 0x65, 0x71, 0x18, 0x15, 0x20, - 0x01, 0x28, 0x03, 0x52, 0x03, 0x73, 0x65, 0x71, 0x12, 0x1e, 0x0a, 0x0a, 0x67, 0x72, 0x6f, 0x75, - 0x70, 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x18, 0x16, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x67, 0x72, - 0x6f, 0x75, 0x70, 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x12, 0x1c, 0x0a, 0x09, 0x67, 0x72, 0x6f, 0x75, - 0x70, 0x54, 0x79, 0x70, 0x65, 0x18, 0x17, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x67, 0x72, 0x6f, - 0x75, 0x70, 0x54, 0x79, 0x70, 0x65, 0x22, 0x6c, 0x0a, 0x13, 0x62, 0x61, 0x74, 0x63, 0x68, 0x53, - 0x65, 0x6e, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x12, 0x1e, 0x0a, - 0x0a, 0x72, 0x65, 0x63, 0x76, 0x49, 0x44, 0x4c, 0x69, 0x73, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, - 0x09, 0x52, 0x0a, 0x72, 0x65, 0x63, 0x76, 0x49, 0x44, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x35, 0x0a, - 0x07, 0x6d, 0x73, 0x67, 0x44, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, - 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x73, 0x64, - 0x6b, 0x77, 0x73, 0x2e, 0x4d, 0x73, 0x67, 0x44, 0x61, 0x74, 0x61, 0x52, 0x07, 0x6d, 0x73, 0x67, - 0x44, 0x61, 0x74, 0x61, 0x22, 0x16, 0x0a, 0x14, 0x62, 0x61, 0x74, 0x63, 0x68, 0x53, 0x65, 0x6e, - 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x32, 0x82, 0x0f, 0x0a, - 0x03, 0x6d, 0x73, 0x67, 0x12, 0x50, 0x0a, 0x09, 0x47, 0x65, 0x74, 0x4d, 0x61, 0x78, 0x53, 0x65, - 0x71, 0x12, 0x20, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, - 0x2e, 0x73, 0x64, 0x6b, 0x77, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x4d, 0x61, 0x78, 0x53, 0x65, 0x71, - 0x52, 0x65, 0x71, 0x1a, 0x21, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, - 0x65, 0x72, 0x2e, 0x73, 0x64, 0x6b, 0x77, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x4d, 0x61, 0x78, 0x53, - 0x65, 0x71, 0x52, 0x65, 0x73, 0x70, 0x12, 0x70, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, - 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x78, 0x53, 0x65, 0x71, 0x12, - 0x2a, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x6d, - 0x73, 0x67, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x4d, 0x61, 0x78, 0x53, 0x65, 0x71, 0x52, 0x65, 0x71, 0x1a, 0x2b, 0x2e, 0x4f, 0x70, - 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x6d, 0x73, 0x67, 0x2e, 0x47, - 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x61, - 0x78, 0x53, 0x65, 0x71, 0x52, 0x65, 0x73, 0x70, 0x12, 0x68, 0x0a, 0x11, 0x50, 0x75, 0x6c, 0x6c, - 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x42, 0x79, 0x53, 0x65, 0x71, 0x73, 0x12, 0x28, 0x2e, - 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x73, 0x64, 0x6b, - 0x77, 0x73, 0x2e, 0x50, 0x75, 0x6c, 0x6c, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x42, 0x79, - 0x53, 0x65, 0x71, 0x73, 0x52, 0x65, 0x71, 0x1a, 0x29, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, - 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x73, 0x64, 0x6b, 0x77, 0x73, 0x2e, 0x50, 0x75, 0x6c, - 0x6c, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x42, 0x79, 0x53, 0x65, 0x71, 0x73, 0x52, 0x65, - 0x73, 0x70, 0x12, 0x58, 0x0a, 0x0d, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x4d, 0x65, 0x73, 0x73, - 0x61, 0x67, 0x65, 0x12, 0x22, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, - 0x65, 0x72, 0x2e, 0x6d, 0x73, 0x67, 0x2e, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x4d, 0x65, 0x73, - 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x1a, 0x23, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, - 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x6d, 0x73, 0x67, 0x2e, 0x53, 0x65, 0x61, 0x72, 0x63, - 0x68, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x46, 0x0a, 0x07, - 0x53, 0x65, 0x6e, 0x64, 0x4d, 0x73, 0x67, 0x12, 0x1c, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, - 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x6d, 0x73, 0x67, 0x2e, 0x53, 0x65, 0x6e, 0x64, 0x4d, - 0x73, 0x67, 0x52, 0x65, 0x71, 0x1a, 0x1d, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, - 0x72, 0x76, 0x65, 0x72, 0x2e, 0x6d, 0x73, 0x67, 0x2e, 0x53, 0x65, 0x6e, 0x64, 0x4d, 0x73, 0x67, - 0x52, 0x65, 0x73, 0x70, 0x12, 0x70, 0x0a, 0x15, 0x43, 0x6c, 0x65, 0x61, 0x72, 0x43, 0x6f, 0x6e, - 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x4d, 0x73, 0x67, 0x12, 0x2a, 0x2e, - 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x6d, 0x73, 0x67, - 0x2e, 0x43, 0x6c, 0x65, 0x61, 0x72, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x71, 0x1a, 0x2b, 0x2e, 0x4f, 0x70, 0x65, 0x6e, - 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x6d, 0x73, 0x67, 0x2e, 0x43, 0x6c, 0x65, - 0x61, 0x72, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x4d, - 0x73, 0x67, 0x52, 0x65, 0x73, 0x70, 0x12, 0x5e, 0x0a, 0x0f, 0x55, 0x73, 0x65, 0x72, 0x43, 0x6c, - 0x65, 0x61, 0x72, 0x41, 0x6c, 0x6c, 0x4d, 0x73, 0x67, 0x12, 0x24, 0x2e, 0x4f, 0x70, 0x65, 0x6e, - 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x6d, 0x73, 0x67, 0x2e, 0x55, 0x73, 0x65, - 0x72, 0x43, 0x6c, 0x65, 0x61, 0x72, 0x41, 0x6c, 0x6c, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x71, 0x1a, - 0x25, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x6d, - 0x73, 0x67, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x43, 0x6c, 0x65, 0x61, 0x72, 0x41, 0x6c, 0x6c, 0x4d, - 0x73, 0x67, 0x52, 0x65, 0x73, 0x70, 0x12, 0x4f, 0x0a, 0x0a, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, - 0x4d, 0x73, 0x67, 0x73, 0x12, 0x1f, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, - 0x76, 0x65, 0x72, 0x2e, 0x6d, 0x73, 0x67, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4d, 0x73, - 0x67, 0x73, 0x52, 0x65, 0x71, 0x1a, 0x20, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, - 0x72, 0x76, 0x65, 0x72, 0x2e, 0x6d, 0x73, 0x67, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4d, - 0x73, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x12, 0x73, 0x0a, 0x16, 0x44, 0x65, 0x6c, 0x65, 0x74, - 0x65, 0x4d, 0x73, 0x67, 0x50, 0x68, 0x79, 0x73, 0x69, 0x63, 0x61, 0x6c, 0x42, 0x79, 0x53, 0x65, - 0x71, 0x12, 0x2b, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, - 0x2e, 0x6d, 0x73, 0x67, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4d, 0x73, 0x67, 0x50, 0x68, - 0x79, 0x73, 0x69, 0x63, 0x61, 0x6c, 0x42, 0x79, 0x53, 0x65, 0x71, 0x52, 0x65, 0x71, 0x1a, 0x2c, - 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x6d, 0x73, - 0x67, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4d, 0x73, 0x67, 0x50, 0x68, 0x79, 0x73, 0x69, - 0x63, 0x61, 0x6c, 0x42, 0x79, 0x53, 0x65, 0x71, 0x52, 0x65, 0x73, 0x70, 0x12, 0x64, 0x0a, 0x11, - 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4d, 0x73, 0x67, 0x50, 0x68, 0x79, 0x73, 0x69, 0x63, 0x61, - 0x6c, 0x12, 0x26, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, - 0x2e, 0x6d, 0x73, 0x67, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4d, 0x73, 0x67, 0x50, 0x68, - 0x79, 0x73, 0x69, 0x63, 0x61, 0x6c, 0x52, 0x65, 0x71, 0x1a, 0x27, 0x2e, 0x4f, 0x70, 0x65, 0x6e, - 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x6d, 0x73, 0x67, 0x2e, 0x44, 0x65, 0x6c, - 0x65, 0x74, 0x65, 0x4d, 0x73, 0x67, 0x50, 0x68, 0x79, 0x73, 0x69, 0x63, 0x61, 0x6c, 0x52, 0x65, - 0x73, 0x70, 0x12, 0x61, 0x0a, 0x10, 0x53, 0x65, 0x74, 0x53, 0x65, 0x6e, 0x64, 0x4d, 0x73, 0x67, - 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x25, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, - 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x6d, 0x73, 0x67, 0x2e, 0x53, 0x65, 0x74, 0x53, 0x65, 0x6e, - 0x64, 0x4d, 0x73, 0x67, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x1a, 0x26, 0x2e, - 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x6d, 0x73, 0x67, - 0x2e, 0x53, 0x65, 0x74, 0x53, 0x65, 0x6e, 0x64, 0x4d, 0x73, 0x67, 0x53, 0x74, 0x61, 0x74, 0x75, - 0x73, 0x52, 0x65, 0x73, 0x70, 0x12, 0x61, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x53, 0x65, 0x6e, 0x64, - 0x4d, 0x73, 0x67, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x25, 0x2e, 0x4f, 0x70, 0x65, 0x6e, - 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x6d, 0x73, 0x67, 0x2e, 0x47, 0x65, 0x74, - 0x53, 0x65, 0x6e, 0x64, 0x4d, 0x73, 0x67, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, - 0x1a, 0x26, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, - 0x6d, 0x73, 0x67, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x65, 0x6e, 0x64, 0x4d, 0x73, 0x67, 0x53, 0x74, - 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x12, 0x4c, 0x0a, 0x09, 0x52, 0x65, 0x76, 0x6f, - 0x6b, 0x65, 0x4d, 0x73, 0x67, 0x12, 0x1e, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, - 0x72, 0x76, 0x65, 0x72, 0x2e, 0x6d, 0x73, 0x67, 0x2e, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x4d, - 0x73, 0x67, 0x52, 0x65, 0x71, 0x1a, 0x1f, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, - 0x72, 0x76, 0x65, 0x72, 0x2e, 0x6d, 0x73, 0x67, 0x2e, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x4d, - 0x73, 0x67, 0x52, 0x65, 0x73, 0x70, 0x12, 0x5b, 0x0a, 0x0e, 0x4d, 0x61, 0x72, 0x6b, 0x4d, 0x73, - 0x67, 0x73, 0x41, 0x73, 0x52, 0x65, 0x61, 0x64, 0x12, 0x23, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, - 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x6d, 0x73, 0x67, 0x2e, 0x4d, 0x61, 0x72, 0x6b, - 0x4d, 0x73, 0x67, 0x73, 0x41, 0x73, 0x52, 0x65, 0x61, 0x64, 0x52, 0x65, 0x71, 0x1a, 0x24, 0x2e, - 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x6d, 0x73, 0x67, - 0x2e, 0x4d, 0x61, 0x72, 0x6b, 0x4d, 0x73, 0x67, 0x73, 0x41, 0x73, 0x52, 0x65, 0x61, 0x64, 0x52, - 0x65, 0x73, 0x70, 0x12, 0x73, 0x0a, 0x16, 0x4d, 0x61, 0x72, 0x6b, 0x43, 0x6f, 0x6e, 0x76, 0x65, - 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x73, 0x52, 0x65, 0x61, 0x64, 0x12, 0x2b, 0x2e, - 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x6d, 0x73, 0x67, - 0x2e, 0x4d, 0x61, 0x72, 0x6b, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x41, 0x73, 0x52, 0x65, 0x61, 0x64, 0x52, 0x65, 0x71, 0x1a, 0x2c, 0x2e, 0x4f, 0x70, 0x65, - 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x6d, 0x73, 0x67, 0x2e, 0x4d, 0x61, - 0x72, 0x6b, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x73, - 0x52, 0x65, 0x61, 0x64, 0x52, 0x65, 0x73, 0x70, 0x12, 0x7c, 0x0a, 0x19, 0x53, 0x65, 0x74, 0x43, - 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x61, 0x73, 0x52, 0x65, - 0x61, 0x64, 0x53, 0x65, 0x71, 0x12, 0x2e, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, - 0x72, 0x76, 0x65, 0x72, 0x2e, 0x6d, 0x73, 0x67, 0x2e, 0x53, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x76, - 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x61, 0x73, 0x52, 0x65, 0x61, 0x64, 0x53, - 0x65, 0x71, 0x52, 0x65, 0x71, 0x1a, 0x2f, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, - 0x72, 0x76, 0x65, 0x72, 0x2e, 0x6d, 0x73, 0x67, 0x2e, 0x53, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x76, - 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x61, 0x73, 0x52, 0x65, 0x61, 0x64, 0x53, - 0x65, 0x71, 0x52, 0x65, 0x73, 0x70, 0x12, 0x91, 0x01, 0x0a, 0x20, 0x47, 0x65, 0x74, 0x43, 0x6f, - 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x48, 0x61, 0x73, 0x52, 0x65, - 0x61, 0x64, 0x41, 0x6e, 0x64, 0x4d, 0x61, 0x78, 0x53, 0x65, 0x71, 0x12, 0x35, 0x2e, 0x4f, 0x70, - 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x6d, 0x73, 0x67, 0x2e, 0x47, - 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x48, - 0x61, 0x73, 0x52, 0x65, 0x61, 0x64, 0x41, 0x6e, 0x64, 0x4d, 0x61, 0x78, 0x53, 0x65, 0x71, 0x52, - 0x65, 0x71, 0x1a, 0x36, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, - 0x72, 0x2e, 0x6d, 0x73, 0x67, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x48, 0x61, 0x73, 0x52, 0x65, 0x61, 0x64, 0x41, 0x6e, 0x64, - 0x4d, 0x61, 0x78, 0x53, 0x65, 0x71, 0x52, 0x65, 0x73, 0x70, 0x12, 0x58, 0x0a, 0x0d, 0x47, 0x65, - 0x74, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x55, 0x73, 0x65, 0x72, 0x12, 0x22, 0x2e, 0x4f, 0x70, - 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x6d, 0x73, 0x67, 0x2e, 0x47, - 0x65, 0x74, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x1a, - 0x23, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x6d, - 0x73, 0x67, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x55, 0x73, 0x65, 0x72, - 0x52, 0x65, 0x73, 0x70, 0x12, 0x5b, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x41, 0x63, 0x74, 0x69, 0x76, - 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x23, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, - 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x6d, 0x73, 0x67, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x63, 0x74, - 0x69, 0x76, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x1a, 0x24, 0x2e, 0x4f, 0x70, - 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x6d, 0x73, 0x67, 0x2e, 0x47, - 0x65, 0x74, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x73, - 0x70, 0x42, 0x33, 0x5a, 0x31, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, - 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x44, 0x4b, 0x2f, 0x4f, 0x70, 0x65, 0x6e, 0x2d, 0x49, - 0x4d, 0x2d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x2f, 0x6d, 0x73, 0x67, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_msg_msg_proto_rawDescOnce sync.Once - file_msg_msg_proto_rawDescData = file_msg_msg_proto_rawDesc -) - -func file_msg_msg_proto_rawDescGZIP() []byte { - file_msg_msg_proto_rawDescOnce.Do(func() { - file_msg_msg_proto_rawDescData = protoimpl.X.CompressGZIP(file_msg_msg_proto_rawDescData) - }) - return file_msg_msg_proto_rawDescData -} - -var file_msg_msg_proto_msgTypes = make([]protoimpl.MessageInfo, 53) -var file_msg_msg_proto_goTypes = []interface{}{ - (*MsgDataToMQ)(nil), // 0: OpenIMServer.msg.MsgDataToMQ - (*MsgDataToDB)(nil), // 1: OpenIMServer.msg.MsgDataToDB - (*PushMsgDataToMQ)(nil), // 2: OpenIMServer.msg.PushMsgDataToMQ - (*MsgDataToMongoByMQ)(nil), // 3: OpenIMServer.msg.MsgDataToMongoByMQ - (*GetMaxAndMinSeqReq)(nil), // 4: OpenIMServer.msg.GetMaxAndMinSeqReq - (*GetMaxAndMinSeqResp)(nil), // 5: OpenIMServer.msg.GetMaxAndMinSeqResp - (*SendMsgReq)(nil), // 6: OpenIMServer.msg.SendMsgReq - (*SendMsgResp)(nil), // 7: OpenIMServer.msg.SendMsgResp - (*SetSendMsgStatusReq)(nil), // 8: OpenIMServer.msg.SetSendMsgStatusReq - (*SetSendMsgStatusResp)(nil), // 9: OpenIMServer.msg.SetSendMsgStatusResp - (*GetSendMsgStatusReq)(nil), // 10: OpenIMServer.msg.GetSendMsgStatusReq - (*GetSendMsgStatusResp)(nil), // 11: OpenIMServer.msg.GetSendMsgStatusResp - (*MsgDataToModifyByMQ)(nil), // 12: OpenIMServer.msg.MsgDataToModifyByMQ - (*DelMsgsReq)(nil), // 13: OpenIMServer.msg.DelMsgsReq - (*DelMsgsResp)(nil), // 14: OpenIMServer.msg.DelMsgsResp - (*RevokeMsgReq)(nil), // 15: OpenIMServer.msg.RevokeMsgReq - (*RevokeMsgResp)(nil), // 16: OpenIMServer.msg.RevokeMsgResp - (*MarkMsgsAsReadReq)(nil), // 17: OpenIMServer.msg.MarkMsgsAsReadReq - (*MarkMsgsAsReadResp)(nil), // 18: OpenIMServer.msg.MarkMsgsAsReadResp - (*MarkConversationAsReadReq)(nil), // 19: OpenIMServer.msg.MarkConversationAsReadReq - (*MarkConversationAsReadResp)(nil), // 20: OpenIMServer.msg.MarkConversationAsReadResp - (*SetConversationHasReadSeqReq)(nil), // 21: OpenIMServer.msg.SetConversationHasReadSeqReq - (*SetConversationHasReadSeqResp)(nil), // 22: OpenIMServer.msg.SetConversationHasReadSeqResp - (*DeleteSyncOpt)(nil), // 23: OpenIMServer.msg.DeleteSyncOpt - (*ClearConversationsMsgReq)(nil), // 24: OpenIMServer.msg.ClearConversationsMsgReq - (*ClearConversationsMsgResp)(nil), // 25: OpenIMServer.msg.ClearConversationsMsgResp - (*UserClearAllMsgReq)(nil), // 26: OpenIMServer.msg.UserClearAllMsgReq - (*UserClearAllMsgResp)(nil), // 27: OpenIMServer.msg.UserClearAllMsgResp - (*DeleteMsgsReq)(nil), // 28: OpenIMServer.msg.DeleteMsgsReq - (*DeleteMsgsResp)(nil), // 29: OpenIMServer.msg.DeleteMsgsResp - (*DeleteMsgPhysicalReq)(nil), // 30: OpenIMServer.msg.DeleteMsgPhysicalReq - (*DeleteMsgPhysicalResp)(nil), // 31: OpenIMServer.msg.DeleteMsgPhysicalResp - (*DeleteMsgPhysicalBySeqReq)(nil), // 32: OpenIMServer.msg.DeleteMsgPhysicalBySeqReq - (*DeleteMsgPhysicalBySeqResp)(nil), // 33: OpenIMServer.msg.DeleteMsgPhysicalBySeqResp - (*GetConversationMaxSeqReq)(nil), // 34: OpenIMServer.msg.GetConversationMaxSeqReq - (*GetConversationMaxSeqResp)(nil), // 35: OpenIMServer.msg.GetConversationMaxSeqResp - (*GetConversationsHasReadAndMaxSeqReq)(nil), // 36: OpenIMServer.msg.GetConversationsHasReadAndMaxSeqReq - (*Seqs)(nil), // 37: OpenIMServer.msg.Seqs - (*GetConversationsHasReadAndMaxSeqResp)(nil), // 38: OpenIMServer.msg.GetConversationsHasReadAndMaxSeqResp - (*GetActiveUserReq)(nil), // 39: OpenIMServer.msg.GetActiveUserReq - (*ActiveUser)(nil), // 40: OpenIMServer.msg.ActiveUser - (*GetActiveUserResp)(nil), // 41: OpenIMServer.msg.GetActiveUserResp - (*GetActiveGroupReq)(nil), // 42: OpenIMServer.msg.GetActiveGroupReq - (*ActiveGroup)(nil), // 43: OpenIMServer.msg.ActiveGroup - (*GetActiveGroupResp)(nil), // 44: OpenIMServer.msg.GetActiveGroupResp - (*SearchMessageReq)(nil), // 45: OpenIMServer.msg.SearchMessageReq - (*SearchMessageResp)(nil), // 46: OpenIMServer.msg.SearchMessageResp - (*ChatLog)(nil), // 47: OpenIMServer.msg.ChatLog - (*BatchSendMessageReq)(nil), // 48: OpenIMServer.msg.batchSendMessageReq - (*BatchSendMessageResp)(nil), // 49: OpenIMServer.msg.batchSendMessageResp - nil, // 50: OpenIMServer.msg.GetConversationsHasReadAndMaxSeqResp.SeqsEntry - nil, // 51: OpenIMServer.msg.GetActiveUserResp.DateCountEntry - nil, // 52: OpenIMServer.msg.GetActiveGroupResp.DateCountEntry - (*sdkws.MsgData)(nil), // 53: OpenIMServer.sdkws.MsgData - (*sdkws.RequestPagination)(nil), // 54: OpenIMServer.sdkws.RequestPagination - (*sdkws.UserInfo)(nil), // 55: OpenIMServer.sdkws.UserInfo - (*sdkws.GroupInfo)(nil), // 56: OpenIMServer.sdkws.GroupInfo - (*sdkws.GetMaxSeqReq)(nil), // 57: OpenIMServer.sdkws.GetMaxSeqReq - (*sdkws.PullMessageBySeqsReq)(nil), // 58: OpenIMServer.sdkws.PullMessageBySeqsReq - (*sdkws.GetMaxSeqResp)(nil), // 59: OpenIMServer.sdkws.GetMaxSeqResp - (*sdkws.PullMessageBySeqsResp)(nil), // 60: OpenIMServer.sdkws.PullMessageBySeqsResp -} -var file_msg_msg_proto_depIdxs = []int32{ - 53, // 0: OpenIMServer.msg.MsgDataToMQ.msgData:type_name -> OpenIMServer.sdkws.MsgData - 53, // 1: OpenIMServer.msg.MsgDataToDB.msgData:type_name -> OpenIMServer.sdkws.MsgData - 53, // 2: OpenIMServer.msg.PushMsgDataToMQ.msgData:type_name -> OpenIMServer.sdkws.MsgData - 53, // 3: OpenIMServer.msg.MsgDataToMongoByMQ.msgData:type_name -> OpenIMServer.sdkws.MsgData - 53, // 4: OpenIMServer.msg.SendMsgReq.msgData:type_name -> OpenIMServer.sdkws.MsgData - 53, // 5: OpenIMServer.msg.MsgDataToModifyByMQ.messages:type_name -> OpenIMServer.sdkws.MsgData - 23, // 6: OpenIMServer.msg.ClearConversationsMsgReq.deleteSyncOpt:type_name -> OpenIMServer.msg.DeleteSyncOpt - 23, // 7: OpenIMServer.msg.UserClearAllMsgReq.deleteSyncOpt:type_name -> OpenIMServer.msg.DeleteSyncOpt - 23, // 8: OpenIMServer.msg.DeleteMsgsReq.deleteSyncOpt:type_name -> OpenIMServer.msg.DeleteSyncOpt - 50, // 9: OpenIMServer.msg.GetConversationsHasReadAndMaxSeqResp.seqs:type_name -> OpenIMServer.msg.GetConversationsHasReadAndMaxSeqResp.SeqsEntry - 54, // 10: OpenIMServer.msg.GetActiveUserReq.pagination:type_name -> OpenIMServer.sdkws.RequestPagination - 55, // 11: OpenIMServer.msg.ActiveUser.user:type_name -> OpenIMServer.sdkws.UserInfo - 51, // 12: OpenIMServer.msg.GetActiveUserResp.dateCount:type_name -> OpenIMServer.msg.GetActiveUserResp.DateCountEntry - 40, // 13: OpenIMServer.msg.GetActiveUserResp.users:type_name -> OpenIMServer.msg.ActiveUser - 54, // 14: OpenIMServer.msg.GetActiveGroupReq.pagination:type_name -> OpenIMServer.sdkws.RequestPagination - 56, // 15: OpenIMServer.msg.ActiveGroup.group:type_name -> OpenIMServer.sdkws.GroupInfo - 52, // 16: OpenIMServer.msg.GetActiveGroupResp.dateCount:type_name -> OpenIMServer.msg.GetActiveGroupResp.DateCountEntry - 43, // 17: OpenIMServer.msg.GetActiveGroupResp.groups:type_name -> OpenIMServer.msg.ActiveGroup - 54, // 18: OpenIMServer.msg.SearchMessageReq.pagination:type_name -> OpenIMServer.sdkws.RequestPagination - 47, // 19: OpenIMServer.msg.SearchMessageResp.chatLogs:type_name -> OpenIMServer.msg.ChatLog - 53, // 20: OpenIMServer.msg.batchSendMessageReq.msgData:type_name -> OpenIMServer.sdkws.MsgData - 37, // 21: OpenIMServer.msg.GetConversationsHasReadAndMaxSeqResp.SeqsEntry.value:type_name -> OpenIMServer.msg.Seqs - 57, // 22: OpenIMServer.msg.msg.GetMaxSeq:input_type -> OpenIMServer.sdkws.GetMaxSeqReq - 34, // 23: OpenIMServer.msg.msg.GetConversationMaxSeq:input_type -> OpenIMServer.msg.GetConversationMaxSeqReq - 58, // 24: OpenIMServer.msg.msg.PullMessageBySeqs:input_type -> OpenIMServer.sdkws.PullMessageBySeqsReq - 45, // 25: OpenIMServer.msg.msg.SearchMessage:input_type -> OpenIMServer.msg.SearchMessageReq - 6, // 26: OpenIMServer.msg.msg.SendMsg:input_type -> OpenIMServer.msg.SendMsgReq - 24, // 27: OpenIMServer.msg.msg.ClearConversationsMsg:input_type -> OpenIMServer.msg.ClearConversationsMsgReq - 26, // 28: OpenIMServer.msg.msg.UserClearAllMsg:input_type -> OpenIMServer.msg.UserClearAllMsgReq - 28, // 29: OpenIMServer.msg.msg.DeleteMsgs:input_type -> OpenIMServer.msg.DeleteMsgsReq - 32, // 30: OpenIMServer.msg.msg.DeleteMsgPhysicalBySeq:input_type -> OpenIMServer.msg.DeleteMsgPhysicalBySeqReq - 30, // 31: OpenIMServer.msg.msg.DeleteMsgPhysical:input_type -> OpenIMServer.msg.DeleteMsgPhysicalReq - 8, // 32: OpenIMServer.msg.msg.SetSendMsgStatus:input_type -> OpenIMServer.msg.SetSendMsgStatusReq - 10, // 33: OpenIMServer.msg.msg.GetSendMsgStatus:input_type -> OpenIMServer.msg.GetSendMsgStatusReq - 15, // 34: OpenIMServer.msg.msg.RevokeMsg:input_type -> OpenIMServer.msg.RevokeMsgReq - 17, // 35: OpenIMServer.msg.msg.MarkMsgsAsRead:input_type -> OpenIMServer.msg.MarkMsgsAsReadReq - 19, // 36: OpenIMServer.msg.msg.MarkConversationAsRead:input_type -> OpenIMServer.msg.MarkConversationAsReadReq - 21, // 37: OpenIMServer.msg.msg.SetConversationHasReadSeq:input_type -> OpenIMServer.msg.SetConversationHasReadSeqReq - 36, // 38: OpenIMServer.msg.msg.GetConversationsHasReadAndMaxSeq:input_type -> OpenIMServer.msg.GetConversationsHasReadAndMaxSeqReq - 39, // 39: OpenIMServer.msg.msg.GetActiveUser:input_type -> OpenIMServer.msg.GetActiveUserReq - 42, // 40: OpenIMServer.msg.msg.GetActiveGroup:input_type -> OpenIMServer.msg.GetActiveGroupReq - 59, // 41: OpenIMServer.msg.msg.GetMaxSeq:output_type -> OpenIMServer.sdkws.GetMaxSeqResp - 35, // 42: OpenIMServer.msg.msg.GetConversationMaxSeq:output_type -> OpenIMServer.msg.GetConversationMaxSeqResp - 60, // 43: OpenIMServer.msg.msg.PullMessageBySeqs:output_type -> OpenIMServer.sdkws.PullMessageBySeqsResp - 46, // 44: OpenIMServer.msg.msg.SearchMessage:output_type -> OpenIMServer.msg.SearchMessageResp - 7, // 45: OpenIMServer.msg.msg.SendMsg:output_type -> OpenIMServer.msg.SendMsgResp - 25, // 46: OpenIMServer.msg.msg.ClearConversationsMsg:output_type -> OpenIMServer.msg.ClearConversationsMsgResp - 27, // 47: OpenIMServer.msg.msg.UserClearAllMsg:output_type -> OpenIMServer.msg.UserClearAllMsgResp - 29, // 48: OpenIMServer.msg.msg.DeleteMsgs:output_type -> OpenIMServer.msg.DeleteMsgsResp - 33, // 49: OpenIMServer.msg.msg.DeleteMsgPhysicalBySeq:output_type -> OpenIMServer.msg.DeleteMsgPhysicalBySeqResp - 31, // 50: OpenIMServer.msg.msg.DeleteMsgPhysical:output_type -> OpenIMServer.msg.DeleteMsgPhysicalResp - 9, // 51: OpenIMServer.msg.msg.SetSendMsgStatus:output_type -> OpenIMServer.msg.SetSendMsgStatusResp - 11, // 52: OpenIMServer.msg.msg.GetSendMsgStatus:output_type -> OpenIMServer.msg.GetSendMsgStatusResp - 16, // 53: OpenIMServer.msg.msg.RevokeMsg:output_type -> OpenIMServer.msg.RevokeMsgResp - 18, // 54: OpenIMServer.msg.msg.MarkMsgsAsRead:output_type -> OpenIMServer.msg.MarkMsgsAsReadResp - 20, // 55: OpenIMServer.msg.msg.MarkConversationAsRead:output_type -> OpenIMServer.msg.MarkConversationAsReadResp - 22, // 56: OpenIMServer.msg.msg.SetConversationHasReadSeq:output_type -> OpenIMServer.msg.SetConversationHasReadSeqResp - 38, // 57: OpenIMServer.msg.msg.GetConversationsHasReadAndMaxSeq:output_type -> OpenIMServer.msg.GetConversationsHasReadAndMaxSeqResp - 41, // 58: OpenIMServer.msg.msg.GetActiveUser:output_type -> OpenIMServer.msg.GetActiveUserResp - 44, // 59: OpenIMServer.msg.msg.GetActiveGroup:output_type -> OpenIMServer.msg.GetActiveGroupResp - 41, // [41:60] is the sub-list for method output_type - 22, // [22:41] is the sub-list for method input_type - 22, // [22:22] is the sub-list for extension type_name - 22, // [22:22] is the sub-list for extension extendee - 0, // [0:22] is the sub-list for field type_name -} - -func init() { file_msg_msg_proto_init() } -func file_msg_msg_proto_init() { - if File_msg_msg_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_msg_msg_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgDataToMQ); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_msg_msg_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgDataToDB); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_msg_msg_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PushMsgDataToMQ); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_msg_msg_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgDataToMongoByMQ); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_msg_msg_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetMaxAndMinSeqReq); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_msg_msg_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetMaxAndMinSeqResp); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_msg_msg_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SendMsgReq); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_msg_msg_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SendMsgResp); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_msg_msg_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SetSendMsgStatusReq); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_msg_msg_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SetSendMsgStatusResp); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_msg_msg_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetSendMsgStatusReq); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_msg_msg_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetSendMsgStatusResp); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_msg_msg_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgDataToModifyByMQ); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_msg_msg_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DelMsgsReq); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_msg_msg_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DelMsgsResp); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_msg_msg_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RevokeMsgReq); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_msg_msg_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RevokeMsgResp); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_msg_msg_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MarkMsgsAsReadReq); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_msg_msg_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MarkMsgsAsReadResp); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_msg_msg_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MarkConversationAsReadReq); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_msg_msg_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MarkConversationAsReadResp); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_msg_msg_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SetConversationHasReadSeqReq); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_msg_msg_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SetConversationHasReadSeqResp); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_msg_msg_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeleteSyncOpt); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_msg_msg_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ClearConversationsMsgReq); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_msg_msg_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ClearConversationsMsgResp); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_msg_msg_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UserClearAllMsgReq); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_msg_msg_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UserClearAllMsgResp); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_msg_msg_proto_msgTypes[28].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeleteMsgsReq); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_msg_msg_proto_msgTypes[29].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeleteMsgsResp); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_msg_msg_proto_msgTypes[30].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeleteMsgPhysicalReq); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_msg_msg_proto_msgTypes[31].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeleteMsgPhysicalResp); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_msg_msg_proto_msgTypes[32].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeleteMsgPhysicalBySeqReq); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_msg_msg_proto_msgTypes[33].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeleteMsgPhysicalBySeqResp); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_msg_msg_proto_msgTypes[34].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetConversationMaxSeqReq); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_msg_msg_proto_msgTypes[35].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetConversationMaxSeqResp); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_msg_msg_proto_msgTypes[36].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetConversationsHasReadAndMaxSeqReq); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_msg_msg_proto_msgTypes[37].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Seqs); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_msg_msg_proto_msgTypes[38].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetConversationsHasReadAndMaxSeqResp); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_msg_msg_proto_msgTypes[39].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetActiveUserReq); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_msg_msg_proto_msgTypes[40].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ActiveUser); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_msg_msg_proto_msgTypes[41].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetActiveUserResp); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_msg_msg_proto_msgTypes[42].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetActiveGroupReq); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_msg_msg_proto_msgTypes[43].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ActiveGroup); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_msg_msg_proto_msgTypes[44].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetActiveGroupResp); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_msg_msg_proto_msgTypes[45].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SearchMessageReq); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_msg_msg_proto_msgTypes[46].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SearchMessageResp); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_msg_msg_proto_msgTypes[47].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ChatLog); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_msg_msg_proto_msgTypes[48].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BatchSendMessageReq); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_msg_msg_proto_msgTypes[49].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BatchSendMessageResp); 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{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_msg_msg_proto_rawDesc, - NumEnums: 0, - NumMessages: 53, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_msg_msg_proto_goTypes, - DependencyIndexes: file_msg_msg_proto_depIdxs, - MessageInfos: file_msg_msg_proto_msgTypes, - }.Build() - File_msg_msg_proto = out.File - file_msg_msg_proto_rawDesc = nil - file_msg_msg_proto_goTypes = nil - file_msg_msg_proto_depIdxs = nil -} - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConnInterface - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion6 - -// MsgClient is the client API for Msg service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type MsgClient interface { - // 获取最小最大seq(包括用户的,以及指定群组的) - GetMaxSeq(ctx context.Context, in *sdkws.GetMaxSeqReq, opts ...grpc.CallOption) (*sdkws.GetMaxSeqResp, error) - GetConversationMaxSeq(ctx context.Context, in *GetConversationMaxSeqReq, opts ...grpc.CallOption) (*GetConversationMaxSeqResp, error) - // 拉取历史消息(包括用户的,以及指定群组的) - PullMessageBySeqs(ctx context.Context, in *sdkws.PullMessageBySeqsReq, opts ...grpc.CallOption) (*sdkws.PullMessageBySeqsResp, error) - SearchMessage(ctx context.Context, in *SearchMessageReq, opts ...grpc.CallOption) (*SearchMessageResp, error) - // 发送消息 - SendMsg(ctx context.Context, in *SendMsgReq, opts ...grpc.CallOption) (*SendMsgResp, error) - // 全量清空指定会话消息 重置min seq 比最大seq大1 - ClearConversationsMsg(ctx context.Context, in *ClearConversationsMsgReq, opts ...grpc.CallOption) (*ClearConversationsMsgResp, error) - // 删除用户全部消息 重置min seq 比最大seq大1 - UserClearAllMsg(ctx context.Context, in *UserClearAllMsgReq, opts ...grpc.CallOption) (*UserClearAllMsgResp, error) - // 用户标记删除部分消息by Seq - DeleteMsgs(ctx context.Context, in *DeleteMsgsReq, opts ...grpc.CallOption) (*DeleteMsgsResp, error) - // seq物理删除消息 - DeleteMsgPhysicalBySeq(ctx context.Context, in *DeleteMsgPhysicalBySeqReq, opts ...grpc.CallOption) (*DeleteMsgPhysicalBySeqResp, error) - // 物理删除消息by 时间 - DeleteMsgPhysical(ctx context.Context, in *DeleteMsgPhysicalReq, opts ...grpc.CallOption) (*DeleteMsgPhysicalResp, error) - // 设置消息是否发送成功-针对api发送的消息 - SetSendMsgStatus(ctx context.Context, in *SetSendMsgStatusReq, opts ...grpc.CallOption) (*SetSendMsgStatusResp, error) - // 获取消息发送状态 - GetSendMsgStatus(ctx context.Context, in *GetSendMsgStatusReq, opts ...grpc.CallOption) (*GetSendMsgStatusResp, error) - RevokeMsg(ctx context.Context, in *RevokeMsgReq, opts ...grpc.CallOption) (*RevokeMsgResp, error) - // mark as read - MarkMsgsAsRead(ctx context.Context, in *MarkMsgsAsReadReq, opts ...grpc.CallOption) (*MarkMsgsAsReadResp, error) - MarkConversationAsRead(ctx context.Context, in *MarkConversationAsReadReq, opts ...grpc.CallOption) (*MarkConversationAsReadResp, error) - SetConversationHasReadSeq(ctx context.Context, in *SetConversationHasReadSeqReq, opts ...grpc.CallOption) (*SetConversationHasReadSeqResp, error) - GetConversationsHasReadAndMaxSeq(ctx context.Context, in *GetConversationsHasReadAndMaxSeqReq, opts ...grpc.CallOption) (*GetConversationsHasReadAndMaxSeqResp, error) - GetActiveUser(ctx context.Context, in *GetActiveUserReq, opts ...grpc.CallOption) (*GetActiveUserResp, error) - GetActiveGroup(ctx context.Context, in *GetActiveGroupReq, opts ...grpc.CallOption) (*GetActiveGroupResp, error) -} - -type msgClient struct { - cc grpc.ClientConnInterface -} - -func NewMsgClient(cc grpc.ClientConnInterface) MsgClient { - return &msgClient{cc} -} - -func (c *msgClient) GetMaxSeq(ctx context.Context, in *sdkws.GetMaxSeqReq, opts ...grpc.CallOption) (*sdkws.GetMaxSeqResp, error) { - out := new(sdkws.GetMaxSeqResp) - err := c.cc.Invoke(ctx, "/OpenIMServer.msg.msg/GetMaxSeq", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *msgClient) GetConversationMaxSeq(ctx context.Context, in *GetConversationMaxSeqReq, opts ...grpc.CallOption) (*GetConversationMaxSeqResp, error) { - out := new(GetConversationMaxSeqResp) - err := c.cc.Invoke(ctx, "/OpenIMServer.msg.msg/GetConversationMaxSeq", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *msgClient) PullMessageBySeqs(ctx context.Context, in *sdkws.PullMessageBySeqsReq, opts ...grpc.CallOption) (*sdkws.PullMessageBySeqsResp, error) { - out := new(sdkws.PullMessageBySeqsResp) - err := c.cc.Invoke(ctx, "/OpenIMServer.msg.msg/PullMessageBySeqs", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *msgClient) SearchMessage(ctx context.Context, in *SearchMessageReq, opts ...grpc.CallOption) (*SearchMessageResp, error) { - out := new(SearchMessageResp) - err := c.cc.Invoke(ctx, "/OpenIMServer.msg.msg/SearchMessage", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *msgClient) SendMsg(ctx context.Context, in *SendMsgReq, opts ...grpc.CallOption) (*SendMsgResp, error) { - out := new(SendMsgResp) - err := c.cc.Invoke(ctx, "/OpenIMServer.msg.msg/SendMsg", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *msgClient) ClearConversationsMsg(ctx context.Context, in *ClearConversationsMsgReq, opts ...grpc.CallOption) (*ClearConversationsMsgResp, error) { - out := new(ClearConversationsMsgResp) - err := c.cc.Invoke(ctx, "/OpenIMServer.msg.msg/ClearConversationsMsg", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *msgClient) UserClearAllMsg(ctx context.Context, in *UserClearAllMsgReq, opts ...grpc.CallOption) (*UserClearAllMsgResp, error) { - out := new(UserClearAllMsgResp) - err := c.cc.Invoke(ctx, "/OpenIMServer.msg.msg/UserClearAllMsg", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *msgClient) DeleteMsgs(ctx context.Context, in *DeleteMsgsReq, opts ...grpc.CallOption) (*DeleteMsgsResp, error) { - out := new(DeleteMsgsResp) - err := c.cc.Invoke(ctx, "/OpenIMServer.msg.msg/DeleteMsgs", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *msgClient) DeleteMsgPhysicalBySeq(ctx context.Context, in *DeleteMsgPhysicalBySeqReq, opts ...grpc.CallOption) (*DeleteMsgPhysicalBySeqResp, error) { - out := new(DeleteMsgPhysicalBySeqResp) - err := c.cc.Invoke(ctx, "/OpenIMServer.msg.msg/DeleteMsgPhysicalBySeq", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *msgClient) DeleteMsgPhysical(ctx context.Context, in *DeleteMsgPhysicalReq, opts ...grpc.CallOption) (*DeleteMsgPhysicalResp, error) { - out := new(DeleteMsgPhysicalResp) - err := c.cc.Invoke(ctx, "/OpenIMServer.msg.msg/DeleteMsgPhysical", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *msgClient) SetSendMsgStatus(ctx context.Context, in *SetSendMsgStatusReq, opts ...grpc.CallOption) (*SetSendMsgStatusResp, error) { - out := new(SetSendMsgStatusResp) - err := c.cc.Invoke(ctx, "/OpenIMServer.msg.msg/SetSendMsgStatus", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *msgClient) GetSendMsgStatus(ctx context.Context, in *GetSendMsgStatusReq, opts ...grpc.CallOption) (*GetSendMsgStatusResp, error) { - out := new(GetSendMsgStatusResp) - err := c.cc.Invoke(ctx, "/OpenIMServer.msg.msg/GetSendMsgStatus", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *msgClient) RevokeMsg(ctx context.Context, in *RevokeMsgReq, opts ...grpc.CallOption) (*RevokeMsgResp, error) { - out := new(RevokeMsgResp) - err := c.cc.Invoke(ctx, "/OpenIMServer.msg.msg/RevokeMsg", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *msgClient) MarkMsgsAsRead(ctx context.Context, in *MarkMsgsAsReadReq, opts ...grpc.CallOption) (*MarkMsgsAsReadResp, error) { - out := new(MarkMsgsAsReadResp) - err := c.cc.Invoke(ctx, "/OpenIMServer.msg.msg/MarkMsgsAsRead", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *msgClient) MarkConversationAsRead(ctx context.Context, in *MarkConversationAsReadReq, opts ...grpc.CallOption) (*MarkConversationAsReadResp, error) { - out := new(MarkConversationAsReadResp) - err := c.cc.Invoke(ctx, "/OpenIMServer.msg.msg/MarkConversationAsRead", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *msgClient) SetConversationHasReadSeq(ctx context.Context, in *SetConversationHasReadSeqReq, opts ...grpc.CallOption) (*SetConversationHasReadSeqResp, error) { - out := new(SetConversationHasReadSeqResp) - err := c.cc.Invoke(ctx, "/OpenIMServer.msg.msg/SetConversationHasReadSeq", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *msgClient) GetConversationsHasReadAndMaxSeq(ctx context.Context, in *GetConversationsHasReadAndMaxSeqReq, opts ...grpc.CallOption) (*GetConversationsHasReadAndMaxSeqResp, error) { - out := new(GetConversationsHasReadAndMaxSeqResp) - err := c.cc.Invoke(ctx, "/OpenIMServer.msg.msg/GetConversationsHasReadAndMaxSeq", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *msgClient) GetActiveUser(ctx context.Context, in *GetActiveUserReq, opts ...grpc.CallOption) (*GetActiveUserResp, error) { - out := new(GetActiveUserResp) - err := c.cc.Invoke(ctx, "/OpenIMServer.msg.msg/GetActiveUser", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *msgClient) GetActiveGroup(ctx context.Context, in *GetActiveGroupReq, opts ...grpc.CallOption) (*GetActiveGroupResp, error) { - out := new(GetActiveGroupResp) - err := c.cc.Invoke(ctx, "/OpenIMServer.msg.msg/GetActiveGroup", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// MsgServer is the server API for Msg service. -type MsgServer interface { - // 获取最小最大seq(包括用户的,以及指定群组的) - GetMaxSeq(context.Context, *sdkws.GetMaxSeqReq) (*sdkws.GetMaxSeqResp, error) - GetConversationMaxSeq(context.Context, *GetConversationMaxSeqReq) (*GetConversationMaxSeqResp, error) - // 拉取历史消息(包括用户的,以及指定群组的) - PullMessageBySeqs(context.Context, *sdkws.PullMessageBySeqsReq) (*sdkws.PullMessageBySeqsResp, error) - SearchMessage(context.Context, *SearchMessageReq) (*SearchMessageResp, error) - // 发送消息 - SendMsg(context.Context, *SendMsgReq) (*SendMsgResp, error) - // 全量清空指定会话消息 重置min seq 比最大seq大1 - ClearConversationsMsg(context.Context, *ClearConversationsMsgReq) (*ClearConversationsMsgResp, error) - // 删除用户全部消息 重置min seq 比最大seq大1 - UserClearAllMsg(context.Context, *UserClearAllMsgReq) (*UserClearAllMsgResp, error) - // 用户标记删除部分消息by Seq - DeleteMsgs(context.Context, *DeleteMsgsReq) (*DeleteMsgsResp, error) - // seq物理删除消息 - DeleteMsgPhysicalBySeq(context.Context, *DeleteMsgPhysicalBySeqReq) (*DeleteMsgPhysicalBySeqResp, error) - // 物理删除消息by 时间 - DeleteMsgPhysical(context.Context, *DeleteMsgPhysicalReq) (*DeleteMsgPhysicalResp, error) - // 设置消息是否发送成功-针对api发送的消息 - SetSendMsgStatus(context.Context, *SetSendMsgStatusReq) (*SetSendMsgStatusResp, error) - // 获取消息发送状态 - GetSendMsgStatus(context.Context, *GetSendMsgStatusReq) (*GetSendMsgStatusResp, error) - RevokeMsg(context.Context, *RevokeMsgReq) (*RevokeMsgResp, error) - // mark as read - MarkMsgsAsRead(context.Context, *MarkMsgsAsReadReq) (*MarkMsgsAsReadResp, error) - MarkConversationAsRead(context.Context, *MarkConversationAsReadReq) (*MarkConversationAsReadResp, error) - SetConversationHasReadSeq(context.Context, *SetConversationHasReadSeqReq) (*SetConversationHasReadSeqResp, error) - GetConversationsHasReadAndMaxSeq(context.Context, *GetConversationsHasReadAndMaxSeqReq) (*GetConversationsHasReadAndMaxSeqResp, error) - GetActiveUser(context.Context, *GetActiveUserReq) (*GetActiveUserResp, error) - GetActiveGroup(context.Context, *GetActiveGroupReq) (*GetActiveGroupResp, error) -} - -// UnimplementedMsgServer can be embedded to have forward compatible implementations. -type UnimplementedMsgServer struct { -} - -func (*UnimplementedMsgServer) GetMaxSeq(context.Context, *sdkws.GetMaxSeqReq) (*sdkws.GetMaxSeqResp, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetMaxSeq not implemented") -} -func (*UnimplementedMsgServer) GetConversationMaxSeq(context.Context, *GetConversationMaxSeqReq) (*GetConversationMaxSeqResp, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetConversationMaxSeq not implemented") -} -func (*UnimplementedMsgServer) PullMessageBySeqs(context.Context, *sdkws.PullMessageBySeqsReq) (*sdkws.PullMessageBySeqsResp, error) { - return nil, status.Errorf(codes.Unimplemented, "method PullMessageBySeqs not implemented") -} -func (*UnimplementedMsgServer) SearchMessage(context.Context, *SearchMessageReq) (*SearchMessageResp, error) { - return nil, status.Errorf(codes.Unimplemented, "method SearchMessage not implemented") -} -func (*UnimplementedMsgServer) SendMsg(context.Context, *SendMsgReq) (*SendMsgResp, error) { - return nil, status.Errorf(codes.Unimplemented, "method SendMsg not implemented") -} -func (*UnimplementedMsgServer) ClearConversationsMsg(context.Context, *ClearConversationsMsgReq) (*ClearConversationsMsgResp, error) { - return nil, status.Errorf(codes.Unimplemented, "method ClearConversationsMsg not implemented") -} -func (*UnimplementedMsgServer) UserClearAllMsg(context.Context, *UserClearAllMsgReq) (*UserClearAllMsgResp, error) { - return nil, status.Errorf(codes.Unimplemented, "method UserClearAllMsg not implemented") -} -func (*UnimplementedMsgServer) DeleteMsgs(context.Context, *DeleteMsgsReq) (*DeleteMsgsResp, error) { - return nil, status.Errorf(codes.Unimplemented, "method DeleteMsgs not implemented") -} -func (*UnimplementedMsgServer) DeleteMsgPhysicalBySeq(context.Context, *DeleteMsgPhysicalBySeqReq) (*DeleteMsgPhysicalBySeqResp, error) { - return nil, status.Errorf(codes.Unimplemented, "method DeleteMsgPhysicalBySeq not implemented") -} -func (*UnimplementedMsgServer) DeleteMsgPhysical(context.Context, *DeleteMsgPhysicalReq) (*DeleteMsgPhysicalResp, error) { - return nil, status.Errorf(codes.Unimplemented, "method DeleteMsgPhysical not implemented") -} -func (*UnimplementedMsgServer) SetSendMsgStatus(context.Context, *SetSendMsgStatusReq) (*SetSendMsgStatusResp, error) { - return nil, status.Errorf(codes.Unimplemented, "method SetSendMsgStatus not implemented") -} -func (*UnimplementedMsgServer) GetSendMsgStatus(context.Context, *GetSendMsgStatusReq) (*GetSendMsgStatusResp, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetSendMsgStatus not implemented") -} -func (*UnimplementedMsgServer) RevokeMsg(context.Context, *RevokeMsgReq) (*RevokeMsgResp, error) { - return nil, status.Errorf(codes.Unimplemented, "method RevokeMsg not implemented") -} -func (*UnimplementedMsgServer) MarkMsgsAsRead(context.Context, *MarkMsgsAsReadReq) (*MarkMsgsAsReadResp, error) { - return nil, status.Errorf(codes.Unimplemented, "method MarkMsgsAsRead not implemented") -} -func (*UnimplementedMsgServer) MarkConversationAsRead(context.Context, *MarkConversationAsReadReq) (*MarkConversationAsReadResp, error) { - return nil, status.Errorf(codes.Unimplemented, "method MarkConversationAsRead not implemented") -} -func (*UnimplementedMsgServer) SetConversationHasReadSeq(context.Context, *SetConversationHasReadSeqReq) (*SetConversationHasReadSeqResp, error) { - return nil, status.Errorf(codes.Unimplemented, "method SetConversationHasReadSeq not implemented") -} -func (*UnimplementedMsgServer) GetConversationsHasReadAndMaxSeq(context.Context, *GetConversationsHasReadAndMaxSeqReq) (*GetConversationsHasReadAndMaxSeqResp, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetConversationsHasReadAndMaxSeq not implemented") -} -func (*UnimplementedMsgServer) GetActiveUser(context.Context, *GetActiveUserReq) (*GetActiveUserResp, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetActiveUser not implemented") -} -func (*UnimplementedMsgServer) GetActiveGroup(context.Context, *GetActiveGroupReq) (*GetActiveGroupResp, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetActiveGroup not implemented") -} - -func RegisterMsgServer(s *grpc.Server, srv MsgServer) { - s.RegisterService(&_Msg_serviceDesc, srv) -} - -func _Msg_GetMaxSeq_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(sdkws.GetMaxSeqReq) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).GetMaxSeq(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/OpenIMServer.msg.msg/GetMaxSeq", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).GetMaxSeq(ctx, req.(*sdkws.GetMaxSeqReq)) - } - return interceptor(ctx, in, info, handler) -} - -func _Msg_GetConversationMaxSeq_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetConversationMaxSeqReq) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).GetConversationMaxSeq(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/OpenIMServer.msg.msg/GetConversationMaxSeq", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).GetConversationMaxSeq(ctx, req.(*GetConversationMaxSeqReq)) - } - return interceptor(ctx, in, info, handler) -} - -func _Msg_PullMessageBySeqs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(sdkws.PullMessageBySeqsReq) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).PullMessageBySeqs(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/OpenIMServer.msg.msg/PullMessageBySeqs", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).PullMessageBySeqs(ctx, req.(*sdkws.PullMessageBySeqsReq)) - } - return interceptor(ctx, in, info, handler) -} - -func _Msg_SearchMessage_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(SearchMessageReq) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).SearchMessage(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/OpenIMServer.msg.msg/SearchMessage", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).SearchMessage(ctx, req.(*SearchMessageReq)) - } - return interceptor(ctx, in, info, handler) -} - -func _Msg_SendMsg_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(SendMsgReq) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).SendMsg(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/OpenIMServer.msg.msg/SendMsg", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).SendMsg(ctx, req.(*SendMsgReq)) - } - return interceptor(ctx, in, info, handler) -} - -func _Msg_ClearConversationsMsg_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ClearConversationsMsgReq) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).ClearConversationsMsg(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/OpenIMServer.msg.msg/ClearConversationsMsg", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).ClearConversationsMsg(ctx, req.(*ClearConversationsMsgReq)) - } - return interceptor(ctx, in, info, handler) -} - -func _Msg_UserClearAllMsg_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(UserClearAllMsgReq) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).UserClearAllMsg(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/OpenIMServer.msg.msg/UserClearAllMsg", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).UserClearAllMsg(ctx, req.(*UserClearAllMsgReq)) - } - return interceptor(ctx, in, info, handler) -} - -func _Msg_DeleteMsgs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DeleteMsgsReq) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).DeleteMsgs(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/OpenIMServer.msg.msg/DeleteMsgs", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).DeleteMsgs(ctx, req.(*DeleteMsgsReq)) - } - return interceptor(ctx, in, info, handler) -} - -func _Msg_DeleteMsgPhysicalBySeq_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DeleteMsgPhysicalBySeqReq) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).DeleteMsgPhysicalBySeq(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/OpenIMServer.msg.msg/DeleteMsgPhysicalBySeq", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).DeleteMsgPhysicalBySeq(ctx, req.(*DeleteMsgPhysicalBySeqReq)) - } - return interceptor(ctx, in, info, handler) -} - -func _Msg_DeleteMsgPhysical_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DeleteMsgPhysicalReq) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).DeleteMsgPhysical(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/OpenIMServer.msg.msg/DeleteMsgPhysical", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).DeleteMsgPhysical(ctx, req.(*DeleteMsgPhysicalReq)) - } - return interceptor(ctx, in, info, handler) -} - -func _Msg_SetSendMsgStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(SetSendMsgStatusReq) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).SetSendMsgStatus(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/OpenIMServer.msg.msg/SetSendMsgStatus", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).SetSendMsgStatus(ctx, req.(*SetSendMsgStatusReq)) - } - return interceptor(ctx, in, info, handler) -} - -func _Msg_GetSendMsgStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetSendMsgStatusReq) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).GetSendMsgStatus(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/OpenIMServer.msg.msg/GetSendMsgStatus", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).GetSendMsgStatus(ctx, req.(*GetSendMsgStatusReq)) - } - return interceptor(ctx, in, info, handler) -} - -func _Msg_RevokeMsg_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(RevokeMsgReq) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).RevokeMsg(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/OpenIMServer.msg.msg/RevokeMsg", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).RevokeMsg(ctx, req.(*RevokeMsgReq)) - } - return interceptor(ctx, in, info, handler) -} - -func _Msg_MarkMsgsAsRead_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MarkMsgsAsReadReq) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).MarkMsgsAsRead(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/OpenIMServer.msg.msg/MarkMsgsAsRead", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).MarkMsgsAsRead(ctx, req.(*MarkMsgsAsReadReq)) - } - return interceptor(ctx, in, info, handler) -} - -func _Msg_MarkConversationAsRead_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MarkConversationAsReadReq) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).MarkConversationAsRead(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/OpenIMServer.msg.msg/MarkConversationAsRead", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).MarkConversationAsRead(ctx, req.(*MarkConversationAsReadReq)) - } - return interceptor(ctx, in, info, handler) -} - -func _Msg_SetConversationHasReadSeq_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(SetConversationHasReadSeqReq) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).SetConversationHasReadSeq(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/OpenIMServer.msg.msg/SetConversationHasReadSeq", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).SetConversationHasReadSeq(ctx, req.(*SetConversationHasReadSeqReq)) - } - return interceptor(ctx, in, info, handler) -} - -func _Msg_GetConversationsHasReadAndMaxSeq_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetConversationsHasReadAndMaxSeqReq) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).GetConversationsHasReadAndMaxSeq(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/OpenIMServer.msg.msg/GetConversationsHasReadAndMaxSeq", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).GetConversationsHasReadAndMaxSeq(ctx, req.(*GetConversationsHasReadAndMaxSeqReq)) - } - return interceptor(ctx, in, info, handler) -} - -func _Msg_GetActiveUser_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetActiveUserReq) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).GetActiveUser(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/OpenIMServer.msg.msg/GetActiveUser", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).GetActiveUser(ctx, req.(*GetActiveUserReq)) - } - return interceptor(ctx, in, info, handler) -} - -func _Msg_GetActiveGroup_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetActiveGroupReq) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).GetActiveGroup(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/OpenIMServer.msg.msg/GetActiveGroup", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).GetActiveGroup(ctx, req.(*GetActiveGroupReq)) - } - return interceptor(ctx, in, info, handler) -} - -var _Msg_serviceDesc = grpc.ServiceDesc{ - ServiceName: "OpenIMServer.msg.msg", - HandlerType: (*MsgServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "GetMaxSeq", - Handler: _Msg_GetMaxSeq_Handler, - }, - { - MethodName: "GetConversationMaxSeq", - Handler: _Msg_GetConversationMaxSeq_Handler, - }, - { - MethodName: "PullMessageBySeqs", - Handler: _Msg_PullMessageBySeqs_Handler, - }, - { - MethodName: "SearchMessage", - Handler: _Msg_SearchMessage_Handler, - }, - { - MethodName: "SendMsg", - Handler: _Msg_SendMsg_Handler, - }, - { - MethodName: "ClearConversationsMsg", - Handler: _Msg_ClearConversationsMsg_Handler, - }, - { - MethodName: "UserClearAllMsg", - Handler: _Msg_UserClearAllMsg_Handler, - }, - { - MethodName: "DeleteMsgs", - Handler: _Msg_DeleteMsgs_Handler, - }, - { - MethodName: "DeleteMsgPhysicalBySeq", - Handler: _Msg_DeleteMsgPhysicalBySeq_Handler, - }, - { - MethodName: "DeleteMsgPhysical", - Handler: _Msg_DeleteMsgPhysical_Handler, - }, - { - MethodName: "SetSendMsgStatus", - Handler: _Msg_SetSendMsgStatus_Handler, - }, - { - MethodName: "GetSendMsgStatus", - Handler: _Msg_GetSendMsgStatus_Handler, - }, - { - MethodName: "RevokeMsg", - Handler: _Msg_RevokeMsg_Handler, - }, - { - MethodName: "MarkMsgsAsRead", - Handler: _Msg_MarkMsgsAsRead_Handler, - }, - { - MethodName: "MarkConversationAsRead", - Handler: _Msg_MarkConversationAsRead_Handler, - }, - { - MethodName: "SetConversationHasReadSeq", - Handler: _Msg_SetConversationHasReadSeq_Handler, - }, - { - MethodName: "GetConversationsHasReadAndMaxSeq", - Handler: _Msg_GetConversationsHasReadAndMaxSeq_Handler, - }, - { - MethodName: "GetActiveUser", - Handler: _Msg_GetActiveUser_Handler, - }, - { - MethodName: "GetActiveGroup", - Handler: _Msg_GetActiveGroup_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "msg/msg.proto", -} diff --git a/pkg/proto/msg/msg.proto b/pkg/proto/msg/msg.proto deleted file mode 100644 index af1d137b9..000000000 --- a/pkg/proto/msg/msg.proto +++ /dev/null @@ -1,319 +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. - -syntax = "proto3"; -package OpenIMServer.msg; -import "sdkws/sdkws.proto"; -// import "wrapperspb/wrapperspb.proto"; -option go_package = "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/msg"; - -message MsgDataToMQ{ - string token = 1; - sdkws.MsgData msgData = 2; -} - - -message MsgDataToDB { - sdkws.MsgData msgData = 1; -} - -message PushMsgDataToMQ{ - sdkws.MsgData msgData = 1; - string conversationID = 2; -} - -message MsgDataToMongoByMQ{ - int64 lastSeq = 1; - string conversationID = 2; - repeated sdkws.MsgData msgData = 3; -} - -message GetMaxAndMinSeqReq { - string UserID = 1; -} -message GetMaxAndMinSeqResp { - int64 MaxSeq = 1; - int64 MinSeq = 2; -} - -message SendMsgReq { - sdkws.MsgData msgData = 3; -} - -message SendMsgResp { - string serverMsgID = 1; - string clientMsgID = 2; - int64 sendTime = 3; -} - - - -message SetSendMsgStatusReq{ - int32 status = 1; -} - -message SetSendMsgStatusResp{ -} - -message GetSendMsgStatusReq{ -} - -message GetSendMsgStatusResp{ - int32 status = 1; -} - - -message MsgDataToModifyByMQ{ - repeated sdkws.MsgData messages = 1; - string conversationID = 2; -} - -message DelMsgsReq{ -} - -message DelMsgsResp{ -} - -message RevokeMsgReq { - string conversationID = 1; - int64 seq = 2; - string userID = 3; -} - -message RevokeMsgResp { -} - -message MarkMsgsAsReadReq { - string conversationID = 1; - repeated int64 seqs = 2; - string userID = 3; -} - -message MarkMsgsAsReadResp { -} - -message MarkConversationAsReadReq { - string conversationID = 1; - string userID = 2; - int64 hasReadSeq = 3; - repeated int64 seqs = 4; -} - -message MarkConversationAsReadResp { -} - -message SetConversationHasReadSeqReq { - string conversationID = 1; - string userID = 2; - int64 hasReadSeq = 3; -} - -message SetConversationHasReadSeqResp { -} - -message DeleteSyncOpt { - bool IsSyncSelf = 3; - bool IsSyncOther = 4; -} - -message ClearConversationsMsgReq { - repeated string conversationIDs = 1; - string userID = 2; - DeleteSyncOpt deleteSyncOpt = 3; -} - -message ClearConversationsMsgResp { -} - -message UserClearAllMsgReq { - string userID = 1; - DeleteSyncOpt deleteSyncOpt = 3; -} - -message UserClearAllMsgResp { -} - -message DeleteMsgsReq { - string conversationID = 1; - repeated int64 seqs = 2; - string userID = 3; - DeleteSyncOpt deleteSyncOpt = 4; -} - -message DeleteMsgsResp { -} - -message DeleteMsgPhysicalReq { - repeated string conversationIDs = 1; - int64 timestamp = 2; -} - -message DeleteMsgPhysicalResp { -} - -message DeleteMsgPhysicalBySeqReq { - string conversationID = 1; - repeated int64 seqs = 2; -} - -message DeleteMsgPhysicalBySeqResp { - -} - -message GetConversationMaxSeqReq { - string conversationID = 1; -} - -message GetConversationMaxSeqResp { - int64 maxSeq = 1; -} - - -message GetConversationsHasReadAndMaxSeqReq { - string userID = 1; -} - -message Seqs { - int64 maxSeq = 1; - int64 hasReadSeq = 2; -} - -message GetConversationsHasReadAndMaxSeqResp { - map seqs = 1; -} - -message GetActiveUserReq { - int64 start = 1; - int64 end = 2; - bool ase = 3; - bool group = 4; - sdkws.RequestPagination pagination = 5; -} - -message ActiveUser { - sdkws.UserInfo user = 1; - int64 count = 2; -} - -message GetActiveUserResp { - int64 msgCount = 1; - int64 userCount = 2; - map dateCount = 3; - repeated ActiveUser users = 4; -} - -message GetActiveGroupReq { - int64 start = 1; - int64 end = 2; - bool ase = 3; - sdkws.RequestPagination pagination = 4; -} - -message ActiveGroup { - sdkws.GroupInfo group = 1; - int64 count = 2; -} - -message GetActiveGroupResp { - int64 msgCount = 1; - int64 groupCount = 2; - map dateCount = 3; - repeated ActiveGroup groups = 4; -} - -message SearchMessageReq{ - string sendID=1;//发送者ID - string recvID=2;//接收者ID - int32 msgType=3; - string sendTime=4; - int32 sessionType=5; - sdkws.RequestPagination pagination = 6; -} - -message SearchMessageResp{ - repeated ChatLog chatLogs=1; - int32 chatLogsNum = 2; -} - - -message ChatLog { - string serverMsgID = 1; - string clientMsgID = 2; - string sendID = 3; - string recvID = 4; - string groupID = 5; - string recvNickname = 6; - int32 senderPlatformID = 7; - string senderNickname = 8; - string senderFaceURL = 9; - string groupName = 10; - int32 sessionType = 11; - int32 msgFrom = 12; - int32 contentType = 13; - string content = 14; - int32 status = 15; - int64 sendTime = 16; - int64 createTime = 17; - string ex = 18; - string groupFaceURL=19; - uint32 groupMemberCount=20; - int64 seq=21; - string groupOwner=22; - int32 groupType=23; -} - -message batchSendMessageReq{ - repeated string recvIDList=1; - sdkws.MsgData msgData = 2; -} - -message batchSendMessageResp{ -} - -service msg { - //获取最小最大seq(包括用户的,以及指定群组的) - rpc GetMaxSeq(sdkws.GetMaxSeqReq) returns(sdkws.GetMaxSeqResp); - rpc GetConversationMaxSeq(GetConversationMaxSeqReq) returns(GetConversationMaxSeqResp); - //拉取历史消息(包括用户的,以及指定群组的) - rpc PullMessageBySeqs(sdkws.PullMessageBySeqsReq) returns(sdkws.PullMessageBySeqsResp); - rpc SearchMessage(SearchMessageReq) returns(SearchMessageResp); - //发送消息 - rpc SendMsg(SendMsgReq) returns(SendMsgResp); - - // 全量清空指定会话消息 重置min seq 比最大seq大1 - rpc ClearConversationsMsg(ClearConversationsMsgReq) returns(ClearConversationsMsgResp); - // 删除用户全部消息 重置min seq 比最大seq大1 - rpc UserClearAllMsg(UserClearAllMsgReq) returns(UserClearAllMsgResp); - // 用户标记删除部分消息by Seq - rpc DeleteMsgs(DeleteMsgsReq) returns(DeleteMsgsResp); - // seq物理删除消息 - rpc DeleteMsgPhysicalBySeq(DeleteMsgPhysicalBySeqReq) returns(DeleteMsgPhysicalBySeqResp); - // 物理删除消息by 时间 - rpc DeleteMsgPhysical(DeleteMsgPhysicalReq) returns(DeleteMsgPhysicalResp); - - //设置消息是否发送成功-针对api发送的消息 - rpc SetSendMsgStatus(SetSendMsgStatusReq) returns(SetSendMsgStatusResp); - //获取消息发送状态 - rpc GetSendMsgStatus(GetSendMsgStatusReq) returns(GetSendMsgStatusResp); - rpc RevokeMsg(RevokeMsgReq) returns(RevokeMsgResp); - // mark as read - rpc MarkMsgsAsRead(MarkMsgsAsReadReq) returns(MarkMsgsAsReadResp); - rpc MarkConversationAsRead(MarkConversationAsReadReq) returns(MarkConversationAsReadResp); - rpc SetConversationHasReadSeq(SetConversationHasReadSeqReq) returns(SetConversationHasReadSeqResp); - - rpc GetConversationsHasReadAndMaxSeq(GetConversationsHasReadAndMaxSeqReq) returns(GetConversationsHasReadAndMaxSeqResp); - - rpc GetActiveUser(GetActiveUserReq) returns(GetActiveUserResp); - rpc GetActiveGroup(GetActiveGroupReq) returns(GetActiveGroupResp); -} diff --git a/pkg/proto/msggateway/msggateway.go b/pkg/proto/msggateway/msggateway.go deleted file mode 100644 index 5e0c85b45..000000000 --- a/pkg/proto/msggateway/msggateway.go +++ /dev/null @@ -1,73 +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. - -package msggateway - -import "github.com/OpenIMSDK/Open-IM-Server/pkg/errs" - -func (x *OnlinePushMsgReq) Check() error { - if x.MsgData == nil { - return errs.ErrArgs.Wrap("MsgData is empty") - } - if err := x.MsgData.Check(); err != nil { - return err - } - if x.PushToUserID == "" { - return errs.ErrArgs.Wrap("PushToUserID is empty") - } - return nil -} - -func (x *OnlineBatchPushOneMsgReq) Check() error { - if x.MsgData == nil { - return errs.ErrArgs.Wrap("MsgData is empty") - } - if err := x.MsgData.Check(); err != nil { - return err - } - if x.PushToUserIDs == nil { - return errs.ErrArgs.Wrap("PushToUserIDs is empty") - } - return nil -} - -func (x *GetUsersOnlineStatusReq) Check() error { - if x.UserIDs == nil { - return errs.ErrArgs.Wrap("UserIDs is empty") - } - return nil -} - -func (x *KickUserOfflineReq) Check() error { - if x.PlatformID < 1 || x.PlatformID > 9 { - return errs.ErrArgs.Wrap("PlatformID is invalid") - } - if x.KickUserIDList == nil { - return errs.ErrArgs.Wrap("KickUserIDList is empty") - } - return nil -} - -func (x *MultiTerminalLoginCheckReq) Check() error { - if x.PlatformID < 1 || x.PlatformID > 9 { - return errs.ErrArgs.Wrap("PlatformID is invalid") - } - if x.UserID == "" { - return errs.ErrArgs.Wrap("UserID is empty") - } - if x.Token == "" { - return errs.ErrArgs.Wrap("Token is empty") - } - return nil -} diff --git a/pkg/proto/msggateway/msggateway.pb.go b/pkg/proto/msggateway/msggateway.pb.go deleted file mode 100644 index d922d98b4..000000000 --- a/pkg/proto/msggateway/msggateway.pb.go +++ /dev/null @@ -1,1724 +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. - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.29.1 -// protoc v4.22.0 -// source: msggateway/msggateway.proto - -package msggateway - -import ( - context "context" - sdkws "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/sdkws" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type OnlinePushMsgReq struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - MsgData *sdkws.MsgData `protobuf:"bytes,1,opt,name=msgData,proto3" json:"msgData"` - PushToUserID string `protobuf:"bytes,2,opt,name=pushToUserID,proto3" json:"pushToUserID"` -} - -func (x *OnlinePushMsgReq) Reset() { - *x = OnlinePushMsgReq{} - if protoimpl.UnsafeEnabled { - mi := &file_msggateway_msggateway_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *OnlinePushMsgReq) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*OnlinePushMsgReq) ProtoMessage() {} - -func (x *OnlinePushMsgReq) ProtoReflect() protoreflect.Message { - mi := &file_msggateway_msggateway_proto_msgTypes[0] - 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 OnlinePushMsgReq.ProtoReflect.Descriptor instead. -func (*OnlinePushMsgReq) Descriptor() ([]byte, []int) { - return file_msggateway_msggateway_proto_rawDescGZIP(), []int{0} -} - -func (x *OnlinePushMsgReq) GetMsgData() *sdkws.MsgData { - if x != nil { - return x.MsgData - } - return nil -} - -func (x *OnlinePushMsgReq) GetPushToUserID() string { - if x != nil { - return x.PushToUserID - } - return "" -} - -type OnlinePushMsgResp struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Resp []*SingleMsgToUserPlatform `protobuf:"bytes,1,rep,name=resp,proto3" json:"resp"` -} - -func (x *OnlinePushMsgResp) Reset() { - *x = OnlinePushMsgResp{} - if protoimpl.UnsafeEnabled { - mi := &file_msggateway_msggateway_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *OnlinePushMsgResp) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*OnlinePushMsgResp) ProtoMessage() {} - -func (x *OnlinePushMsgResp) ProtoReflect() protoreflect.Message { - mi := &file_msggateway_msggateway_proto_msgTypes[1] - 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 OnlinePushMsgResp.ProtoReflect.Descriptor instead. -func (*OnlinePushMsgResp) Descriptor() ([]byte, []int) { - return file_msggateway_msggateway_proto_rawDescGZIP(), []int{1} -} - -func (x *OnlinePushMsgResp) GetResp() []*SingleMsgToUserPlatform { - if x != nil { - return x.Resp - } - return nil -} - -type SingleMsgToUserResults struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - UserID string `protobuf:"bytes,1,opt,name=userID,proto3" json:"userID"` - Resp []*SingleMsgToUserPlatform `protobuf:"bytes,2,rep,name=resp,proto3" json:"resp"` - OnlinePush bool `protobuf:"varint,3,opt,name=onlinePush,proto3" json:"onlinePush"` -} - -func (x *SingleMsgToUserResults) Reset() { - *x = SingleMsgToUserResults{} - if protoimpl.UnsafeEnabled { - mi := &file_msggateway_msggateway_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SingleMsgToUserResults) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SingleMsgToUserResults) ProtoMessage() {} - -func (x *SingleMsgToUserResults) ProtoReflect() protoreflect.Message { - mi := &file_msggateway_msggateway_proto_msgTypes[2] - 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 SingleMsgToUserResults.ProtoReflect.Descriptor instead. -func (*SingleMsgToUserResults) Descriptor() ([]byte, []int) { - return file_msggateway_msggateway_proto_rawDescGZIP(), []int{2} -} - -func (x *SingleMsgToUserResults) GetUserID() string { - if x != nil { - return x.UserID - } - return "" -} - -func (x *SingleMsgToUserResults) GetResp() []*SingleMsgToUserPlatform { - if x != nil { - return x.Resp - } - return nil -} - -func (x *SingleMsgToUserResults) GetOnlinePush() bool { - if x != nil { - return x.OnlinePush - } - return false -} - -type OnlineBatchPushOneMsgReq struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - MsgData *sdkws.MsgData `protobuf:"bytes,1,opt,name=msgData,proto3" json:"msgData"` - PushToUserIDs []string `protobuf:"bytes,2,rep,name=pushToUserIDs,proto3" json:"pushToUserIDs"` -} - -func (x *OnlineBatchPushOneMsgReq) Reset() { - *x = OnlineBatchPushOneMsgReq{} - if protoimpl.UnsafeEnabled { - mi := &file_msggateway_msggateway_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *OnlineBatchPushOneMsgReq) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*OnlineBatchPushOneMsgReq) ProtoMessage() {} - -func (x *OnlineBatchPushOneMsgReq) ProtoReflect() protoreflect.Message { - mi := &file_msggateway_msggateway_proto_msgTypes[3] - 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 OnlineBatchPushOneMsgReq.ProtoReflect.Descriptor instead. -func (*OnlineBatchPushOneMsgReq) Descriptor() ([]byte, []int) { - return file_msggateway_msggateway_proto_rawDescGZIP(), []int{3} -} - -func (x *OnlineBatchPushOneMsgReq) GetMsgData() *sdkws.MsgData { - if x != nil { - return x.MsgData - } - return nil -} - -func (x *OnlineBatchPushOneMsgReq) GetPushToUserIDs() []string { - if x != nil { - return x.PushToUserIDs - } - return nil -} - -type OnlineBatchPushOneMsgResp struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - SinglePushResult []*SingleMsgToUserResults `protobuf:"bytes,1,rep,name=singlePushResult,proto3" json:"singlePushResult"` -} - -func (x *OnlineBatchPushOneMsgResp) Reset() { - *x = OnlineBatchPushOneMsgResp{} - if protoimpl.UnsafeEnabled { - mi := &file_msggateway_msggateway_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *OnlineBatchPushOneMsgResp) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*OnlineBatchPushOneMsgResp) ProtoMessage() {} - -func (x *OnlineBatchPushOneMsgResp) ProtoReflect() protoreflect.Message { - mi := &file_msggateway_msggateway_proto_msgTypes[4] - 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 OnlineBatchPushOneMsgResp.ProtoReflect.Descriptor instead. -func (*OnlineBatchPushOneMsgResp) Descriptor() ([]byte, []int) { - return file_msggateway_msggateway_proto_rawDescGZIP(), []int{4} -} - -func (x *OnlineBatchPushOneMsgResp) GetSinglePushResult() []*SingleMsgToUserResults { - if x != nil { - return x.SinglePushResult - } - return nil -} - -type SingleMsgToUserPlatform struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - ResultCode int64 `protobuf:"varint,1,opt,name=ResultCode,proto3" json:"ResultCode"` - RecvID string `protobuf:"bytes,2,opt,name=RecvID,proto3" json:"RecvID"` - RecvPlatFormID int32 `protobuf:"varint,3,opt,name=RecvPlatFormID,proto3" json:"RecvPlatFormID"` -} - -func (x *SingleMsgToUserPlatform) Reset() { - *x = SingleMsgToUserPlatform{} - if protoimpl.UnsafeEnabled { - mi := &file_msggateway_msggateway_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SingleMsgToUserPlatform) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SingleMsgToUserPlatform) ProtoMessage() {} - -func (x *SingleMsgToUserPlatform) ProtoReflect() protoreflect.Message { - mi := &file_msggateway_msggateway_proto_msgTypes[5] - 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 SingleMsgToUserPlatform.ProtoReflect.Descriptor instead. -func (*SingleMsgToUserPlatform) Descriptor() ([]byte, []int) { - return file_msggateway_msggateway_proto_rawDescGZIP(), []int{5} -} - -func (x *SingleMsgToUserPlatform) GetResultCode() int64 { - if x != nil { - return x.ResultCode - } - return 0 -} - -func (x *SingleMsgToUserPlatform) GetRecvID() string { - if x != nil { - return x.RecvID - } - return "" -} - -func (x *SingleMsgToUserPlatform) GetRecvPlatFormID() int32 { - if x != nil { - return x.RecvPlatFormID - } - return 0 -} - -type GetUsersOnlineStatusReq struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - UserIDs []string `protobuf:"bytes,1,rep,name=userIDs,proto3" json:"userIDs"` -} - -func (x *GetUsersOnlineStatusReq) Reset() { - *x = GetUsersOnlineStatusReq{} - if protoimpl.UnsafeEnabled { - mi := &file_msggateway_msggateway_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetUsersOnlineStatusReq) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetUsersOnlineStatusReq) ProtoMessage() {} - -func (x *GetUsersOnlineStatusReq) ProtoReflect() protoreflect.Message { - mi := &file_msggateway_msggateway_proto_msgTypes[6] - 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 GetUsersOnlineStatusReq.ProtoReflect.Descriptor instead. -func (*GetUsersOnlineStatusReq) Descriptor() ([]byte, []int) { - return file_msggateway_msggateway_proto_rawDescGZIP(), []int{6} -} - -func (x *GetUsersOnlineStatusReq) GetUserIDs() []string { - if x != nil { - return x.UserIDs - } - return nil -} - -type GetUsersOnlineStatusResp struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - SuccessResult []*GetUsersOnlineStatusResp_SuccessResult `protobuf:"bytes,1,rep,name=successResult,proto3" json:"successResult"` - FailedResult []*GetUsersOnlineStatusResp_FailedDetail `protobuf:"bytes,2,rep,name=failedResult,proto3" json:"failedResult"` -} - -func (x *GetUsersOnlineStatusResp) Reset() { - *x = GetUsersOnlineStatusResp{} - if protoimpl.UnsafeEnabled { - mi := &file_msggateway_msggateway_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetUsersOnlineStatusResp) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetUsersOnlineStatusResp) ProtoMessage() {} - -func (x *GetUsersOnlineStatusResp) ProtoReflect() protoreflect.Message { - mi := &file_msggateway_msggateway_proto_msgTypes[7] - 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 GetUsersOnlineStatusResp.ProtoReflect.Descriptor instead. -func (*GetUsersOnlineStatusResp) Descriptor() ([]byte, []int) { - return file_msggateway_msggateway_proto_rawDescGZIP(), []int{7} -} - -func (x *GetUsersOnlineStatusResp) GetSuccessResult() []*GetUsersOnlineStatusResp_SuccessResult { - if x != nil { - return x.SuccessResult - } - return nil -} - -func (x *GetUsersOnlineStatusResp) GetFailedResult() []*GetUsersOnlineStatusResp_FailedDetail { - if x != nil { - return x.FailedResult - } - return nil -} - -type SingleDetail struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - UserID string `protobuf:"bytes,1,opt,name=userID,proto3" json:"userID"` - Status string `protobuf:"bytes,2,opt,name=status,proto3" json:"status"` - SinglePlatformToken []*SinglePlatformToken `protobuf:"bytes,3,rep,name=singlePlatformToken,proto3" json:"singlePlatformToken"` -} - -func (x *SingleDetail) Reset() { - *x = SingleDetail{} - if protoimpl.UnsafeEnabled { - mi := &file_msggateway_msggateway_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SingleDetail) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SingleDetail) ProtoMessage() {} - -func (x *SingleDetail) ProtoReflect() protoreflect.Message { - mi := &file_msggateway_msggateway_proto_msgTypes[8] - 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 SingleDetail.ProtoReflect.Descriptor instead. -func (*SingleDetail) Descriptor() ([]byte, []int) { - return file_msggateway_msggateway_proto_rawDescGZIP(), []int{8} -} - -func (x *SingleDetail) GetUserID() string { - if x != nil { - return x.UserID - } - return "" -} - -func (x *SingleDetail) GetStatus() string { - if x != nil { - return x.Status - } - return "" -} - -func (x *SingleDetail) GetSinglePlatformToken() []*SinglePlatformToken { - if x != nil { - return x.SinglePlatformToken - } - return nil -} - -type SinglePlatformToken struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Platform string `protobuf:"bytes,1,opt,name=platform,proto3" json:"platform"` - Total int32 `protobuf:"varint,2,opt,name=total,proto3" json:"total"` - Token []string `protobuf:"bytes,3,rep,name=token,proto3" json:"token"` -} - -func (x *SinglePlatformToken) Reset() { - *x = SinglePlatformToken{} - if protoimpl.UnsafeEnabled { - mi := &file_msggateway_msggateway_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SinglePlatformToken) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SinglePlatformToken) ProtoMessage() {} - -func (x *SinglePlatformToken) ProtoReflect() protoreflect.Message { - mi := &file_msggateway_msggateway_proto_msgTypes[9] - 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 SinglePlatformToken.ProtoReflect.Descriptor instead. -func (*SinglePlatformToken) Descriptor() ([]byte, []int) { - return file_msggateway_msggateway_proto_rawDescGZIP(), []int{9} -} - -func (x *SinglePlatformToken) GetPlatform() string { - if x != nil { - return x.Platform - } - return "" -} - -func (x *SinglePlatformToken) GetTotal() int32 { - if x != nil { - return x.Total - } - return 0 -} - -func (x *SinglePlatformToken) GetToken() []string { - if x != nil { - return x.Token - } - return nil -} - -type KickUserOfflineReq struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - PlatformID int32 `protobuf:"varint,1,opt,name=platformID,proto3" json:"platformID"` - KickUserIDList []string `protobuf:"bytes,2,rep,name=kickUserIDList,proto3" json:"kickUserIDList"` -} - -func (x *KickUserOfflineReq) Reset() { - *x = KickUserOfflineReq{} - if protoimpl.UnsafeEnabled { - mi := &file_msggateway_msggateway_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *KickUserOfflineReq) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*KickUserOfflineReq) ProtoMessage() {} - -func (x *KickUserOfflineReq) ProtoReflect() protoreflect.Message { - mi := &file_msggateway_msggateway_proto_msgTypes[10] - 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 KickUserOfflineReq.ProtoReflect.Descriptor instead. -func (*KickUserOfflineReq) Descriptor() ([]byte, []int) { - return file_msggateway_msggateway_proto_rawDescGZIP(), []int{10} -} - -func (x *KickUserOfflineReq) GetPlatformID() int32 { - if x != nil { - return x.PlatformID - } - return 0 -} - -func (x *KickUserOfflineReq) GetKickUserIDList() []string { - if x != nil { - return x.KickUserIDList - } - return nil -} - -type KickUserOfflineResp struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *KickUserOfflineResp) Reset() { - *x = KickUserOfflineResp{} - if protoimpl.UnsafeEnabled { - mi := &file_msggateway_msggateway_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *KickUserOfflineResp) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*KickUserOfflineResp) ProtoMessage() {} - -func (x *KickUserOfflineResp) ProtoReflect() protoreflect.Message { - mi := &file_msggateway_msggateway_proto_msgTypes[11] - 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 KickUserOfflineResp.ProtoReflect.Descriptor instead. -func (*KickUserOfflineResp) Descriptor() ([]byte, []int) { - return file_msggateway_msggateway_proto_rawDescGZIP(), []int{11} -} - -type MultiTerminalLoginCheckReq struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - UserID string `protobuf:"bytes,1,opt,name=userID,proto3" json:"userID"` - PlatformID int32 `protobuf:"varint,2,opt,name=platformID,proto3" json:"platformID"` - Token string `protobuf:"bytes,3,opt,name=token,proto3" json:"token"` - OperationID string `protobuf:"bytes,4,opt,name=operationID,proto3" json:"operationID"` -} - -func (x *MultiTerminalLoginCheckReq) Reset() { - *x = MultiTerminalLoginCheckReq{} - if protoimpl.UnsafeEnabled { - mi := &file_msggateway_msggateway_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MultiTerminalLoginCheckReq) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MultiTerminalLoginCheckReq) ProtoMessage() {} - -func (x *MultiTerminalLoginCheckReq) ProtoReflect() protoreflect.Message { - mi := &file_msggateway_msggateway_proto_msgTypes[12] - 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 MultiTerminalLoginCheckReq.ProtoReflect.Descriptor instead. -func (*MultiTerminalLoginCheckReq) Descriptor() ([]byte, []int) { - return file_msggateway_msggateway_proto_rawDescGZIP(), []int{12} -} - -func (x *MultiTerminalLoginCheckReq) GetUserID() string { - if x != nil { - return x.UserID - } - return "" -} - -func (x *MultiTerminalLoginCheckReq) GetPlatformID() int32 { - if x != nil { - return x.PlatformID - } - return 0 -} - -func (x *MultiTerminalLoginCheckReq) GetToken() string { - if x != nil { - return x.Token - } - return "" -} - -func (x *MultiTerminalLoginCheckReq) GetOperationID() string { - if x != nil { - return x.OperationID - } - return "" -} - -type MultiTerminalLoginCheckResp struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *MultiTerminalLoginCheckResp) Reset() { - *x = MultiTerminalLoginCheckResp{} - if protoimpl.UnsafeEnabled { - mi := &file_msggateway_msggateway_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MultiTerminalLoginCheckResp) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MultiTerminalLoginCheckResp) ProtoMessage() {} - -func (x *MultiTerminalLoginCheckResp) ProtoReflect() protoreflect.Message { - mi := &file_msggateway_msggateway_proto_msgTypes[13] - 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 MultiTerminalLoginCheckResp.ProtoReflect.Descriptor instead. -func (*MultiTerminalLoginCheckResp) Descriptor() ([]byte, []int) { - return file_msggateway_msggateway_proto_rawDescGZIP(), []int{13} -} - -type GetUsersOnlineStatusResp_SuccessDetail struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Platform string `protobuf:"bytes,1,opt,name=platform,proto3" json:"platform"` - Status string `protobuf:"bytes,2,opt,name=status,proto3" json:"status"` - ConnID string `protobuf:"bytes,3,opt,name=connID,proto3" json:"connID"` - IsBackground bool `protobuf:"varint,4,opt,name=isBackground,proto3" json:"isBackground"` - Token string `protobuf:"bytes,5,opt,name=token,proto3" json:"token"` -} - -func (x *GetUsersOnlineStatusResp_SuccessDetail) Reset() { - *x = GetUsersOnlineStatusResp_SuccessDetail{} - if protoimpl.UnsafeEnabled { - mi := &file_msggateway_msggateway_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetUsersOnlineStatusResp_SuccessDetail) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetUsersOnlineStatusResp_SuccessDetail) ProtoMessage() {} - -func (x *GetUsersOnlineStatusResp_SuccessDetail) ProtoReflect() protoreflect.Message { - mi := &file_msggateway_msggateway_proto_msgTypes[14] - 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 GetUsersOnlineStatusResp_SuccessDetail.ProtoReflect.Descriptor instead. -func (*GetUsersOnlineStatusResp_SuccessDetail) Descriptor() ([]byte, []int) { - return file_msggateway_msggateway_proto_rawDescGZIP(), []int{7, 0} -} - -func (x *GetUsersOnlineStatusResp_SuccessDetail) GetPlatform() string { - if x != nil { - return x.Platform - } - return "" -} - -func (x *GetUsersOnlineStatusResp_SuccessDetail) GetStatus() string { - if x != nil { - return x.Status - } - return "" -} - -func (x *GetUsersOnlineStatusResp_SuccessDetail) GetConnID() string { - if x != nil { - return x.ConnID - } - return "" -} - -func (x *GetUsersOnlineStatusResp_SuccessDetail) GetIsBackground() bool { - if x != nil { - return x.IsBackground - } - return false -} - -func (x *GetUsersOnlineStatusResp_SuccessDetail) GetToken() string { - if x != nil { - return x.Token - } - return "" -} - -type GetUsersOnlineStatusResp_FailedDetail struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - UserID string `protobuf:"bytes,1,opt,name=userID,proto3" json:"userID"` -} - -func (x *GetUsersOnlineStatusResp_FailedDetail) Reset() { - *x = GetUsersOnlineStatusResp_FailedDetail{} - if protoimpl.UnsafeEnabled { - mi := &file_msggateway_msggateway_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetUsersOnlineStatusResp_FailedDetail) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetUsersOnlineStatusResp_FailedDetail) ProtoMessage() {} - -func (x *GetUsersOnlineStatusResp_FailedDetail) ProtoReflect() protoreflect.Message { - mi := &file_msggateway_msggateway_proto_msgTypes[15] - 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 GetUsersOnlineStatusResp_FailedDetail.ProtoReflect.Descriptor instead. -func (*GetUsersOnlineStatusResp_FailedDetail) Descriptor() ([]byte, []int) { - return file_msggateway_msggateway_proto_rawDescGZIP(), []int{7, 1} -} - -func (x *GetUsersOnlineStatusResp_FailedDetail) GetUserID() string { - if x != nil { - return x.UserID - } - return "" -} - -type GetUsersOnlineStatusResp_SuccessResult struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - UserID string `protobuf:"bytes,1,opt,name=userID,proto3" json:"userID"` - Status string `protobuf:"bytes,2,opt,name=status,proto3" json:"status"` - DetailPlatformStatus []*GetUsersOnlineStatusResp_SuccessDetail `protobuf:"bytes,3,rep,name=detailPlatformStatus,proto3" json:"detailPlatformStatus"` -} - -func (x *GetUsersOnlineStatusResp_SuccessResult) Reset() { - *x = GetUsersOnlineStatusResp_SuccessResult{} - if protoimpl.UnsafeEnabled { - mi := &file_msggateway_msggateway_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetUsersOnlineStatusResp_SuccessResult) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetUsersOnlineStatusResp_SuccessResult) ProtoMessage() {} - -func (x *GetUsersOnlineStatusResp_SuccessResult) ProtoReflect() protoreflect.Message { - mi := &file_msggateway_msggateway_proto_msgTypes[16] - 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 GetUsersOnlineStatusResp_SuccessResult.ProtoReflect.Descriptor instead. -func (*GetUsersOnlineStatusResp_SuccessResult) Descriptor() ([]byte, []int) { - return file_msggateway_msggateway_proto_rawDescGZIP(), []int{7, 2} -} - -func (x *GetUsersOnlineStatusResp_SuccessResult) GetUserID() string { - if x != nil { - return x.UserID - } - return "" -} - -func (x *GetUsersOnlineStatusResp_SuccessResult) GetStatus() string { - if x != nil { - return x.Status - } - return "" -} - -func (x *GetUsersOnlineStatusResp_SuccessResult) GetDetailPlatformStatus() []*GetUsersOnlineStatusResp_SuccessDetail { - if x != nil { - return x.DetailPlatformStatus - } - return nil -} - -var File_msggateway_msggateway_proto protoreflect.FileDescriptor - -var file_msggateway_msggateway_proto_rawDesc = []byte{ - 0x0a, 0x1b, 0x6d, 0x73, 0x67, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2f, 0x6d, 0x73, 0x67, - 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x17, 0x4f, - 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x6d, 0x73, 0x67, 0x67, - 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x1a, 0x11, 0x73, 0x64, 0x6b, 0x77, 0x73, 0x2f, 0x73, 0x64, - 0x6b, 0x77, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x6d, 0x0a, 0x10, 0x4f, 0x6e, 0x6c, - 0x69, 0x6e, 0x65, 0x50, 0x75, 0x73, 0x68, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x71, 0x12, 0x35, 0x0a, - 0x07, 0x6d, 0x73, 0x67, 0x44, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, - 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x73, 0x64, - 0x6b, 0x77, 0x73, 0x2e, 0x4d, 0x73, 0x67, 0x44, 0x61, 0x74, 0x61, 0x52, 0x07, 0x6d, 0x73, 0x67, - 0x44, 0x61, 0x74, 0x61, 0x12, 0x22, 0x0a, 0x0c, 0x70, 0x75, 0x73, 0x68, 0x54, 0x6f, 0x55, 0x73, - 0x65, 0x72, 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x70, 0x75, 0x73, 0x68, - 0x54, 0x6f, 0x55, 0x73, 0x65, 0x72, 0x49, 0x44, 0x22, 0x59, 0x0a, 0x11, 0x4f, 0x6e, 0x6c, 0x69, - 0x6e, 0x65, 0x50, 0x75, 0x73, 0x68, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x73, 0x70, 0x12, 0x44, 0x0a, - 0x04, 0x72, 0x65, 0x73, 0x70, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x4f, 0x70, - 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x6d, 0x73, 0x67, 0x67, 0x61, - 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x53, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x4d, 0x73, 0x67, 0x54, - 0x6f, 0x55, 0x73, 0x65, 0x72, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x52, 0x04, 0x72, - 0x65, 0x73, 0x70, 0x22, 0x96, 0x01, 0x0a, 0x16, 0x53, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x4d, 0x73, - 0x67, 0x54, 0x6f, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x12, 0x16, - 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, - 0x75, 0x73, 0x65, 0x72, 0x49, 0x44, 0x12, 0x44, 0x0a, 0x04, 0x72, 0x65, 0x73, 0x70, 0x18, 0x02, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, - 0x76, 0x65, 0x72, 0x2e, 0x6d, 0x73, 0x67, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x53, - 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x4d, 0x73, 0x67, 0x54, 0x6f, 0x55, 0x73, 0x65, 0x72, 0x50, 0x6c, - 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x52, 0x04, 0x72, 0x65, 0x73, 0x70, 0x12, 0x1e, 0x0a, 0x0a, - 0x6f, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x50, 0x75, 0x73, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, - 0x52, 0x0a, 0x6f, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x50, 0x75, 0x73, 0x68, 0x22, 0x77, 0x0a, 0x18, - 0x4f, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x42, 0x61, 0x74, 0x63, 0x68, 0x50, 0x75, 0x73, 0x68, 0x4f, - 0x6e, 0x65, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x71, 0x12, 0x35, 0x0a, 0x07, 0x6d, 0x73, 0x67, 0x44, - 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x4f, 0x70, 0x65, 0x6e, - 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x73, 0x64, 0x6b, 0x77, 0x73, 0x2e, 0x4d, - 0x73, 0x67, 0x44, 0x61, 0x74, 0x61, 0x52, 0x07, 0x6d, 0x73, 0x67, 0x44, 0x61, 0x74, 0x61, 0x12, - 0x24, 0x0a, 0x0d, 0x70, 0x75, 0x73, 0x68, 0x54, 0x6f, 0x55, 0x73, 0x65, 0x72, 0x49, 0x44, 0x73, - 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0d, 0x70, 0x75, 0x73, 0x68, 0x54, 0x6f, 0x55, 0x73, - 0x65, 0x72, 0x49, 0x44, 0x73, 0x22, 0x78, 0x0a, 0x19, 0x4f, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x42, - 0x61, 0x74, 0x63, 0x68, 0x50, 0x75, 0x73, 0x68, 0x4f, 0x6e, 0x65, 0x4d, 0x73, 0x67, 0x52, 0x65, - 0x73, 0x70, 0x12, 0x5b, 0x0a, 0x10, 0x73, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x50, 0x75, 0x73, 0x68, - 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x4f, - 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x6d, 0x73, 0x67, 0x67, - 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x53, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x4d, 0x73, 0x67, - 0x54, 0x6f, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x52, 0x10, 0x73, - 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x50, 0x75, 0x73, 0x68, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, - 0x79, 0x0a, 0x17, 0x53, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x4d, 0x73, 0x67, 0x54, 0x6f, 0x55, 0x73, - 0x65, 0x72, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x12, 0x1e, 0x0a, 0x0a, 0x52, 0x65, - 0x73, 0x75, 0x6c, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, - 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x52, 0x65, - 0x63, 0x76, 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x52, 0x65, 0x63, 0x76, - 0x49, 0x44, 0x12, 0x26, 0x0a, 0x0e, 0x52, 0x65, 0x63, 0x76, 0x50, 0x6c, 0x61, 0x74, 0x46, 0x6f, - 0x72, 0x6d, 0x49, 0x44, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0e, 0x52, 0x65, 0x63, 0x76, - 0x50, 0x6c, 0x61, 0x74, 0x46, 0x6f, 0x72, 0x6d, 0x49, 0x44, 0x22, 0x33, 0x0a, 0x17, 0x47, 0x65, - 0x74, 0x55, 0x73, 0x65, 0x72, 0x73, 0x4f, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x53, 0x74, 0x61, 0x74, - 0x75, 0x73, 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, - 0xdc, 0x04, 0x0a, 0x18, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x73, 0x4f, 0x6e, 0x6c, 0x69, - 0x6e, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x12, 0x65, 0x0a, 0x0d, - 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x01, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x3f, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, - 0x65, 0x72, 0x2e, 0x6d, 0x73, 0x67, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x47, 0x65, - 0x74, 0x55, 0x73, 0x65, 0x72, 0x73, 0x4f, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x53, 0x74, 0x61, 0x74, - 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x2e, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x52, 0x65, - 0x73, 0x75, 0x6c, 0x74, 0x52, 0x0d, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x52, 0x65, 0x73, - 0x75, 0x6c, 0x74, 0x12, 0x62, 0x0a, 0x0c, 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x52, 0x65, 0x73, - 0x75, 0x6c, 0x74, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3e, 0x2e, 0x4f, 0x70, 0x65, 0x6e, - 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x6d, 0x73, 0x67, 0x67, 0x61, 0x74, 0x65, - 0x77, 0x61, 0x79, 0x2e, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x73, 0x4f, 0x6e, 0x6c, 0x69, - 0x6e, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x2e, 0x46, 0x61, 0x69, - 0x6c, 0x65, 0x64, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x52, 0x0c, 0x66, 0x61, 0x69, 0x6c, 0x65, - 0x64, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x1a, 0x95, 0x01, 0x0a, 0x0d, 0x53, 0x75, 0x63, 0x63, - 0x65, 0x73, 0x73, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x6c, 0x61, - 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x6c, 0x61, - 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x16, 0x0a, - 0x06, 0x63, 0x6f, 0x6e, 0x6e, 0x49, 0x44, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x63, - 0x6f, 0x6e, 0x6e, 0x49, 0x44, 0x12, 0x22, 0x0a, 0x0c, 0x69, 0x73, 0x42, 0x61, 0x63, 0x6b, 0x67, - 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x69, 0x73, 0x42, - 0x61, 0x63, 0x6b, 0x67, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x6b, - 0x65, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x1a, - 0x26, 0x0a, 0x0c, 0x46, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x12, - 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x44, 0x1a, 0xb4, 0x01, 0x0a, 0x0d, 0x53, 0x75, 0x63, 0x63, - 0x65, 0x73, 0x73, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, - 0x72, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, - 0x44, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x73, 0x0a, 0x14, 0x64, 0x65, 0x74, - 0x61, 0x69, 0x6c, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x53, 0x74, 0x61, 0x74, 0x75, - 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3f, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, - 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x6d, 0x73, 0x67, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, - 0x79, 0x2e, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x73, 0x4f, 0x6e, 0x6c, 0x69, 0x6e, 0x65, - 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x2e, 0x53, 0x75, 0x63, 0x63, 0x65, - 0x73, 0x73, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x52, 0x14, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, - 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x9e, - 0x01, 0x0a, 0x0c, 0x53, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x12, - 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x44, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, - 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, - 0x5e, 0x0a, 0x13, 0x73, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, - 0x6d, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x4f, - 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x6d, 0x73, 0x67, 0x67, - 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x53, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x50, 0x6c, 0x61, - 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x13, 0x73, 0x69, 0x6e, 0x67, - 0x6c, 0x65, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, - 0x5d, 0x0a, 0x13, 0x53, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, - 0x6d, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, - 0x72, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, - 0x72, 0x6d, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x05, 0x52, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x6b, 0x65, - 0x6e, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x5c, - 0x0a, 0x12, 0x4b, 0x69, 0x63, 0x6b, 0x55, 0x73, 0x65, 0x72, 0x4f, 0x66, 0x66, 0x6c, 0x69, 0x6e, - 0x65, 0x52, 0x65, 0x71, 0x12, 0x1e, 0x0a, 0x0a, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, - 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, - 0x72, 0x6d, 0x49, 0x44, 0x12, 0x26, 0x0a, 0x0e, 0x6b, 0x69, 0x63, 0x6b, 0x55, 0x73, 0x65, 0x72, - 0x49, 0x44, 0x4c, 0x69, 0x73, 0x74, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0e, 0x6b, 0x69, - 0x63, 0x6b, 0x55, 0x73, 0x65, 0x72, 0x49, 0x44, 0x4c, 0x69, 0x73, 0x74, 0x22, 0x15, 0x0a, 0x13, - 0x4b, 0x69, 0x63, 0x6b, 0x55, 0x73, 0x65, 0x72, 0x4f, 0x66, 0x66, 0x6c, 0x69, 0x6e, 0x65, 0x52, - 0x65, 0x73, 0x70, 0x22, 0x8c, 0x01, 0x0a, 0x1a, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x54, 0x65, 0x72, - 0x6d, 0x69, 0x6e, 0x61, 0x6c, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x43, 0x68, 0x65, 0x63, 0x6b, 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, 0x12, 0x1e, 0x0a, 0x0a, 0x70, 0x6c, - 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, - 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x49, 0x44, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, - 0x6b, 0x65, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, - 0x12, 0x20, 0x0a, 0x0b, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x49, 0x44, 0x22, 0x1d, 0x0a, 0x1b, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x54, 0x65, 0x72, 0x6d, 0x69, - 0x6e, 0x61, 0x6c, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x73, - 0x70, 0x32, 0xf1, 0x05, 0x0a, 0x0a, 0x6d, 0x73, 0x67, 0x47, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, - 0x12, 0x66, 0x0a, 0x0d, 0x4f, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x50, 0x75, 0x73, 0x68, 0x4d, 0x73, - 0x67, 0x12, 0x29, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, - 0x2e, 0x6d, 0x73, 0x67, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x4f, 0x6e, 0x6c, 0x69, - 0x6e, 0x65, 0x50, 0x75, 0x73, 0x68, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x71, 0x1a, 0x2a, 0x2e, 0x4f, - 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x6d, 0x73, 0x67, 0x67, - 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x4f, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x50, 0x75, 0x73, - 0x68, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x73, 0x70, 0x12, 0x7b, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x55, - 0x73, 0x65, 0x72, 0x73, 0x4f, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, - 0x12, 0x30, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, - 0x6d, 0x73, 0x67, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x47, 0x65, 0x74, 0x55, 0x73, - 0x65, 0x72, 0x73, 0x4f, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, - 0x65, 0x71, 0x1a, 0x31, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, - 0x72, 0x2e, 0x6d, 0x73, 0x67, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x47, 0x65, 0x74, - 0x55, 0x73, 0x65, 0x72, 0x73, 0x4f, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, - 0x73, 0x52, 0x65, 0x73, 0x70, 0x12, 0x7e, 0x0a, 0x15, 0x4f, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x42, - 0x61, 0x74, 0x63, 0x68, 0x50, 0x75, 0x73, 0x68, 0x4f, 0x6e, 0x65, 0x4d, 0x73, 0x67, 0x12, 0x31, - 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x6d, 0x73, - 0x67, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x4f, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x42, - 0x61, 0x74, 0x63, 0x68, 0x50, 0x75, 0x73, 0x68, 0x4f, 0x6e, 0x65, 0x4d, 0x73, 0x67, 0x52, 0x65, - 0x71, 0x1a, 0x32, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, - 0x2e, 0x6d, 0x73, 0x67, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x4f, 0x6e, 0x6c, 0x69, - 0x6e, 0x65, 0x42, 0x61, 0x74, 0x63, 0x68, 0x50, 0x75, 0x73, 0x68, 0x4f, 0x6e, 0x65, 0x4d, 0x73, - 0x67, 0x52, 0x65, 0x73, 0x70, 0x12, 0x88, 0x01, 0x0a, 0x1f, 0x53, 0x75, 0x70, 0x65, 0x72, 0x47, - 0x72, 0x6f, 0x75, 0x70, 0x4f, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x42, 0x61, 0x74, 0x63, 0x68, 0x50, - 0x75, 0x73, 0x68, 0x4f, 0x6e, 0x65, 0x4d, 0x73, 0x67, 0x12, 0x31, 0x2e, 0x4f, 0x70, 0x65, 0x6e, - 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x6d, 0x73, 0x67, 0x67, 0x61, 0x74, 0x65, - 0x77, 0x61, 0x79, 0x2e, 0x4f, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x42, 0x61, 0x74, 0x63, 0x68, 0x50, - 0x75, 0x73, 0x68, 0x4f, 0x6e, 0x65, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x71, 0x1a, 0x32, 0x2e, 0x4f, - 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x6d, 0x73, 0x67, 0x67, - 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x4f, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x42, 0x61, 0x74, - 0x63, 0x68, 0x50, 0x75, 0x73, 0x68, 0x4f, 0x6e, 0x65, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x73, 0x70, - 0x12, 0x6c, 0x0a, 0x0f, 0x4b, 0x69, 0x63, 0x6b, 0x55, 0x73, 0x65, 0x72, 0x4f, 0x66, 0x66, 0x6c, - 0x69, 0x6e, 0x65, 0x12, 0x2b, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, - 0x65, 0x72, 0x2e, 0x6d, 0x73, 0x67, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x4b, 0x69, - 0x63, 0x6b, 0x55, 0x73, 0x65, 0x72, 0x4f, 0x66, 0x66, 0x6c, 0x69, 0x6e, 0x65, 0x52, 0x65, 0x71, - 0x1a, 0x2c, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, - 0x6d, 0x73, 0x67, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x4b, 0x69, 0x63, 0x6b, 0x55, - 0x73, 0x65, 0x72, 0x4f, 0x66, 0x66, 0x6c, 0x69, 0x6e, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x84, - 0x01, 0x0a, 0x17, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x54, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x6c, - 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x12, 0x33, 0x2e, 0x4f, 0x70, 0x65, - 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x6d, 0x73, 0x67, 0x67, 0x61, 0x74, - 0x65, 0x77, 0x61, 0x79, 0x2e, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x54, 0x65, 0x72, 0x6d, 0x69, 0x6e, - 0x61, 0x6c, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x1a, - 0x34, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x6d, - 0x73, 0x67, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x54, - 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x6c, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x43, 0x68, 0x65, 0x63, - 0x6b, 0x52, 0x65, 0x73, 0x70, 0x42, 0x3a, 0x5a, 0x38, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, - 0x63, 0x6f, 0x6d, 0x2f, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x44, 0x4b, 0x2f, 0x4f, 0x70, - 0x65, 0x6e, 0x2d, 0x49, 0x4d, 0x2d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2f, 0x70, 0x6b, 0x67, - 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x6d, 0x73, 0x67, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, - 0x79, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_msggateway_msggateway_proto_rawDescOnce sync.Once - file_msggateway_msggateway_proto_rawDescData = file_msggateway_msggateway_proto_rawDesc -) - -func file_msggateway_msggateway_proto_rawDescGZIP() []byte { - file_msggateway_msggateway_proto_rawDescOnce.Do(func() { - file_msggateway_msggateway_proto_rawDescData = protoimpl.X.CompressGZIP(file_msggateway_msggateway_proto_rawDescData) - }) - return file_msggateway_msggateway_proto_rawDescData -} - -var file_msggateway_msggateway_proto_msgTypes = make([]protoimpl.MessageInfo, 17) -var file_msggateway_msggateway_proto_goTypes = []interface{}{ - (*OnlinePushMsgReq)(nil), // 0: OpenIMServer.msggateway.OnlinePushMsgReq - (*OnlinePushMsgResp)(nil), // 1: OpenIMServer.msggateway.OnlinePushMsgResp - (*SingleMsgToUserResults)(nil), // 2: OpenIMServer.msggateway.SingleMsgToUserResults - (*OnlineBatchPushOneMsgReq)(nil), // 3: OpenIMServer.msggateway.OnlineBatchPushOneMsgReq - (*OnlineBatchPushOneMsgResp)(nil), // 4: OpenIMServer.msggateway.OnlineBatchPushOneMsgResp - (*SingleMsgToUserPlatform)(nil), // 5: OpenIMServer.msggateway.SingleMsgToUserPlatform - (*GetUsersOnlineStatusReq)(nil), // 6: OpenIMServer.msggateway.GetUsersOnlineStatusReq - (*GetUsersOnlineStatusResp)(nil), // 7: OpenIMServer.msggateway.GetUsersOnlineStatusResp - (*SingleDetail)(nil), // 8: OpenIMServer.msggateway.SingleDetail - (*SinglePlatformToken)(nil), // 9: OpenIMServer.msggateway.SinglePlatformToken - (*KickUserOfflineReq)(nil), // 10: OpenIMServer.msggateway.KickUserOfflineReq - (*KickUserOfflineResp)(nil), // 11: OpenIMServer.msggateway.KickUserOfflineResp - (*MultiTerminalLoginCheckReq)(nil), // 12: OpenIMServer.msggateway.MultiTerminalLoginCheckReq - (*MultiTerminalLoginCheckResp)(nil), // 13: OpenIMServer.msggateway.MultiTerminalLoginCheckResp - (*GetUsersOnlineStatusResp_SuccessDetail)(nil), // 14: OpenIMServer.msggateway.GetUsersOnlineStatusResp.SuccessDetail - (*GetUsersOnlineStatusResp_FailedDetail)(nil), // 15: OpenIMServer.msggateway.GetUsersOnlineStatusResp.FailedDetail - (*GetUsersOnlineStatusResp_SuccessResult)(nil), // 16: OpenIMServer.msggateway.GetUsersOnlineStatusResp.SuccessResult - (*sdkws.MsgData)(nil), // 17: OpenIMServer.sdkws.MsgData -} -var file_msggateway_msggateway_proto_depIdxs = []int32{ - 17, // 0: OpenIMServer.msggateway.OnlinePushMsgReq.msgData:type_name -> OpenIMServer.sdkws.MsgData - 5, // 1: OpenIMServer.msggateway.OnlinePushMsgResp.resp:type_name -> OpenIMServer.msggateway.SingleMsgToUserPlatform - 5, // 2: OpenIMServer.msggateway.SingleMsgToUserResults.resp:type_name -> OpenIMServer.msggateway.SingleMsgToUserPlatform - 17, // 3: OpenIMServer.msggateway.OnlineBatchPushOneMsgReq.msgData:type_name -> OpenIMServer.sdkws.MsgData - 2, // 4: OpenIMServer.msggateway.OnlineBatchPushOneMsgResp.singlePushResult:type_name -> OpenIMServer.msggateway.SingleMsgToUserResults - 16, // 5: OpenIMServer.msggateway.GetUsersOnlineStatusResp.successResult:type_name -> OpenIMServer.msggateway.GetUsersOnlineStatusResp.SuccessResult - 15, // 6: OpenIMServer.msggateway.GetUsersOnlineStatusResp.failedResult:type_name -> OpenIMServer.msggateway.GetUsersOnlineStatusResp.FailedDetail - 9, // 7: OpenIMServer.msggateway.SingleDetail.singlePlatformToken:type_name -> OpenIMServer.msggateway.SinglePlatformToken - 14, // 8: OpenIMServer.msggateway.GetUsersOnlineStatusResp.SuccessResult.detailPlatformStatus:type_name -> OpenIMServer.msggateway.GetUsersOnlineStatusResp.SuccessDetail - 0, // 9: OpenIMServer.msggateway.msgGateway.OnlinePushMsg:input_type -> OpenIMServer.msggateway.OnlinePushMsgReq - 6, // 10: OpenIMServer.msggateway.msgGateway.GetUsersOnlineStatus:input_type -> OpenIMServer.msggateway.GetUsersOnlineStatusReq - 3, // 11: OpenIMServer.msggateway.msgGateway.OnlineBatchPushOneMsg:input_type -> OpenIMServer.msggateway.OnlineBatchPushOneMsgReq - 3, // 12: OpenIMServer.msggateway.msgGateway.SuperGroupOnlineBatchPushOneMsg:input_type -> OpenIMServer.msggateway.OnlineBatchPushOneMsgReq - 10, // 13: OpenIMServer.msggateway.msgGateway.KickUserOffline:input_type -> OpenIMServer.msggateway.KickUserOfflineReq - 12, // 14: OpenIMServer.msggateway.msgGateway.MultiTerminalLoginCheck:input_type -> OpenIMServer.msggateway.MultiTerminalLoginCheckReq - 1, // 15: OpenIMServer.msggateway.msgGateway.OnlinePushMsg:output_type -> OpenIMServer.msggateway.OnlinePushMsgResp - 7, // 16: OpenIMServer.msggateway.msgGateway.GetUsersOnlineStatus:output_type -> OpenIMServer.msggateway.GetUsersOnlineStatusResp - 4, // 17: OpenIMServer.msggateway.msgGateway.OnlineBatchPushOneMsg:output_type -> OpenIMServer.msggateway.OnlineBatchPushOneMsgResp - 4, // 18: OpenIMServer.msggateway.msgGateway.SuperGroupOnlineBatchPushOneMsg:output_type -> OpenIMServer.msggateway.OnlineBatchPushOneMsgResp - 11, // 19: OpenIMServer.msggateway.msgGateway.KickUserOffline:output_type -> OpenIMServer.msggateway.KickUserOfflineResp - 13, // 20: OpenIMServer.msggateway.msgGateway.MultiTerminalLoginCheck:output_type -> OpenIMServer.msggateway.MultiTerminalLoginCheckResp - 15, // [15:21] is the sub-list for method output_type - 9, // [9:15] is the sub-list for method input_type - 9, // [9:9] is the sub-list for extension type_name - 9, // [9:9] is the sub-list for extension extendee - 0, // [0:9] is the sub-list for field type_name -} - -func init() { file_msggateway_msggateway_proto_init() } -func file_msggateway_msggateway_proto_init() { - if File_msggateway_msggateway_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_msggateway_msggateway_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*OnlinePushMsgReq); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_msggateway_msggateway_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*OnlinePushMsgResp); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_msggateway_msggateway_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SingleMsgToUserResults); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_msggateway_msggateway_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*OnlineBatchPushOneMsgReq); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_msggateway_msggateway_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*OnlineBatchPushOneMsgResp); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_msggateway_msggateway_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SingleMsgToUserPlatform); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_msggateway_msggateway_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetUsersOnlineStatusReq); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_msggateway_msggateway_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetUsersOnlineStatusResp); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_msggateway_msggateway_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SingleDetail); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_msggateway_msggateway_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SinglePlatformToken); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_msggateway_msggateway_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*KickUserOfflineReq); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_msggateway_msggateway_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*KickUserOfflineResp); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_msggateway_msggateway_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MultiTerminalLoginCheckReq); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_msggateway_msggateway_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MultiTerminalLoginCheckResp); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_msggateway_msggateway_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetUsersOnlineStatusResp_SuccessDetail); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_msggateway_msggateway_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetUsersOnlineStatusResp_FailedDetail); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_msggateway_msggateway_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetUsersOnlineStatusResp_SuccessResult); 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{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_msggateway_msggateway_proto_rawDesc, - NumEnums: 0, - NumMessages: 17, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_msggateway_msggateway_proto_goTypes, - DependencyIndexes: file_msggateway_msggateway_proto_depIdxs, - MessageInfos: file_msggateway_msggateway_proto_msgTypes, - }.Build() - File_msggateway_msggateway_proto = out.File - file_msggateway_msggateway_proto_rawDesc = nil - file_msggateway_msggateway_proto_goTypes = nil - file_msggateway_msggateway_proto_depIdxs = nil -} - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConnInterface - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion6 - -// MsgGatewayClient is the client API for MsgGateway service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type MsgGatewayClient interface { - OnlinePushMsg(ctx context.Context, in *OnlinePushMsgReq, opts ...grpc.CallOption) (*OnlinePushMsgResp, error) - GetUsersOnlineStatus(ctx context.Context, in *GetUsersOnlineStatusReq, opts ...grpc.CallOption) (*GetUsersOnlineStatusResp, error) - OnlineBatchPushOneMsg(ctx context.Context, in *OnlineBatchPushOneMsgReq, opts ...grpc.CallOption) (*OnlineBatchPushOneMsgResp, error) - SuperGroupOnlineBatchPushOneMsg(ctx context.Context, in *OnlineBatchPushOneMsgReq, opts ...grpc.CallOption) (*OnlineBatchPushOneMsgResp, error) - KickUserOffline(ctx context.Context, in *KickUserOfflineReq, opts ...grpc.CallOption) (*KickUserOfflineResp, error) - MultiTerminalLoginCheck(ctx context.Context, in *MultiTerminalLoginCheckReq, opts ...grpc.CallOption) (*MultiTerminalLoginCheckResp, error) -} - -type msgGatewayClient struct { - cc grpc.ClientConnInterface -} - -func NewMsgGatewayClient(cc grpc.ClientConnInterface) MsgGatewayClient { - return &msgGatewayClient{cc} -} - -func (c *msgGatewayClient) OnlinePushMsg(ctx context.Context, in *OnlinePushMsgReq, opts ...grpc.CallOption) (*OnlinePushMsgResp, error) { - out := new(OnlinePushMsgResp) - err := c.cc.Invoke(ctx, "/OpenIMServer.msggateway.msgGateway/OnlinePushMsg", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *msgGatewayClient) GetUsersOnlineStatus(ctx context.Context, in *GetUsersOnlineStatusReq, opts ...grpc.CallOption) (*GetUsersOnlineStatusResp, error) { - out := new(GetUsersOnlineStatusResp) - err := c.cc.Invoke(ctx, "/OpenIMServer.msggateway.msgGateway/GetUsersOnlineStatus", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *msgGatewayClient) OnlineBatchPushOneMsg(ctx context.Context, in *OnlineBatchPushOneMsgReq, opts ...grpc.CallOption) (*OnlineBatchPushOneMsgResp, error) { - out := new(OnlineBatchPushOneMsgResp) - err := c.cc.Invoke(ctx, "/OpenIMServer.msggateway.msgGateway/OnlineBatchPushOneMsg", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *msgGatewayClient) SuperGroupOnlineBatchPushOneMsg(ctx context.Context, in *OnlineBatchPushOneMsgReq, opts ...grpc.CallOption) (*OnlineBatchPushOneMsgResp, error) { - out := new(OnlineBatchPushOneMsgResp) - err := c.cc.Invoke(ctx, "/OpenIMServer.msggateway.msgGateway/SuperGroupOnlineBatchPushOneMsg", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *msgGatewayClient) KickUserOffline(ctx context.Context, in *KickUserOfflineReq, opts ...grpc.CallOption) (*KickUserOfflineResp, error) { - out := new(KickUserOfflineResp) - err := c.cc.Invoke(ctx, "/OpenIMServer.msggateway.msgGateway/KickUserOffline", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *msgGatewayClient) MultiTerminalLoginCheck(ctx context.Context, in *MultiTerminalLoginCheckReq, opts ...grpc.CallOption) (*MultiTerminalLoginCheckResp, error) { - out := new(MultiTerminalLoginCheckResp) - err := c.cc.Invoke(ctx, "/OpenIMServer.msggateway.msgGateway/MultiTerminalLoginCheck", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// MsgGatewayServer is the server API for MsgGateway service. -type MsgGatewayServer interface { - OnlinePushMsg(context.Context, *OnlinePushMsgReq) (*OnlinePushMsgResp, error) - GetUsersOnlineStatus(context.Context, *GetUsersOnlineStatusReq) (*GetUsersOnlineStatusResp, error) - OnlineBatchPushOneMsg(context.Context, *OnlineBatchPushOneMsgReq) (*OnlineBatchPushOneMsgResp, error) - SuperGroupOnlineBatchPushOneMsg(context.Context, *OnlineBatchPushOneMsgReq) (*OnlineBatchPushOneMsgResp, error) - KickUserOffline(context.Context, *KickUserOfflineReq) (*KickUserOfflineResp, error) - MultiTerminalLoginCheck(context.Context, *MultiTerminalLoginCheckReq) (*MultiTerminalLoginCheckResp, error) -} - -// UnimplementedMsgGatewayServer can be embedded to have forward compatible implementations. -type UnimplementedMsgGatewayServer struct { -} - -func (*UnimplementedMsgGatewayServer) OnlinePushMsg(context.Context, *OnlinePushMsgReq) (*OnlinePushMsgResp, error) { - return nil, status.Errorf(codes.Unimplemented, "method OnlinePushMsg not implemented") -} -func (*UnimplementedMsgGatewayServer) GetUsersOnlineStatus(context.Context, *GetUsersOnlineStatusReq) (*GetUsersOnlineStatusResp, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetUsersOnlineStatus not implemented") -} -func (*UnimplementedMsgGatewayServer) OnlineBatchPushOneMsg(context.Context, *OnlineBatchPushOneMsgReq) (*OnlineBatchPushOneMsgResp, error) { - return nil, status.Errorf(codes.Unimplemented, "method OnlineBatchPushOneMsg not implemented") -} -func (*UnimplementedMsgGatewayServer) SuperGroupOnlineBatchPushOneMsg(context.Context, *OnlineBatchPushOneMsgReq) (*OnlineBatchPushOneMsgResp, error) { - return nil, status.Errorf(codes.Unimplemented, "method SuperGroupOnlineBatchPushOneMsg not implemented") -} -func (*UnimplementedMsgGatewayServer) KickUserOffline(context.Context, *KickUserOfflineReq) (*KickUserOfflineResp, error) { - return nil, status.Errorf(codes.Unimplemented, "method KickUserOffline not implemented") -} -func (*UnimplementedMsgGatewayServer) MultiTerminalLoginCheck(context.Context, *MultiTerminalLoginCheckReq) (*MultiTerminalLoginCheckResp, error) { - return nil, status.Errorf(codes.Unimplemented, "method MultiTerminalLoginCheck not implemented") -} - -func RegisterMsgGatewayServer(s *grpc.Server, srv MsgGatewayServer) { - s.RegisterService(&_MsgGateway_serviceDesc, srv) -} - -func _MsgGateway_OnlinePushMsg_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(OnlinePushMsgReq) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgGatewayServer).OnlinePushMsg(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/OpenIMServer.msggateway.msgGateway/OnlinePushMsg", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgGatewayServer).OnlinePushMsg(ctx, req.(*OnlinePushMsgReq)) - } - return interceptor(ctx, in, info, handler) -} - -func _MsgGateway_GetUsersOnlineStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetUsersOnlineStatusReq) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgGatewayServer).GetUsersOnlineStatus(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/OpenIMServer.msggateway.msgGateway/GetUsersOnlineStatus", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgGatewayServer).GetUsersOnlineStatus(ctx, req.(*GetUsersOnlineStatusReq)) - } - return interceptor(ctx, in, info, handler) -} - -func _MsgGateway_OnlineBatchPushOneMsg_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(OnlineBatchPushOneMsgReq) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgGatewayServer).OnlineBatchPushOneMsg(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/OpenIMServer.msggateway.msgGateway/OnlineBatchPushOneMsg", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgGatewayServer).OnlineBatchPushOneMsg(ctx, req.(*OnlineBatchPushOneMsgReq)) - } - return interceptor(ctx, in, info, handler) -} - -func _MsgGateway_SuperGroupOnlineBatchPushOneMsg_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(OnlineBatchPushOneMsgReq) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgGatewayServer).SuperGroupOnlineBatchPushOneMsg(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/OpenIMServer.msggateway.msgGateway/SuperGroupOnlineBatchPushOneMsg", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgGatewayServer).SuperGroupOnlineBatchPushOneMsg(ctx, req.(*OnlineBatchPushOneMsgReq)) - } - return interceptor(ctx, in, info, handler) -} - -func _MsgGateway_KickUserOffline_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(KickUserOfflineReq) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgGatewayServer).KickUserOffline(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/OpenIMServer.msggateway.msgGateway/KickUserOffline", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgGatewayServer).KickUserOffline(ctx, req.(*KickUserOfflineReq)) - } - return interceptor(ctx, in, info, handler) -} - -func _MsgGateway_MultiTerminalLoginCheck_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MultiTerminalLoginCheckReq) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgGatewayServer).MultiTerminalLoginCheck(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/OpenIMServer.msggateway.msgGateway/MultiTerminalLoginCheck", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgGatewayServer).MultiTerminalLoginCheck(ctx, req.(*MultiTerminalLoginCheckReq)) - } - return interceptor(ctx, in, info, handler) -} - -var _MsgGateway_serviceDesc = grpc.ServiceDesc{ - ServiceName: "OpenIMServer.msggateway.msgGateway", - HandlerType: (*MsgGatewayServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "OnlinePushMsg", - Handler: _MsgGateway_OnlinePushMsg_Handler, - }, - { - MethodName: "GetUsersOnlineStatus", - Handler: _MsgGateway_GetUsersOnlineStatus_Handler, - }, - { - MethodName: "OnlineBatchPushOneMsg", - Handler: _MsgGateway_OnlineBatchPushOneMsg_Handler, - }, - { - MethodName: "SuperGroupOnlineBatchPushOneMsg", - Handler: _MsgGateway_SuperGroupOnlineBatchPushOneMsg_Handler, - }, - { - MethodName: "KickUserOffline", - Handler: _MsgGateway_KickUserOffline_Handler, - }, - { - MethodName: "MultiTerminalLoginCheck", - Handler: _MsgGateway_MultiTerminalLoginCheck_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "msggateway/msggateway.proto", -} diff --git a/pkg/proto/msggateway/msggateway.proto b/pkg/proto/msggateway/msggateway.proto deleted file mode 100644 index 77f0fcbf3..000000000 --- a/pkg/proto/msggateway/msggateway.proto +++ /dev/null @@ -1,122 +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. - -syntax = "proto3"; -package OpenIMServer.msggateway; -import "sdkws/sdkws.proto"; -option go_package = "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/msggateway"; - -message OnlinePushMsgReq { - sdkws.MsgData msgData = 1; - string pushToUserID = 2; -} - -message OnlinePushMsgResp{ - repeated SingleMsgToUserPlatform resp = 1; -} - -message SingleMsgToUserResults { - string userID =1; - repeated SingleMsgToUserPlatform resp = 2; - bool onlinePush = 3; - -} -message OnlineBatchPushOneMsgReq{ - sdkws.MsgData msgData = 1; - repeated string pushToUserIDs = 2; -} - -message OnlineBatchPushOneMsgResp{ - repeated SingleMsgToUserResults singlePushResult= 1; -} -//message SendMsgByWSReq{ -// string SendID = 1; -// string RecvID = 2; -// string Content = 3; -// int64 SendTime = 4; -// int64 MsgFrom = 5; -// int64 ContentType = 6; -// int64 SessionType = 7; -// string OperationID = 8; -// int64 PlatformID = 9; -//} - -message SingleMsgToUserPlatform{ - int64 ResultCode = 1; - string RecvID = 2; - int32 RecvPlatFormID = 3; -} - -message GetUsersOnlineStatusReq{ - repeated string userIDs = 1; -} - -message GetUsersOnlineStatusResp{ - repeated SuccessResult successResult = 1; - repeated FailedDetail failedResult = 2; - message SuccessDetail{ - string platform = 1; - string status = 2; - string connID = 3; - bool isBackground = 4; - string token =5; - } - message FailedDetail{ - string userID = 1; - } - message SuccessResult{ - string userID = 1; - string status = 2; - repeated SuccessDetail detailPlatformStatus = 3; - } -} -message SingleDetail{ - string userID = 1; - string status = 2; - repeated SinglePlatformToken singlePlatformToken = 3; -} -message SinglePlatformToken{ - string platform = 1; - int32 total =2; - repeated string token = 3; -} - - -message KickUserOfflineReq{ - int32 platformID = 1; - repeated string kickUserIDList = 2; -} - -message KickUserOfflineResp{ -} - - -message MultiTerminalLoginCheckReq{ - string userID = 1; - int32 platformID = 2; - string token = 3; - string operationID = 4; -} -message MultiTerminalLoginCheckResp{ -} - -service msgGateway { - rpc OnlinePushMsg(OnlinePushMsgReq) returns(OnlinePushMsgResp); - rpc GetUsersOnlineStatus(GetUsersOnlineStatusReq) returns(GetUsersOnlineStatusResp); - rpc OnlineBatchPushOneMsg(OnlineBatchPushOneMsgReq) returns(OnlineBatchPushOneMsgResp); - rpc SuperGroupOnlineBatchPushOneMsg(OnlineBatchPushOneMsgReq) returns(OnlineBatchPushOneMsgResp); - rpc KickUserOffline(KickUserOfflineReq) returns(KickUserOfflineResp); - rpc MultiTerminalLoginCheck(MultiTerminalLoginCheckReq) returns(MultiTerminalLoginCheckResp); -} - diff --git a/pkg/proto/push/push.go b/pkg/proto/push/push.go deleted file mode 100644 index 2f117acda..000000000 --- a/pkg/proto/push/push.go +++ /dev/null @@ -1,40 +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. - -package push - -import "github.com/OpenIMSDK/Open-IM-Server/pkg/errs" - -func (x *PushMsgReq) Check() error { - if x.MsgData == nil { - return errs.ErrArgs.Wrap("MsgData is empty") - } - if err := x.MsgData.Check(); err != nil { - return err - } - if x.ConversationID == "" { - return errs.ErrArgs.Wrap("ConversationID is empty") - } - return nil -} - -func (x *DelUserPushTokenReq) Check() error { - if x.UserID == "" { - return errs.ErrArgs.Wrap("UserID is empty") - } - if x.PlatformID < 1 || x.PlatformID > 9 { - return errs.ErrArgs.Wrap("PlatformID is invalid") - } - return nil -} diff --git a/pkg/proto/push/push.pb.go b/pkg/proto/push/push.pb.go deleted file mode 100644 index 1dc9d2ab9..000000000 --- a/pkg/proto/push/push.pb.go +++ /dev/null @@ -1,489 +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. - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.29.1 -// protoc v4.22.0 -// source: push/push.proto - -package push - -import ( - context "context" - sdkws "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/sdkws" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type PushMsgReq struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - MsgData *sdkws.MsgData `protobuf:"bytes,1,opt,name=msgData,proto3" json:"msgData"` - ConversationID string `protobuf:"bytes,2,opt,name=conversationID,proto3" json:"conversationID"` -} - -func (x *PushMsgReq) Reset() { - *x = PushMsgReq{} - if protoimpl.UnsafeEnabled { - mi := &file_push_push_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *PushMsgReq) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*PushMsgReq) ProtoMessage() {} - -func (x *PushMsgReq) ProtoReflect() protoreflect.Message { - mi := &file_push_push_proto_msgTypes[0] - 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 PushMsgReq.ProtoReflect.Descriptor instead. -func (*PushMsgReq) Descriptor() ([]byte, []int) { - return file_push_push_proto_rawDescGZIP(), []int{0} -} - -func (x *PushMsgReq) GetMsgData() *sdkws.MsgData { - if x != nil { - return x.MsgData - } - return nil -} - -func (x *PushMsgReq) GetConversationID() string { - if x != nil { - return x.ConversationID - } - return "" -} - -type PushMsgResp struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *PushMsgResp) Reset() { - *x = PushMsgResp{} - if protoimpl.UnsafeEnabled { - mi := &file_push_push_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *PushMsgResp) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*PushMsgResp) ProtoMessage() {} - -func (x *PushMsgResp) ProtoReflect() protoreflect.Message { - mi := &file_push_push_proto_msgTypes[1] - 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 PushMsgResp.ProtoReflect.Descriptor instead. -func (*PushMsgResp) Descriptor() ([]byte, []int) { - return file_push_push_proto_rawDescGZIP(), []int{1} -} - -type DelUserPushTokenReq struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - UserID string `protobuf:"bytes,1,opt,name=userID,proto3" json:"userID"` - PlatformID int32 `protobuf:"varint,2,opt,name=platformID,proto3" json:"platformID"` -} - -func (x *DelUserPushTokenReq) Reset() { - *x = DelUserPushTokenReq{} - if protoimpl.UnsafeEnabled { - mi := &file_push_push_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DelUserPushTokenReq) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DelUserPushTokenReq) ProtoMessage() {} - -func (x *DelUserPushTokenReq) ProtoReflect() protoreflect.Message { - mi := &file_push_push_proto_msgTypes[2] - 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 DelUserPushTokenReq.ProtoReflect.Descriptor instead. -func (*DelUserPushTokenReq) Descriptor() ([]byte, []int) { - return file_push_push_proto_rawDescGZIP(), []int{2} -} - -func (x *DelUserPushTokenReq) GetUserID() string { - if x != nil { - return x.UserID - } - return "" -} - -func (x *DelUserPushTokenReq) GetPlatformID() int32 { - if x != nil { - return x.PlatformID - } - return 0 -} - -type DelUserPushTokenResp struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *DelUserPushTokenResp) Reset() { - *x = DelUserPushTokenResp{} - if protoimpl.UnsafeEnabled { - mi := &file_push_push_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DelUserPushTokenResp) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DelUserPushTokenResp) ProtoMessage() {} - -func (x *DelUserPushTokenResp) ProtoReflect() protoreflect.Message { - mi := &file_push_push_proto_msgTypes[3] - 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 DelUserPushTokenResp.ProtoReflect.Descriptor instead. -func (*DelUserPushTokenResp) Descriptor() ([]byte, []int) { - return file_push_push_proto_rawDescGZIP(), []int{3} -} - -var File_push_push_proto protoreflect.FileDescriptor - -var file_push_push_proto_rawDesc = []byte{ - 0x0a, 0x0f, 0x70, 0x75, 0x73, 0x68, 0x2f, 0x70, 0x75, 0x73, 0x68, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x12, 0x11, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, - 0x70, 0x75, 0x73, 0x68, 0x1a, 0x11, 0x73, 0x64, 0x6b, 0x77, 0x73, 0x2f, 0x73, 0x64, 0x6b, 0x77, - 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x6b, 0x0a, 0x0a, 0x50, 0x75, 0x73, 0x68, 0x4d, - 0x73, 0x67, 0x52, 0x65, 0x71, 0x12, 0x35, 0x0a, 0x07, 0x6d, 0x73, 0x67, 0x44, 0x61, 0x74, 0x61, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, - 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x73, 0x64, 0x6b, 0x77, 0x73, 0x2e, 0x4d, 0x73, 0x67, 0x44, - 0x61, 0x74, 0x61, 0x52, 0x07, 0x6d, 0x73, 0x67, 0x44, 0x61, 0x74, 0x61, 0x12, 0x26, 0x0a, 0x0e, - 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x49, 0x44, 0x22, 0x0d, 0x0a, 0x0b, 0x50, 0x75, 0x73, 0x68, 0x4d, 0x73, 0x67, 0x52, - 0x65, 0x73, 0x70, 0x22, 0x4d, 0x0a, 0x13, 0x44, 0x65, 0x6c, 0x55, 0x73, 0x65, 0x72, 0x50, 0x75, - 0x73, 0x68, 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, 0x12, 0x1e, 0x0a, 0x0a, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x49, 0x44, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, - 0x49, 0x44, 0x22, 0x16, 0x0a, 0x14, 0x44, 0x65, 0x6c, 0x55, 0x73, 0x65, 0x72, 0x50, 0x75, 0x73, - 0x68, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x32, 0xbf, 0x01, 0x0a, 0x0e, 0x50, - 0x75, 0x73, 0x68, 0x4d, 0x73, 0x67, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x48, 0x0a, - 0x07, 0x50, 0x75, 0x73, 0x68, 0x4d, 0x73, 0x67, 0x12, 0x1d, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, - 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x70, 0x75, 0x73, 0x68, 0x2e, 0x50, 0x75, 0x73, - 0x68, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x71, 0x1a, 0x1e, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, - 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x70, 0x75, 0x73, 0x68, 0x2e, 0x50, 0x75, 0x73, 0x68, - 0x4d, 0x73, 0x67, 0x52, 0x65, 0x73, 0x70, 0x12, 0x63, 0x0a, 0x10, 0x44, 0x65, 0x6c, 0x55, 0x73, - 0x65, 0x72, 0x50, 0x75, 0x73, 0x68, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x26, 0x2e, 0x4f, 0x70, - 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x70, 0x75, 0x73, 0x68, 0x2e, - 0x44, 0x65, 0x6c, 0x55, 0x73, 0x65, 0x72, 0x50, 0x75, 0x73, 0x68, 0x54, 0x6f, 0x6b, 0x65, 0x6e, - 0x52, 0x65, 0x71, 0x1a, 0x27, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, - 0x65, 0x72, 0x2e, 0x70, 0x75, 0x73, 0x68, 0x2e, 0x44, 0x65, 0x6c, 0x55, 0x73, 0x65, 0x72, 0x50, - 0x75, 0x73, 0x68, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x42, 0x34, 0x5a, 0x32, - 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x4f, 0x70, 0x65, 0x6e, 0x49, - 0x4d, 0x53, 0x44, 0x4b, 0x2f, 0x4f, 0x70, 0x65, 0x6e, 0x2d, 0x49, 0x4d, 0x2d, 0x53, 0x65, 0x72, - 0x76, 0x65, 0x72, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x70, 0x75, - 0x73, 0x68, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_push_push_proto_rawDescOnce sync.Once - file_push_push_proto_rawDescData = file_push_push_proto_rawDesc -) - -func file_push_push_proto_rawDescGZIP() []byte { - file_push_push_proto_rawDescOnce.Do(func() { - file_push_push_proto_rawDescData = protoimpl.X.CompressGZIP(file_push_push_proto_rawDescData) - }) - return file_push_push_proto_rawDescData -} - -var file_push_push_proto_msgTypes = make([]protoimpl.MessageInfo, 4) -var file_push_push_proto_goTypes = []interface{}{ - (*PushMsgReq)(nil), // 0: OpenIMServer.push.PushMsgReq - (*PushMsgResp)(nil), // 1: OpenIMServer.push.PushMsgResp - (*DelUserPushTokenReq)(nil), // 2: OpenIMServer.push.DelUserPushTokenReq - (*DelUserPushTokenResp)(nil), // 3: OpenIMServer.push.DelUserPushTokenResp - (*sdkws.MsgData)(nil), // 4: OpenIMServer.sdkws.MsgData -} -var file_push_push_proto_depIdxs = []int32{ - 4, // 0: OpenIMServer.push.PushMsgReq.msgData:type_name -> OpenIMServer.sdkws.MsgData - 0, // 1: OpenIMServer.push.PushMsgService.PushMsg:input_type -> OpenIMServer.push.PushMsgReq - 2, // 2: OpenIMServer.push.PushMsgService.DelUserPushToken:input_type -> OpenIMServer.push.DelUserPushTokenReq - 1, // 3: OpenIMServer.push.PushMsgService.PushMsg:output_type -> OpenIMServer.push.PushMsgResp - 3, // 4: OpenIMServer.push.PushMsgService.DelUserPushToken:output_type -> OpenIMServer.push.DelUserPushTokenResp - 3, // [3:5] is the sub-list for method output_type - 1, // [1:3] is the sub-list for method input_type - 1, // [1:1] is the sub-list for extension type_name - 1, // [1:1] is the sub-list for extension extendee - 0, // [0:1] is the sub-list for field type_name -} - -func init() { file_push_push_proto_init() } -func file_push_push_proto_init() { - if File_push_push_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_push_push_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PushMsgReq); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_push_push_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PushMsgResp); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_push_push_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DelUserPushTokenReq); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_push_push_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DelUserPushTokenResp); 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{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_push_push_proto_rawDesc, - NumEnums: 0, - NumMessages: 4, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_push_push_proto_goTypes, - DependencyIndexes: file_push_push_proto_depIdxs, - MessageInfos: file_push_push_proto_msgTypes, - }.Build() - File_push_push_proto = out.File - file_push_push_proto_rawDesc = nil - file_push_push_proto_goTypes = nil - file_push_push_proto_depIdxs = nil -} - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConnInterface - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion6 - -// PushMsgServiceClient is the client API for PushMsgService service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type PushMsgServiceClient interface { - PushMsg(ctx context.Context, in *PushMsgReq, opts ...grpc.CallOption) (*PushMsgResp, error) - DelUserPushToken(ctx context.Context, in *DelUserPushTokenReq, opts ...grpc.CallOption) (*DelUserPushTokenResp, error) -} - -type pushMsgServiceClient struct { - cc grpc.ClientConnInterface -} - -func NewPushMsgServiceClient(cc grpc.ClientConnInterface) PushMsgServiceClient { - return &pushMsgServiceClient{cc} -} - -func (c *pushMsgServiceClient) PushMsg(ctx context.Context, in *PushMsgReq, opts ...grpc.CallOption) (*PushMsgResp, error) { - out := new(PushMsgResp) - err := c.cc.Invoke(ctx, "/OpenIMServer.push.PushMsgService/PushMsg", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *pushMsgServiceClient) DelUserPushToken(ctx context.Context, in *DelUserPushTokenReq, opts ...grpc.CallOption) (*DelUserPushTokenResp, error) { - out := new(DelUserPushTokenResp) - err := c.cc.Invoke(ctx, "/OpenIMServer.push.PushMsgService/DelUserPushToken", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// PushMsgServiceServer is the server API for PushMsgService service. -type PushMsgServiceServer interface { - PushMsg(context.Context, *PushMsgReq) (*PushMsgResp, error) - DelUserPushToken(context.Context, *DelUserPushTokenReq) (*DelUserPushTokenResp, error) -} - -// UnimplementedPushMsgServiceServer can be embedded to have forward compatible implementations. -type UnimplementedPushMsgServiceServer struct { -} - -func (*UnimplementedPushMsgServiceServer) PushMsg(context.Context, *PushMsgReq) (*PushMsgResp, error) { - return nil, status.Errorf(codes.Unimplemented, "method PushMsg not implemented") -} -func (*UnimplementedPushMsgServiceServer) DelUserPushToken(context.Context, *DelUserPushTokenReq) (*DelUserPushTokenResp, error) { - return nil, status.Errorf(codes.Unimplemented, "method DelUserPushToken not implemented") -} - -func RegisterPushMsgServiceServer(s *grpc.Server, srv PushMsgServiceServer) { - s.RegisterService(&_PushMsgService_serviceDesc, srv) -} - -func _PushMsgService_PushMsg_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(PushMsgReq) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(PushMsgServiceServer).PushMsg(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/OpenIMServer.push.PushMsgService/PushMsg", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(PushMsgServiceServer).PushMsg(ctx, req.(*PushMsgReq)) - } - return interceptor(ctx, in, info, handler) -} - -func _PushMsgService_DelUserPushToken_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DelUserPushTokenReq) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(PushMsgServiceServer).DelUserPushToken(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/OpenIMServer.push.PushMsgService/DelUserPushToken", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(PushMsgServiceServer).DelUserPushToken(ctx, req.(*DelUserPushTokenReq)) - } - return interceptor(ctx, in, info, handler) -} - -var _PushMsgService_serviceDesc = grpc.ServiceDesc{ - ServiceName: "OpenIMServer.push.PushMsgService", - HandlerType: (*PushMsgServiceServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "PushMsg", - Handler: _PushMsgService_PushMsg_Handler, - }, - { - MethodName: "DelUserPushToken", - Handler: _PushMsgService_DelUserPushToken_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "push/push.proto", -} diff --git a/pkg/proto/push/push.proto b/pkg/proto/push/push.proto deleted file mode 100644 index 1f511b225..000000000 --- a/pkg/proto/push/push.proto +++ /dev/null @@ -1,40 +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. - -syntax = "proto3"; -package OpenIMServer.push; -import "sdkws/sdkws.proto"; -option go_package = "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/push"; - -message PushMsgReq { - sdkws.MsgData msgData = 1; - string conversationID = 2; -} - -message PushMsgResp{ -} - -message DelUserPushTokenReq{ - string userID = 1; - int32 platformID = 2; -} - -message DelUserPushTokenResp{ -} - -service PushMsgService { - rpc PushMsg(PushMsgReq) returns(PushMsgResp); - rpc DelUserPushToken(DelUserPushTokenReq) returns(DelUserPushTokenResp); -} - diff --git a/pkg/proto/sdkws/sdkws.go b/pkg/proto/sdkws/sdkws.go deleted file mode 100644 index d0b0ae8aa..000000000 --- a/pkg/proto/sdkws/sdkws.go +++ /dev/null @@ -1,46 +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. - -package sdkws - -import ( - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/constant" - "github.com/OpenIMSDK/Open-IM-Server/pkg/errs" -) - -func (x *MsgData) Check() error { - if x.SendID == "" { - return errs.ErrArgs.Wrap("sendID is empty") - } - if x.Content == nil { - return errs.ErrArgs.Wrap("content is empty") - } - if x.ContentType <= constant.ContentTypeBegin || x.ContentType >= constant.NotificationEnd { - return errs.ErrArgs.Wrap("content type is invalid") - } - if x.SessionType < constant.SingleChatType || x.SessionType > constant.NotificationChatType { - return errs.ErrArgs.Wrap("sessionType is invalid") - } - if x.SessionType == constant.SingleChatType || x.SessionType == constant.NotificationChatType { - if x.RecvID == "" { - return errs.ErrArgs.Wrap("recvID is empty") - } - } - if x.SessionType == constant.GroupChatType || x.SessionType == constant.SuperGroupChatType { - if x.GroupID == "" { - return errs.ErrArgs.Wrap("GroupID is empty") - } - } - return nil -} diff --git a/pkg/proto/sdkws/sdkws.pb.go b/pkg/proto/sdkws/sdkws.pb.go deleted file mode 100644 index b45d46d4c..000000000 --- a/pkg/proto/sdkws/sdkws.pb.go +++ /dev/null @@ -1,6399 +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. - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.29.1 -// protoc v4.22.0 -// source: sdkws/sdkws.proto - -package sdkws - -import ( - wrapperspb "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/wrapperspb" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// /////////////////////////////////base end///////////////////////////////////// -type PullOrder int32 - -const ( - PullOrder_PullOrderAsc PullOrder = 0 - PullOrder_PullOrderDesc PullOrder = 1 -) - -// Enum value maps for PullOrder. -var ( - PullOrder_name = map[int32]string{ - 0: "PullOrderAsc", - 1: "PullOrderDesc", - } - PullOrder_value = map[string]int32{ - "PullOrderAsc": 0, - "PullOrderDesc": 1, - } -) - -func (x PullOrder) Enum() *PullOrder { - p := new(PullOrder) - *p = x - return p -} - -func (x PullOrder) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (PullOrder) Descriptor() protoreflect.EnumDescriptor { - return file_sdkws_sdkws_proto_enumTypes[0].Descriptor() -} - -func (PullOrder) Type() protoreflect.EnumType { - return &file_sdkws_sdkws_proto_enumTypes[0] -} - -func (x PullOrder) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use PullOrder.Descriptor instead. -func (PullOrder) EnumDescriptor() ([]byte, []int) { - return file_sdkws_sdkws_proto_rawDescGZIP(), []int{0} -} - -type GroupInfo struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - GroupID string `protobuf:"bytes,1,opt,name=groupID,proto3" json:"groupID"` - GroupName string `protobuf:"bytes,2,opt,name=groupName,proto3" json:"groupName"` - Notification string `protobuf:"bytes,3,opt,name=notification,proto3" json:"notification"` - Introduction string `protobuf:"bytes,4,opt,name=introduction,proto3" json:"introduction"` - FaceURL string `protobuf:"bytes,5,opt,name=faceURL,proto3" json:"faceURL"` - OwnerUserID string `protobuf:"bytes,6,opt,name=ownerUserID,proto3" json:"ownerUserID"` - CreateTime int64 `protobuf:"varint,7,opt,name=createTime,proto3" json:"createTime"` - MemberCount uint32 `protobuf:"varint,8,opt,name=memberCount,proto3" json:"memberCount"` - Ex string `protobuf:"bytes,9,opt,name=ex,proto3" json:"ex"` - Status int32 `protobuf:"varint,10,opt,name=status,proto3" json:"status"` - CreatorUserID string `protobuf:"bytes,11,opt,name=creatorUserID,proto3" json:"creatorUserID"` - GroupType int32 `protobuf:"varint,12,opt,name=groupType,proto3" json:"groupType"` - NeedVerification int32 `protobuf:"varint,13,opt,name=needVerification,proto3" json:"needVerification"` - LookMemberInfo int32 `protobuf:"varint,14,opt,name=lookMemberInfo,proto3" json:"lookMemberInfo"` - ApplyMemberFriend int32 `protobuf:"varint,15,opt,name=applyMemberFriend,proto3" json:"applyMemberFriend"` - NotificationUpdateTime int64 `protobuf:"varint,16,opt,name=notificationUpdateTime,proto3" json:"notificationUpdateTime"` - NotificationUserID string `protobuf:"bytes,17,opt,name=notificationUserID,proto3" json:"notificationUserID"` -} - -func (x *GroupInfo) Reset() { - *x = GroupInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_sdkws_sdkws_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GroupInfo) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GroupInfo) ProtoMessage() {} - -func (x *GroupInfo) ProtoReflect() protoreflect.Message { - mi := &file_sdkws_sdkws_proto_msgTypes[0] - 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 GroupInfo.ProtoReflect.Descriptor instead. -func (*GroupInfo) Descriptor() ([]byte, []int) { - return file_sdkws_sdkws_proto_rawDescGZIP(), []int{0} -} - -func (x *GroupInfo) GetGroupID() string { - if x != nil { - return x.GroupID - } - return "" -} - -func (x *GroupInfo) GetGroupName() string { - if x != nil { - return x.GroupName - } - return "" -} - -func (x *GroupInfo) GetNotification() string { - if x != nil { - return x.Notification - } - return "" -} - -func (x *GroupInfo) GetIntroduction() string { - if x != nil { - return x.Introduction - } - return "" -} - -func (x *GroupInfo) GetFaceURL() string { - if x != nil { - return x.FaceURL - } - return "" -} - -func (x *GroupInfo) GetOwnerUserID() string { - if x != nil { - return x.OwnerUserID - } - return "" -} - -func (x *GroupInfo) GetCreateTime() int64 { - if x != nil { - return x.CreateTime - } - return 0 -} - -func (x *GroupInfo) GetMemberCount() uint32 { - if x != nil { - return x.MemberCount - } - return 0 -} - -func (x *GroupInfo) GetEx() string { - if x != nil { - return x.Ex - } - return "" -} - -func (x *GroupInfo) GetStatus() int32 { - if x != nil { - return x.Status - } - return 0 -} - -func (x *GroupInfo) GetCreatorUserID() string { - if x != nil { - return x.CreatorUserID - } - return "" -} - -func (x *GroupInfo) GetGroupType() int32 { - if x != nil { - return x.GroupType - } - return 0 -} - -func (x *GroupInfo) GetNeedVerification() int32 { - if x != nil { - return x.NeedVerification - } - return 0 -} - -func (x *GroupInfo) GetLookMemberInfo() int32 { - if x != nil { - return x.LookMemberInfo - } - return 0 -} - -func (x *GroupInfo) GetApplyMemberFriend() int32 { - if x != nil { - return x.ApplyMemberFriend - } - return 0 -} - -func (x *GroupInfo) GetNotificationUpdateTime() int64 { - if x != nil { - return x.NotificationUpdateTime - } - return 0 -} - -func (x *GroupInfo) GetNotificationUserID() string { - if x != nil { - return x.NotificationUserID - } - return "" -} - -type GroupInfoForSet struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - GroupID string `protobuf:"bytes,1,opt,name=groupID,proto3" json:"groupID"` - GroupName string `protobuf:"bytes,2,opt,name=groupName,proto3" json:"groupName"` - Notification string `protobuf:"bytes,3,opt,name=notification,proto3" json:"notification"` - Introduction string `protobuf:"bytes,4,opt,name=introduction,proto3" json:"introduction"` - FaceURL string `protobuf:"bytes,5,opt,name=faceURL,proto3" json:"faceURL"` - Ex string `protobuf:"bytes,6,opt,name=ex,proto3" json:"ex"` - NeedVerification *wrapperspb.Int32Value `protobuf:"bytes,7,opt,name=needVerification,proto3" json:"needVerification"` - LookMemberInfo *wrapperspb.Int32Value `protobuf:"bytes,8,opt,name=lookMemberInfo,proto3" json:"lookMemberInfo"` - ApplyMemberFriend *wrapperspb.Int32Value `protobuf:"bytes,9,opt,name=applyMemberFriend,proto3" json:"applyMemberFriend"` -} - -func (x *GroupInfoForSet) Reset() { - *x = GroupInfoForSet{} - if protoimpl.UnsafeEnabled { - mi := &file_sdkws_sdkws_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GroupInfoForSet) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GroupInfoForSet) ProtoMessage() {} - -func (x *GroupInfoForSet) ProtoReflect() protoreflect.Message { - mi := &file_sdkws_sdkws_proto_msgTypes[1] - 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 GroupInfoForSet.ProtoReflect.Descriptor instead. -func (*GroupInfoForSet) Descriptor() ([]byte, []int) { - return file_sdkws_sdkws_proto_rawDescGZIP(), []int{1} -} - -func (x *GroupInfoForSet) GetGroupID() string { - if x != nil { - return x.GroupID - } - return "" -} - -func (x *GroupInfoForSet) GetGroupName() string { - if x != nil { - return x.GroupName - } - return "" -} - -func (x *GroupInfoForSet) GetNotification() string { - if x != nil { - return x.Notification - } - return "" -} - -func (x *GroupInfoForSet) GetIntroduction() string { - if x != nil { - return x.Introduction - } - return "" -} - -func (x *GroupInfoForSet) GetFaceURL() string { - if x != nil { - return x.FaceURL - } - return "" -} - -func (x *GroupInfoForSet) GetEx() string { - if x != nil { - return x.Ex - } - return "" -} - -func (x *GroupInfoForSet) GetNeedVerification() *wrapperspb.Int32Value { - if x != nil { - return x.NeedVerification - } - return nil -} - -func (x *GroupInfoForSet) GetLookMemberInfo() *wrapperspb.Int32Value { - if x != nil { - return x.LookMemberInfo - } - return nil -} - -func (x *GroupInfoForSet) GetApplyMemberFriend() *wrapperspb.Int32Value { - if x != nil { - return x.ApplyMemberFriend - } - return nil -} - -type GroupMemberFullInfo struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - GroupID string `protobuf:"bytes,1,opt,name=groupID,proto3" json:"groupID"` - UserID string `protobuf:"bytes,2,opt,name=userID,proto3" json:"userID"` - RoleLevel int32 `protobuf:"varint,3,opt,name=roleLevel,proto3" json:"roleLevel"` - JoinTime int64 `protobuf:"varint,4,opt,name=joinTime,proto3" json:"joinTime"` - Nickname string `protobuf:"bytes,5,opt,name=nickname,proto3" json:"nickname"` - FaceURL string `protobuf:"bytes,6,opt,name=faceURL,proto3" json:"faceURL"` - AppMangerLevel int32 `protobuf:"varint,7,opt,name=appMangerLevel,proto3" json:"appMangerLevel"` //if >0 - JoinSource int32 `protobuf:"varint,8,opt,name=joinSource,proto3" json:"joinSource"` - OperatorUserID string `protobuf:"bytes,9,opt,name=operatorUserID,proto3" json:"operatorUserID"` - Ex string `protobuf:"bytes,10,opt,name=ex,proto3" json:"ex"` - MuteEndTime int64 `protobuf:"varint,11,opt,name=muteEndTime,proto3" json:"muteEndTime"` - InviterUserID string `protobuf:"bytes,12,opt,name=inviterUserID,proto3" json:"inviterUserID"` -} - -func (x *GroupMemberFullInfo) Reset() { - *x = GroupMemberFullInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_sdkws_sdkws_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GroupMemberFullInfo) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GroupMemberFullInfo) ProtoMessage() {} - -func (x *GroupMemberFullInfo) ProtoReflect() protoreflect.Message { - mi := &file_sdkws_sdkws_proto_msgTypes[2] - 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 GroupMemberFullInfo.ProtoReflect.Descriptor instead. -func (*GroupMemberFullInfo) Descriptor() ([]byte, []int) { - return file_sdkws_sdkws_proto_rawDescGZIP(), []int{2} -} - -func (x *GroupMemberFullInfo) GetGroupID() string { - if x != nil { - return x.GroupID - } - return "" -} - -func (x *GroupMemberFullInfo) GetUserID() string { - if x != nil { - return x.UserID - } - return "" -} - -func (x *GroupMemberFullInfo) GetRoleLevel() int32 { - if x != nil { - return x.RoleLevel - } - return 0 -} - -func (x *GroupMemberFullInfo) GetJoinTime() int64 { - if x != nil { - return x.JoinTime - } - return 0 -} - -func (x *GroupMemberFullInfo) GetNickname() string { - if x != nil { - return x.Nickname - } - return "" -} - -func (x *GroupMemberFullInfo) GetFaceURL() string { - if x != nil { - return x.FaceURL - } - return "" -} - -func (x *GroupMemberFullInfo) GetAppMangerLevel() int32 { - if x != nil { - return x.AppMangerLevel - } - return 0 -} - -func (x *GroupMemberFullInfo) GetJoinSource() int32 { - if x != nil { - return x.JoinSource - } - return 0 -} - -func (x *GroupMemberFullInfo) GetOperatorUserID() string { - if x != nil { - return x.OperatorUserID - } - return "" -} - -func (x *GroupMemberFullInfo) GetEx() string { - if x != nil { - return x.Ex - } - return "" -} - -func (x *GroupMemberFullInfo) GetMuteEndTime() int64 { - if x != nil { - return x.MuteEndTime - } - return 0 -} - -func (x *GroupMemberFullInfo) GetInviterUserID() string { - if x != nil { - return x.InviterUserID - } - return "" -} - -type PublicUserInfo struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - UserID string `protobuf:"bytes,1,opt,name=userID,proto3" json:"userID"` - Nickname string `protobuf:"bytes,2,opt,name=nickname,proto3" json:"nickname"` - FaceURL string `protobuf:"bytes,3,opt,name=faceURL,proto3" json:"faceURL"` - Ex string `protobuf:"bytes,4,opt,name=ex,proto3" json:"ex"` -} - -func (x *PublicUserInfo) Reset() { - *x = PublicUserInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_sdkws_sdkws_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *PublicUserInfo) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*PublicUserInfo) ProtoMessage() {} - -func (x *PublicUserInfo) ProtoReflect() protoreflect.Message { - mi := &file_sdkws_sdkws_proto_msgTypes[3] - 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 PublicUserInfo.ProtoReflect.Descriptor instead. -func (*PublicUserInfo) Descriptor() ([]byte, []int) { - return file_sdkws_sdkws_proto_rawDescGZIP(), []int{3} -} - -func (x *PublicUserInfo) GetUserID() string { - if x != nil { - return x.UserID - } - return "" -} - -func (x *PublicUserInfo) GetNickname() string { - if x != nil { - return x.Nickname - } - return "" -} - -func (x *PublicUserInfo) GetFaceURL() string { - if x != nil { - return x.FaceURL - } - return "" -} - -func (x *PublicUserInfo) GetEx() string { - if x != nil { - return x.Ex - } - return "" -} - -type UserInfo struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - UserID string `protobuf:"bytes,1,opt,name=userID,proto3" json:"userID"` - Nickname string `protobuf:"bytes,2,opt,name=nickname,proto3" json:"nickname"` - FaceURL string `protobuf:"bytes,3,opt,name=faceURL,proto3" json:"faceURL"` - Ex string `protobuf:"bytes,4,opt,name=ex,proto3" json:"ex"` - CreateTime int64 `protobuf:"varint,5,opt,name=createTime,proto3" json:"createTime"` - AppMangerLevel int32 `protobuf:"varint,6,opt,name=appMangerLevel,proto3" json:"appMangerLevel"` - GlobalRecvMsgOpt int32 `protobuf:"varint,7,opt,name=globalRecvMsgOpt,proto3" json:"globalRecvMsgOpt"` -} - -func (x *UserInfo) Reset() { - *x = UserInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_sdkws_sdkws_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *UserInfo) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*UserInfo) ProtoMessage() {} - -func (x *UserInfo) ProtoReflect() protoreflect.Message { - mi := &file_sdkws_sdkws_proto_msgTypes[4] - 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 UserInfo.ProtoReflect.Descriptor instead. -func (*UserInfo) Descriptor() ([]byte, []int) { - return file_sdkws_sdkws_proto_rawDescGZIP(), []int{4} -} - -func (x *UserInfo) GetUserID() string { - if x != nil { - return x.UserID - } - return "" -} - -func (x *UserInfo) GetNickname() string { - if x != nil { - return x.Nickname - } - return "" -} - -func (x *UserInfo) GetFaceURL() string { - if x != nil { - return x.FaceURL - } - return "" -} - -func (x *UserInfo) GetEx() string { - if x != nil { - return x.Ex - } - return "" -} - -func (x *UserInfo) GetCreateTime() int64 { - if x != nil { - return x.CreateTime - } - return 0 -} - -func (x *UserInfo) GetAppMangerLevel() int32 { - if x != nil { - return x.AppMangerLevel - } - return 0 -} - -func (x *UserInfo) GetGlobalRecvMsgOpt() int32 { - if x != nil { - return x.GlobalRecvMsgOpt - } - return 0 -} - -type FriendInfo struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - OwnerUserID string `protobuf:"bytes,1,opt,name=ownerUserID,proto3" json:"ownerUserID"` - Remark string `protobuf:"bytes,2,opt,name=remark,proto3" json:"remark"` - CreateTime int64 `protobuf:"varint,3,opt,name=createTime,proto3" json:"createTime"` - FriendUser *UserInfo `protobuf:"bytes,4,opt,name=friendUser,proto3" json:"friendUser"` - AddSource int32 `protobuf:"varint,5,opt,name=addSource,proto3" json:"addSource"` - OperatorUserID string `protobuf:"bytes,6,opt,name=operatorUserID,proto3" json:"operatorUserID"` - Ex string `protobuf:"bytes,7,opt,name=ex,proto3" json:"ex"` -} - -func (x *FriendInfo) Reset() { - *x = FriendInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_sdkws_sdkws_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *FriendInfo) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*FriendInfo) ProtoMessage() {} - -func (x *FriendInfo) ProtoReflect() protoreflect.Message { - mi := &file_sdkws_sdkws_proto_msgTypes[5] - 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 FriendInfo.ProtoReflect.Descriptor instead. -func (*FriendInfo) Descriptor() ([]byte, []int) { - return file_sdkws_sdkws_proto_rawDescGZIP(), []int{5} -} - -func (x *FriendInfo) GetOwnerUserID() string { - if x != nil { - return x.OwnerUserID - } - return "" -} - -func (x *FriendInfo) GetRemark() string { - if x != nil { - return x.Remark - } - return "" -} - -func (x *FriendInfo) GetCreateTime() int64 { - if x != nil { - return x.CreateTime - } - return 0 -} - -func (x *FriendInfo) GetFriendUser() *UserInfo { - if x != nil { - return x.FriendUser - } - return nil -} - -func (x *FriendInfo) GetAddSource() int32 { - if x != nil { - return x.AddSource - } - return 0 -} - -func (x *FriendInfo) GetOperatorUserID() string { - if x != nil { - return x.OperatorUserID - } - return "" -} - -func (x *FriendInfo) GetEx() string { - if x != nil { - return x.Ex - } - return "" -} - -type BlackInfo struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - OwnerUserID string `protobuf:"bytes,1,opt,name=ownerUserID,proto3" json:"ownerUserID"` - CreateTime int64 `protobuf:"varint,2,opt,name=createTime,proto3" json:"createTime"` - BlackUserInfo *PublicUserInfo `protobuf:"bytes,3,opt,name=blackUserInfo,proto3" json:"blackUserInfo"` - AddSource int32 `protobuf:"varint,4,opt,name=addSource,proto3" json:"addSource"` - OperatorUserID string `protobuf:"bytes,5,opt,name=operatorUserID,proto3" json:"operatorUserID"` - Ex string `protobuf:"bytes,6,opt,name=ex,proto3" json:"ex"` -} - -func (x *BlackInfo) Reset() { - *x = BlackInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_sdkws_sdkws_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *BlackInfo) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*BlackInfo) ProtoMessage() {} - -func (x *BlackInfo) ProtoReflect() protoreflect.Message { - mi := &file_sdkws_sdkws_proto_msgTypes[6] - 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 BlackInfo.ProtoReflect.Descriptor instead. -func (*BlackInfo) Descriptor() ([]byte, []int) { - return file_sdkws_sdkws_proto_rawDescGZIP(), []int{6} -} - -func (x *BlackInfo) GetOwnerUserID() string { - if x != nil { - return x.OwnerUserID - } - return "" -} - -func (x *BlackInfo) GetCreateTime() int64 { - if x != nil { - return x.CreateTime - } - return 0 -} - -func (x *BlackInfo) GetBlackUserInfo() *PublicUserInfo { - if x != nil { - return x.BlackUserInfo - } - return nil -} - -func (x *BlackInfo) GetAddSource() int32 { - if x != nil { - return x.AddSource - } - return 0 -} - -func (x *BlackInfo) GetOperatorUserID() string { - if x != nil { - return x.OperatorUserID - } - return "" -} - -func (x *BlackInfo) GetEx() string { - if x != nil { - return x.Ex - } - return "" -} - -type GroupRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - UserInfo *PublicUserInfo `protobuf:"bytes,1,opt,name=userInfo,proto3" json:"userInfo"` - GroupInfo *GroupInfo `protobuf:"bytes,2,opt,name=groupInfo,proto3" json:"groupInfo"` - HandleResult int32 `protobuf:"varint,3,opt,name=handleResult,proto3" json:"handleResult"` - ReqMsg string `protobuf:"bytes,4,opt,name=reqMsg,proto3" json:"reqMsg"` - HandleMsg string `protobuf:"bytes,5,opt,name=handleMsg,proto3" json:"handleMsg"` - ReqTime int64 `protobuf:"varint,6,opt,name=reqTime,proto3" json:"reqTime"` - HandleUserID string `protobuf:"bytes,7,opt,name=handleUserID,proto3" json:"handleUserID"` - HandleTime int64 `protobuf:"varint,8,opt,name=handleTime,proto3" json:"handleTime"` - Ex string `protobuf:"bytes,9,opt,name=ex,proto3" json:"ex"` - JoinSource int32 `protobuf:"varint,10,opt,name=joinSource,proto3" json:"joinSource"` - InviterUserID string `protobuf:"bytes,11,opt,name=inviterUserID,proto3" json:"inviterUserID"` -} - -func (x *GroupRequest) Reset() { - *x = GroupRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_sdkws_sdkws_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GroupRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GroupRequest) ProtoMessage() {} - -func (x *GroupRequest) ProtoReflect() protoreflect.Message { - mi := &file_sdkws_sdkws_proto_msgTypes[7] - 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 GroupRequest.ProtoReflect.Descriptor instead. -func (*GroupRequest) Descriptor() ([]byte, []int) { - return file_sdkws_sdkws_proto_rawDescGZIP(), []int{7} -} - -func (x *GroupRequest) GetUserInfo() *PublicUserInfo { - if x != nil { - return x.UserInfo - } - return nil -} - -func (x *GroupRequest) GetGroupInfo() *GroupInfo { - if x != nil { - return x.GroupInfo - } - return nil -} - -func (x *GroupRequest) GetHandleResult() int32 { - if x != nil { - return x.HandleResult - } - return 0 -} - -func (x *GroupRequest) GetReqMsg() string { - if x != nil { - return x.ReqMsg - } - return "" -} - -func (x *GroupRequest) GetHandleMsg() string { - if x != nil { - return x.HandleMsg - } - return "" -} - -func (x *GroupRequest) GetReqTime() int64 { - if x != nil { - return x.ReqTime - } - return 0 -} - -func (x *GroupRequest) GetHandleUserID() string { - if x != nil { - return x.HandleUserID - } - return "" -} - -func (x *GroupRequest) GetHandleTime() int64 { - if x != nil { - return x.HandleTime - } - return 0 -} - -func (x *GroupRequest) GetEx() string { - if x != nil { - return x.Ex - } - return "" -} - -func (x *GroupRequest) GetJoinSource() int32 { - if x != nil { - return x.JoinSource - } - return 0 -} - -func (x *GroupRequest) GetInviterUserID() string { - if x != nil { - return x.InviterUserID - } - return "" -} - -type FriendRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - FromUserID string `protobuf:"bytes,1,opt,name=fromUserID,proto3" json:"fromUserID"` - FromNickname string `protobuf:"bytes,2,opt,name=fromNickname,proto3" json:"fromNickname"` - FromFaceURL string `protobuf:"bytes,3,opt,name=fromFaceURL,proto3" json:"fromFaceURL"` - ToUserID string `protobuf:"bytes,4,opt,name=toUserID,proto3" json:"toUserID"` - ToNickname string `protobuf:"bytes,5,opt,name=toNickname,proto3" json:"toNickname"` - ToFaceURL string `protobuf:"bytes,6,opt,name=toFaceURL,proto3" json:"toFaceURL"` - HandleResult int32 `protobuf:"varint,7,opt,name=handleResult,proto3" json:"handleResult"` - ReqMsg string `protobuf:"bytes,8,opt,name=reqMsg,proto3" json:"reqMsg"` - CreateTime int64 `protobuf:"varint,9,opt,name=createTime,proto3" json:"createTime"` - HandlerUserID string `protobuf:"bytes,10,opt,name=handlerUserID,proto3" json:"handlerUserID"` - HandleMsg string `protobuf:"bytes,11,opt,name=handleMsg,proto3" json:"handleMsg"` - HandleTime int64 `protobuf:"varint,12,opt,name=handleTime,proto3" json:"handleTime"` - Ex string `protobuf:"bytes,13,opt,name=ex,proto3" json:"ex"` -} - -func (x *FriendRequest) Reset() { - *x = FriendRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_sdkws_sdkws_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *FriendRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*FriendRequest) ProtoMessage() {} - -func (x *FriendRequest) ProtoReflect() protoreflect.Message { - mi := &file_sdkws_sdkws_proto_msgTypes[8] - 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 FriendRequest.ProtoReflect.Descriptor instead. -func (*FriendRequest) Descriptor() ([]byte, []int) { - return file_sdkws_sdkws_proto_rawDescGZIP(), []int{8} -} - -func (x *FriendRequest) GetFromUserID() string { - if x != nil { - return x.FromUserID - } - return "" -} - -func (x *FriendRequest) GetFromNickname() string { - if x != nil { - return x.FromNickname - } - return "" -} - -func (x *FriendRequest) GetFromFaceURL() string { - if x != nil { - return x.FromFaceURL - } - return "" -} - -func (x *FriendRequest) GetToUserID() string { - if x != nil { - return x.ToUserID - } - return "" -} - -func (x *FriendRequest) GetToNickname() string { - if x != nil { - return x.ToNickname - } - return "" -} - -func (x *FriendRequest) GetToFaceURL() string { - if x != nil { - return x.ToFaceURL - } - return "" -} - -func (x *FriendRequest) GetHandleResult() int32 { - if x != nil { - return x.HandleResult - } - return 0 -} - -func (x *FriendRequest) GetReqMsg() string { - if x != nil { - return x.ReqMsg - } - return "" -} - -func (x *FriendRequest) GetCreateTime() int64 { - if x != nil { - return x.CreateTime - } - return 0 -} - -func (x *FriendRequest) GetHandlerUserID() string { - if x != nil { - return x.HandlerUserID - } - return "" -} - -func (x *FriendRequest) GetHandleMsg() string { - if x != nil { - return x.HandleMsg - } - return "" -} - -func (x *FriendRequest) GetHandleTime() int64 { - if x != nil { - return x.HandleTime - } - return 0 -} - -func (x *FriendRequest) GetEx() string { - if x != nil { - return x.Ex - } - return "" -} - -type PullMessageBySeqsReq struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - UserID string `protobuf:"bytes,1,opt,name=userID,proto3" json:"userID"` - SeqRanges []*SeqRange `protobuf:"bytes,2,rep,name=seqRanges,proto3" json:"seqRanges"` - Order PullOrder `protobuf:"varint,3,opt,name=order,proto3,enum=OpenIMServer.sdkws.PullOrder" json:"order"` -} - -func (x *PullMessageBySeqsReq) Reset() { - *x = PullMessageBySeqsReq{} - if protoimpl.UnsafeEnabled { - mi := &file_sdkws_sdkws_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *PullMessageBySeqsReq) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*PullMessageBySeqsReq) ProtoMessage() {} - -func (x *PullMessageBySeqsReq) ProtoReflect() protoreflect.Message { - mi := &file_sdkws_sdkws_proto_msgTypes[9] - 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 PullMessageBySeqsReq.ProtoReflect.Descriptor instead. -func (*PullMessageBySeqsReq) Descriptor() ([]byte, []int) { - return file_sdkws_sdkws_proto_rawDescGZIP(), []int{9} -} - -func (x *PullMessageBySeqsReq) GetUserID() string { - if x != nil { - return x.UserID - } - return "" -} - -func (x *PullMessageBySeqsReq) GetSeqRanges() []*SeqRange { - if x != nil { - return x.SeqRanges - } - return nil -} - -func (x *PullMessageBySeqsReq) GetOrder() PullOrder { - if x != nil { - return x.Order - } - return PullOrder_PullOrderAsc -} - -type SeqRange struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - ConversationID string `protobuf:"bytes,1,opt,name=conversationID,proto3" json:"conversationID"` - Begin int64 `protobuf:"varint,2,opt,name=begin,proto3" json:"begin"` - End int64 `protobuf:"varint,3,opt,name=end,proto3" json:"end"` - Num int64 `protobuf:"varint,4,opt,name=num,proto3" json:"num"` -} - -func (x *SeqRange) Reset() { - *x = SeqRange{} - if protoimpl.UnsafeEnabled { - mi := &file_sdkws_sdkws_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SeqRange) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SeqRange) ProtoMessage() {} - -func (x *SeqRange) ProtoReflect() protoreflect.Message { - mi := &file_sdkws_sdkws_proto_msgTypes[10] - 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 SeqRange.ProtoReflect.Descriptor instead. -func (*SeqRange) Descriptor() ([]byte, []int) { - return file_sdkws_sdkws_proto_rawDescGZIP(), []int{10} -} - -func (x *SeqRange) GetConversationID() string { - if x != nil { - return x.ConversationID - } - return "" -} - -func (x *SeqRange) GetBegin() int64 { - if x != nil { - return x.Begin - } - return 0 -} - -func (x *SeqRange) GetEnd() int64 { - if x != nil { - return x.End - } - return 0 -} - -func (x *SeqRange) GetNum() int64 { - if x != nil { - return x.Num - } - return 0 -} - -type PullMsgs struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Msgs []*MsgData `protobuf:"bytes,1,rep,name=Msgs,proto3" json:"Msgs"` - IsEnd bool `protobuf:"varint,2,opt,name=isEnd,proto3" json:"isEnd"` -} - -func (x *PullMsgs) Reset() { - *x = PullMsgs{} - if protoimpl.UnsafeEnabled { - mi := &file_sdkws_sdkws_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *PullMsgs) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*PullMsgs) ProtoMessage() {} - -func (x *PullMsgs) ProtoReflect() protoreflect.Message { - mi := &file_sdkws_sdkws_proto_msgTypes[11] - 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 PullMsgs.ProtoReflect.Descriptor instead. -func (*PullMsgs) Descriptor() ([]byte, []int) { - return file_sdkws_sdkws_proto_rawDescGZIP(), []int{11} -} - -func (x *PullMsgs) GetMsgs() []*MsgData { - if x != nil { - return x.Msgs - } - return nil -} - -func (x *PullMsgs) GetIsEnd() bool { - if x != nil { - return x.IsEnd - } - return false -} - -type PullMessageBySeqsResp struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Msgs map[string]*PullMsgs `protobuf:"bytes,1,rep,name=msgs,proto3" json:"msgs" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - NotificationMsgs map[string]*PullMsgs `protobuf:"bytes,2,rep,name=notificationMsgs,proto3" json:"notificationMsgs" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` -} - -func (x *PullMessageBySeqsResp) Reset() { - *x = PullMessageBySeqsResp{} - if protoimpl.UnsafeEnabled { - mi := &file_sdkws_sdkws_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *PullMessageBySeqsResp) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*PullMessageBySeqsResp) ProtoMessage() {} - -func (x *PullMessageBySeqsResp) ProtoReflect() protoreflect.Message { - mi := &file_sdkws_sdkws_proto_msgTypes[12] - 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 PullMessageBySeqsResp.ProtoReflect.Descriptor instead. -func (*PullMessageBySeqsResp) Descriptor() ([]byte, []int) { - return file_sdkws_sdkws_proto_rawDescGZIP(), []int{12} -} - -func (x *PullMessageBySeqsResp) GetMsgs() map[string]*PullMsgs { - if x != nil { - return x.Msgs - } - return nil -} - -func (x *PullMessageBySeqsResp) GetNotificationMsgs() map[string]*PullMsgs { - if x != nil { - return x.NotificationMsgs - } - return nil -} - -type GetMaxSeqReq struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - UserID string `protobuf:"bytes,1,opt,name=userID,proto3" json:"userID"` -} - -func (x *GetMaxSeqReq) Reset() { - *x = GetMaxSeqReq{} - if protoimpl.UnsafeEnabled { - mi := &file_sdkws_sdkws_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetMaxSeqReq) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetMaxSeqReq) ProtoMessage() {} - -func (x *GetMaxSeqReq) ProtoReflect() protoreflect.Message { - mi := &file_sdkws_sdkws_proto_msgTypes[13] - 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 GetMaxSeqReq.ProtoReflect.Descriptor instead. -func (*GetMaxSeqReq) Descriptor() ([]byte, []int) { - return file_sdkws_sdkws_proto_rawDescGZIP(), []int{13} -} - -func (x *GetMaxSeqReq) GetUserID() string { - if x != nil { - return x.UserID - } - return "" -} - -type GetMaxSeqResp struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - MaxSeqs map[string]int64 `protobuf:"bytes,1,rep,name=maxSeqs,proto3" json:"maxSeqs" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` - MinSeqs map[string]int64 `protobuf:"bytes,2,rep,name=minSeqs,proto3" json:"minSeqs" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` -} - -func (x *GetMaxSeqResp) Reset() { - *x = GetMaxSeqResp{} - if protoimpl.UnsafeEnabled { - mi := &file_sdkws_sdkws_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetMaxSeqResp) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetMaxSeqResp) ProtoMessage() {} - -func (x *GetMaxSeqResp) ProtoReflect() protoreflect.Message { - mi := &file_sdkws_sdkws_proto_msgTypes[14] - 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 GetMaxSeqResp.ProtoReflect.Descriptor instead. -func (*GetMaxSeqResp) Descriptor() ([]byte, []int) { - return file_sdkws_sdkws_proto_rawDescGZIP(), []int{14} -} - -func (x *GetMaxSeqResp) GetMaxSeqs() map[string]int64 { - if x != nil { - return x.MaxSeqs - } - return nil -} - -func (x *GetMaxSeqResp) GetMinSeqs() map[string]int64 { - if x != nil { - return x.MinSeqs - } - return nil -} - -type UserSendMsgResp struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - ServerMsgID string `protobuf:"bytes,1,opt,name=serverMsgID,proto3" json:"serverMsgID"` - ClientMsgID string `protobuf:"bytes,2,opt,name=clientMsgID,proto3" json:"clientMsgID"` - SendTime int64 `protobuf:"varint,3,opt,name=sendTime,proto3" json:"sendTime"` -} - -func (x *UserSendMsgResp) Reset() { - *x = UserSendMsgResp{} - if protoimpl.UnsafeEnabled { - mi := &file_sdkws_sdkws_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *UserSendMsgResp) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*UserSendMsgResp) ProtoMessage() {} - -func (x *UserSendMsgResp) ProtoReflect() protoreflect.Message { - mi := &file_sdkws_sdkws_proto_msgTypes[15] - 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 UserSendMsgResp.ProtoReflect.Descriptor instead. -func (*UserSendMsgResp) Descriptor() ([]byte, []int) { - return file_sdkws_sdkws_proto_rawDescGZIP(), []int{15} -} - -func (x *UserSendMsgResp) GetServerMsgID() string { - if x != nil { - return x.ServerMsgID - } - return "" -} - -func (x *UserSendMsgResp) GetClientMsgID() string { - if x != nil { - return x.ClientMsgID - } - return "" -} - -func (x *UserSendMsgResp) GetSendTime() int64 { - if x != nil { - return x.SendTime - } - return 0 -} - -type MsgData struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - SendID string `protobuf:"bytes,1,opt,name=sendID,proto3" json:"sendID"` - RecvID string `protobuf:"bytes,2,opt,name=recvID,proto3" json:"recvID"` - GroupID string `protobuf:"bytes,3,opt,name=groupID,proto3" json:"groupID"` - ClientMsgID string `protobuf:"bytes,4,opt,name=clientMsgID,proto3" json:"clientMsgID"` - ServerMsgID string `protobuf:"bytes,5,opt,name=serverMsgID,proto3" json:"serverMsgID"` - SenderPlatformID int32 `protobuf:"varint,6,opt,name=senderPlatformID,proto3" json:"senderPlatformID"` - SenderNickname string `protobuf:"bytes,7,opt,name=senderNickname,proto3" json:"senderNickname"` - SenderFaceURL string `protobuf:"bytes,8,opt,name=senderFaceURL,proto3" json:"senderFaceURL"` - SessionType int32 `protobuf:"varint,9,opt,name=sessionType,proto3" json:"sessionType"` - MsgFrom int32 `protobuf:"varint,10,opt,name=msgFrom,proto3" json:"msgFrom"` - ContentType int32 `protobuf:"varint,11,opt,name=contentType,proto3" json:"contentType"` - Content []byte `protobuf:"bytes,12,opt,name=content,proto3" json:"content"` - Seq int64 `protobuf:"varint,14,opt,name=seq,proto3" json:"seq"` - SendTime int64 `protobuf:"varint,15,opt,name=sendTime,proto3" json:"sendTime"` - CreateTime int64 `protobuf:"varint,16,opt,name=createTime,proto3" json:"createTime"` - Status int32 `protobuf:"varint,17,opt,name=status,proto3" json:"status"` - IsRead bool `protobuf:"varint,18,opt,name=isRead,proto3" json:"isRead"` - Options map[string]bool `protobuf:"bytes,19,rep,name=options,proto3" json:"options" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` - OfflinePushInfo *OfflinePushInfo `protobuf:"bytes,20,opt,name=offlinePushInfo,proto3" json:"offlinePushInfo"` - AtUserIDList []string `protobuf:"bytes,21,rep,name=atUserIDList,proto3" json:"atUserIDList"` - AttachedInfo string `protobuf:"bytes,22,opt,name=attachedInfo,proto3" json:"attachedInfo"` - Ex string `protobuf:"bytes,23,opt,name=ex,proto3" json:"ex"` -} - -func (x *MsgData) Reset() { - *x = MsgData{} - if protoimpl.UnsafeEnabled { - mi := &file_sdkws_sdkws_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgData) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgData) ProtoMessage() {} - -func (x *MsgData) ProtoReflect() protoreflect.Message { - mi := &file_sdkws_sdkws_proto_msgTypes[16] - 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 MsgData.ProtoReflect.Descriptor instead. -func (*MsgData) Descriptor() ([]byte, []int) { - return file_sdkws_sdkws_proto_rawDescGZIP(), []int{16} -} - -func (x *MsgData) GetSendID() string { - if x != nil { - return x.SendID - } - return "" -} - -func (x *MsgData) GetRecvID() string { - if x != nil { - return x.RecvID - } - return "" -} - -func (x *MsgData) GetGroupID() string { - if x != nil { - return x.GroupID - } - return "" -} - -func (x *MsgData) GetClientMsgID() string { - if x != nil { - return x.ClientMsgID - } - return "" -} - -func (x *MsgData) GetServerMsgID() string { - if x != nil { - return x.ServerMsgID - } - return "" -} - -func (x *MsgData) GetSenderPlatformID() int32 { - if x != nil { - return x.SenderPlatformID - } - return 0 -} - -func (x *MsgData) GetSenderNickname() string { - if x != nil { - return x.SenderNickname - } - return "" -} - -func (x *MsgData) GetSenderFaceURL() string { - if x != nil { - return x.SenderFaceURL - } - return "" -} - -func (x *MsgData) GetSessionType() int32 { - if x != nil { - return x.SessionType - } - return 0 -} - -func (x *MsgData) GetMsgFrom() int32 { - if x != nil { - return x.MsgFrom - } - return 0 -} - -func (x *MsgData) GetContentType() int32 { - if x != nil { - return x.ContentType - } - return 0 -} - -func (x *MsgData) GetContent() []byte { - if x != nil { - return x.Content - } - return nil -} - -func (x *MsgData) GetSeq() int64 { - if x != nil { - return x.Seq - } - return 0 -} - -func (x *MsgData) GetSendTime() int64 { - if x != nil { - return x.SendTime - } - return 0 -} - -func (x *MsgData) GetCreateTime() int64 { - if x != nil { - return x.CreateTime - } - return 0 -} - -func (x *MsgData) GetStatus() int32 { - if x != nil { - return x.Status - } - return 0 -} - -func (x *MsgData) GetIsRead() bool { - if x != nil { - return x.IsRead - } - return false -} - -func (x *MsgData) GetOptions() map[string]bool { - if x != nil { - return x.Options - } - return nil -} - -func (x *MsgData) GetOfflinePushInfo() *OfflinePushInfo { - if x != nil { - return x.OfflinePushInfo - } - return nil -} - -func (x *MsgData) GetAtUserIDList() []string { - if x != nil { - return x.AtUserIDList - } - return nil -} - -func (x *MsgData) GetAttachedInfo() string { - if x != nil { - return x.AttachedInfo - } - return "" -} - -func (x *MsgData) GetEx() string { - if x != nil { - return x.Ex - } - return "" -} - -type PushMessages struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Msgs map[string]*PullMsgs `protobuf:"bytes,1,rep,name=msgs,proto3" json:"msgs" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - NotificationMsgs map[string]*PullMsgs `protobuf:"bytes,2,rep,name=notificationMsgs,proto3" json:"notificationMsgs" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` -} - -func (x *PushMessages) Reset() { - *x = PushMessages{} - if protoimpl.UnsafeEnabled { - mi := &file_sdkws_sdkws_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *PushMessages) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*PushMessages) ProtoMessage() {} - -func (x *PushMessages) ProtoReflect() protoreflect.Message { - mi := &file_sdkws_sdkws_proto_msgTypes[17] - 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 PushMessages.ProtoReflect.Descriptor instead. -func (*PushMessages) Descriptor() ([]byte, []int) { - return file_sdkws_sdkws_proto_rawDescGZIP(), []int{17} -} - -func (x *PushMessages) GetMsgs() map[string]*PullMsgs { - if x != nil { - return x.Msgs - } - return nil -} - -func (x *PushMessages) GetNotificationMsgs() map[string]*PullMsgs { - if x != nil { - return x.NotificationMsgs - } - return nil -} - -type OfflinePushInfo struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title"` - Desc string `protobuf:"bytes,2,opt,name=desc,proto3" json:"desc"` - Ex string `protobuf:"bytes,3,opt,name=ex,proto3" json:"ex"` - IOSPushSound string `protobuf:"bytes,4,opt,name=iOSPushSound,proto3" json:"iOSPushSound"` - IOSBadgeCount bool `protobuf:"varint,5,opt,name=iOSBadgeCount,proto3" json:"iOSBadgeCount"` - SignalInfo string `protobuf:"bytes,6,opt,name=signalInfo,proto3" json:"signalInfo"` -} - -func (x *OfflinePushInfo) Reset() { - *x = OfflinePushInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_sdkws_sdkws_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *OfflinePushInfo) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*OfflinePushInfo) ProtoMessage() {} - -func (x *OfflinePushInfo) ProtoReflect() protoreflect.Message { - mi := &file_sdkws_sdkws_proto_msgTypes[18] - 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 OfflinePushInfo.ProtoReflect.Descriptor instead. -func (*OfflinePushInfo) Descriptor() ([]byte, []int) { - return file_sdkws_sdkws_proto_rawDescGZIP(), []int{18} -} - -func (x *OfflinePushInfo) GetTitle() string { - if x != nil { - return x.Title - } - return "" -} - -func (x *OfflinePushInfo) GetDesc() string { - if x != nil { - return x.Desc - } - return "" -} - -func (x *OfflinePushInfo) GetEx() string { - if x != nil { - return x.Ex - } - return "" -} - -func (x *OfflinePushInfo) GetIOSPushSound() string { - if x != nil { - return x.IOSPushSound - } - return "" -} - -func (x *OfflinePushInfo) GetIOSBadgeCount() bool { - if x != nil { - return x.IOSBadgeCount - } - return false -} - -func (x *OfflinePushInfo) GetSignalInfo() string { - if x != nil { - return x.SignalInfo - } - return "" -} - -type TipsComm struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Detail []byte `protobuf:"bytes,1,opt,name=detail,proto3" json:"detail"` - DefaultTips string `protobuf:"bytes,2,opt,name=defaultTips,proto3" json:"defaultTips"` - JsonDetail string `protobuf:"bytes,3,opt,name=jsonDetail,proto3" json:"jsonDetail"` -} - -func (x *TipsComm) Reset() { - *x = TipsComm{} - if protoimpl.UnsafeEnabled { - mi := &file_sdkws_sdkws_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *TipsComm) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*TipsComm) ProtoMessage() {} - -func (x *TipsComm) ProtoReflect() protoreflect.Message { - mi := &file_sdkws_sdkws_proto_msgTypes[19] - 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 TipsComm.ProtoReflect.Descriptor instead. -func (*TipsComm) Descriptor() ([]byte, []int) { - return file_sdkws_sdkws_proto_rawDescGZIP(), []int{19} -} - -func (x *TipsComm) GetDetail() []byte { - if x != nil { - return x.Detail - } - return nil -} - -func (x *TipsComm) GetDefaultTips() string { - if x != nil { - return x.DefaultTips - } - return "" -} - -func (x *TipsComm) GetJsonDetail() string { - if x != nil { - return x.JsonDetail - } - return "" -} - -// OnGroupCreated() -type GroupCreatedTips struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Group *GroupInfo `protobuf:"bytes,1,opt,name=group,proto3" json:"group"` - OpUser *GroupMemberFullInfo `protobuf:"bytes,2,opt,name=opUser,proto3" json:"opUser"` - MemberList []*GroupMemberFullInfo `protobuf:"bytes,3,rep,name=memberList,proto3" json:"memberList"` - OperationTime int64 `protobuf:"varint,4,opt,name=operationTime,proto3" json:"operationTime"` - GroupOwnerUser *GroupMemberFullInfo `protobuf:"bytes,5,opt,name=groupOwnerUser,proto3" json:"groupOwnerUser"` -} - -func (x *GroupCreatedTips) Reset() { - *x = GroupCreatedTips{} - if protoimpl.UnsafeEnabled { - mi := &file_sdkws_sdkws_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GroupCreatedTips) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GroupCreatedTips) ProtoMessage() {} - -func (x *GroupCreatedTips) ProtoReflect() protoreflect.Message { - mi := &file_sdkws_sdkws_proto_msgTypes[20] - 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 GroupCreatedTips.ProtoReflect.Descriptor instead. -func (*GroupCreatedTips) Descriptor() ([]byte, []int) { - return file_sdkws_sdkws_proto_rawDescGZIP(), []int{20} -} - -func (x *GroupCreatedTips) GetGroup() *GroupInfo { - if x != nil { - return x.Group - } - return nil -} - -func (x *GroupCreatedTips) GetOpUser() *GroupMemberFullInfo { - if x != nil { - return x.OpUser - } - return nil -} - -func (x *GroupCreatedTips) GetMemberList() []*GroupMemberFullInfo { - if x != nil { - return x.MemberList - } - return nil -} - -func (x *GroupCreatedTips) GetOperationTime() int64 { - if x != nil { - return x.OperationTime - } - return 0 -} - -func (x *GroupCreatedTips) GetGroupOwnerUser() *GroupMemberFullInfo { - if x != nil { - return x.GroupOwnerUser - } - return nil -} - -// OnGroupInfoSet() -type GroupInfoSetTips struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - OpUser *GroupMemberFullInfo `protobuf:"bytes,1,opt,name=opUser,proto3" json:"opUser"` //who do this - MuteTime int64 `protobuf:"varint,2,opt,name=muteTime,proto3" json:"muteTime"` - Group *GroupInfo `protobuf:"bytes,3,opt,name=group,proto3" json:"group"` -} - -func (x *GroupInfoSetTips) Reset() { - *x = GroupInfoSetTips{} - if protoimpl.UnsafeEnabled { - mi := &file_sdkws_sdkws_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GroupInfoSetTips) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GroupInfoSetTips) ProtoMessage() {} - -func (x *GroupInfoSetTips) ProtoReflect() protoreflect.Message { - mi := &file_sdkws_sdkws_proto_msgTypes[21] - 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 GroupInfoSetTips.ProtoReflect.Descriptor instead. -func (*GroupInfoSetTips) Descriptor() ([]byte, []int) { - return file_sdkws_sdkws_proto_rawDescGZIP(), []int{21} -} - -func (x *GroupInfoSetTips) GetOpUser() *GroupMemberFullInfo { - if x != nil { - return x.OpUser - } - return nil -} - -func (x *GroupInfoSetTips) GetMuteTime() int64 { - if x != nil { - return x.MuteTime - } - return 0 -} - -func (x *GroupInfoSetTips) GetGroup() *GroupInfo { - if x != nil { - return x.Group - } - return nil -} - -type GroupInfoSetNameTips struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - OpUser *GroupMemberFullInfo `protobuf:"bytes,1,opt,name=opUser,proto3" json:"opUser"` //who do this - Group *GroupInfo `protobuf:"bytes,2,opt,name=group,proto3" json:"group"` -} - -func (x *GroupInfoSetNameTips) Reset() { - *x = GroupInfoSetNameTips{} - if protoimpl.UnsafeEnabled { - mi := &file_sdkws_sdkws_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GroupInfoSetNameTips) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GroupInfoSetNameTips) ProtoMessage() {} - -func (x *GroupInfoSetNameTips) ProtoReflect() protoreflect.Message { - mi := &file_sdkws_sdkws_proto_msgTypes[22] - 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 GroupInfoSetNameTips.ProtoReflect.Descriptor instead. -func (*GroupInfoSetNameTips) Descriptor() ([]byte, []int) { - return file_sdkws_sdkws_proto_rawDescGZIP(), []int{22} -} - -func (x *GroupInfoSetNameTips) GetOpUser() *GroupMemberFullInfo { - if x != nil { - return x.OpUser - } - return nil -} - -func (x *GroupInfoSetNameTips) GetGroup() *GroupInfo { - if x != nil { - return x.Group - } - return nil -} - -type GroupInfoSetAnnouncementTips struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - OpUser *GroupMemberFullInfo `protobuf:"bytes,1,opt,name=opUser,proto3" json:"opUser"` //who do this - Group *GroupInfo `protobuf:"bytes,2,opt,name=group,proto3" json:"group"` -} - -func (x *GroupInfoSetAnnouncementTips) Reset() { - *x = GroupInfoSetAnnouncementTips{} - if protoimpl.UnsafeEnabled { - mi := &file_sdkws_sdkws_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GroupInfoSetAnnouncementTips) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GroupInfoSetAnnouncementTips) ProtoMessage() {} - -func (x *GroupInfoSetAnnouncementTips) ProtoReflect() protoreflect.Message { - mi := &file_sdkws_sdkws_proto_msgTypes[23] - 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 GroupInfoSetAnnouncementTips.ProtoReflect.Descriptor instead. -func (*GroupInfoSetAnnouncementTips) Descriptor() ([]byte, []int) { - return file_sdkws_sdkws_proto_rawDescGZIP(), []int{23} -} - -func (x *GroupInfoSetAnnouncementTips) GetOpUser() *GroupMemberFullInfo { - if x != nil { - return x.OpUser - } - return nil -} - -func (x *GroupInfoSetAnnouncementTips) GetGroup() *GroupInfo { - if x != nil { - return x.Group - } - return nil -} - -// OnJoinGroupApplication() -type JoinGroupApplicationTips struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Group *GroupInfo `protobuf:"bytes,1,opt,name=group,proto3" json:"group"` - Applicant *PublicUserInfo `protobuf:"bytes,2,opt,name=applicant,proto3" json:"applicant"` - ReqMsg string `protobuf:"bytes,3,opt,name=reqMsg,proto3" json:"reqMsg"` -} - -func (x *JoinGroupApplicationTips) Reset() { - *x = JoinGroupApplicationTips{} - if protoimpl.UnsafeEnabled { - mi := &file_sdkws_sdkws_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *JoinGroupApplicationTips) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*JoinGroupApplicationTips) ProtoMessage() {} - -func (x *JoinGroupApplicationTips) ProtoReflect() protoreflect.Message { - mi := &file_sdkws_sdkws_proto_msgTypes[24] - 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 JoinGroupApplicationTips.ProtoReflect.Descriptor instead. -func (*JoinGroupApplicationTips) Descriptor() ([]byte, []int) { - return file_sdkws_sdkws_proto_rawDescGZIP(), []int{24} -} - -func (x *JoinGroupApplicationTips) GetGroup() *GroupInfo { - if x != nil { - return x.Group - } - return nil -} - -func (x *JoinGroupApplicationTips) GetApplicant() *PublicUserInfo { - if x != nil { - return x.Applicant - } - return nil -} - -func (x *JoinGroupApplicationTips) GetReqMsg() string { - if x != nil { - return x.ReqMsg - } - return "" -} - -// OnQuitGroup() -// -// Actively leave the group -type MemberQuitTips struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Group *GroupInfo `protobuf:"bytes,1,opt,name=group,proto3" json:"group"` - QuitUser *GroupMemberFullInfo `protobuf:"bytes,2,opt,name=quitUser,proto3" json:"quitUser"` - OperationTime int64 `protobuf:"varint,3,opt,name=operationTime,proto3" json:"operationTime"` -} - -func (x *MemberQuitTips) Reset() { - *x = MemberQuitTips{} - if protoimpl.UnsafeEnabled { - mi := &file_sdkws_sdkws_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MemberQuitTips) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MemberQuitTips) ProtoMessage() {} - -func (x *MemberQuitTips) ProtoReflect() protoreflect.Message { - mi := &file_sdkws_sdkws_proto_msgTypes[25] - 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 MemberQuitTips.ProtoReflect.Descriptor instead. -func (*MemberQuitTips) Descriptor() ([]byte, []int) { - return file_sdkws_sdkws_proto_rawDescGZIP(), []int{25} -} - -func (x *MemberQuitTips) GetGroup() *GroupInfo { - if x != nil { - return x.Group - } - return nil -} - -func (x *MemberQuitTips) GetQuitUser() *GroupMemberFullInfo { - if x != nil { - return x.QuitUser - } - return nil -} - -func (x *MemberQuitTips) GetOperationTime() int64 { - if x != nil { - return x.OperationTime - } - return 0 -} - -// OnApplicationGroupAccepted() -type GroupApplicationAcceptedTips struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Group *GroupInfo `protobuf:"bytes,1,opt,name=group,proto3" json:"group"` - OpUser *GroupMemberFullInfo `protobuf:"bytes,2,opt,name=opUser,proto3" json:"opUser"` - HandleMsg string `protobuf:"bytes,4,opt,name=handleMsg,proto3" json:"handleMsg"` - ReceiverAs int32 `protobuf:"varint,5,opt,name=receiverAs,proto3" json:"receiverAs"` // admin(==1) or applicant(==0) -} - -func (x *GroupApplicationAcceptedTips) Reset() { - *x = GroupApplicationAcceptedTips{} - if protoimpl.UnsafeEnabled { - mi := &file_sdkws_sdkws_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GroupApplicationAcceptedTips) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GroupApplicationAcceptedTips) ProtoMessage() {} - -func (x *GroupApplicationAcceptedTips) ProtoReflect() protoreflect.Message { - mi := &file_sdkws_sdkws_proto_msgTypes[26] - 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 GroupApplicationAcceptedTips.ProtoReflect.Descriptor instead. -func (*GroupApplicationAcceptedTips) Descriptor() ([]byte, []int) { - return file_sdkws_sdkws_proto_rawDescGZIP(), []int{26} -} - -func (x *GroupApplicationAcceptedTips) GetGroup() *GroupInfo { - if x != nil { - return x.Group - } - return nil -} - -func (x *GroupApplicationAcceptedTips) GetOpUser() *GroupMemberFullInfo { - if x != nil { - return x.OpUser - } - return nil -} - -func (x *GroupApplicationAcceptedTips) GetHandleMsg() string { - if x != nil { - return x.HandleMsg - } - return "" -} - -func (x *GroupApplicationAcceptedTips) GetReceiverAs() int32 { - if x != nil { - return x.ReceiverAs - } - return 0 -} - -// OnApplicationGroupRejected() -type GroupApplicationRejectedTips struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Group *GroupInfo `protobuf:"bytes,1,opt,name=group,proto3" json:"group"` - OpUser *GroupMemberFullInfo `protobuf:"bytes,2,opt,name=opUser,proto3" json:"opUser"` - HandleMsg string `protobuf:"bytes,4,opt,name=handleMsg,proto3" json:"handleMsg"` - ReceiverAs int32 `protobuf:"varint,5,opt,name=receiverAs,proto3" json:"receiverAs"` // admin(==1) or applicant(==0) -} - -func (x *GroupApplicationRejectedTips) Reset() { - *x = GroupApplicationRejectedTips{} - if protoimpl.UnsafeEnabled { - mi := &file_sdkws_sdkws_proto_msgTypes[27] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GroupApplicationRejectedTips) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GroupApplicationRejectedTips) ProtoMessage() {} - -func (x *GroupApplicationRejectedTips) ProtoReflect() protoreflect.Message { - mi := &file_sdkws_sdkws_proto_msgTypes[27] - 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 GroupApplicationRejectedTips.ProtoReflect.Descriptor instead. -func (*GroupApplicationRejectedTips) Descriptor() ([]byte, []int) { - return file_sdkws_sdkws_proto_rawDescGZIP(), []int{27} -} - -func (x *GroupApplicationRejectedTips) GetGroup() *GroupInfo { - if x != nil { - return x.Group - } - return nil -} - -func (x *GroupApplicationRejectedTips) GetOpUser() *GroupMemberFullInfo { - if x != nil { - return x.OpUser - } - return nil -} - -func (x *GroupApplicationRejectedTips) GetHandleMsg() string { - if x != nil { - return x.HandleMsg - } - return "" -} - -func (x *GroupApplicationRejectedTips) GetReceiverAs() int32 { - if x != nil { - return x.ReceiverAs - } - return 0 -} - -// OnTransferGroupOwner() -type GroupOwnerTransferredTips struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Group *GroupInfo `protobuf:"bytes,1,opt,name=group,proto3" json:"group"` - OpUser *GroupMemberFullInfo `protobuf:"bytes,2,opt,name=opUser,proto3" json:"opUser"` - NewGroupOwner *GroupMemberFullInfo `protobuf:"bytes,3,opt,name=newGroupOwner,proto3" json:"newGroupOwner"` - OperationTime int64 `protobuf:"varint,4,opt,name=operationTime,proto3" json:"operationTime"` -} - -func (x *GroupOwnerTransferredTips) Reset() { - *x = GroupOwnerTransferredTips{} - if protoimpl.UnsafeEnabled { - mi := &file_sdkws_sdkws_proto_msgTypes[28] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GroupOwnerTransferredTips) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GroupOwnerTransferredTips) ProtoMessage() {} - -func (x *GroupOwnerTransferredTips) ProtoReflect() protoreflect.Message { - mi := &file_sdkws_sdkws_proto_msgTypes[28] - 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 GroupOwnerTransferredTips.ProtoReflect.Descriptor instead. -func (*GroupOwnerTransferredTips) Descriptor() ([]byte, []int) { - return file_sdkws_sdkws_proto_rawDescGZIP(), []int{28} -} - -func (x *GroupOwnerTransferredTips) GetGroup() *GroupInfo { - if x != nil { - return x.Group - } - return nil -} - -func (x *GroupOwnerTransferredTips) GetOpUser() *GroupMemberFullInfo { - if x != nil { - return x.OpUser - } - return nil -} - -func (x *GroupOwnerTransferredTips) GetNewGroupOwner() *GroupMemberFullInfo { - if x != nil { - return x.NewGroupOwner - } - return nil -} - -func (x *GroupOwnerTransferredTips) GetOperationTime() int64 { - if x != nil { - return x.OperationTime - } - return 0 -} - -// OnMemberKicked() -type MemberKickedTips struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Group *GroupInfo `protobuf:"bytes,1,opt,name=group,proto3" json:"group"` - OpUser *GroupMemberFullInfo `protobuf:"bytes,2,opt,name=opUser,proto3" json:"opUser"` - KickedUserList []*GroupMemberFullInfo `protobuf:"bytes,3,rep,name=kickedUserList,proto3" json:"kickedUserList"` - OperationTime int64 `protobuf:"varint,4,opt,name=operationTime,proto3" json:"operationTime"` -} - -func (x *MemberKickedTips) Reset() { - *x = MemberKickedTips{} - if protoimpl.UnsafeEnabled { - mi := &file_sdkws_sdkws_proto_msgTypes[29] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MemberKickedTips) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MemberKickedTips) ProtoMessage() {} - -func (x *MemberKickedTips) ProtoReflect() protoreflect.Message { - mi := &file_sdkws_sdkws_proto_msgTypes[29] - 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 MemberKickedTips.ProtoReflect.Descriptor instead. -func (*MemberKickedTips) Descriptor() ([]byte, []int) { - return file_sdkws_sdkws_proto_rawDescGZIP(), []int{29} -} - -func (x *MemberKickedTips) GetGroup() *GroupInfo { - if x != nil { - return x.Group - } - return nil -} - -func (x *MemberKickedTips) GetOpUser() *GroupMemberFullInfo { - if x != nil { - return x.OpUser - } - return nil -} - -func (x *MemberKickedTips) GetKickedUserList() []*GroupMemberFullInfo { - if x != nil { - return x.KickedUserList - } - return nil -} - -func (x *MemberKickedTips) GetOperationTime() int64 { - if x != nil { - return x.OperationTime - } - return 0 -} - -// OnMemberInvited() -type MemberInvitedTips struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Group *GroupInfo `protobuf:"bytes,1,opt,name=group,proto3" json:"group"` - OpUser *GroupMemberFullInfo `protobuf:"bytes,2,opt,name=opUser,proto3" json:"opUser"` - InvitedUserList []*GroupMemberFullInfo `protobuf:"bytes,3,rep,name=invitedUserList,proto3" json:"invitedUserList"` - OperationTime int64 `protobuf:"varint,4,opt,name=operationTime,proto3" json:"operationTime"` -} - -func (x *MemberInvitedTips) Reset() { - *x = MemberInvitedTips{} - if protoimpl.UnsafeEnabled { - mi := &file_sdkws_sdkws_proto_msgTypes[30] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MemberInvitedTips) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MemberInvitedTips) ProtoMessage() {} - -func (x *MemberInvitedTips) ProtoReflect() protoreflect.Message { - mi := &file_sdkws_sdkws_proto_msgTypes[30] - 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 MemberInvitedTips.ProtoReflect.Descriptor instead. -func (*MemberInvitedTips) Descriptor() ([]byte, []int) { - return file_sdkws_sdkws_proto_rawDescGZIP(), []int{30} -} - -func (x *MemberInvitedTips) GetGroup() *GroupInfo { - if x != nil { - return x.Group - } - return nil -} - -func (x *MemberInvitedTips) GetOpUser() *GroupMemberFullInfo { - if x != nil { - return x.OpUser - } - return nil -} - -func (x *MemberInvitedTips) GetInvitedUserList() []*GroupMemberFullInfo { - if x != nil { - return x.InvitedUserList - } - return nil -} - -func (x *MemberInvitedTips) GetOperationTime() int64 { - if x != nil { - return x.OperationTime - } - return 0 -} - -// Actively join the group -type MemberEnterTips struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Group *GroupInfo `protobuf:"bytes,1,opt,name=group,proto3" json:"group"` - EntrantUser *GroupMemberFullInfo `protobuf:"bytes,2,opt,name=entrantUser,proto3" json:"entrantUser"` - OperationTime int64 `protobuf:"varint,3,opt,name=operationTime,proto3" json:"operationTime"` -} - -func (x *MemberEnterTips) Reset() { - *x = MemberEnterTips{} - if protoimpl.UnsafeEnabled { - mi := &file_sdkws_sdkws_proto_msgTypes[31] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MemberEnterTips) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MemberEnterTips) ProtoMessage() {} - -func (x *MemberEnterTips) ProtoReflect() protoreflect.Message { - mi := &file_sdkws_sdkws_proto_msgTypes[31] - 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 MemberEnterTips.ProtoReflect.Descriptor instead. -func (*MemberEnterTips) Descriptor() ([]byte, []int) { - return file_sdkws_sdkws_proto_rawDescGZIP(), []int{31} -} - -func (x *MemberEnterTips) GetGroup() *GroupInfo { - if x != nil { - return x.Group - } - return nil -} - -func (x *MemberEnterTips) GetEntrantUser() *GroupMemberFullInfo { - if x != nil { - return x.EntrantUser - } - return nil -} - -func (x *MemberEnterTips) GetOperationTime() int64 { - if x != nil { - return x.OperationTime - } - return 0 -} - -type GroupDismissedTips struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Group *GroupInfo `protobuf:"bytes,1,opt,name=group,proto3" json:"group"` - OpUser *GroupMemberFullInfo `protobuf:"bytes,2,opt,name=opUser,proto3" json:"opUser"` - OperationTime int64 `protobuf:"varint,3,opt,name=operationTime,proto3" json:"operationTime"` -} - -func (x *GroupDismissedTips) Reset() { - *x = GroupDismissedTips{} - if protoimpl.UnsafeEnabled { - mi := &file_sdkws_sdkws_proto_msgTypes[32] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GroupDismissedTips) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GroupDismissedTips) ProtoMessage() {} - -func (x *GroupDismissedTips) ProtoReflect() protoreflect.Message { - mi := &file_sdkws_sdkws_proto_msgTypes[32] - 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 GroupDismissedTips.ProtoReflect.Descriptor instead. -func (*GroupDismissedTips) Descriptor() ([]byte, []int) { - return file_sdkws_sdkws_proto_rawDescGZIP(), []int{32} -} - -func (x *GroupDismissedTips) GetGroup() *GroupInfo { - if x != nil { - return x.Group - } - return nil -} - -func (x *GroupDismissedTips) GetOpUser() *GroupMemberFullInfo { - if x != nil { - return x.OpUser - } - return nil -} - -func (x *GroupDismissedTips) GetOperationTime() int64 { - if x != nil { - return x.OperationTime - } - return 0 -} - -type GroupMemberMutedTips struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Group *GroupInfo `protobuf:"bytes,1,opt,name=group,proto3" json:"group"` - OpUser *GroupMemberFullInfo `protobuf:"bytes,2,opt,name=opUser,proto3" json:"opUser"` - OperationTime int64 `protobuf:"varint,3,opt,name=operationTime,proto3" json:"operationTime"` - MutedUser *GroupMemberFullInfo `protobuf:"bytes,4,opt,name=mutedUser,proto3" json:"mutedUser"` - MutedSeconds uint32 `protobuf:"varint,5,opt,name=mutedSeconds,proto3" json:"mutedSeconds"` -} - -func (x *GroupMemberMutedTips) Reset() { - *x = GroupMemberMutedTips{} - if protoimpl.UnsafeEnabled { - mi := &file_sdkws_sdkws_proto_msgTypes[33] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GroupMemberMutedTips) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GroupMemberMutedTips) ProtoMessage() {} - -func (x *GroupMemberMutedTips) ProtoReflect() protoreflect.Message { - mi := &file_sdkws_sdkws_proto_msgTypes[33] - 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 GroupMemberMutedTips.ProtoReflect.Descriptor instead. -func (*GroupMemberMutedTips) Descriptor() ([]byte, []int) { - return file_sdkws_sdkws_proto_rawDescGZIP(), []int{33} -} - -func (x *GroupMemberMutedTips) GetGroup() *GroupInfo { - if x != nil { - return x.Group - } - return nil -} - -func (x *GroupMemberMutedTips) GetOpUser() *GroupMemberFullInfo { - if x != nil { - return x.OpUser - } - return nil -} - -func (x *GroupMemberMutedTips) GetOperationTime() int64 { - if x != nil { - return x.OperationTime - } - return 0 -} - -func (x *GroupMemberMutedTips) GetMutedUser() *GroupMemberFullInfo { - if x != nil { - return x.MutedUser - } - return nil -} - -func (x *GroupMemberMutedTips) GetMutedSeconds() uint32 { - if x != nil { - return x.MutedSeconds - } - return 0 -} - -type GroupMemberCancelMutedTips struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Group *GroupInfo `protobuf:"bytes,1,opt,name=group,proto3" json:"group"` - OpUser *GroupMemberFullInfo `protobuf:"bytes,2,opt,name=opUser,proto3" json:"opUser"` - OperationTime int64 `protobuf:"varint,3,opt,name=operationTime,proto3" json:"operationTime"` - MutedUser *GroupMemberFullInfo `protobuf:"bytes,4,opt,name=mutedUser,proto3" json:"mutedUser"` -} - -func (x *GroupMemberCancelMutedTips) Reset() { - *x = GroupMemberCancelMutedTips{} - if protoimpl.UnsafeEnabled { - mi := &file_sdkws_sdkws_proto_msgTypes[34] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GroupMemberCancelMutedTips) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GroupMemberCancelMutedTips) ProtoMessage() {} - -func (x *GroupMemberCancelMutedTips) ProtoReflect() protoreflect.Message { - mi := &file_sdkws_sdkws_proto_msgTypes[34] - 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 GroupMemberCancelMutedTips.ProtoReflect.Descriptor instead. -func (*GroupMemberCancelMutedTips) Descriptor() ([]byte, []int) { - return file_sdkws_sdkws_proto_rawDescGZIP(), []int{34} -} - -func (x *GroupMemberCancelMutedTips) GetGroup() *GroupInfo { - if x != nil { - return x.Group - } - return nil -} - -func (x *GroupMemberCancelMutedTips) GetOpUser() *GroupMemberFullInfo { - if x != nil { - return x.OpUser - } - return nil -} - -func (x *GroupMemberCancelMutedTips) GetOperationTime() int64 { - if x != nil { - return x.OperationTime - } - return 0 -} - -func (x *GroupMemberCancelMutedTips) GetMutedUser() *GroupMemberFullInfo { - if x != nil { - return x.MutedUser - } - return nil -} - -type GroupMutedTips struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Group *GroupInfo `protobuf:"bytes,1,opt,name=group,proto3" json:"group"` - OpUser *GroupMemberFullInfo `protobuf:"bytes,2,opt,name=opUser,proto3" json:"opUser"` - OperationTime int64 `protobuf:"varint,3,opt,name=operationTime,proto3" json:"operationTime"` -} - -func (x *GroupMutedTips) Reset() { - *x = GroupMutedTips{} - if protoimpl.UnsafeEnabled { - mi := &file_sdkws_sdkws_proto_msgTypes[35] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GroupMutedTips) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GroupMutedTips) ProtoMessage() {} - -func (x *GroupMutedTips) ProtoReflect() protoreflect.Message { - mi := &file_sdkws_sdkws_proto_msgTypes[35] - 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 GroupMutedTips.ProtoReflect.Descriptor instead. -func (*GroupMutedTips) Descriptor() ([]byte, []int) { - return file_sdkws_sdkws_proto_rawDescGZIP(), []int{35} -} - -func (x *GroupMutedTips) GetGroup() *GroupInfo { - if x != nil { - return x.Group - } - return nil -} - -func (x *GroupMutedTips) GetOpUser() *GroupMemberFullInfo { - if x != nil { - return x.OpUser - } - return nil -} - -func (x *GroupMutedTips) GetOperationTime() int64 { - if x != nil { - return x.OperationTime - } - return 0 -} - -type GroupCancelMutedTips struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Group *GroupInfo `protobuf:"bytes,1,opt,name=group,proto3" json:"group"` - OpUser *GroupMemberFullInfo `protobuf:"bytes,2,opt,name=opUser,proto3" json:"opUser"` - OperationTime int64 `protobuf:"varint,3,opt,name=operationTime,proto3" json:"operationTime"` -} - -func (x *GroupCancelMutedTips) Reset() { - *x = GroupCancelMutedTips{} - if protoimpl.UnsafeEnabled { - mi := &file_sdkws_sdkws_proto_msgTypes[36] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GroupCancelMutedTips) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GroupCancelMutedTips) ProtoMessage() {} - -func (x *GroupCancelMutedTips) ProtoReflect() protoreflect.Message { - mi := &file_sdkws_sdkws_proto_msgTypes[36] - 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 GroupCancelMutedTips.ProtoReflect.Descriptor instead. -func (*GroupCancelMutedTips) Descriptor() ([]byte, []int) { - return file_sdkws_sdkws_proto_rawDescGZIP(), []int{36} -} - -func (x *GroupCancelMutedTips) GetGroup() *GroupInfo { - if x != nil { - return x.Group - } - return nil -} - -func (x *GroupCancelMutedTips) GetOpUser() *GroupMemberFullInfo { - if x != nil { - return x.OpUser - } - return nil -} - -func (x *GroupCancelMutedTips) GetOperationTime() int64 { - if x != nil { - return x.OperationTime - } - return 0 -} - -type GroupMemberInfoSetTips struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Group *GroupInfo `protobuf:"bytes,1,opt,name=group,proto3" json:"group"` - OpUser *GroupMemberFullInfo `protobuf:"bytes,2,opt,name=opUser,proto3" json:"opUser"` - OperationTime int64 `protobuf:"varint,3,opt,name=operationTime,proto3" json:"operationTime"` - ChangedUser *GroupMemberFullInfo `protobuf:"bytes,4,opt,name=changedUser,proto3" json:"changedUser"` -} - -func (x *GroupMemberInfoSetTips) Reset() { - *x = GroupMemberInfoSetTips{} - if protoimpl.UnsafeEnabled { - mi := &file_sdkws_sdkws_proto_msgTypes[37] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GroupMemberInfoSetTips) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GroupMemberInfoSetTips) ProtoMessage() {} - -func (x *GroupMemberInfoSetTips) ProtoReflect() protoreflect.Message { - mi := &file_sdkws_sdkws_proto_msgTypes[37] - 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 GroupMemberInfoSetTips.ProtoReflect.Descriptor instead. -func (*GroupMemberInfoSetTips) Descriptor() ([]byte, []int) { - return file_sdkws_sdkws_proto_rawDescGZIP(), []int{37} -} - -func (x *GroupMemberInfoSetTips) GetGroup() *GroupInfo { - if x != nil { - return x.Group - } - return nil -} - -func (x *GroupMemberInfoSetTips) GetOpUser() *GroupMemberFullInfo { - if x != nil { - return x.OpUser - } - return nil -} - -func (x *GroupMemberInfoSetTips) GetOperationTime() int64 { - if x != nil { - return x.OperationTime - } - return 0 -} - -func (x *GroupMemberInfoSetTips) GetChangedUser() *GroupMemberFullInfo { - if x != nil { - return x.ChangedUser - } - return nil -} - -type FriendApplication struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - AddTime int64 `protobuf:"varint,1,opt,name=addTime,proto3" json:"addTime"` - AddSource string `protobuf:"bytes,2,opt,name=addSource,proto3" json:"addSource"` - AddWording string `protobuf:"bytes,3,opt,name=addWording,proto3" json:"addWording"` -} - -func (x *FriendApplication) Reset() { - *x = FriendApplication{} - if protoimpl.UnsafeEnabled { - mi := &file_sdkws_sdkws_proto_msgTypes[38] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *FriendApplication) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*FriendApplication) ProtoMessage() {} - -func (x *FriendApplication) ProtoReflect() protoreflect.Message { - mi := &file_sdkws_sdkws_proto_msgTypes[38] - 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 FriendApplication.ProtoReflect.Descriptor instead. -func (*FriendApplication) Descriptor() ([]byte, []int) { - return file_sdkws_sdkws_proto_rawDescGZIP(), []int{38} -} - -func (x *FriendApplication) GetAddTime() int64 { - if x != nil { - return x.AddTime - } - return 0 -} - -func (x *FriendApplication) GetAddSource() string { - if x != nil { - return x.AddSource - } - return "" -} - -func (x *FriendApplication) GetAddWording() string { - if x != nil { - return x.AddWording - } - return "" -} - -type FromToUserID struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - FromUserID string `protobuf:"bytes,1,opt,name=fromUserID,proto3" json:"fromUserID"` - ToUserID string `protobuf:"bytes,2,opt,name=toUserID,proto3" json:"toUserID"` -} - -func (x *FromToUserID) Reset() { - *x = FromToUserID{} - if protoimpl.UnsafeEnabled { - mi := &file_sdkws_sdkws_proto_msgTypes[39] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *FromToUserID) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*FromToUserID) ProtoMessage() {} - -func (x *FromToUserID) ProtoReflect() protoreflect.Message { - mi := &file_sdkws_sdkws_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 FromToUserID.ProtoReflect.Descriptor instead. -func (*FromToUserID) Descriptor() ([]byte, []int) { - return file_sdkws_sdkws_proto_rawDescGZIP(), []int{39} -} - -func (x *FromToUserID) GetFromUserID() string { - if x != nil { - return x.FromUserID - } - return "" -} - -func (x *FromToUserID) GetToUserID() string { - if x != nil { - return x.ToUserID - } - return "" -} - -// FromUserID apply to add ToUserID -type FriendApplicationTips struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - FromToUserID *FromToUserID `protobuf:"bytes,1,opt,name=fromToUserID,proto3" json:"fromToUserID"` //from:发起者; to:接收者 -} - -func (x *FriendApplicationTips) Reset() { - *x = FriendApplicationTips{} - if protoimpl.UnsafeEnabled { - mi := &file_sdkws_sdkws_proto_msgTypes[40] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *FriendApplicationTips) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*FriendApplicationTips) ProtoMessage() {} - -func (x *FriendApplicationTips) ProtoReflect() protoreflect.Message { - mi := &file_sdkws_sdkws_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 FriendApplicationTips.ProtoReflect.Descriptor instead. -func (*FriendApplicationTips) Descriptor() ([]byte, []int) { - return file_sdkws_sdkws_proto_rawDescGZIP(), []int{40} -} - -func (x *FriendApplicationTips) GetFromToUserID() *FromToUserID { - if x != nil { - return x.FromToUserID - } - return nil -} - -// FromUserID accept or reject ToUserID -type FriendApplicationApprovedTips struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - FromToUserID *FromToUserID `protobuf:"bytes,1,opt,name=fromToUserID,proto3" json:"fromToUserID"` //from:同意者;to:请求发起者 - HandleMsg string `protobuf:"bytes,2,opt,name=handleMsg,proto3" json:"handleMsg"` -} - -func (x *FriendApplicationApprovedTips) Reset() { - *x = FriendApplicationApprovedTips{} - if protoimpl.UnsafeEnabled { - mi := &file_sdkws_sdkws_proto_msgTypes[41] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *FriendApplicationApprovedTips) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*FriendApplicationApprovedTips) ProtoMessage() {} - -func (x *FriendApplicationApprovedTips) ProtoReflect() protoreflect.Message { - mi := &file_sdkws_sdkws_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 FriendApplicationApprovedTips.ProtoReflect.Descriptor instead. -func (*FriendApplicationApprovedTips) Descriptor() ([]byte, []int) { - return file_sdkws_sdkws_proto_rawDescGZIP(), []int{41} -} - -func (x *FriendApplicationApprovedTips) GetFromToUserID() *FromToUserID { - if x != nil { - return x.FromToUserID - } - return nil -} - -func (x *FriendApplicationApprovedTips) GetHandleMsg() string { - if x != nil { - return x.HandleMsg - } - return "" -} - -// FromUserID accept or reject ToUserID -type FriendApplicationRejectedTips struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - FromToUserID *FromToUserID `protobuf:"bytes,1,opt,name=fromToUserID,proto3" json:"fromToUserID"` //from:拒绝者;to:请求发起者 - HandleMsg string `protobuf:"bytes,2,opt,name=handleMsg,proto3" json:"handleMsg"` -} - -func (x *FriendApplicationRejectedTips) Reset() { - *x = FriendApplicationRejectedTips{} - if protoimpl.UnsafeEnabled { - mi := &file_sdkws_sdkws_proto_msgTypes[42] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *FriendApplicationRejectedTips) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*FriendApplicationRejectedTips) ProtoMessage() {} - -func (x *FriendApplicationRejectedTips) ProtoReflect() protoreflect.Message { - mi := &file_sdkws_sdkws_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 FriendApplicationRejectedTips.ProtoReflect.Descriptor instead. -func (*FriendApplicationRejectedTips) Descriptor() ([]byte, []int) { - return file_sdkws_sdkws_proto_rawDescGZIP(), []int{42} -} - -func (x *FriendApplicationRejectedTips) GetFromToUserID() *FromToUserID { - if x != nil { - return x.FromToUserID - } - return nil -} - -func (x *FriendApplicationRejectedTips) GetHandleMsg() string { - if x != nil { - return x.HandleMsg - } - return "" -} - -// FromUserID Added a friend ToUserID -type FriendAddedTips struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Friend *FriendInfo `protobuf:"bytes,1,opt,name=friend,proto3" json:"friend"` - OperationTime int64 `protobuf:"varint,2,opt,name=operationTime,proto3" json:"operationTime"` - OpUser *PublicUserInfo `protobuf:"bytes,3,opt,name=opUser,proto3" json:"opUser"` //who do this -} - -func (x *FriendAddedTips) Reset() { - *x = FriendAddedTips{} - if protoimpl.UnsafeEnabled { - mi := &file_sdkws_sdkws_proto_msgTypes[43] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *FriendAddedTips) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*FriendAddedTips) ProtoMessage() {} - -func (x *FriendAddedTips) ProtoReflect() protoreflect.Message { - mi := &file_sdkws_sdkws_proto_msgTypes[43] - 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 FriendAddedTips.ProtoReflect.Descriptor instead. -func (*FriendAddedTips) Descriptor() ([]byte, []int) { - return file_sdkws_sdkws_proto_rawDescGZIP(), []int{43} -} - -func (x *FriendAddedTips) GetFriend() *FriendInfo { - if x != nil { - return x.Friend - } - return nil -} - -func (x *FriendAddedTips) GetOperationTime() int64 { - if x != nil { - return x.OperationTime - } - return 0 -} - -func (x *FriendAddedTips) GetOpUser() *PublicUserInfo { - if x != nil { - return x.OpUser - } - return nil -} - -// FromUserID deleted a friend ToUserID -type FriendDeletedTips struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - FromToUserID *FromToUserID `protobuf:"bytes,1,opt,name=fromToUserID,proto3" json:"fromToUserID"` //from:owner; to:friend -} - -func (x *FriendDeletedTips) Reset() { - *x = FriendDeletedTips{} - if protoimpl.UnsafeEnabled { - mi := &file_sdkws_sdkws_proto_msgTypes[44] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *FriendDeletedTips) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*FriendDeletedTips) ProtoMessage() {} - -func (x *FriendDeletedTips) ProtoReflect() protoreflect.Message { - mi := &file_sdkws_sdkws_proto_msgTypes[44] - 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 FriendDeletedTips.ProtoReflect.Descriptor instead. -func (*FriendDeletedTips) Descriptor() ([]byte, []int) { - return file_sdkws_sdkws_proto_rawDescGZIP(), []int{44} -} - -func (x *FriendDeletedTips) GetFromToUserID() *FromToUserID { - if x != nil { - return x.FromToUserID - } - return nil -} - -type BlackAddedTips struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - FromToUserID *FromToUserID `protobuf:"bytes,1,opt,name=fromToUserID,proto3" json:"fromToUserID"` //from:owner; to:black -} - -func (x *BlackAddedTips) Reset() { - *x = BlackAddedTips{} - if protoimpl.UnsafeEnabled { - mi := &file_sdkws_sdkws_proto_msgTypes[45] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *BlackAddedTips) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*BlackAddedTips) ProtoMessage() {} - -func (x *BlackAddedTips) ProtoReflect() protoreflect.Message { - mi := &file_sdkws_sdkws_proto_msgTypes[45] - 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 BlackAddedTips.ProtoReflect.Descriptor instead. -func (*BlackAddedTips) Descriptor() ([]byte, []int) { - return file_sdkws_sdkws_proto_rawDescGZIP(), []int{45} -} - -func (x *BlackAddedTips) GetFromToUserID() *FromToUserID { - if x != nil { - return x.FromToUserID - } - return nil -} - -type BlackDeletedTips struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - FromToUserID *FromToUserID `protobuf:"bytes,1,opt,name=fromToUserID,proto3" json:"fromToUserID"` //from:owner; to:black -} - -func (x *BlackDeletedTips) Reset() { - *x = BlackDeletedTips{} - if protoimpl.UnsafeEnabled { - mi := &file_sdkws_sdkws_proto_msgTypes[46] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *BlackDeletedTips) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*BlackDeletedTips) ProtoMessage() {} - -func (x *BlackDeletedTips) ProtoReflect() protoreflect.Message { - mi := &file_sdkws_sdkws_proto_msgTypes[46] - 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 BlackDeletedTips.ProtoReflect.Descriptor instead. -func (*BlackDeletedTips) Descriptor() ([]byte, []int) { - return file_sdkws_sdkws_proto_rawDescGZIP(), []int{46} -} - -func (x *BlackDeletedTips) GetFromToUserID() *FromToUserID { - if x != nil { - return x.FromToUserID - } - return nil -} - -type FriendInfoChangedTips struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - FromToUserID *FromToUserID `protobuf:"bytes,1,opt,name=fromToUserID,proto3" json:"fromToUserID"` //from:changed; to:friend -} - -func (x *FriendInfoChangedTips) Reset() { - *x = FriendInfoChangedTips{} - if protoimpl.UnsafeEnabled { - mi := &file_sdkws_sdkws_proto_msgTypes[47] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *FriendInfoChangedTips) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*FriendInfoChangedTips) ProtoMessage() {} - -func (x *FriendInfoChangedTips) ProtoReflect() protoreflect.Message { - mi := &file_sdkws_sdkws_proto_msgTypes[47] - 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 FriendInfoChangedTips.ProtoReflect.Descriptor instead. -func (*FriendInfoChangedTips) Descriptor() ([]byte, []int) { - return file_sdkws_sdkws_proto_rawDescGZIP(), []int{47} -} - -func (x *FriendInfoChangedTips) GetFromToUserID() *FromToUserID { - if x != nil { - return x.FromToUserID - } - return nil -} - -// ////////////////////user///////////////////// -type UserInfoUpdatedTips struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - UserID string `protobuf:"bytes,1,opt,name=userID,proto3" json:"userID"` -} - -func (x *UserInfoUpdatedTips) Reset() { - *x = UserInfoUpdatedTips{} - if protoimpl.UnsafeEnabled { - mi := &file_sdkws_sdkws_proto_msgTypes[48] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *UserInfoUpdatedTips) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*UserInfoUpdatedTips) ProtoMessage() {} - -func (x *UserInfoUpdatedTips) ProtoReflect() protoreflect.Message { - mi := &file_sdkws_sdkws_proto_msgTypes[48] - 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 UserInfoUpdatedTips.ProtoReflect.Descriptor instead. -func (*UserInfoUpdatedTips) Descriptor() ([]byte, []int) { - return file_sdkws_sdkws_proto_rawDescGZIP(), []int{48} -} - -func (x *UserInfoUpdatedTips) GetUserID() string { - if x != nil { - return x.UserID - } - return "" -} - -// ////////////////////conversation///////////////////// -type ConversationUpdateTips struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - UserID string `protobuf:"bytes,1,opt,name=userID,proto3" json:"userID"` - ConversationIDList []string `protobuf:"bytes,2,rep,name=conversationIDList,proto3" json:"conversationIDList"` -} - -func (x *ConversationUpdateTips) Reset() { - *x = ConversationUpdateTips{} - if protoimpl.UnsafeEnabled { - mi := &file_sdkws_sdkws_proto_msgTypes[49] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ConversationUpdateTips) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ConversationUpdateTips) ProtoMessage() {} - -func (x *ConversationUpdateTips) ProtoReflect() protoreflect.Message { - mi := &file_sdkws_sdkws_proto_msgTypes[49] - 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 ConversationUpdateTips.ProtoReflect.Descriptor instead. -func (*ConversationUpdateTips) Descriptor() ([]byte, []int) { - return file_sdkws_sdkws_proto_rawDescGZIP(), []int{49} -} - -func (x *ConversationUpdateTips) GetUserID() string { - if x != nil { - return x.UserID - } - return "" -} - -func (x *ConversationUpdateTips) GetConversationIDList() []string { - if x != nil { - return x.ConversationIDList - } - return nil -} - -type ConversationSetPrivateTips struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - RecvID string `protobuf:"bytes,1,opt,name=recvID,proto3" json:"recvID"` - SendID string `protobuf:"bytes,2,opt,name=sendID,proto3" json:"sendID"` - IsPrivate bool `protobuf:"varint,3,opt,name=isPrivate,proto3" json:"isPrivate"` -} - -func (x *ConversationSetPrivateTips) Reset() { - *x = ConversationSetPrivateTips{} - if protoimpl.UnsafeEnabled { - mi := &file_sdkws_sdkws_proto_msgTypes[50] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ConversationSetPrivateTips) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ConversationSetPrivateTips) ProtoMessage() {} - -func (x *ConversationSetPrivateTips) ProtoReflect() protoreflect.Message { - mi := &file_sdkws_sdkws_proto_msgTypes[50] - 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 ConversationSetPrivateTips.ProtoReflect.Descriptor instead. -func (*ConversationSetPrivateTips) Descriptor() ([]byte, []int) { - return file_sdkws_sdkws_proto_rawDescGZIP(), []int{50} -} - -func (x *ConversationSetPrivateTips) GetRecvID() string { - if x != nil { - return x.RecvID - } - return "" -} - -func (x *ConversationSetPrivateTips) GetSendID() string { - if x != nil { - return x.SendID - } - return "" -} - -func (x *ConversationSetPrivateTips) GetIsPrivate() bool { - if x != nil { - return x.IsPrivate - } - return false -} - -type ConversationHasReadTips struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - UserID string `protobuf:"bytes,1,opt,name=userID,proto3" json:"userID"` - ConversationID string `protobuf:"bytes,2,opt,name=conversationID,proto3" json:"conversationID"` - HasReadSeq int64 `protobuf:"varint,3,opt,name=hasReadSeq,proto3" json:"hasReadSeq"` - UnreadCountTime int64 `protobuf:"varint,4,opt,name=unreadCountTime,proto3" json:"unreadCountTime"` -} - -func (x *ConversationHasReadTips) Reset() { - *x = ConversationHasReadTips{} - if protoimpl.UnsafeEnabled { - mi := &file_sdkws_sdkws_proto_msgTypes[51] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ConversationHasReadTips) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ConversationHasReadTips) ProtoMessage() {} - -func (x *ConversationHasReadTips) ProtoReflect() protoreflect.Message { - mi := &file_sdkws_sdkws_proto_msgTypes[51] - 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 ConversationHasReadTips.ProtoReflect.Descriptor instead. -func (*ConversationHasReadTips) Descriptor() ([]byte, []int) { - return file_sdkws_sdkws_proto_rawDescGZIP(), []int{51} -} - -func (x *ConversationHasReadTips) GetUserID() string { - if x != nil { - return x.UserID - } - return "" -} - -func (x *ConversationHasReadTips) GetConversationID() string { - if x != nil { - return x.ConversationID - } - return "" -} - -func (x *ConversationHasReadTips) GetHasReadSeq() int64 { - if x != nil { - return x.HasReadSeq - } - return 0 -} - -func (x *ConversationHasReadTips) GetUnreadCountTime() int64 { - if x != nil { - return x.UnreadCountTime - } - return 0 -} - -type NotificationElem struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Detail string `protobuf:"bytes,1,opt,name=detail,proto3" json:"detail"` -} - -func (x *NotificationElem) Reset() { - *x = NotificationElem{} - if protoimpl.UnsafeEnabled { - mi := &file_sdkws_sdkws_proto_msgTypes[52] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *NotificationElem) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*NotificationElem) ProtoMessage() {} - -func (x *NotificationElem) ProtoReflect() protoreflect.Message { - mi := &file_sdkws_sdkws_proto_msgTypes[52] - 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 NotificationElem.ProtoReflect.Descriptor instead. -func (*NotificationElem) Descriptor() ([]byte, []int) { - return file_sdkws_sdkws_proto_rawDescGZIP(), []int{52} -} - -func (x *NotificationElem) GetDetail() string { - if x != nil { - return x.Detail - } - return "" -} - -// //////////////////message/////////////////////// -type Seqs struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Seqs []int64 `protobuf:"varint,1,rep,packed,name=seqs,proto3" json:"seqs"` -} - -func (x *Seqs) Reset() { - *x = Seqs{} - if protoimpl.UnsafeEnabled { - mi := &file_sdkws_sdkws_proto_msgTypes[53] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Seqs) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Seqs) ProtoMessage() {} - -func (x *Seqs) ProtoReflect() protoreflect.Message { - mi := &file_sdkws_sdkws_proto_msgTypes[53] - 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 Seqs.ProtoReflect.Descriptor instead. -func (*Seqs) Descriptor() ([]byte, []int) { - return file_sdkws_sdkws_proto_rawDescGZIP(), []int{53} -} - -func (x *Seqs) GetSeqs() []int64 { - if x != nil { - return x.Seqs - } - return nil -} - -type DeleteMessageTips struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - OpUserID string `protobuf:"bytes,1,opt,name=opUserID,proto3" json:"opUserID"` - UserID string `protobuf:"bytes,2,opt,name=userID,proto3" json:"userID"` - Seqs []int64 `protobuf:"varint,3,rep,packed,name=seqs,proto3" json:"seqs"` -} - -func (x *DeleteMessageTips) Reset() { - *x = DeleteMessageTips{} - if protoimpl.UnsafeEnabled { - mi := &file_sdkws_sdkws_proto_msgTypes[54] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DeleteMessageTips) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DeleteMessageTips) ProtoMessage() {} - -func (x *DeleteMessageTips) ProtoReflect() protoreflect.Message { - mi := &file_sdkws_sdkws_proto_msgTypes[54] - 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 DeleteMessageTips.ProtoReflect.Descriptor instead. -func (*DeleteMessageTips) Descriptor() ([]byte, []int) { - return file_sdkws_sdkws_proto_rawDescGZIP(), []int{54} -} - -func (x *DeleteMessageTips) GetOpUserID() string { - if x != nil { - return x.OpUserID - } - return "" -} - -func (x *DeleteMessageTips) GetUserID() string { - if x != nil { - return x.UserID - } - return "" -} - -func (x *DeleteMessageTips) GetSeqs() []int64 { - if x != nil { - return x.Seqs - } - return nil -} - -type RevokeMsgTips struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - RevokerUserID string `protobuf:"bytes,1,opt,name=revokerUserID,proto3" json:"revokerUserID"` - ClientMsgID string `protobuf:"bytes,2,opt,name=clientMsgID,proto3" json:"clientMsgID"` - RevokeTime int64 `protobuf:"varint,3,opt,name=revokeTime,proto3" json:"revokeTime"` - SesstionType int32 `protobuf:"varint,5,opt,name=sesstionType,proto3" json:"sesstionType"` - Seq int64 `protobuf:"varint,6,opt,name=seq,proto3" json:"seq"` - ConversationID string `protobuf:"bytes,7,opt,name=conversationID,proto3" json:"conversationID"` -} - -func (x *RevokeMsgTips) Reset() { - *x = RevokeMsgTips{} - if protoimpl.UnsafeEnabled { - mi := &file_sdkws_sdkws_proto_msgTypes[55] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RevokeMsgTips) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RevokeMsgTips) ProtoMessage() {} - -func (x *RevokeMsgTips) ProtoReflect() protoreflect.Message { - mi := &file_sdkws_sdkws_proto_msgTypes[55] - 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 RevokeMsgTips.ProtoReflect.Descriptor instead. -func (*RevokeMsgTips) Descriptor() ([]byte, []int) { - return file_sdkws_sdkws_proto_rawDescGZIP(), []int{55} -} - -func (x *RevokeMsgTips) GetRevokerUserID() string { - if x != nil { - return x.RevokerUserID - } - return "" -} - -func (x *RevokeMsgTips) GetClientMsgID() string { - if x != nil { - return x.ClientMsgID - } - return "" -} - -func (x *RevokeMsgTips) GetRevokeTime() int64 { - if x != nil { - return x.RevokeTime - } - return 0 -} - -func (x *RevokeMsgTips) GetSesstionType() int32 { - if x != nil { - return x.SesstionType - } - return 0 -} - -func (x *RevokeMsgTips) GetSeq() int64 { - if x != nil { - return x.Seq - } - return 0 -} - -func (x *RevokeMsgTips) GetConversationID() string { - if x != nil { - return x.ConversationID - } - return "" -} - -type MessageRevokedContent struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - RevokerID string `protobuf:"bytes,1,opt,name=revokerID,proto3" json:"revokerID"` - RevokerRole int32 `protobuf:"varint,2,opt,name=revokerRole,proto3" json:"revokerRole"` - ClientMsgID string `protobuf:"bytes,3,opt,name=clientMsgID,proto3" json:"clientMsgID"` - RevokerNickname string `protobuf:"bytes,4,opt,name=revokerNickname,proto3" json:"revokerNickname"` - RevokeTime int64 `protobuf:"varint,5,opt,name=revokeTime,proto3" json:"revokeTime"` - SourceMessageSendTime int64 `protobuf:"varint,6,opt,name=sourceMessageSendTime,proto3" json:"sourceMessageSendTime"` - SourceMessageSendID string `protobuf:"bytes,7,opt,name=sourceMessageSendID,proto3" json:"sourceMessageSendID"` - SourceMessageSenderNickname string `protobuf:"bytes,8,opt,name=sourceMessageSenderNickname,proto3" json:"sourceMessageSenderNickname"` - SessionType int32 `protobuf:"varint,10,opt,name=sessionType,proto3" json:"sessionType"` - Seq int64 `protobuf:"varint,11,opt,name=seq,proto3" json:"seq"` - Ex string `protobuf:"bytes,12,opt,name=ex,proto3" json:"ex"` -} - -func (x *MessageRevokedContent) Reset() { - *x = MessageRevokedContent{} - if protoimpl.UnsafeEnabled { - mi := &file_sdkws_sdkws_proto_msgTypes[56] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MessageRevokedContent) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MessageRevokedContent) ProtoMessage() {} - -func (x *MessageRevokedContent) ProtoReflect() protoreflect.Message { - mi := &file_sdkws_sdkws_proto_msgTypes[56] - 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 MessageRevokedContent.ProtoReflect.Descriptor instead. -func (*MessageRevokedContent) Descriptor() ([]byte, []int) { - return file_sdkws_sdkws_proto_rawDescGZIP(), []int{56} -} - -func (x *MessageRevokedContent) GetRevokerID() string { - if x != nil { - return x.RevokerID - } - return "" -} - -func (x *MessageRevokedContent) GetRevokerRole() int32 { - if x != nil { - return x.RevokerRole - } - return 0 -} - -func (x *MessageRevokedContent) GetClientMsgID() string { - if x != nil { - return x.ClientMsgID - } - return "" -} - -func (x *MessageRevokedContent) GetRevokerNickname() string { - if x != nil { - return x.RevokerNickname - } - return "" -} - -func (x *MessageRevokedContent) GetRevokeTime() int64 { - if x != nil { - return x.RevokeTime - } - return 0 -} - -func (x *MessageRevokedContent) GetSourceMessageSendTime() int64 { - if x != nil { - return x.SourceMessageSendTime - } - return 0 -} - -func (x *MessageRevokedContent) GetSourceMessageSendID() string { - if x != nil { - return x.SourceMessageSendID - } - return "" -} - -func (x *MessageRevokedContent) GetSourceMessageSenderNickname() string { - if x != nil { - return x.SourceMessageSenderNickname - } - return "" -} - -func (x *MessageRevokedContent) GetSessionType() int32 { - if x != nil { - return x.SessionType - } - return 0 -} - -func (x *MessageRevokedContent) GetSeq() int64 { - if x != nil { - return x.Seq - } - return 0 -} - -func (x *MessageRevokedContent) GetEx() string { - if x != nil { - return x.Ex - } - return "" -} - -type ClearConversationTips struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - UserID string `protobuf:"bytes,1,opt,name=userID,proto3" json:"userID"` - ConversationIDs []string `protobuf:"bytes,2,rep,name=conversationIDs,proto3" json:"conversationIDs"` -} - -func (x *ClearConversationTips) Reset() { - *x = ClearConversationTips{} - if protoimpl.UnsafeEnabled { - mi := &file_sdkws_sdkws_proto_msgTypes[57] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ClearConversationTips) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ClearConversationTips) ProtoMessage() {} - -func (x *ClearConversationTips) ProtoReflect() protoreflect.Message { - mi := &file_sdkws_sdkws_proto_msgTypes[57] - 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 ClearConversationTips.ProtoReflect.Descriptor instead. -func (*ClearConversationTips) Descriptor() ([]byte, []int) { - return file_sdkws_sdkws_proto_rawDescGZIP(), []int{57} -} - -func (x *ClearConversationTips) GetUserID() string { - if x != nil { - return x.UserID - } - return "" -} - -func (x *ClearConversationTips) GetConversationIDs() []string { - if x != nil { - return x.ConversationIDs - } - return nil -} - -type DeleteMsgsTips struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - UserID string `protobuf:"bytes,1,opt,name=userID,proto3" json:"userID"` - ConversationID string `protobuf:"bytes,2,opt,name=conversationID,proto3" json:"conversationID"` - Seqs []int64 `protobuf:"varint,3,rep,packed,name=seqs,proto3" json:"seqs"` -} - -func (x *DeleteMsgsTips) Reset() { - *x = DeleteMsgsTips{} - if protoimpl.UnsafeEnabled { - mi := &file_sdkws_sdkws_proto_msgTypes[58] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DeleteMsgsTips) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DeleteMsgsTips) ProtoMessage() {} - -func (x *DeleteMsgsTips) ProtoReflect() protoreflect.Message { - mi := &file_sdkws_sdkws_proto_msgTypes[58] - 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 DeleteMsgsTips.ProtoReflect.Descriptor instead. -func (*DeleteMsgsTips) Descriptor() ([]byte, []int) { - return file_sdkws_sdkws_proto_rawDescGZIP(), []int{58} -} - -func (x *DeleteMsgsTips) GetUserID() string { - if x != nil { - return x.UserID - } - return "" -} - -func (x *DeleteMsgsTips) GetConversationID() string { - if x != nil { - return x.ConversationID - } - return "" -} - -func (x *DeleteMsgsTips) GetSeqs() []int64 { - if x != nil { - return x.Seqs - } - return nil -} - -type MarkAsReadTips struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - MarkAsReadUserID string `protobuf:"bytes,1,opt,name=markAsReadUserID,proto3" json:"markAsReadUserID"` - ConversationID string `protobuf:"bytes,2,opt,name=conversationID,proto3" json:"conversationID"` - Seqs []int64 `protobuf:"varint,3,rep,packed,name=seqs,proto3" json:"seqs"` - HasReadSeq int64 `protobuf:"varint,4,opt,name=hasReadSeq,proto3" json:"hasReadSeq"` -} - -func (x *MarkAsReadTips) Reset() { - *x = MarkAsReadTips{} - if protoimpl.UnsafeEnabled { - mi := &file_sdkws_sdkws_proto_msgTypes[59] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MarkAsReadTips) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MarkAsReadTips) ProtoMessage() {} - -func (x *MarkAsReadTips) ProtoReflect() protoreflect.Message { - mi := &file_sdkws_sdkws_proto_msgTypes[59] - 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 MarkAsReadTips.ProtoReflect.Descriptor instead. -func (*MarkAsReadTips) Descriptor() ([]byte, []int) { - return file_sdkws_sdkws_proto_rawDescGZIP(), []int{59} -} - -func (x *MarkAsReadTips) GetMarkAsReadUserID() string { - if x != nil { - return x.MarkAsReadUserID - } - return "" -} - -func (x *MarkAsReadTips) GetConversationID() string { - if x != nil { - return x.ConversationID - } - return "" -} - -func (x *MarkAsReadTips) GetSeqs() []int64 { - if x != nil { - return x.Seqs - } - return nil -} - -func (x *MarkAsReadTips) GetHasReadSeq() int64 { - if x != nil { - return x.HasReadSeq - } - return 0 -} - -type SetAppBackgroundStatusReq struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - UserID string `protobuf:"bytes,1,opt,name=userID,proto3" json:"userID"` - IsBackground bool `protobuf:"varint,2,opt,name=isBackground,proto3" json:"isBackground"` -} - -func (x *SetAppBackgroundStatusReq) Reset() { - *x = SetAppBackgroundStatusReq{} - if protoimpl.UnsafeEnabled { - mi := &file_sdkws_sdkws_proto_msgTypes[60] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SetAppBackgroundStatusReq) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SetAppBackgroundStatusReq) ProtoMessage() {} - -func (x *SetAppBackgroundStatusReq) ProtoReflect() protoreflect.Message { - mi := &file_sdkws_sdkws_proto_msgTypes[60] - 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 SetAppBackgroundStatusReq.ProtoReflect.Descriptor instead. -func (*SetAppBackgroundStatusReq) Descriptor() ([]byte, []int) { - return file_sdkws_sdkws_proto_rawDescGZIP(), []int{60} -} - -func (x *SetAppBackgroundStatusReq) GetUserID() string { - if x != nil { - return x.UserID - } - return "" -} - -func (x *SetAppBackgroundStatusReq) GetIsBackground() bool { - if x != nil { - return x.IsBackground - } - return false -} - -type SetAppBackgroundStatusResp struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *SetAppBackgroundStatusResp) Reset() { - *x = SetAppBackgroundStatusResp{} - if protoimpl.UnsafeEnabled { - mi := &file_sdkws_sdkws_proto_msgTypes[61] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SetAppBackgroundStatusResp) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SetAppBackgroundStatusResp) ProtoMessage() {} - -func (x *SetAppBackgroundStatusResp) ProtoReflect() protoreflect.Message { - mi := &file_sdkws_sdkws_proto_msgTypes[61] - 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 SetAppBackgroundStatusResp.ProtoReflect.Descriptor instead. -func (*SetAppBackgroundStatusResp) Descriptor() ([]byte, []int) { - return file_sdkws_sdkws_proto_rawDescGZIP(), []int{61} -} - -type RequestPagination struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - PageNumber int32 `protobuf:"varint,1,opt,name=pageNumber,proto3" json:"pageNumber"` - ShowNumber int32 `protobuf:"varint,2,opt,name=showNumber,proto3" json:"showNumber"` -} - -func (x *RequestPagination) Reset() { - *x = RequestPagination{} - if protoimpl.UnsafeEnabled { - mi := &file_sdkws_sdkws_proto_msgTypes[62] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RequestPagination) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RequestPagination) ProtoMessage() {} - -func (x *RequestPagination) ProtoReflect() protoreflect.Message { - mi := &file_sdkws_sdkws_proto_msgTypes[62] - 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 RequestPagination.ProtoReflect.Descriptor instead. -func (*RequestPagination) Descriptor() ([]byte, []int) { - return file_sdkws_sdkws_proto_rawDescGZIP(), []int{62} -} - -func (x *RequestPagination) GetPageNumber() int32 { - if x != nil { - return x.PageNumber - } - return 0 -} - -func (x *RequestPagination) GetShowNumber() int32 { - if x != nil { - return x.ShowNumber - } - return 0 -} - -var File_sdkws_sdkws_proto protoreflect.FileDescriptor - -var file_sdkws_sdkws_proto_rawDesc = []byte{ - 0x0a, 0x11, 0x73, 0x64, 0x6b, 0x77, 0x73, 0x2f, 0x73, 0x64, 0x6b, 0x77, 0x73, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x12, 0x12, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, - 0x72, 0x2e, 0x73, 0x64, 0x6b, 0x77, 0x73, 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, 0xdf, 0x04, 0x0a, 0x09, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x6e, - 0x66, 0x6f, 0x12, 0x18, 0x0a, 0x07, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x44, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x07, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x44, 0x12, 0x1c, 0x0a, 0x09, - 0x67, 0x72, 0x6f, 0x75, 0x70, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x09, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x22, 0x0a, 0x0c, 0x6e, 0x6f, - 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0c, 0x6e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x22, - 0x0a, 0x0c, 0x69, 0x6e, 0x74, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x69, 0x6e, 0x74, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x66, 0x61, 0x63, 0x65, 0x55, 0x52, 0x4c, 0x18, 0x05, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x07, 0x66, 0x61, 0x63, 0x65, 0x55, 0x52, 0x4c, 0x12, 0x20, 0x0a, 0x0b, - 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x55, 0x73, 0x65, 0x72, 0x49, 0x44, 0x18, 0x06, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0b, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x55, 0x73, 0x65, 0x72, 0x49, 0x44, 0x12, 0x1e, - 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x07, 0x20, 0x01, - 0x28, 0x03, 0x52, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x20, - 0x0a, 0x0b, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x08, 0x20, - 0x01, 0x28, 0x0d, 0x52, 0x0b, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x43, 0x6f, 0x75, 0x6e, 0x74, - 0x12, 0x0e, 0x0a, 0x02, 0x65, 0x78, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x65, 0x78, - 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x05, - 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x24, 0x0a, 0x0d, 0x63, 0x72, 0x65, 0x61, - 0x74, 0x6f, 0x72, 0x55, 0x73, 0x65, 0x72, 0x49, 0x44, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0d, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x55, 0x73, 0x65, 0x72, 0x49, 0x44, 0x12, 0x1c, - 0x0a, 0x09, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x54, 0x79, 0x70, 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28, - 0x05, 0x52, 0x09, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x54, 0x79, 0x70, 0x65, 0x12, 0x2a, 0x0a, 0x10, - 0x6e, 0x65, 0x65, 0x64, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x18, 0x0d, 0x20, 0x01, 0x28, 0x05, 0x52, 0x10, 0x6e, 0x65, 0x65, 0x64, 0x56, 0x65, 0x72, 0x69, - 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x26, 0x0a, 0x0e, 0x6c, 0x6f, 0x6f, 0x6b, - 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x05, - 0x52, 0x0e, 0x6c, 0x6f, 0x6f, 0x6b, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, - 0x12, 0x2c, 0x0a, 0x11, 0x61, 0x70, 0x70, 0x6c, 0x79, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x46, - 0x72, 0x69, 0x65, 0x6e, 0x64, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x05, 0x52, 0x11, 0x61, 0x70, 0x70, - 0x6c, 0x79, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x12, 0x36, - 0x0a, 0x16, 0x6e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x55, 0x70, - 0x64, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x10, 0x20, 0x01, 0x28, 0x03, 0x52, 0x16, - 0x6e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x55, 0x70, 0x64, 0x61, - 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x2e, 0x0a, 0x12, 0x6e, 0x6f, 0x74, 0x69, 0x66, 0x69, - 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x55, 0x73, 0x65, 0x72, 0x49, 0x44, 0x18, 0x11, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x12, 0x6e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x55, 0x73, 0x65, 0x72, 0x49, 0x44, 0x22, 0xa6, 0x03, 0x0a, 0x0f, 0x47, 0x72, 0x6f, 0x75, 0x70, - 0x49, 0x6e, 0x66, 0x6f, 0x46, 0x6f, 0x72, 0x53, 0x65, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x67, 0x72, - 0x6f, 0x75, 0x70, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x67, 0x72, 0x6f, - 0x75, 0x70, 0x49, 0x44, 0x12, 0x1c, 0x0a, 0x09, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x4e, 0x61, 0x6d, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x4e, 0x61, - 0x6d, 0x65, 0x12, 0x22, 0x0a, 0x0c, 0x6e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x6e, 0x6f, 0x74, 0x69, 0x66, 0x69, - 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x22, 0x0a, 0x0c, 0x69, 0x6e, 0x74, 0x72, 0x6f, 0x64, - 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x69, 0x6e, - 0x74, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x66, 0x61, - 0x63, 0x65, 0x55, 0x52, 0x4c, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x66, 0x61, 0x63, - 0x65, 0x55, 0x52, 0x4c, 0x12, 0x0e, 0x0a, 0x02, 0x65, 0x78, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x02, 0x65, 0x78, 0x12, 0x4d, 0x0a, 0x10, 0x6e, 0x65, 0x65, 0x64, 0x56, 0x65, 0x72, 0x69, - 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, - 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, - 0x65, 0x52, 0x10, 0x6e, 0x65, 0x65, 0x64, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x12, 0x49, 0x0a, 0x0e, 0x6c, 0x6f, 0x6f, 0x6b, 0x4d, 0x65, 0x6d, 0x62, 0x65, - 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x4f, 0x70, - 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2e, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0e, - 0x6c, 0x6f, 0x6f, 0x6b, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x4f, - 0x0a, 0x11, 0x61, 0x70, 0x70, 0x6c, 0x79, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x46, 0x72, 0x69, - 0x65, 0x6e, 0x64, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x4f, 0x70, 0x65, 0x6e, - 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x11, 0x61, 0x70, - 0x70, 0x6c, 0x79, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x22, - 0xff, 0x02, 0x0a, 0x13, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x46, - 0x75, 0x6c, 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x18, 0x0a, 0x07, 0x67, 0x72, 0x6f, 0x75, 0x70, - 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x49, - 0x44, 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, 0x1c, 0x0a, 0x09, 0x72, 0x6f, 0x6c, - 0x65, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x72, 0x6f, - 0x6c, 0x65, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x1a, 0x0a, 0x08, 0x6a, 0x6f, 0x69, 0x6e, 0x54, - 0x69, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x6a, 0x6f, 0x69, 0x6e, 0x54, - 0x69, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x6e, 0x69, 0x63, 0x6b, 0x6e, 0x61, 0x6d, 0x65, 0x18, - 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6e, 0x69, 0x63, 0x6b, 0x6e, 0x61, 0x6d, 0x65, 0x12, - 0x18, 0x0a, 0x07, 0x66, 0x61, 0x63, 0x65, 0x55, 0x52, 0x4c, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x07, 0x66, 0x61, 0x63, 0x65, 0x55, 0x52, 0x4c, 0x12, 0x26, 0x0a, 0x0e, 0x61, 0x70, 0x70, - 0x4d, 0x61, 0x6e, 0x67, 0x65, 0x72, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x07, 0x20, 0x01, 0x28, - 0x05, 0x52, 0x0e, 0x61, 0x70, 0x70, 0x4d, 0x61, 0x6e, 0x67, 0x65, 0x72, 0x4c, 0x65, 0x76, 0x65, - 0x6c, 0x12, 0x1e, 0x0a, 0x0a, 0x6a, 0x6f, 0x69, 0x6e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, - 0x08, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x6a, 0x6f, 0x69, 0x6e, 0x53, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x12, 0x26, 0x0a, 0x0e, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x55, 0x73, 0x65, - 0x72, 0x49, 0x44, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x6f, 0x70, 0x65, 0x72, 0x61, - 0x74, 0x6f, 0x72, 0x55, 0x73, 0x65, 0x72, 0x49, 0x44, 0x12, 0x0e, 0x0a, 0x02, 0x65, 0x78, 0x18, - 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x65, 0x78, 0x12, 0x20, 0x0a, 0x0b, 0x6d, 0x75, 0x74, - 0x65, 0x45, 0x6e, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, - 0x6d, 0x75, 0x74, 0x65, 0x45, 0x6e, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x24, 0x0a, 0x0d, 0x69, - 0x6e, 0x76, 0x69, 0x74, 0x65, 0x72, 0x55, 0x73, 0x65, 0x72, 0x49, 0x44, 0x18, 0x0c, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0d, 0x69, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x72, 0x55, 0x73, 0x65, 0x72, 0x49, - 0x44, 0x22, 0x6e, 0x0a, 0x0e, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x55, 0x73, 0x65, 0x72, 0x49, - 0x6e, 0x66, 0x6f, 0x12, 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, 0x6e, - 0x69, 0x63, 0x6b, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6e, - 0x69, 0x63, 0x6b, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x66, 0x61, 0x63, 0x65, 0x55, - 0x52, 0x4c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x66, 0x61, 0x63, 0x65, 0x55, 0x52, - 0x4c, 0x12, 0x0e, 0x0a, 0x02, 0x65, 0x78, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x65, - 0x78, 0x22, 0xdc, 0x01, 0x0a, 0x08, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x12, 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, 0x6e, 0x69, 0x63, 0x6b, 0x6e, 0x61, - 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6e, 0x69, 0x63, 0x6b, 0x6e, 0x61, - 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x66, 0x61, 0x63, 0x65, 0x55, 0x52, 0x4c, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x07, 0x66, 0x61, 0x63, 0x65, 0x55, 0x52, 0x4c, 0x12, 0x0e, 0x0a, 0x02, - 0x65, 0x78, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x65, 0x78, 0x12, 0x1e, 0x0a, 0x0a, - 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, - 0x52, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x26, 0x0a, 0x0e, - 0x61, 0x70, 0x70, 0x4d, 0x61, 0x6e, 0x67, 0x65, 0x72, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x06, - 0x20, 0x01, 0x28, 0x05, 0x52, 0x0e, 0x61, 0x70, 0x70, 0x4d, 0x61, 0x6e, 0x67, 0x65, 0x72, 0x4c, - 0x65, 0x76, 0x65, 0x6c, 0x12, 0x2a, 0x0a, 0x10, 0x67, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x52, 0x65, - 0x63, 0x76, 0x4d, 0x73, 0x67, 0x4f, 0x70, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x10, - 0x67, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x52, 0x65, 0x63, 0x76, 0x4d, 0x73, 0x67, 0x4f, 0x70, 0x74, - 0x22, 0xfa, 0x01, 0x0a, 0x0a, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x49, 0x6e, 0x66, 0x6f, 0x12, - 0x20, 0x0a, 0x0b, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x55, 0x73, 0x65, 0x72, 0x49, 0x44, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x55, 0x73, 0x65, 0x72, 0x49, - 0x44, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x6d, 0x61, 0x72, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x06, 0x72, 0x65, 0x6d, 0x61, 0x72, 0x6b, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x72, 0x65, - 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x63, - 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x3c, 0x0a, 0x0a, 0x66, 0x72, 0x69, - 0x65, 0x6e, 0x64, 0x55, 0x73, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, - 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x73, 0x64, 0x6b, - 0x77, 0x73, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0a, 0x66, 0x72, 0x69, - 0x65, 0x6e, 0x64, 0x55, 0x73, 0x65, 0x72, 0x12, 0x1c, 0x0a, 0x09, 0x61, 0x64, 0x64, 0x53, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x61, 0x64, 0x64, 0x53, - 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x26, 0x0a, 0x0e, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, - 0x72, 0x55, 0x73, 0x65, 0x72, 0x49, 0x44, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x6f, - 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x55, 0x73, 0x65, 0x72, 0x49, 0x44, 0x12, 0x0e, 0x0a, - 0x02, 0x65, 0x78, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x65, 0x78, 0x22, 0xed, 0x01, - 0x0a, 0x09, 0x42, 0x6c, 0x61, 0x63, 0x6b, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x20, 0x0a, 0x0b, 0x6f, - 0x77, 0x6e, 0x65, 0x72, 0x55, 0x73, 0x65, 0x72, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0b, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x55, 0x73, 0x65, 0x72, 0x49, 0x44, 0x12, 0x1e, 0x0a, - 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x03, 0x52, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x48, 0x0a, - 0x0d, 0x62, 0x6c, 0x61, 0x63, 0x6b, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, - 0x76, 0x65, 0x72, 0x2e, 0x73, 0x64, 0x6b, 0x77, 0x73, 0x2e, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, - 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0d, 0x62, 0x6c, 0x61, 0x63, 0x6b, 0x55, - 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x1c, 0x0a, 0x09, 0x61, 0x64, 0x64, 0x53, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x61, 0x64, 0x64, 0x53, - 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x26, 0x0a, 0x0e, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, - 0x72, 0x55, 0x73, 0x65, 0x72, 0x49, 0x44, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x6f, - 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x55, 0x73, 0x65, 0x72, 0x49, 0x44, 0x12, 0x0e, 0x0a, - 0x02, 0x65, 0x78, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x65, 0x78, 0x22, 0x99, 0x03, - 0x0a, 0x0c, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3e, - 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x22, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, - 0x73, 0x64, 0x6b, 0x77, 0x73, 0x2e, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x55, 0x73, 0x65, 0x72, - 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x3b, - 0x0a, 0x09, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x6e, 0x66, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x1d, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, - 0x2e, 0x73, 0x64, 0x6b, 0x77, 0x73, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x6e, 0x66, 0x6f, - 0x52, 0x09, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x22, 0x0a, 0x0c, 0x68, - 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x05, 0x52, 0x0c, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, - 0x16, 0x0a, 0x06, 0x72, 0x65, 0x71, 0x4d, 0x73, 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x06, 0x72, 0x65, 0x71, 0x4d, 0x73, 0x67, 0x12, 0x1c, 0x0a, 0x09, 0x68, 0x61, 0x6e, 0x64, 0x6c, - 0x65, 0x4d, 0x73, 0x67, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x68, 0x61, 0x6e, 0x64, - 0x6c, 0x65, 0x4d, 0x73, 0x67, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x65, 0x71, 0x54, 0x69, 0x6d, 0x65, - 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x72, 0x65, 0x71, 0x54, 0x69, 0x6d, 0x65, 0x12, - 0x22, 0x0a, 0x0c, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x55, 0x73, 0x65, 0x72, 0x49, 0x44, 0x18, - 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x55, 0x73, 0x65, - 0x72, 0x49, 0x44, 0x12, 0x1e, 0x0a, 0x0a, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x54, 0x69, 0x6d, - 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x54, - 0x69, 0x6d, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x65, 0x78, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x02, 0x65, 0x78, 0x12, 0x1e, 0x0a, 0x0a, 0x6a, 0x6f, 0x69, 0x6e, 0x53, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x6a, 0x6f, 0x69, 0x6e, 0x53, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x12, 0x24, 0x0a, 0x0d, 0x69, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x72, 0x55, 0x73, - 0x65, 0x72, 0x49, 0x44, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x69, 0x6e, 0x76, 0x69, - 0x74, 0x65, 0x72, 0x55, 0x73, 0x65, 0x72, 0x49, 0x44, 0x22, 0x9f, 0x03, 0x0a, 0x0d, 0x46, 0x72, - 0x69, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x66, - 0x72, 0x6f, 0x6d, 0x55, 0x73, 0x65, 0x72, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0a, 0x66, 0x72, 0x6f, 0x6d, 0x55, 0x73, 0x65, 0x72, 0x49, 0x44, 0x12, 0x22, 0x0a, 0x0c, 0x66, - 0x72, 0x6f, 0x6d, 0x4e, 0x69, 0x63, 0x6b, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0c, 0x66, 0x72, 0x6f, 0x6d, 0x4e, 0x69, 0x63, 0x6b, 0x6e, 0x61, 0x6d, 0x65, 0x12, - 0x20, 0x0a, 0x0b, 0x66, 0x72, 0x6f, 0x6d, 0x46, 0x61, 0x63, 0x65, 0x55, 0x52, 0x4c, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x66, 0x72, 0x6f, 0x6d, 0x46, 0x61, 0x63, 0x65, 0x55, 0x52, - 0x4c, 0x12, 0x1a, 0x0a, 0x08, 0x74, 0x6f, 0x55, 0x73, 0x65, 0x72, 0x49, 0x44, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x08, 0x74, 0x6f, 0x55, 0x73, 0x65, 0x72, 0x49, 0x44, 0x12, 0x1e, 0x0a, - 0x0a, 0x74, 0x6f, 0x4e, 0x69, 0x63, 0x6b, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0a, 0x74, 0x6f, 0x4e, 0x69, 0x63, 0x6b, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1c, 0x0a, - 0x09, 0x74, 0x6f, 0x46, 0x61, 0x63, 0x65, 0x55, 0x52, 0x4c, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x09, 0x74, 0x6f, 0x46, 0x61, 0x63, 0x65, 0x55, 0x52, 0x4c, 0x12, 0x22, 0x0a, 0x0c, 0x68, - 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, - 0x05, 0x52, 0x0c, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, - 0x16, 0x0a, 0x06, 0x72, 0x65, 0x71, 0x4d, 0x73, 0x67, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x06, 0x72, 0x65, 0x71, 0x4d, 0x73, 0x67, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, - 0x65, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x63, 0x72, 0x65, - 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x24, 0x0a, 0x0d, 0x68, 0x61, 0x6e, 0x64, 0x6c, - 0x65, 0x72, 0x55, 0x73, 0x65, 0x72, 0x49, 0x44, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, - 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x72, 0x55, 0x73, 0x65, 0x72, 0x49, 0x44, 0x12, 0x1c, 0x0a, - 0x09, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x4d, 0x73, 0x67, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x09, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x4d, 0x73, 0x67, 0x12, 0x1e, 0x0a, 0x0a, 0x68, - 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x03, 0x52, - 0x0a, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x65, - 0x78, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x65, 0x78, 0x22, 0x9f, 0x01, 0x0a, 0x14, - 0x50, 0x75, 0x6c, 0x6c, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x42, 0x79, 0x53, 0x65, 0x71, - 0x73, 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, 0x12, 0x3a, 0x0a, 0x09, - 0x73, 0x65, 0x71, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x1c, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x73, - 0x64, 0x6b, 0x77, 0x73, 0x2e, 0x53, 0x65, 0x71, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x09, 0x73, - 0x65, 0x71, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x12, 0x33, 0x0a, 0x05, 0x6f, 0x72, 0x64, 0x65, - 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1d, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, - 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x73, 0x64, 0x6b, 0x77, 0x73, 0x2e, 0x50, 0x75, 0x6c, - 0x6c, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x05, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x22, 0x6c, 0x0a, - 0x08, 0x53, 0x65, 0x71, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x26, 0x0a, 0x0e, 0x63, 0x6f, 0x6e, - 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0e, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, - 0x44, 0x12, 0x14, 0x0a, 0x05, 0x62, 0x65, 0x67, 0x69, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, - 0x52, 0x05, 0x62, 0x65, 0x67, 0x69, 0x6e, 0x12, 0x10, 0x0a, 0x03, 0x65, 0x6e, 0x64, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x65, 0x6e, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x6e, 0x75, 0x6d, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x6e, 0x75, 0x6d, 0x22, 0x51, 0x0a, 0x08, 0x50, - 0x75, 0x6c, 0x6c, 0x4d, 0x73, 0x67, 0x73, 0x12, 0x2f, 0x0a, 0x04, 0x4d, 0x73, 0x67, 0x73, 0x18, - 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, - 0x72, 0x76, 0x65, 0x72, 0x2e, 0x73, 0x64, 0x6b, 0x77, 0x73, 0x2e, 0x4d, 0x73, 0x67, 0x44, 0x61, - 0x74, 0x61, 0x52, 0x04, 0x4d, 0x73, 0x67, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x73, 0x45, 0x6e, - 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x69, 0x73, 0x45, 0x6e, 0x64, 0x22, 0x87, - 0x03, 0x0a, 0x15, 0x50, 0x75, 0x6c, 0x6c, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x42, 0x79, - 0x53, 0x65, 0x71, 0x73, 0x52, 0x65, 0x73, 0x70, 0x12, 0x47, 0x0a, 0x04, 0x6d, 0x73, 0x67, 0x73, - 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, - 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x73, 0x64, 0x6b, 0x77, 0x73, 0x2e, 0x50, 0x75, 0x6c, 0x6c, - 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x42, 0x79, 0x53, 0x65, 0x71, 0x73, 0x52, 0x65, 0x73, - 0x70, 0x2e, 0x4d, 0x73, 0x67, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x04, 0x6d, 0x73, 0x67, - 0x73, 0x12, 0x6b, 0x0a, 0x10, 0x6e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x4d, 0x73, 0x67, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3f, 0x2e, 0x4f, 0x70, - 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x73, 0x64, 0x6b, 0x77, 0x73, - 0x2e, 0x50, 0x75, 0x6c, 0x6c, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x42, 0x79, 0x53, 0x65, - 0x71, 0x73, 0x52, 0x65, 0x73, 0x70, 0x2e, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x4d, 0x73, 0x67, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x10, 0x6e, 0x6f, - 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x73, 0x67, 0x73, 0x1a, 0x55, - 0x0a, 0x09, 0x4d, 0x73, 0x67, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, - 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x32, 0x0a, - 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x4f, - 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x73, 0x64, 0x6b, 0x77, - 0x73, 0x2e, 0x50, 0x75, 0x6c, 0x6c, 0x4d, 0x73, 0x67, 0x73, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x61, 0x0a, 0x15, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x73, 0x67, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, - 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, - 0x12, 0x32, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x1c, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x73, - 0x64, 0x6b, 0x77, 0x73, 0x2e, 0x50, 0x75, 0x6c, 0x6c, 0x4d, 0x73, 0x67, 0x73, 0x52, 0x05, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x26, 0x0a, 0x0c, 0x47, 0x65, 0x74, 0x4d, - 0x61, 0x78, 0x53, 0x65, 0x71, 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, 0x9b, 0x02, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x4d, 0x61, 0x78, 0x53, 0x65, 0x71, 0x52, 0x65, - 0x73, 0x70, 0x12, 0x48, 0x0a, 0x07, 0x6d, 0x61, 0x78, 0x53, 0x65, 0x71, 0x73, 0x18, 0x01, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, - 0x65, 0x72, 0x2e, 0x73, 0x64, 0x6b, 0x77, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x4d, 0x61, 0x78, 0x53, - 0x65, 0x71, 0x52, 0x65, 0x73, 0x70, 0x2e, 0x4d, 0x61, 0x78, 0x53, 0x65, 0x71, 0x73, 0x45, 0x6e, - 0x74, 0x72, 0x79, 0x52, 0x07, 0x6d, 0x61, 0x78, 0x53, 0x65, 0x71, 0x73, 0x12, 0x48, 0x0a, 0x07, - 0x6d, 0x69, 0x6e, 0x53, 0x65, 0x71, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2e, 0x2e, - 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x73, 0x64, 0x6b, - 0x77, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x4d, 0x61, 0x78, 0x53, 0x65, 0x71, 0x52, 0x65, 0x73, 0x70, - 0x2e, 0x4d, 0x69, 0x6e, 0x53, 0x65, 0x71, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x07, 0x6d, - 0x69, 0x6e, 0x53, 0x65, 0x71, 0x73, 0x1a, 0x3a, 0x0a, 0x0c, 0x4d, 0x61, 0x78, 0x53, 0x65, 0x71, - 0x73, 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, 0x03, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, - 0x38, 0x01, 0x1a, 0x3a, 0x0a, 0x0c, 0x4d, 0x69, 0x6e, 0x53, 0x65, 0x71, 0x73, 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, 0x03, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x71, - 0x0a, 0x0f, 0x55, 0x73, 0x65, 0x72, 0x53, 0x65, 0x6e, 0x64, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x73, - 0x70, 0x12, 0x20, 0x0a, 0x0b, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x4d, 0x73, 0x67, 0x49, 0x44, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x4d, 0x73, - 0x67, 0x49, 0x44, 0x12, 0x20, 0x0a, 0x0b, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x4d, 0x73, 0x67, - 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, - 0x4d, 0x73, 0x67, 0x49, 0x44, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x65, 0x6e, 0x64, 0x54, 0x69, 0x6d, - 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x73, 0x65, 0x6e, 0x64, 0x54, 0x69, 0x6d, - 0x65, 0x22, 0xae, 0x06, 0x0a, 0x07, 0x4d, 0x73, 0x67, 0x44, 0x61, 0x74, 0x61, 0x12, 0x16, 0x0a, - 0x06, 0x73, 0x65, 0x6e, 0x64, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, - 0x65, 0x6e, 0x64, 0x49, 0x44, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x63, 0x76, 0x49, 0x44, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x65, 0x63, 0x76, 0x49, 0x44, 0x12, 0x18, 0x0a, - 0x07, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x44, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, - 0x67, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x44, 0x12, 0x20, 0x0a, 0x0b, 0x63, 0x6c, 0x69, 0x65, 0x6e, - 0x74, 0x4d, 0x73, 0x67, 0x49, 0x44, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x6c, - 0x69, 0x65, 0x6e, 0x74, 0x4d, 0x73, 0x67, 0x49, 0x44, 0x12, 0x20, 0x0a, 0x0b, 0x73, 0x65, 0x72, - 0x76, 0x65, 0x72, 0x4d, 0x73, 0x67, 0x49, 0x44, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, - 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x4d, 0x73, 0x67, 0x49, 0x44, 0x12, 0x2a, 0x0a, 0x10, 0x73, - 0x65, 0x6e, 0x64, 0x65, 0x72, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x49, 0x44, 0x18, - 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x10, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x50, 0x6c, 0x61, - 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x49, 0x44, 0x12, 0x26, 0x0a, 0x0e, 0x73, 0x65, 0x6e, 0x64, 0x65, - 0x72, 0x4e, 0x69, 0x63, 0x6b, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0e, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x4e, 0x69, 0x63, 0x6b, 0x6e, 0x61, 0x6d, 0x65, 0x12, - 0x24, 0x0a, 0x0d, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x46, 0x61, 0x63, 0x65, 0x55, 0x52, 0x4c, - 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x46, 0x61, - 0x63, 0x65, 0x55, 0x52, 0x4c, 0x12, 0x20, 0x0a, 0x0b, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, - 0x54, 0x79, 0x70, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x73, 0x65, 0x73, 0x73, - 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x73, 0x67, 0x46, 0x72, - 0x6f, 0x6d, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x6d, 0x73, 0x67, 0x46, 0x72, 0x6f, - 0x6d, 0x12, 0x20, 0x0a, 0x0b, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, - 0x18, 0x0b, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x54, - 0x79, 0x70, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x0c, - 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x10, 0x0a, - 0x03, 0x73, 0x65, 0x71, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x73, 0x65, 0x71, 0x12, - 0x1a, 0x0a, 0x08, 0x73, 0x65, 0x6e, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x0f, 0x20, 0x01, 0x28, - 0x03, 0x52, 0x08, 0x73, 0x65, 0x6e, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x63, - 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x10, 0x20, 0x01, 0x28, 0x03, 0x52, - 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x73, - 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x11, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x73, 0x74, 0x61, - 0x74, 0x75, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x69, 0x73, 0x52, 0x65, 0x61, 0x64, 0x18, 0x12, 0x20, - 0x01, 0x28, 0x08, 0x52, 0x06, 0x69, 0x73, 0x52, 0x65, 0x61, 0x64, 0x12, 0x42, 0x0a, 0x07, 0x6f, - 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x13, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x4f, - 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x73, 0x64, 0x6b, 0x77, - 0x73, 0x2e, 0x4d, 0x73, 0x67, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, - 0x4d, 0x0a, 0x0f, 0x6f, 0x66, 0x66, 0x6c, 0x69, 0x6e, 0x65, 0x50, 0x75, 0x73, 0x68, 0x49, 0x6e, - 0x66, 0x6f, 0x18, 0x14, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, - 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x73, 0x64, 0x6b, 0x77, 0x73, 0x2e, 0x4f, 0x66, - 0x66, 0x6c, 0x69, 0x6e, 0x65, 0x50, 0x75, 0x73, 0x68, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0f, 0x6f, - 0x66, 0x66, 0x6c, 0x69, 0x6e, 0x65, 0x50, 0x75, 0x73, 0x68, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x22, - 0x0a, 0x0c, 0x61, 0x74, 0x55, 0x73, 0x65, 0x72, 0x49, 0x44, 0x4c, 0x69, 0x73, 0x74, 0x18, 0x15, - 0x20, 0x03, 0x28, 0x09, 0x52, 0x0c, 0x61, 0x74, 0x55, 0x73, 0x65, 0x72, 0x49, 0x44, 0x4c, 0x69, - 0x73, 0x74, 0x12, 0x22, 0x0a, 0x0c, 0x61, 0x74, 0x74, 0x61, 0x63, 0x68, 0x65, 0x64, 0x49, 0x6e, - 0x66, 0x6f, 0x18, 0x16, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x61, 0x74, 0x74, 0x61, 0x63, 0x68, - 0x65, 0x64, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x0e, 0x0a, 0x02, 0x65, 0x78, 0x18, 0x17, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x02, 0x65, 0x78, 0x1a, 0x3a, 0x0a, 0x0c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 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, 0x08, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, - 0x38, 0x01, 0x22, 0xec, 0x02, 0x0a, 0x0c, 0x50, 0x75, 0x73, 0x68, 0x4d, 0x65, 0x73, 0x73, 0x61, - 0x67, 0x65, 0x73, 0x12, 0x3e, 0x0a, 0x04, 0x6d, 0x73, 0x67, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x2a, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, - 0x2e, 0x73, 0x64, 0x6b, 0x77, 0x73, 0x2e, 0x50, 0x75, 0x73, 0x68, 0x4d, 0x65, 0x73, 0x73, 0x61, - 0x67, 0x65, 0x73, 0x2e, 0x4d, 0x73, 0x67, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x04, 0x6d, - 0x73, 0x67, 0x73, 0x12, 0x62, 0x0a, 0x10, 0x6e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x4d, 0x73, 0x67, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x36, 0x2e, - 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x73, 0x64, 0x6b, - 0x77, 0x73, 0x2e, 0x50, 0x75, 0x73, 0x68, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, - 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x73, 0x67, 0x73, - 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x10, 0x6e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x4d, 0x73, 0x67, 0x73, 0x1a, 0x55, 0x0a, 0x09, 0x4d, 0x73, 0x67, 0x73, 0x45, - 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x32, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, - 0x72, 0x76, 0x65, 0x72, 0x2e, 0x73, 0x64, 0x6b, 0x77, 0x73, 0x2e, 0x50, 0x75, 0x6c, 0x6c, 0x4d, - 0x73, 0x67, 0x73, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x61, - 0x0a, 0x15, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x73, - 0x67, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x32, 0x0a, 0x05, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, - 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x73, 0x64, 0x6b, 0x77, 0x73, 0x2e, 0x50, 0x75, - 0x6c, 0x6c, 0x4d, 0x73, 0x67, 0x73, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, - 0x01, 0x22, 0xb5, 0x01, 0x0a, 0x0f, 0x4f, 0x66, 0x66, 0x6c, 0x69, 0x6e, 0x65, 0x50, 0x75, 0x73, - 0x68, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x64, - 0x65, 0x73, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x64, 0x65, 0x73, 0x63, 0x12, - 0x0e, 0x0a, 0x02, 0x65, 0x78, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x65, 0x78, 0x12, - 0x22, 0x0a, 0x0c, 0x69, 0x4f, 0x53, 0x50, 0x75, 0x73, 0x68, 0x53, 0x6f, 0x75, 0x6e, 0x64, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x69, 0x4f, 0x53, 0x50, 0x75, 0x73, 0x68, 0x53, 0x6f, - 0x75, 0x6e, 0x64, 0x12, 0x24, 0x0a, 0x0d, 0x69, 0x4f, 0x53, 0x42, 0x61, 0x64, 0x67, 0x65, 0x43, - 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x69, 0x4f, 0x53, 0x42, - 0x61, 0x64, 0x67, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x73, 0x69, 0x67, - 0x6e, 0x61, 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, - 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0x64, 0x0a, 0x08, 0x54, 0x69, 0x70, - 0x73, 0x43, 0x6f, 0x6d, 0x6d, 0x12, 0x16, 0x0a, 0x06, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x12, 0x20, 0x0a, - 0x0b, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x54, 0x69, 0x70, 0x73, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x54, 0x69, 0x70, 0x73, 0x12, - 0x1e, 0x0a, 0x0a, 0x6a, 0x73, 0x6f, 0x6e, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0a, 0x6a, 0x73, 0x6f, 0x6e, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x22, - 0xc8, 0x02, 0x0a, 0x10, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, - 0x54, 0x69, 0x70, 0x73, 0x12, 0x33, 0x0a, 0x05, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, - 0x65, 0x72, 0x2e, 0x73, 0x64, 0x6b, 0x77, 0x73, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x6e, - 0x66, 0x6f, 0x52, 0x05, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x3f, 0x0a, 0x06, 0x6f, 0x70, 0x55, - 0x73, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x4f, 0x70, 0x65, 0x6e, - 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x73, 0x64, 0x6b, 0x77, 0x73, 0x2e, 0x47, - 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x46, 0x75, 0x6c, 0x6c, 0x49, 0x6e, - 0x66, 0x6f, 0x52, 0x06, 0x6f, 0x70, 0x55, 0x73, 0x65, 0x72, 0x12, 0x47, 0x0a, 0x0a, 0x6d, 0x65, - 0x6d, 0x62, 0x65, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, - 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x73, 0x64, - 0x6b, 0x77, 0x73, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x46, - 0x75, 0x6c, 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0a, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x4c, - 0x69, 0x73, 0x74, 0x12, 0x24, 0x0a, 0x0d, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x54, 0x69, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x6f, 0x70, 0x65, 0x72, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x4f, 0x0a, 0x0e, 0x67, 0x72, 0x6f, - 0x75, 0x70, 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x55, 0x73, 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x27, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, - 0x2e, 0x73, 0x64, 0x6b, 0x77, 0x73, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, - 0x65, 0x72, 0x46, 0x75, 0x6c, 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0e, 0x67, 0x72, 0x6f, 0x75, - 0x70, 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x55, 0x73, 0x65, 0x72, 0x22, 0xa4, 0x01, 0x0a, 0x10, 0x47, - 0x72, 0x6f, 0x75, 0x70, 0x49, 0x6e, 0x66, 0x6f, 0x53, 0x65, 0x74, 0x54, 0x69, 0x70, 0x73, 0x12, - 0x3f, 0x0a, 0x06, 0x6f, 0x70, 0x55, 0x73, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x27, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x73, - 0x64, 0x6b, 0x77, 0x73, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, - 0x46, 0x75, 0x6c, 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x06, 0x6f, 0x70, 0x55, 0x73, 0x65, 0x72, - 0x12, 0x1a, 0x0a, 0x08, 0x6d, 0x75, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x03, 0x52, 0x08, 0x6d, 0x75, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x33, 0x0a, 0x05, - 0x67, 0x72, 0x6f, 0x75, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x4f, 0x70, - 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x73, 0x64, 0x6b, 0x77, 0x73, - 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x05, 0x67, 0x72, 0x6f, 0x75, - 0x70, 0x22, 0x8c, 0x01, 0x0a, 0x14, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x6e, 0x66, 0x6f, 0x53, - 0x65, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x54, 0x69, 0x70, 0x73, 0x12, 0x3f, 0x0a, 0x06, 0x6f, 0x70, - 0x55, 0x73, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x4f, 0x70, 0x65, - 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x73, 0x64, 0x6b, 0x77, 0x73, 0x2e, - 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x46, 0x75, 0x6c, 0x6c, 0x49, - 0x6e, 0x66, 0x6f, 0x52, 0x06, 0x6f, 0x70, 0x55, 0x73, 0x65, 0x72, 0x12, 0x33, 0x0a, 0x05, 0x67, - 0x72, 0x6f, 0x75, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x4f, 0x70, 0x65, - 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x73, 0x64, 0x6b, 0x77, 0x73, 0x2e, - 0x47, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x05, 0x67, 0x72, 0x6f, 0x75, 0x70, - 0x22, 0x94, 0x01, 0x0a, 0x1c, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x6e, 0x66, 0x6f, 0x53, 0x65, - 0x74, 0x41, 0x6e, 0x6e, 0x6f, 0x75, 0x6e, 0x63, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x54, 0x69, 0x70, - 0x73, 0x12, 0x3f, 0x0a, 0x06, 0x6f, 0x70, 0x55, 0x73, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x27, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, - 0x2e, 0x73, 0x64, 0x6b, 0x77, 0x73, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, - 0x65, 0x72, 0x46, 0x75, 0x6c, 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x06, 0x6f, 0x70, 0x55, 0x73, - 0x65, 0x72, 0x12, 0x33, 0x0a, 0x05, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x1d, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, - 0x2e, 0x73, 0x64, 0x6b, 0x77, 0x73, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x6e, 0x66, 0x6f, - 0x52, 0x05, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x22, 0xa9, 0x01, 0x0a, 0x18, 0x4a, 0x6f, 0x69, 0x6e, - 0x47, 0x72, 0x6f, 0x75, 0x70, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x54, 0x69, 0x70, 0x73, 0x12, 0x33, 0x0a, 0x05, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, - 0x65, 0x72, 0x2e, 0x73, 0x64, 0x6b, 0x77, 0x73, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x6e, - 0x66, 0x6f, 0x52, 0x05, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x40, 0x0a, 0x09, 0x61, 0x70, 0x70, - 0x6c, 0x69, 0x63, 0x61, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x4f, - 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x73, 0x64, 0x6b, 0x77, - 0x73, 0x2e, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, - 0x52, 0x09, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x6e, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x72, - 0x65, 0x71, 0x4d, 0x73, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x65, 0x71, - 0x4d, 0x73, 0x67, 0x22, 0xb0, 0x01, 0x0a, 0x0e, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x51, 0x75, - 0x69, 0x74, 0x54, 0x69, 0x70, 0x73, 0x12, 0x33, 0x0a, 0x05, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, - 0x72, 0x76, 0x65, 0x72, 0x2e, 0x73, 0x64, 0x6b, 0x77, 0x73, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, - 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x05, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x43, 0x0a, 0x08, 0x71, - 0x75, 0x69, 0x74, 0x55, 0x73, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, - 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x73, 0x64, 0x6b, - 0x77, 0x73, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x46, 0x75, - 0x6c, 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x08, 0x71, 0x75, 0x69, 0x74, 0x55, 0x73, 0x65, 0x72, - 0x12, 0x24, 0x0a, 0x0d, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x69, 0x6d, - 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x22, 0xd2, 0x01, 0x0a, 0x1c, 0x47, 0x72, 0x6f, 0x75, 0x70, - 0x41, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x63, 0x63, 0x65, 0x70, - 0x74, 0x65, 0x64, 0x54, 0x69, 0x70, 0x73, 0x12, 0x33, 0x0a, 0x05, 0x67, 0x72, 0x6f, 0x75, 0x70, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, - 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x73, 0x64, 0x6b, 0x77, 0x73, 0x2e, 0x47, 0x72, 0x6f, 0x75, - 0x70, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x05, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x3f, 0x0a, 0x06, - 0x6f, 0x70, 0x55, 0x73, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x4f, - 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x73, 0x64, 0x6b, 0x77, - 0x73, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x46, 0x75, 0x6c, - 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x06, 0x6f, 0x70, 0x55, 0x73, 0x65, 0x72, 0x12, 0x1c, 0x0a, - 0x09, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x4d, 0x73, 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x09, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x4d, 0x73, 0x67, 0x12, 0x1e, 0x0a, 0x0a, 0x72, - 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x72, 0x41, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, - 0x0a, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x72, 0x41, 0x73, 0x22, 0xd2, 0x01, 0x0a, 0x1c, - 0x47, 0x72, 0x6f, 0x75, 0x70, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x52, 0x65, 0x6a, 0x65, 0x63, 0x74, 0x65, 0x64, 0x54, 0x69, 0x70, 0x73, 0x12, 0x33, 0x0a, 0x05, - 0x67, 0x72, 0x6f, 0x75, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x4f, 0x70, - 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x73, 0x64, 0x6b, 0x77, 0x73, - 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x05, 0x67, 0x72, 0x6f, 0x75, - 0x70, 0x12, 0x3f, 0x0a, 0x06, 0x6f, 0x70, 0x55, 0x73, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x27, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, - 0x2e, 0x73, 0x64, 0x6b, 0x77, 0x73, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, - 0x65, 0x72, 0x46, 0x75, 0x6c, 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x06, 0x6f, 0x70, 0x55, 0x73, - 0x65, 0x72, 0x12, 0x1c, 0x0a, 0x09, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x4d, 0x73, 0x67, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x4d, 0x73, 0x67, - 0x12, 0x1e, 0x0a, 0x0a, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x72, 0x41, 0x73, 0x18, 0x05, - 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x72, 0x41, 0x73, - 0x22, 0x86, 0x02, 0x0a, 0x19, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x54, - 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x72, 0x65, 0x64, 0x54, 0x69, 0x70, 0x73, 0x12, 0x33, - 0x0a, 0x05, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, - 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x73, 0x64, 0x6b, - 0x77, 0x73, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x05, 0x67, 0x72, - 0x6f, 0x75, 0x70, 0x12, 0x3f, 0x0a, 0x06, 0x6f, 0x70, 0x55, 0x73, 0x65, 0x72, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, - 0x65, 0x72, 0x2e, 0x73, 0x64, 0x6b, 0x77, 0x73, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, - 0x6d, 0x62, 0x65, 0x72, 0x46, 0x75, 0x6c, 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x06, 0x6f, 0x70, - 0x55, 0x73, 0x65, 0x72, 0x12, 0x4d, 0x0a, 0x0d, 0x6e, 0x65, 0x77, 0x47, 0x72, 0x6f, 0x75, 0x70, - 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x4f, 0x70, - 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x73, 0x64, 0x6b, 0x77, 0x73, - 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x46, 0x75, 0x6c, 0x6c, - 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0d, 0x6e, 0x65, 0x77, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4f, 0x77, - 0x6e, 0x65, 0x72, 0x12, 0x24, 0x0a, 0x0d, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x54, 0x69, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x6f, 0x70, 0x65, 0x72, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x22, 0xff, 0x01, 0x0a, 0x10, 0x4d, 0x65, - 0x6d, 0x62, 0x65, 0x72, 0x4b, 0x69, 0x63, 0x6b, 0x65, 0x64, 0x54, 0x69, 0x70, 0x73, 0x12, 0x33, - 0x0a, 0x05, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, - 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x73, 0x64, 0x6b, - 0x77, 0x73, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x05, 0x67, 0x72, - 0x6f, 0x75, 0x70, 0x12, 0x3f, 0x0a, 0x06, 0x6f, 0x70, 0x55, 0x73, 0x65, 0x72, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, - 0x65, 0x72, 0x2e, 0x73, 0x64, 0x6b, 0x77, 0x73, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, - 0x6d, 0x62, 0x65, 0x72, 0x46, 0x75, 0x6c, 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x06, 0x6f, 0x70, - 0x55, 0x73, 0x65, 0x72, 0x12, 0x4f, 0x0a, 0x0e, 0x6b, 0x69, 0x63, 0x6b, 0x65, 0x64, 0x55, 0x73, - 0x65, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x4f, - 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x73, 0x64, 0x6b, 0x77, - 0x73, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x46, 0x75, 0x6c, - 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0e, 0x6b, 0x69, 0x63, 0x6b, 0x65, 0x64, 0x55, 0x73, 0x65, - 0x72, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x24, 0x0a, 0x0d, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x6f, 0x70, - 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x22, 0x82, 0x02, 0x0a, 0x11, - 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x64, 0x54, 0x69, 0x70, - 0x73, 0x12, 0x33, 0x0a, 0x05, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x1d, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, - 0x73, 0x64, 0x6b, 0x77, 0x73, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x6e, 0x66, 0x6f, 0x52, - 0x05, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x3f, 0x0a, 0x06, 0x6f, 0x70, 0x55, 0x73, 0x65, 0x72, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, - 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x73, 0x64, 0x6b, 0x77, 0x73, 0x2e, 0x47, 0x72, 0x6f, 0x75, - 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x46, 0x75, 0x6c, 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x52, - 0x06, 0x6f, 0x70, 0x55, 0x73, 0x65, 0x72, 0x12, 0x51, 0x0a, 0x0f, 0x69, 0x6e, 0x76, 0x69, 0x74, - 0x65, 0x64, 0x55, 0x73, 0x65, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x27, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, - 0x73, 0x64, 0x6b, 0x77, 0x73, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, - 0x72, 0x46, 0x75, 0x6c, 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0f, 0x69, 0x6e, 0x76, 0x69, 0x74, - 0x65, 0x64, 0x55, 0x73, 0x65, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x24, 0x0a, 0x0d, 0x6f, 0x70, - 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x03, 0x52, 0x0d, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x69, 0x6d, 0x65, - 0x22, 0xb7, 0x01, 0x0a, 0x0f, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x45, 0x6e, 0x74, 0x65, 0x72, - 0x54, 0x69, 0x70, 0x73, 0x12, 0x33, 0x0a, 0x05, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, - 0x65, 0x72, 0x2e, 0x73, 0x64, 0x6b, 0x77, 0x73, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x6e, - 0x66, 0x6f, 0x52, 0x05, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x49, 0x0a, 0x0b, 0x65, 0x6e, 0x74, - 0x72, 0x61, 0x6e, 0x74, 0x55, 0x73, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, - 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x73, 0x64, - 0x6b, 0x77, 0x73, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x46, - 0x75, 0x6c, 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0b, 0x65, 0x6e, 0x74, 0x72, 0x61, 0x6e, 0x74, - 0x55, 0x73, 0x65, 0x72, 0x12, 0x24, 0x0a, 0x0d, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x6f, 0x70, 0x65, - 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x22, 0xb0, 0x01, 0x0a, 0x12, 0x47, - 0x72, 0x6f, 0x75, 0x70, 0x44, 0x69, 0x73, 0x6d, 0x69, 0x73, 0x73, 0x65, 0x64, 0x54, 0x69, 0x70, - 0x73, 0x12, 0x33, 0x0a, 0x05, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x1d, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, - 0x73, 0x64, 0x6b, 0x77, 0x73, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x6e, 0x66, 0x6f, 0x52, - 0x05, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x3f, 0x0a, 0x06, 0x6f, 0x70, 0x55, 0x73, 0x65, 0x72, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, - 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x73, 0x64, 0x6b, 0x77, 0x73, 0x2e, 0x47, 0x72, 0x6f, 0x75, - 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x46, 0x75, 0x6c, 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x52, - 0x06, 0x6f, 0x70, 0x55, 0x73, 0x65, 0x72, 0x12, 0x24, 0x0a, 0x0d, 0x6f, 0x70, 0x65, 0x72, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, - 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x22, 0x9d, 0x02, - 0x0a, 0x14, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x4d, 0x75, 0x74, - 0x65, 0x64, 0x54, 0x69, 0x70, 0x73, 0x12, 0x33, 0x0a, 0x05, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, - 0x72, 0x76, 0x65, 0x72, 0x2e, 0x73, 0x64, 0x6b, 0x77, 0x73, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, - 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x05, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x3f, 0x0a, 0x06, 0x6f, - 0x70, 0x55, 0x73, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x4f, 0x70, - 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x73, 0x64, 0x6b, 0x77, 0x73, - 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x46, 0x75, 0x6c, 0x6c, - 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x06, 0x6f, 0x70, 0x55, 0x73, 0x65, 0x72, 0x12, 0x24, 0x0a, 0x0d, - 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x03, 0x52, 0x0d, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x69, - 0x6d, 0x65, 0x12, 0x45, 0x0a, 0x09, 0x6d, 0x75, 0x74, 0x65, 0x64, 0x55, 0x73, 0x65, 0x72, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, - 0x72, 0x76, 0x65, 0x72, 0x2e, 0x73, 0x64, 0x6b, 0x77, 0x73, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, - 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x46, 0x75, 0x6c, 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x09, - 0x6d, 0x75, 0x74, 0x65, 0x64, 0x55, 0x73, 0x65, 0x72, 0x12, 0x22, 0x0a, 0x0c, 0x6d, 0x75, 0x74, - 0x65, 0x64, 0x53, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0d, 0x52, - 0x0c, 0x6d, 0x75, 0x74, 0x65, 0x64, 0x53, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x22, 0xff, 0x01, - 0x0a, 0x1a, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x43, 0x61, 0x6e, - 0x63, 0x65, 0x6c, 0x4d, 0x75, 0x74, 0x65, 0x64, 0x54, 0x69, 0x70, 0x73, 0x12, 0x33, 0x0a, 0x05, - 0x67, 0x72, 0x6f, 0x75, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x4f, 0x70, - 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x73, 0x64, 0x6b, 0x77, 0x73, - 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x05, 0x67, 0x72, 0x6f, 0x75, - 0x70, 0x12, 0x3f, 0x0a, 0x06, 0x6f, 0x70, 0x55, 0x73, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x27, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, - 0x2e, 0x73, 0x64, 0x6b, 0x77, 0x73, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, - 0x65, 0x72, 0x46, 0x75, 0x6c, 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x06, 0x6f, 0x70, 0x55, 0x73, - 0x65, 0x72, 0x12, 0x24, 0x0a, 0x0d, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, - 0x69, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x6f, 0x70, 0x65, 0x72, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x45, 0x0a, 0x09, 0x6d, 0x75, 0x74, 0x65, - 0x64, 0x55, 0x73, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x4f, 0x70, - 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x73, 0x64, 0x6b, 0x77, 0x73, - 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x46, 0x75, 0x6c, 0x6c, - 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x09, 0x6d, 0x75, 0x74, 0x65, 0x64, 0x55, 0x73, 0x65, 0x72, 0x22, - 0xac, 0x01, 0x0a, 0x0e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x75, 0x74, 0x65, 0x64, 0x54, 0x69, - 0x70, 0x73, 0x12, 0x33, 0x0a, 0x05, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x1d, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, - 0x2e, 0x73, 0x64, 0x6b, 0x77, 0x73, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x6e, 0x66, 0x6f, - 0x52, 0x05, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x3f, 0x0a, 0x06, 0x6f, 0x70, 0x55, 0x73, 0x65, - 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, - 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x73, 0x64, 0x6b, 0x77, 0x73, 0x2e, 0x47, 0x72, 0x6f, - 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x46, 0x75, 0x6c, 0x6c, 0x49, 0x6e, 0x66, 0x6f, - 0x52, 0x06, 0x6f, 0x70, 0x55, 0x73, 0x65, 0x72, 0x12, 0x24, 0x0a, 0x0d, 0x6f, 0x70, 0x65, 0x72, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, - 0x0d, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x22, 0xb2, - 0x01, 0x0a, 0x14, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x4d, 0x75, - 0x74, 0x65, 0x64, 0x54, 0x69, 0x70, 0x73, 0x12, 0x33, 0x0a, 0x05, 0x67, 0x72, 0x6f, 0x75, 0x70, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, - 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x73, 0x64, 0x6b, 0x77, 0x73, 0x2e, 0x47, 0x72, 0x6f, 0x75, - 0x70, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x05, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x3f, 0x0a, 0x06, - 0x6f, 0x70, 0x55, 0x73, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x4f, - 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x73, 0x64, 0x6b, 0x77, - 0x73, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x46, 0x75, 0x6c, - 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x06, 0x6f, 0x70, 0x55, 0x73, 0x65, 0x72, 0x12, 0x24, 0x0a, - 0x0d, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, - 0x69, 0x6d, 0x65, 0x22, 0xff, 0x01, 0x0a, 0x16, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, - 0x62, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x53, 0x65, 0x74, 0x54, 0x69, 0x70, 0x73, 0x12, 0x33, - 0x0a, 0x05, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, - 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x73, 0x64, 0x6b, - 0x77, 0x73, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x05, 0x67, 0x72, - 0x6f, 0x75, 0x70, 0x12, 0x3f, 0x0a, 0x06, 0x6f, 0x70, 0x55, 0x73, 0x65, 0x72, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, - 0x65, 0x72, 0x2e, 0x73, 0x64, 0x6b, 0x77, 0x73, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, - 0x6d, 0x62, 0x65, 0x72, 0x46, 0x75, 0x6c, 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x06, 0x6f, 0x70, - 0x55, 0x73, 0x65, 0x72, 0x12, 0x24, 0x0a, 0x0d, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x6f, 0x70, 0x65, - 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x49, 0x0a, 0x0b, 0x63, 0x68, - 0x61, 0x6e, 0x67, 0x65, 0x64, 0x55, 0x73, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x27, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x73, - 0x64, 0x6b, 0x77, 0x73, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, - 0x46, 0x75, 0x6c, 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0b, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, - 0x64, 0x55, 0x73, 0x65, 0x72, 0x22, 0x6b, 0x0a, 0x11, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x41, - 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, - 0x64, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x61, 0x64, 0x64, - 0x54, 0x69, 0x6d, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x61, 0x64, 0x64, 0x53, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x61, 0x64, 0x64, 0x53, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x61, 0x64, 0x64, 0x57, 0x6f, 0x72, 0x64, 0x69, 0x6e, 0x67, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x61, 0x64, 0x64, 0x57, 0x6f, 0x72, 0x64, 0x69, - 0x6e, 0x67, 0x22, 0x4a, 0x0a, 0x0c, 0x46, 0x72, 0x6f, 0x6d, 0x54, 0x6f, 0x55, 0x73, 0x65, 0x72, - 0x49, 0x44, 0x12, 0x1e, 0x0a, 0x0a, 0x66, 0x72, 0x6f, 0x6d, 0x55, 0x73, 0x65, 0x72, 0x49, 0x44, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x66, 0x72, 0x6f, 0x6d, 0x55, 0x73, 0x65, 0x72, - 0x49, 0x44, 0x12, 0x1a, 0x0a, 0x08, 0x74, 0x6f, 0x55, 0x73, 0x65, 0x72, 0x49, 0x44, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x74, 0x6f, 0x55, 0x73, 0x65, 0x72, 0x49, 0x44, 0x22, 0x5d, - 0x0a, 0x15, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x54, 0x69, 0x70, 0x73, 0x12, 0x44, 0x0a, 0x0c, 0x66, 0x72, 0x6f, 0x6d, 0x54, - 0x6f, 0x55, 0x73, 0x65, 0x72, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, - 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x73, 0x64, 0x6b, - 0x77, 0x73, 0x2e, 0x46, 0x72, 0x6f, 0x6d, 0x54, 0x6f, 0x55, 0x73, 0x65, 0x72, 0x49, 0x44, 0x52, - 0x0c, 0x66, 0x72, 0x6f, 0x6d, 0x54, 0x6f, 0x55, 0x73, 0x65, 0x72, 0x49, 0x44, 0x22, 0x83, 0x01, - 0x0a, 0x1d, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x41, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x65, 0x64, 0x54, 0x69, 0x70, 0x73, 0x12, - 0x44, 0x0a, 0x0c, 0x66, 0x72, 0x6f, 0x6d, 0x54, 0x6f, 0x55, 0x73, 0x65, 0x72, 0x49, 0x44, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, - 0x72, 0x76, 0x65, 0x72, 0x2e, 0x73, 0x64, 0x6b, 0x77, 0x73, 0x2e, 0x46, 0x72, 0x6f, 0x6d, 0x54, - 0x6f, 0x55, 0x73, 0x65, 0x72, 0x49, 0x44, 0x52, 0x0c, 0x66, 0x72, 0x6f, 0x6d, 0x54, 0x6f, 0x55, - 0x73, 0x65, 0x72, 0x49, 0x44, 0x12, 0x1c, 0x0a, 0x09, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x4d, - 0x73, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, - 0x4d, 0x73, 0x67, 0x22, 0x83, 0x01, 0x0a, 0x1d, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x41, 0x70, - 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x6a, 0x65, 0x63, 0x74, 0x65, - 0x64, 0x54, 0x69, 0x70, 0x73, 0x12, 0x44, 0x0a, 0x0c, 0x66, 0x72, 0x6f, 0x6d, 0x54, 0x6f, 0x55, - 0x73, 0x65, 0x72, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x4f, 0x70, - 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x73, 0x64, 0x6b, 0x77, 0x73, - 0x2e, 0x46, 0x72, 0x6f, 0x6d, 0x54, 0x6f, 0x55, 0x73, 0x65, 0x72, 0x49, 0x44, 0x52, 0x0c, 0x66, - 0x72, 0x6f, 0x6d, 0x54, 0x6f, 0x55, 0x73, 0x65, 0x72, 0x49, 0x44, 0x12, 0x1c, 0x0a, 0x09, 0x68, - 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x4d, 0x73, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, - 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x4d, 0x73, 0x67, 0x22, 0xab, 0x01, 0x0a, 0x0f, 0x46, 0x72, - 0x69, 0x65, 0x6e, 0x64, 0x41, 0x64, 0x64, 0x65, 0x64, 0x54, 0x69, 0x70, 0x73, 0x12, 0x36, 0x0a, - 0x06, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, - 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x73, 0x64, 0x6b, - 0x77, 0x73, 0x2e, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x06, 0x66, - 0x72, 0x69, 0x65, 0x6e, 0x64, 0x12, 0x24, 0x0a, 0x0d, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x6f, 0x70, - 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x3a, 0x0a, 0x06, 0x6f, - 0x70, 0x55, 0x73, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x4f, 0x70, - 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x73, 0x64, 0x6b, 0x77, 0x73, - 0x2e, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, - 0x06, 0x6f, 0x70, 0x55, 0x73, 0x65, 0x72, 0x22, 0x59, 0x0a, 0x11, 0x46, 0x72, 0x69, 0x65, 0x6e, - 0x64, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x54, 0x69, 0x70, 0x73, 0x12, 0x44, 0x0a, 0x0c, - 0x66, 0x72, 0x6f, 0x6d, 0x54, 0x6f, 0x55, 0x73, 0x65, 0x72, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, - 0x72, 0x2e, 0x73, 0x64, 0x6b, 0x77, 0x73, 0x2e, 0x46, 0x72, 0x6f, 0x6d, 0x54, 0x6f, 0x55, 0x73, - 0x65, 0x72, 0x49, 0x44, 0x52, 0x0c, 0x66, 0x72, 0x6f, 0x6d, 0x54, 0x6f, 0x55, 0x73, 0x65, 0x72, - 0x49, 0x44, 0x22, 0x56, 0x0a, 0x0e, 0x42, 0x6c, 0x61, 0x63, 0x6b, 0x41, 0x64, 0x64, 0x65, 0x64, - 0x54, 0x69, 0x70, 0x73, 0x12, 0x44, 0x0a, 0x0c, 0x66, 0x72, 0x6f, 0x6d, 0x54, 0x6f, 0x55, 0x73, - 0x65, 0x72, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x4f, 0x70, 0x65, - 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x73, 0x64, 0x6b, 0x77, 0x73, 0x2e, - 0x46, 0x72, 0x6f, 0x6d, 0x54, 0x6f, 0x55, 0x73, 0x65, 0x72, 0x49, 0x44, 0x52, 0x0c, 0x66, 0x72, - 0x6f, 0x6d, 0x54, 0x6f, 0x55, 0x73, 0x65, 0x72, 0x49, 0x44, 0x22, 0x58, 0x0a, 0x10, 0x42, 0x6c, - 0x61, 0x63, 0x6b, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x54, 0x69, 0x70, 0x73, 0x12, 0x44, - 0x0a, 0x0c, 0x66, 0x72, 0x6f, 0x6d, 0x54, 0x6f, 0x55, 0x73, 0x65, 0x72, 0x49, 0x44, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, - 0x76, 0x65, 0x72, 0x2e, 0x73, 0x64, 0x6b, 0x77, 0x73, 0x2e, 0x46, 0x72, 0x6f, 0x6d, 0x54, 0x6f, - 0x55, 0x73, 0x65, 0x72, 0x49, 0x44, 0x52, 0x0c, 0x66, 0x72, 0x6f, 0x6d, 0x54, 0x6f, 0x55, 0x73, - 0x65, 0x72, 0x49, 0x44, 0x22, 0x5d, 0x0a, 0x15, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x49, 0x6e, - 0x66, 0x6f, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x64, 0x54, 0x69, 0x70, 0x73, 0x12, 0x44, 0x0a, - 0x0c, 0x66, 0x72, 0x6f, 0x6d, 0x54, 0x6f, 0x55, 0x73, 0x65, 0x72, 0x49, 0x44, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, - 0x65, 0x72, 0x2e, 0x73, 0x64, 0x6b, 0x77, 0x73, 0x2e, 0x46, 0x72, 0x6f, 0x6d, 0x54, 0x6f, 0x55, - 0x73, 0x65, 0x72, 0x49, 0x44, 0x52, 0x0c, 0x66, 0x72, 0x6f, 0x6d, 0x54, 0x6f, 0x55, 0x73, 0x65, - 0x72, 0x49, 0x44, 0x22, 0x2d, 0x0a, 0x13, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x55, - 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x54, 0x69, 0x70, 0x73, 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, 0x60, 0x0a, 0x16, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x69, 0x70, 0x73, 0x12, 0x16, 0x0a, 0x06, - 0x75, 0x73, 0x65, 0x72, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, - 0x65, 0x72, 0x49, 0x44, 0x12, 0x2e, 0x0a, 0x12, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x4c, 0x69, 0x73, 0x74, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, - 0x52, 0x12, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, - 0x4c, 0x69, 0x73, 0x74, 0x22, 0x6a, 0x0a, 0x1a, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x54, 0x69, - 0x70, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x63, 0x76, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x06, 0x72, 0x65, 0x63, 0x76, 0x49, 0x44, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x65, - 0x6e, 0x64, 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x65, 0x6e, 0x64, - 0x49, 0x44, 0x12, 0x1c, 0x0a, 0x09, 0x69, 0x73, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x69, 0x73, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, - 0x22, 0xa3, 0x01, 0x0a, 0x17, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x48, 0x61, 0x73, 0x52, 0x65, 0x61, 0x64, 0x54, 0x69, 0x70, 0x73, 0x12, 0x16, 0x0a, 0x06, - 0x75, 0x73, 0x65, 0x72, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, - 0x65, 0x72, 0x49, 0x44, 0x12, 0x26, 0x0a, 0x0e, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x63, 0x6f, - 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x12, 0x1e, 0x0a, 0x0a, - 0x68, 0x61, 0x73, 0x52, 0x65, 0x61, 0x64, 0x53, 0x65, 0x71, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, - 0x52, 0x0a, 0x68, 0x61, 0x73, 0x52, 0x65, 0x61, 0x64, 0x53, 0x65, 0x71, 0x12, 0x28, 0x0a, 0x0f, - 0x75, 0x6e, 0x72, 0x65, 0x61, 0x64, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0f, 0x75, 0x6e, 0x72, 0x65, 0x61, 0x64, 0x43, 0x6f, 0x75, - 0x6e, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x22, 0x2a, 0x0a, 0x10, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x69, - 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x6c, 0x65, 0x6d, 0x12, 0x16, 0x0a, 0x06, 0x64, 0x65, - 0x74, 0x61, 0x69, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x64, 0x65, 0x74, 0x61, - 0x69, 0x6c, 0x22, 0x1a, 0x0a, 0x04, 0x73, 0x65, 0x71, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x65, - 0x71, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x03, 0x52, 0x04, 0x73, 0x65, 0x71, 0x73, 0x22, 0x5b, - 0x0a, 0x11, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, - 0x69, 0x70, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x6f, 0x70, 0x55, 0x73, 0x65, 0x72, 0x49, 0x44, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6f, 0x70, 0x55, 0x73, 0x65, 0x72, 0x49, 0x44, 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, 0x12, 0x0a, 0x04, 0x73, 0x65, 0x71, 0x73, 0x18, - 0x03, 0x20, 0x03, 0x28, 0x03, 0x52, 0x04, 0x73, 0x65, 0x71, 0x73, 0x22, 0xd5, 0x01, 0x0a, 0x0d, - 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x4d, 0x73, 0x67, 0x54, 0x69, 0x70, 0x73, 0x12, 0x24, 0x0a, - 0x0d, 0x72, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x72, 0x55, 0x73, 0x65, 0x72, 0x49, 0x44, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x72, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x72, 0x55, 0x73, 0x65, - 0x72, 0x49, 0x44, 0x12, 0x20, 0x0a, 0x0b, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x4d, 0x73, 0x67, - 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, - 0x4d, 0x73, 0x67, 0x49, 0x44, 0x12, 0x1e, 0x0a, 0x0a, 0x72, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x54, - 0x69, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x72, 0x65, 0x76, 0x6f, 0x6b, - 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x22, 0x0a, 0x0c, 0x73, 0x65, 0x73, 0x73, 0x74, 0x69, 0x6f, - 0x6e, 0x54, 0x79, 0x70, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, 0x73, 0x65, 0x73, - 0x73, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x73, 0x65, 0x71, - 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x73, 0x65, 0x71, 0x12, 0x26, 0x0a, 0x0e, 0x63, - 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x18, 0x07, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0e, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x49, 0x44, 0x22, 0xb1, 0x03, 0x0a, 0x15, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, - 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x64, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x1c, 0x0a, - 0x09, 0x72, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x72, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x09, 0x72, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x72, 0x49, 0x44, 0x12, 0x20, 0x0a, 0x0b, 0x72, - 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x72, 0x52, 0x6f, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, - 0x52, 0x0b, 0x72, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x72, 0x52, 0x6f, 0x6c, 0x65, 0x12, 0x20, 0x0a, - 0x0b, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x4d, 0x73, 0x67, 0x49, 0x44, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0b, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x4d, 0x73, 0x67, 0x49, 0x44, 0x12, - 0x28, 0x0a, 0x0f, 0x72, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x72, 0x4e, 0x69, 0x63, 0x6b, 0x6e, 0x61, - 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x72, 0x65, 0x76, 0x6f, 0x6b, 0x65, - 0x72, 0x4e, 0x69, 0x63, 0x6b, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x72, 0x65, 0x76, - 0x6f, 0x6b, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x72, - 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x34, 0x0a, 0x15, 0x73, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x53, 0x65, 0x6e, 0x64, 0x54, 0x69, - 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x15, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x53, 0x65, 0x6e, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x12, - 0x30, 0x0a, 0x13, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, - 0x53, 0x65, 0x6e, 0x64, 0x49, 0x44, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, 0x73, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x53, 0x65, 0x6e, 0x64, 0x49, - 0x44, 0x12, 0x40, 0x0a, 0x1b, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, - 0x67, 0x65, 0x53, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x4e, 0x69, 0x63, 0x6b, 0x6e, 0x61, 0x6d, 0x65, - 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x1b, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d, 0x65, - 0x73, 0x73, 0x61, 0x67, 0x65, 0x53, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x4e, 0x69, 0x63, 0x6b, 0x6e, - 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x54, 0x79, - 0x70, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, - 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x73, 0x65, 0x71, 0x18, 0x0b, 0x20, 0x01, - 0x28, 0x03, 0x52, 0x03, 0x73, 0x65, 0x71, 0x12, 0x0e, 0x0a, 0x02, 0x65, 0x78, 0x18, 0x0c, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x02, 0x65, 0x78, 0x22, 0x59, 0x0a, 0x15, 0x43, 0x6c, 0x65, 0x61, 0x72, - 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x69, 0x70, 0x73, - 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x44, 0x12, 0x28, 0x0a, 0x0f, 0x63, 0x6f, 0x6e, 0x76, - 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, - 0x09, 0x52, 0x0f, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, - 0x44, 0x73, 0x22, 0x64, 0x0a, 0x0e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4d, 0x73, 0x67, 0x73, - 0x54, 0x69, 0x70, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x44, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x44, 0x12, 0x26, 0x0a, 0x0e, - 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x49, 0x44, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x65, 0x71, 0x73, 0x18, 0x03, 0x20, 0x03, - 0x28, 0x03, 0x52, 0x04, 0x73, 0x65, 0x71, 0x73, 0x22, 0x98, 0x01, 0x0a, 0x0e, 0x4d, 0x61, 0x72, - 0x6b, 0x41, 0x73, 0x52, 0x65, 0x61, 0x64, 0x54, 0x69, 0x70, 0x73, 0x12, 0x2a, 0x0a, 0x10, 0x6d, - 0x61, 0x72, 0x6b, 0x41, 0x73, 0x52, 0x65, 0x61, 0x64, 0x55, 0x73, 0x65, 0x72, 0x49, 0x44, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x6d, 0x61, 0x72, 0x6b, 0x41, 0x73, 0x52, 0x65, 0x61, - 0x64, 0x55, 0x73, 0x65, 0x72, 0x49, 0x44, 0x12, 0x26, 0x0a, 0x0e, 0x63, 0x6f, 0x6e, 0x76, 0x65, - 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0e, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x12, - 0x12, 0x0a, 0x04, 0x73, 0x65, 0x71, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x03, 0x52, 0x04, 0x73, - 0x65, 0x71, 0x73, 0x12, 0x1e, 0x0a, 0x0a, 0x68, 0x61, 0x73, 0x52, 0x65, 0x61, 0x64, 0x53, 0x65, - 0x71, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x68, 0x61, 0x73, 0x52, 0x65, 0x61, 0x64, - 0x53, 0x65, 0x71, 0x22, 0x57, 0x0a, 0x19, 0x53, 0x65, 0x74, 0x41, 0x70, 0x70, 0x42, 0x61, 0x63, - 0x6b, 0x67, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 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, 0x12, 0x22, 0x0a, 0x0c, 0x69, 0x73, 0x42, 0x61, - 0x63, 0x6b, 0x67, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, - 0x69, 0x73, 0x42, 0x61, 0x63, 0x6b, 0x67, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x22, 0x1c, 0x0a, 0x1a, - 0x53, 0x65, 0x74, 0x41, 0x70, 0x70, 0x42, 0x61, 0x63, 0x6b, 0x67, 0x72, 0x6f, 0x75, 0x6e, 0x64, - 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x22, 0x53, 0x0a, 0x11, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, - 0x1e, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x05, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, - 0x1e, 0x0a, 0x0a, 0x73, 0x68, 0x6f, 0x77, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x05, 0x52, 0x0a, 0x73, 0x68, 0x6f, 0x77, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x2a, - 0x30, 0x0a, 0x09, 0x50, 0x75, 0x6c, 0x6c, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x12, 0x10, 0x0a, 0x0c, - 0x50, 0x75, 0x6c, 0x6c, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x41, 0x73, 0x63, 0x10, 0x00, 0x12, 0x11, - 0x0a, 0x0d, 0x50, 0x75, 0x6c, 0x6c, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x44, 0x65, 0x73, 0x63, 0x10, - 0x01, 0x42, 0x35, 0x5a, 0x33, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, - 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x44, 0x4b, 0x2f, 0x4f, 0x70, 0x65, 0x6e, 0x2d, 0x49, - 0x4d, 0x2d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x2f, 0x73, 0x64, 0x6b, 0x77, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_sdkws_sdkws_proto_rawDescOnce sync.Once - file_sdkws_sdkws_proto_rawDescData = file_sdkws_sdkws_proto_rawDesc -) - -func file_sdkws_sdkws_proto_rawDescGZIP() []byte { - file_sdkws_sdkws_proto_rawDescOnce.Do(func() { - file_sdkws_sdkws_proto_rawDescData = protoimpl.X.CompressGZIP(file_sdkws_sdkws_proto_rawDescData) - }) - return file_sdkws_sdkws_proto_rawDescData -} - -var file_sdkws_sdkws_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_sdkws_sdkws_proto_msgTypes = make([]protoimpl.MessageInfo, 70) -var file_sdkws_sdkws_proto_goTypes = []interface{}{ - (PullOrder)(0), // 0: OpenIMServer.sdkws.PullOrder - (*GroupInfo)(nil), // 1: OpenIMServer.sdkws.GroupInfo - (*GroupInfoForSet)(nil), // 2: OpenIMServer.sdkws.GroupInfoForSet - (*GroupMemberFullInfo)(nil), // 3: OpenIMServer.sdkws.GroupMemberFullInfo - (*PublicUserInfo)(nil), // 4: OpenIMServer.sdkws.PublicUserInfo - (*UserInfo)(nil), // 5: OpenIMServer.sdkws.UserInfo - (*FriendInfo)(nil), // 6: OpenIMServer.sdkws.FriendInfo - (*BlackInfo)(nil), // 7: OpenIMServer.sdkws.BlackInfo - (*GroupRequest)(nil), // 8: OpenIMServer.sdkws.GroupRequest - (*FriendRequest)(nil), // 9: OpenIMServer.sdkws.FriendRequest - (*PullMessageBySeqsReq)(nil), // 10: OpenIMServer.sdkws.PullMessageBySeqsReq - (*SeqRange)(nil), // 11: OpenIMServer.sdkws.SeqRange - (*PullMsgs)(nil), // 12: OpenIMServer.sdkws.PullMsgs - (*PullMessageBySeqsResp)(nil), // 13: OpenIMServer.sdkws.PullMessageBySeqsResp - (*GetMaxSeqReq)(nil), // 14: OpenIMServer.sdkws.GetMaxSeqReq - (*GetMaxSeqResp)(nil), // 15: OpenIMServer.sdkws.GetMaxSeqResp - (*UserSendMsgResp)(nil), // 16: OpenIMServer.sdkws.UserSendMsgResp - (*MsgData)(nil), // 17: OpenIMServer.sdkws.MsgData - (*PushMessages)(nil), // 18: OpenIMServer.sdkws.PushMessages - (*OfflinePushInfo)(nil), // 19: OpenIMServer.sdkws.OfflinePushInfo - (*TipsComm)(nil), // 20: OpenIMServer.sdkws.TipsComm - (*GroupCreatedTips)(nil), // 21: OpenIMServer.sdkws.GroupCreatedTips - (*GroupInfoSetTips)(nil), // 22: OpenIMServer.sdkws.GroupInfoSetTips - (*GroupInfoSetNameTips)(nil), // 23: OpenIMServer.sdkws.GroupInfoSetNameTips - (*GroupInfoSetAnnouncementTips)(nil), // 24: OpenIMServer.sdkws.GroupInfoSetAnnouncementTips - (*JoinGroupApplicationTips)(nil), // 25: OpenIMServer.sdkws.JoinGroupApplicationTips - (*MemberQuitTips)(nil), // 26: OpenIMServer.sdkws.MemberQuitTips - (*GroupApplicationAcceptedTips)(nil), // 27: OpenIMServer.sdkws.GroupApplicationAcceptedTips - (*GroupApplicationRejectedTips)(nil), // 28: OpenIMServer.sdkws.GroupApplicationRejectedTips - (*GroupOwnerTransferredTips)(nil), // 29: OpenIMServer.sdkws.GroupOwnerTransferredTips - (*MemberKickedTips)(nil), // 30: OpenIMServer.sdkws.MemberKickedTips - (*MemberInvitedTips)(nil), // 31: OpenIMServer.sdkws.MemberInvitedTips - (*MemberEnterTips)(nil), // 32: OpenIMServer.sdkws.MemberEnterTips - (*GroupDismissedTips)(nil), // 33: OpenIMServer.sdkws.GroupDismissedTips - (*GroupMemberMutedTips)(nil), // 34: OpenIMServer.sdkws.GroupMemberMutedTips - (*GroupMemberCancelMutedTips)(nil), // 35: OpenIMServer.sdkws.GroupMemberCancelMutedTips - (*GroupMutedTips)(nil), // 36: OpenIMServer.sdkws.GroupMutedTips - (*GroupCancelMutedTips)(nil), // 37: OpenIMServer.sdkws.GroupCancelMutedTips - (*GroupMemberInfoSetTips)(nil), // 38: OpenIMServer.sdkws.GroupMemberInfoSetTips - (*FriendApplication)(nil), // 39: OpenIMServer.sdkws.FriendApplication - (*FromToUserID)(nil), // 40: OpenIMServer.sdkws.FromToUserID - (*FriendApplicationTips)(nil), // 41: OpenIMServer.sdkws.FriendApplicationTips - (*FriendApplicationApprovedTips)(nil), // 42: OpenIMServer.sdkws.FriendApplicationApprovedTips - (*FriendApplicationRejectedTips)(nil), // 43: OpenIMServer.sdkws.FriendApplicationRejectedTips - (*FriendAddedTips)(nil), // 44: OpenIMServer.sdkws.FriendAddedTips - (*FriendDeletedTips)(nil), // 45: OpenIMServer.sdkws.FriendDeletedTips - (*BlackAddedTips)(nil), // 46: OpenIMServer.sdkws.BlackAddedTips - (*BlackDeletedTips)(nil), // 47: OpenIMServer.sdkws.BlackDeletedTips - (*FriendInfoChangedTips)(nil), // 48: OpenIMServer.sdkws.FriendInfoChangedTips - (*UserInfoUpdatedTips)(nil), // 49: OpenIMServer.sdkws.UserInfoUpdatedTips - (*ConversationUpdateTips)(nil), // 50: OpenIMServer.sdkws.ConversationUpdateTips - (*ConversationSetPrivateTips)(nil), // 51: OpenIMServer.sdkws.ConversationSetPrivateTips - (*ConversationHasReadTips)(nil), // 52: OpenIMServer.sdkws.ConversationHasReadTips - (*NotificationElem)(nil), // 53: OpenIMServer.sdkws.NotificationElem - (*Seqs)(nil), // 54: OpenIMServer.sdkws.seqs - (*DeleteMessageTips)(nil), // 55: OpenIMServer.sdkws.DeleteMessageTips - (*RevokeMsgTips)(nil), // 56: OpenIMServer.sdkws.RevokeMsgTips - (*MessageRevokedContent)(nil), // 57: OpenIMServer.sdkws.MessageRevokedContent - (*ClearConversationTips)(nil), // 58: OpenIMServer.sdkws.ClearConversationTips - (*DeleteMsgsTips)(nil), // 59: OpenIMServer.sdkws.DeleteMsgsTips - (*MarkAsReadTips)(nil), // 60: OpenIMServer.sdkws.MarkAsReadTips - (*SetAppBackgroundStatusReq)(nil), // 61: OpenIMServer.sdkws.SetAppBackgroundStatusReq - (*SetAppBackgroundStatusResp)(nil), // 62: OpenIMServer.sdkws.SetAppBackgroundStatusResp - (*RequestPagination)(nil), // 63: OpenIMServer.sdkws.RequestPagination - nil, // 64: OpenIMServer.sdkws.PullMessageBySeqsResp.MsgsEntry - nil, // 65: OpenIMServer.sdkws.PullMessageBySeqsResp.NotificationMsgsEntry - nil, // 66: OpenIMServer.sdkws.GetMaxSeqResp.MaxSeqsEntry - nil, // 67: OpenIMServer.sdkws.GetMaxSeqResp.MinSeqsEntry - nil, // 68: OpenIMServer.sdkws.MsgData.OptionsEntry - nil, // 69: OpenIMServer.sdkws.PushMessages.MsgsEntry - nil, // 70: OpenIMServer.sdkws.PushMessages.NotificationMsgsEntry - (*wrapperspb.Int32Value)(nil), // 71: OpenIMServer.protobuf.Int32Value -} -var file_sdkws_sdkws_proto_depIdxs = []int32{ - 71, // 0: OpenIMServer.sdkws.GroupInfoForSet.needVerification:type_name -> OpenIMServer.protobuf.Int32Value - 71, // 1: OpenIMServer.sdkws.GroupInfoForSet.lookMemberInfo:type_name -> OpenIMServer.protobuf.Int32Value - 71, // 2: OpenIMServer.sdkws.GroupInfoForSet.applyMemberFriend:type_name -> OpenIMServer.protobuf.Int32Value - 5, // 3: OpenIMServer.sdkws.FriendInfo.friendUser:type_name -> OpenIMServer.sdkws.UserInfo - 4, // 4: OpenIMServer.sdkws.BlackInfo.blackUserInfo:type_name -> OpenIMServer.sdkws.PublicUserInfo - 4, // 5: OpenIMServer.sdkws.GroupRequest.userInfo:type_name -> OpenIMServer.sdkws.PublicUserInfo - 1, // 6: OpenIMServer.sdkws.GroupRequest.groupInfo:type_name -> OpenIMServer.sdkws.GroupInfo - 11, // 7: OpenIMServer.sdkws.PullMessageBySeqsReq.seqRanges:type_name -> OpenIMServer.sdkws.SeqRange - 0, // 8: OpenIMServer.sdkws.PullMessageBySeqsReq.order:type_name -> OpenIMServer.sdkws.PullOrder - 17, // 9: OpenIMServer.sdkws.PullMsgs.Msgs:type_name -> OpenIMServer.sdkws.MsgData - 64, // 10: OpenIMServer.sdkws.PullMessageBySeqsResp.msgs:type_name -> OpenIMServer.sdkws.PullMessageBySeqsResp.MsgsEntry - 65, // 11: OpenIMServer.sdkws.PullMessageBySeqsResp.notificationMsgs:type_name -> OpenIMServer.sdkws.PullMessageBySeqsResp.NotificationMsgsEntry - 66, // 12: OpenIMServer.sdkws.GetMaxSeqResp.maxSeqs:type_name -> OpenIMServer.sdkws.GetMaxSeqResp.MaxSeqsEntry - 67, // 13: OpenIMServer.sdkws.GetMaxSeqResp.minSeqs:type_name -> OpenIMServer.sdkws.GetMaxSeqResp.MinSeqsEntry - 68, // 14: OpenIMServer.sdkws.MsgData.options:type_name -> OpenIMServer.sdkws.MsgData.OptionsEntry - 19, // 15: OpenIMServer.sdkws.MsgData.offlinePushInfo:type_name -> OpenIMServer.sdkws.OfflinePushInfo - 69, // 16: OpenIMServer.sdkws.PushMessages.msgs:type_name -> OpenIMServer.sdkws.PushMessages.MsgsEntry - 70, // 17: OpenIMServer.sdkws.PushMessages.notificationMsgs:type_name -> OpenIMServer.sdkws.PushMessages.NotificationMsgsEntry - 1, // 18: OpenIMServer.sdkws.GroupCreatedTips.group:type_name -> OpenIMServer.sdkws.GroupInfo - 3, // 19: OpenIMServer.sdkws.GroupCreatedTips.opUser:type_name -> OpenIMServer.sdkws.GroupMemberFullInfo - 3, // 20: OpenIMServer.sdkws.GroupCreatedTips.memberList:type_name -> OpenIMServer.sdkws.GroupMemberFullInfo - 3, // 21: OpenIMServer.sdkws.GroupCreatedTips.groupOwnerUser:type_name -> OpenIMServer.sdkws.GroupMemberFullInfo - 3, // 22: OpenIMServer.sdkws.GroupInfoSetTips.opUser:type_name -> OpenIMServer.sdkws.GroupMemberFullInfo - 1, // 23: OpenIMServer.sdkws.GroupInfoSetTips.group:type_name -> OpenIMServer.sdkws.GroupInfo - 3, // 24: OpenIMServer.sdkws.GroupInfoSetNameTips.opUser:type_name -> OpenIMServer.sdkws.GroupMemberFullInfo - 1, // 25: OpenIMServer.sdkws.GroupInfoSetNameTips.group:type_name -> OpenIMServer.sdkws.GroupInfo - 3, // 26: OpenIMServer.sdkws.GroupInfoSetAnnouncementTips.opUser:type_name -> OpenIMServer.sdkws.GroupMemberFullInfo - 1, // 27: OpenIMServer.sdkws.GroupInfoSetAnnouncementTips.group:type_name -> OpenIMServer.sdkws.GroupInfo - 1, // 28: OpenIMServer.sdkws.JoinGroupApplicationTips.group:type_name -> OpenIMServer.sdkws.GroupInfo - 4, // 29: OpenIMServer.sdkws.JoinGroupApplicationTips.applicant:type_name -> OpenIMServer.sdkws.PublicUserInfo - 1, // 30: OpenIMServer.sdkws.MemberQuitTips.group:type_name -> OpenIMServer.sdkws.GroupInfo - 3, // 31: OpenIMServer.sdkws.MemberQuitTips.quitUser:type_name -> OpenIMServer.sdkws.GroupMemberFullInfo - 1, // 32: OpenIMServer.sdkws.GroupApplicationAcceptedTips.group:type_name -> OpenIMServer.sdkws.GroupInfo - 3, // 33: OpenIMServer.sdkws.GroupApplicationAcceptedTips.opUser:type_name -> OpenIMServer.sdkws.GroupMemberFullInfo - 1, // 34: OpenIMServer.sdkws.GroupApplicationRejectedTips.group:type_name -> OpenIMServer.sdkws.GroupInfo - 3, // 35: OpenIMServer.sdkws.GroupApplicationRejectedTips.opUser:type_name -> OpenIMServer.sdkws.GroupMemberFullInfo - 1, // 36: OpenIMServer.sdkws.GroupOwnerTransferredTips.group:type_name -> OpenIMServer.sdkws.GroupInfo - 3, // 37: OpenIMServer.sdkws.GroupOwnerTransferredTips.opUser:type_name -> OpenIMServer.sdkws.GroupMemberFullInfo - 3, // 38: OpenIMServer.sdkws.GroupOwnerTransferredTips.newGroupOwner:type_name -> OpenIMServer.sdkws.GroupMemberFullInfo - 1, // 39: OpenIMServer.sdkws.MemberKickedTips.group:type_name -> OpenIMServer.sdkws.GroupInfo - 3, // 40: OpenIMServer.sdkws.MemberKickedTips.opUser:type_name -> OpenIMServer.sdkws.GroupMemberFullInfo - 3, // 41: OpenIMServer.sdkws.MemberKickedTips.kickedUserList:type_name -> OpenIMServer.sdkws.GroupMemberFullInfo - 1, // 42: OpenIMServer.sdkws.MemberInvitedTips.group:type_name -> OpenIMServer.sdkws.GroupInfo - 3, // 43: OpenIMServer.sdkws.MemberInvitedTips.opUser:type_name -> OpenIMServer.sdkws.GroupMemberFullInfo - 3, // 44: OpenIMServer.sdkws.MemberInvitedTips.invitedUserList:type_name -> OpenIMServer.sdkws.GroupMemberFullInfo - 1, // 45: OpenIMServer.sdkws.MemberEnterTips.group:type_name -> OpenIMServer.sdkws.GroupInfo - 3, // 46: OpenIMServer.sdkws.MemberEnterTips.entrantUser:type_name -> OpenIMServer.sdkws.GroupMemberFullInfo - 1, // 47: OpenIMServer.sdkws.GroupDismissedTips.group:type_name -> OpenIMServer.sdkws.GroupInfo - 3, // 48: OpenIMServer.sdkws.GroupDismissedTips.opUser:type_name -> OpenIMServer.sdkws.GroupMemberFullInfo - 1, // 49: OpenIMServer.sdkws.GroupMemberMutedTips.group:type_name -> OpenIMServer.sdkws.GroupInfo - 3, // 50: OpenIMServer.sdkws.GroupMemberMutedTips.opUser:type_name -> OpenIMServer.sdkws.GroupMemberFullInfo - 3, // 51: OpenIMServer.sdkws.GroupMemberMutedTips.mutedUser:type_name -> OpenIMServer.sdkws.GroupMemberFullInfo - 1, // 52: OpenIMServer.sdkws.GroupMemberCancelMutedTips.group:type_name -> OpenIMServer.sdkws.GroupInfo - 3, // 53: OpenIMServer.sdkws.GroupMemberCancelMutedTips.opUser:type_name -> OpenIMServer.sdkws.GroupMemberFullInfo - 3, // 54: OpenIMServer.sdkws.GroupMemberCancelMutedTips.mutedUser:type_name -> OpenIMServer.sdkws.GroupMemberFullInfo - 1, // 55: OpenIMServer.sdkws.GroupMutedTips.group:type_name -> OpenIMServer.sdkws.GroupInfo - 3, // 56: OpenIMServer.sdkws.GroupMutedTips.opUser:type_name -> OpenIMServer.sdkws.GroupMemberFullInfo - 1, // 57: OpenIMServer.sdkws.GroupCancelMutedTips.group:type_name -> OpenIMServer.sdkws.GroupInfo - 3, // 58: OpenIMServer.sdkws.GroupCancelMutedTips.opUser:type_name -> OpenIMServer.sdkws.GroupMemberFullInfo - 1, // 59: OpenIMServer.sdkws.GroupMemberInfoSetTips.group:type_name -> OpenIMServer.sdkws.GroupInfo - 3, // 60: OpenIMServer.sdkws.GroupMemberInfoSetTips.opUser:type_name -> OpenIMServer.sdkws.GroupMemberFullInfo - 3, // 61: OpenIMServer.sdkws.GroupMemberInfoSetTips.changedUser:type_name -> OpenIMServer.sdkws.GroupMemberFullInfo - 40, // 62: OpenIMServer.sdkws.FriendApplicationTips.fromToUserID:type_name -> OpenIMServer.sdkws.FromToUserID - 40, // 63: OpenIMServer.sdkws.FriendApplicationApprovedTips.fromToUserID:type_name -> OpenIMServer.sdkws.FromToUserID - 40, // 64: OpenIMServer.sdkws.FriendApplicationRejectedTips.fromToUserID:type_name -> OpenIMServer.sdkws.FromToUserID - 6, // 65: OpenIMServer.sdkws.FriendAddedTips.friend:type_name -> OpenIMServer.sdkws.FriendInfo - 4, // 66: OpenIMServer.sdkws.FriendAddedTips.opUser:type_name -> OpenIMServer.sdkws.PublicUserInfo - 40, // 67: OpenIMServer.sdkws.FriendDeletedTips.fromToUserID:type_name -> OpenIMServer.sdkws.FromToUserID - 40, // 68: OpenIMServer.sdkws.BlackAddedTips.fromToUserID:type_name -> OpenIMServer.sdkws.FromToUserID - 40, // 69: OpenIMServer.sdkws.BlackDeletedTips.fromToUserID:type_name -> OpenIMServer.sdkws.FromToUserID - 40, // 70: OpenIMServer.sdkws.FriendInfoChangedTips.fromToUserID:type_name -> OpenIMServer.sdkws.FromToUserID - 12, // 71: OpenIMServer.sdkws.PullMessageBySeqsResp.MsgsEntry.value:type_name -> OpenIMServer.sdkws.PullMsgs - 12, // 72: OpenIMServer.sdkws.PullMessageBySeqsResp.NotificationMsgsEntry.value:type_name -> OpenIMServer.sdkws.PullMsgs - 12, // 73: OpenIMServer.sdkws.PushMessages.MsgsEntry.value:type_name -> OpenIMServer.sdkws.PullMsgs - 12, // 74: OpenIMServer.sdkws.PushMessages.NotificationMsgsEntry.value:type_name -> OpenIMServer.sdkws.PullMsgs - 75, // [75:75] is the sub-list for method output_type - 75, // [75:75] is the sub-list for method input_type - 75, // [75:75] is the sub-list for extension type_name - 75, // [75:75] is the sub-list for extension extendee - 0, // [0:75] is the sub-list for field type_name -} - -func init() { file_sdkws_sdkws_proto_init() } -func file_sdkws_sdkws_proto_init() { - if File_sdkws_sdkws_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_sdkws_sdkws_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GroupInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_sdkws_sdkws_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GroupInfoForSet); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_sdkws_sdkws_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GroupMemberFullInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_sdkws_sdkws_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PublicUserInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_sdkws_sdkws_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UserInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_sdkws_sdkws_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FriendInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_sdkws_sdkws_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BlackInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_sdkws_sdkws_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GroupRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_sdkws_sdkws_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FriendRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_sdkws_sdkws_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PullMessageBySeqsReq); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_sdkws_sdkws_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SeqRange); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_sdkws_sdkws_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PullMsgs); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_sdkws_sdkws_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PullMessageBySeqsResp); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_sdkws_sdkws_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetMaxSeqReq); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_sdkws_sdkws_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetMaxSeqResp); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_sdkws_sdkws_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UserSendMsgResp); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_sdkws_sdkws_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgData); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_sdkws_sdkws_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PushMessages); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_sdkws_sdkws_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*OfflinePushInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_sdkws_sdkws_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TipsComm); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_sdkws_sdkws_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GroupCreatedTips); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_sdkws_sdkws_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GroupInfoSetTips); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_sdkws_sdkws_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GroupInfoSetNameTips); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_sdkws_sdkws_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GroupInfoSetAnnouncementTips); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_sdkws_sdkws_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*JoinGroupApplicationTips); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_sdkws_sdkws_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MemberQuitTips); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_sdkws_sdkws_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GroupApplicationAcceptedTips); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_sdkws_sdkws_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GroupApplicationRejectedTips); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_sdkws_sdkws_proto_msgTypes[28].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GroupOwnerTransferredTips); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_sdkws_sdkws_proto_msgTypes[29].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MemberKickedTips); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_sdkws_sdkws_proto_msgTypes[30].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MemberInvitedTips); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_sdkws_sdkws_proto_msgTypes[31].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MemberEnterTips); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_sdkws_sdkws_proto_msgTypes[32].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GroupDismissedTips); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_sdkws_sdkws_proto_msgTypes[33].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GroupMemberMutedTips); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_sdkws_sdkws_proto_msgTypes[34].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GroupMemberCancelMutedTips); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_sdkws_sdkws_proto_msgTypes[35].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GroupMutedTips); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_sdkws_sdkws_proto_msgTypes[36].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GroupCancelMutedTips); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_sdkws_sdkws_proto_msgTypes[37].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GroupMemberInfoSetTips); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_sdkws_sdkws_proto_msgTypes[38].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FriendApplication); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_sdkws_sdkws_proto_msgTypes[39].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FromToUserID); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_sdkws_sdkws_proto_msgTypes[40].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FriendApplicationTips); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_sdkws_sdkws_proto_msgTypes[41].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FriendApplicationApprovedTips); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_sdkws_sdkws_proto_msgTypes[42].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FriendApplicationRejectedTips); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_sdkws_sdkws_proto_msgTypes[43].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FriendAddedTips); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_sdkws_sdkws_proto_msgTypes[44].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FriendDeletedTips); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_sdkws_sdkws_proto_msgTypes[45].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BlackAddedTips); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_sdkws_sdkws_proto_msgTypes[46].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BlackDeletedTips); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_sdkws_sdkws_proto_msgTypes[47].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FriendInfoChangedTips); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_sdkws_sdkws_proto_msgTypes[48].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UserInfoUpdatedTips); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_sdkws_sdkws_proto_msgTypes[49].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ConversationUpdateTips); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_sdkws_sdkws_proto_msgTypes[50].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ConversationSetPrivateTips); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_sdkws_sdkws_proto_msgTypes[51].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ConversationHasReadTips); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_sdkws_sdkws_proto_msgTypes[52].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*NotificationElem); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_sdkws_sdkws_proto_msgTypes[53].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Seqs); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_sdkws_sdkws_proto_msgTypes[54].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeleteMessageTips); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_sdkws_sdkws_proto_msgTypes[55].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RevokeMsgTips); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_sdkws_sdkws_proto_msgTypes[56].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MessageRevokedContent); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_sdkws_sdkws_proto_msgTypes[57].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ClearConversationTips); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_sdkws_sdkws_proto_msgTypes[58].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeleteMsgsTips); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_sdkws_sdkws_proto_msgTypes[59].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MarkAsReadTips); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_sdkws_sdkws_proto_msgTypes[60].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SetAppBackgroundStatusReq); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_sdkws_sdkws_proto_msgTypes[61].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SetAppBackgroundStatusResp); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_sdkws_sdkws_proto_msgTypes[62].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RequestPagination); 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{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_sdkws_sdkws_proto_rawDesc, - NumEnums: 1, - NumMessages: 70, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_sdkws_sdkws_proto_goTypes, - DependencyIndexes: file_sdkws_sdkws_proto_depIdxs, - EnumInfos: file_sdkws_sdkws_proto_enumTypes, - MessageInfos: file_sdkws_sdkws_proto_msgTypes, - }.Build() - File_sdkws_sdkws_proto = out.File - file_sdkws_sdkws_proto_rawDesc = nil - file_sdkws_sdkws_proto_goTypes = nil - file_sdkws_sdkws_proto_depIdxs = nil -} diff --git a/pkg/proto/sdkws/sdkws.proto b/pkg/proto/sdkws/sdkws.proto deleted file mode 100644 index 225172fe2..000000000 --- a/pkg/proto/sdkws/sdkws.proto +++ /dev/null @@ -1,517 +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. - -syntax = "proto3"; -package OpenIMServer.sdkws; -import "wrapperspb/wrapperspb.proto"; -option go_package = "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/sdkws"; - -////////////////////////////////base/////////////////////////////// - -message GroupInfo{ - string groupID = 1; - string groupName = 2; - string notification = 3; - string introduction = 4; - string faceURL = 5; - string ownerUserID = 6; - int64 createTime = 7; - uint32 memberCount = 8; - string ex = 9; - int32 status = 10; - string creatorUserID = 11; - int32 groupType = 12; - int32 needVerification = 13; - int32 lookMemberInfo = 14; - int32 applyMemberFriend = 15; - int64 notificationUpdateTime = 16; - string notificationUserID = 17; -} - -message GroupInfoForSet{ - string groupID = 1; - string groupName = 2; - string notification = 3; - string introduction = 4; - string faceURL = 5; - string ex = 6; - OpenIMServer.protobuf.Int32Value needVerification = 7; - OpenIMServer.protobuf.Int32Value lookMemberInfo = 8; - OpenIMServer.protobuf.Int32Value applyMemberFriend = 9; -} - - -message GroupMemberFullInfo { - string groupID = 1 ; - string userID = 2 ; - int32 roleLevel = 3; - int64 joinTime = 4; - string nickname = 5; - string faceURL = 6; - int32 appMangerLevel = 7; //if >0 - int32 joinSource = 8; - string operatorUserID = 9; - string ex = 10; - int64 muteEndTime = 11; - string inviterUserID = 12; -} - -message PublicUserInfo{ - string userID = 1; - string nickname = 2; - string faceURL = 3; - string ex = 4; -} - -message UserInfo{ - string userID = 1; - string nickname = 2; - string faceURL = 3; - string ex = 4; - int64 createTime = 5; - int32 appMangerLevel = 6; - int32 globalRecvMsgOpt = 7; -} - -message FriendInfo{ - string ownerUserID = 1; - string remark = 2; - int64 createTime = 3; - UserInfo friendUser = 4; - int32 addSource = 5; - string operatorUserID = 6; - string ex = 7; -} - -message BlackInfo{ - string ownerUserID = 1; - int64 createTime = 2; - PublicUserInfo blackUserInfo = 3; - int32 addSource = 4; - string operatorUserID = 5; - string ex = 6; -} - -message GroupRequest{ - PublicUserInfo userInfo = 1; - GroupInfo groupInfo = 2; - int32 handleResult = 3; - string reqMsg = 4; - string handleMsg = 5; - int64 reqTime = 6; - string handleUserID = 7; - int64 handleTime = 8; - string ex = 9; - int32 joinSource = 10; - string inviterUserID = 11; -} - -message FriendRequest{ - string fromUserID = 1; - string fromNickname = 2; - string fromFaceURL = 3; - string toUserID = 4; - string toNickname = 5; - string toFaceURL = 6; - int32 handleResult = 7; - string reqMsg = 8; - int64 createTime = 9; - string handlerUserID = 10; - string handleMsg = 11; - int64 handleTime = 12; - string ex = 13; -} - - -///////////////////////////////////base end///////////////////////////////////// -enum PullOrder{ - PullOrderAsc = 0; - PullOrderDesc = 1; - -} -message PullMessageBySeqsReq{ - string userID = 1; - repeated SeqRange seqRanges = 2; - PullOrder order = 3; -} - -message SeqRange { - string conversationID = 1; - int64 begin = 2; - int64 end = 3; - int64 num = 4; -} - -message PullMsgs { - repeated MsgData Msgs = 1; - bool isEnd = 2; -} - -message PullMessageBySeqsResp { - map msgs = 1; - map notificationMsgs = 2; -} - -message GetMaxSeqReq { - string userID = 1; -} - -message GetMaxSeqResp { - map maxSeqs = 1; - map minSeqs = 2; -} - -message UserSendMsgResp { - string serverMsgID = 1; - string clientMsgID = 2; - int64 sendTime = 3; -} - -message MsgData { - string sendID = 1; - string recvID = 2; - string groupID = 3; - string clientMsgID = 4; - string serverMsgID = 5; - int32 senderPlatformID = 6; - string senderNickname = 7; - string senderFaceURL = 8; - int32 sessionType = 9; - int32 msgFrom = 10; - int32 contentType = 11; - bytes content = 12; - int64 seq = 14; - int64 sendTime = 15; - int64 createTime = 16; - int32 status = 17; - bool isRead = 18; - map options = 19; - OfflinePushInfo offlinePushInfo = 20; - repeated string atUserIDList = 21; - string attachedInfo = 22; - string ex = 23; -} -message PushMessages{ - map msgs = 1; - map notificationMsgs = 2; -} -message OfflinePushInfo{ - string title = 1; - string desc = 2; - string ex = 3; - string iOSPushSound = 4; - bool iOSBadgeCount = 5; - string signalInfo = 6; -} - - - - - - - - - -message TipsComm{ - bytes detail = 1; - string defaultTips = 2; - string jsonDetail = 3; -} - -//////////////////////group///////////////////// - - -// OnGroupCreated() -message GroupCreatedTips{ - GroupInfo group = 1; - GroupMemberFullInfo opUser = 2; - repeated GroupMemberFullInfo memberList = 3; - int64 operationTime = 4; - GroupMemberFullInfo groupOwnerUser = 5; -} - -// OnGroupInfoSet() -message GroupInfoSetTips{ - GroupMemberFullInfo opUser = 1; //who do this - int64 muteTime = 2; - GroupInfo group = 3; -} - -message GroupInfoSetNameTips{ - GroupMemberFullInfo opUser = 1; //who do this - GroupInfo group = 2; -} - -message GroupInfoSetAnnouncementTips{ - GroupMemberFullInfo opUser = 1; //who do this - GroupInfo group = 2; -} - -// OnJoinGroupApplication() -message JoinGroupApplicationTips{ - GroupInfo group = 1; - PublicUserInfo applicant = 2; - string reqMsg = 3; -} - -// OnQuitGroup() -//Actively leave the group -message MemberQuitTips{ - GroupInfo group = 1; - GroupMemberFullInfo quitUser = 2; - int64 operationTime = 3; -} - - -// OnApplicationGroupAccepted() -message GroupApplicationAcceptedTips{ - GroupInfo group = 1; - GroupMemberFullInfo opUser = 2; - string handleMsg = 4; - int32 receiverAs = 5; // admin(==1) or applicant(==0) -} - -// OnApplicationGroupRejected() -message GroupApplicationRejectedTips{ - GroupInfo group = 1; - GroupMemberFullInfo opUser = 2; - string handleMsg = 4; - int32 receiverAs = 5; // admin(==1) or applicant(==0) -} - -// OnTransferGroupOwner() -message GroupOwnerTransferredTips{ - GroupInfo group = 1; - GroupMemberFullInfo opUser = 2; - GroupMemberFullInfo newGroupOwner = 3; - int64 operationTime = 4; -} - - -// OnMemberKicked() -message MemberKickedTips{ - GroupInfo group = 1; - GroupMemberFullInfo opUser = 2; - repeated GroupMemberFullInfo kickedUserList = 3; - int64 operationTime = 4; -} - -// OnMemberInvited() -message MemberInvitedTips{ - GroupInfo group = 1; - GroupMemberFullInfo opUser = 2; - repeated GroupMemberFullInfo invitedUserList = 3; - int64 operationTime = 4; -} - -//Actively join the group -message MemberEnterTips{ - GroupInfo group = 1; - GroupMemberFullInfo entrantUser = 2; - int64 operationTime = 3; -} - -message GroupDismissedTips{ - GroupInfo group = 1; - GroupMemberFullInfo opUser = 2; - int64 operationTime = 3; -} - -message GroupMemberMutedTips{ - GroupInfo group = 1; - GroupMemberFullInfo opUser = 2; - int64 operationTime = 3; - GroupMemberFullInfo mutedUser = 4; - uint32 mutedSeconds = 5; -} - -message GroupMemberCancelMutedTips{ - GroupInfo group = 1; - GroupMemberFullInfo opUser = 2; - int64 operationTime = 3; - GroupMemberFullInfo mutedUser = 4; -} - -message GroupMutedTips{ - GroupInfo group = 1; - GroupMemberFullInfo opUser = 2; - int64 operationTime = 3; -} - -message GroupCancelMutedTips{ - GroupInfo group = 1; - GroupMemberFullInfo opUser = 2; - int64 operationTime = 3; -} - -message GroupMemberInfoSetTips{ - GroupInfo group = 1; - GroupMemberFullInfo opUser = 2; - int64 operationTime = 3; - GroupMemberFullInfo changedUser = 4; -} - -//////////////////////friend///////////////////// - -message FriendApplication{ - int64 addTime = 1; - string addSource = 2; - string addWording = 3; -} - -message FromToUserID{ - string fromUserID = 1; - string toUserID = 2; -} - -//FromUserID apply to add ToUserID -message FriendApplicationTips{ - FromToUserID fromToUserID = 1; //from:发起者; to:接收者 -} - -//FromUserID accept or reject ToUserID -message FriendApplicationApprovedTips{ - FromToUserID fromToUserID = 1; //from:同意者;to:请求发起者 - string handleMsg = 2; -} - -//FromUserID accept or reject ToUserID -message FriendApplicationRejectedTips{ - FromToUserID fromToUserID = 1; //from:拒绝者;to:请求发起者 - string handleMsg = 2; -} - - -// FromUserID Added a friend ToUserID -message FriendAddedTips{ - FriendInfo friend = 1; - int64 operationTime = 2; - PublicUserInfo opUser = 3; //who do this - -} - -// FromUserID deleted a friend ToUserID -message FriendDeletedTips{ - FromToUserID fromToUserID = 1; //from:owner; to:friend -} - - - -message BlackAddedTips{ - FromToUserID fromToUserID = 1; //from:owner; to:black -} - -message BlackDeletedTips{ - FromToUserID fromToUserID = 1; //from:owner; to:black -} - -message FriendInfoChangedTips{ - FromToUserID fromToUserID = 1; //from:changed; to:friend -} -//////////////////////user///////////////////// -message UserInfoUpdatedTips{ - string userID = 1; -} - -//////////////////////conversation///////////////////// -message ConversationUpdateTips{ - string userID = 1; - repeated string conversationIDList = 2; -} - -message ConversationSetPrivateTips{ - string recvID = 1; - string sendID = 2; - bool isPrivate = 3; -} - -message ConversationHasReadTips { - string userID = 1; - string conversationID = 2; - int64 hasReadSeq = 3; - int64 unreadCountTime = 4; -} - -message NotificationElem { - string detail = 1; -} - -////////////////////message/////////////////////// -message seqs { - repeated int64 seqs = 1; -} - -message DeleteMessageTips{ - string opUserID = 1; - string userID = 2; - repeated int64 seqs = 3; -} - - -message RevokeMsgTips{ - string revokerUserID = 1; - string clientMsgID = 2; - int64 revokeTime = 3; - int32 sesstionType = 5; - int64 seq = 6; - string conversationID = 7; -} - - -message MessageRevokedContent { - string revokerID = 1; - int32 revokerRole = 2; - string clientMsgID = 3; - string revokerNickname = 4; - int64 revokeTime = 5; - int64 sourceMessageSendTime = 6; - string sourceMessageSendID = 7; - string sourceMessageSenderNickname = 8; - int32 sessionType = 10; - int64 seq = 11; - string ex = 12; -} - -message ClearConversationTips { - string userID = 1; - repeated string conversationIDs = 2; -} - -message DeleteMsgsTips { - string userID = 1; - string conversationID = 2; - repeated int64 seqs = 3; -} - -message MarkAsReadTips { - string markAsReadUserID = 1; - string conversationID = 2; - repeated int64 seqs = 3; - int64 hasReadSeq = 4; -} - - -message SetAppBackgroundStatusReq { - string userID = 1; - bool isBackground = 2; -} - -message SetAppBackgroundStatusResp { -} - - -message RequestPagination { - int32 pageNumber = 1; - int32 showNumber = 2; -} \ No newline at end of file diff --git a/pkg/proto/statistics/statistics.pb.go b/pkg/proto/statistics/statistics.pb.go deleted file mode 100644 index 5660758f9..000000000 --- a/pkg/proto/statistics/statistics.pb.go +++ /dev/null @@ -1,80 +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. - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.29.1 -// protoc v4.22.0 -// source: statistics/statistics.proto - -package statistics - -import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -var File_statistics_statistics_proto protoreflect.FileDescriptor - -var file_statistics_statistics_proto_rawDesc = []byte{ - 0x0a, 0x1b, 0x73, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x2f, 0x73, 0x74, 0x61, - 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x17, 0x4f, - 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x73, 0x74, 0x61, 0x74, - 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x42, 0x3a, 0x5a, 0x38, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, - 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x44, 0x4b, 0x2f, 0x4f, - 0x70, 0x65, 0x6e, 0x2d, 0x49, 0x4d, 0x2d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2f, 0x70, 0x6b, - 0x67, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, - 0x63, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var file_statistics_statistics_proto_goTypes = []interface{}{} -var file_statistics_statistics_proto_depIdxs = []int32{ - 0, // [0:0] is the sub-list for method output_type - 0, // [0:0] is the sub-list for method input_type - 0, // [0:0] is the sub-list for extension type_name - 0, // [0:0] is the sub-list for extension extendee - 0, // [0:0] is the sub-list for field type_name -} - -func init() { file_statistics_statistics_proto_init() } -func file_statistics_statistics_proto_init() { - if File_statistics_statistics_proto != nil { - return - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_statistics_statistics_proto_rawDesc, - NumEnums: 0, - NumMessages: 0, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_statistics_statistics_proto_goTypes, - DependencyIndexes: file_statistics_statistics_proto_depIdxs, - }.Build() - File_statistics_statistics_proto = out.File - file_statistics_statistics_proto_rawDesc = nil - file_statistics_statistics_proto_goTypes = nil - file_statistics_statistics_proto_depIdxs = nil -} diff --git a/pkg/proto/statistics/statistics.proto b/pkg/proto/statistics/statistics.proto deleted file mode 100644 index 160ad1dcd..000000000 --- a/pkg/proto/statistics/statistics.proto +++ /dev/null @@ -1,18 +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. - -syntax = "proto3"; -package OpenIMServer.statistics; -option go_package = "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/statistics"; - diff --git a/pkg/proto/third/third.go b/pkg/proto/third/third.go deleted file mode 100644 index 0e2072727..000000000 --- a/pkg/proto/third/third.go +++ /dev/null @@ -1,75 +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. - -package third - -import "github.com/OpenIMSDK/Open-IM-Server/pkg/errs" - -//func (x *ApplyPutReq) Check() error { -// if x.PutID == "" { -// return errs.ErrArgs.Wrap("PutID is empty") -// } -// if x.ContentType == "" { -// return errs.ErrArgs.Wrap("ContentType is empty") -// } -// return nil -//} -// -//func (x *ConfirmPutReq) Check() error { -// if x.PutID == "" { -// return errs.ErrArgs.Wrap("PutID is empty") -// } -// return nil -//} -// -//func (x *GetUrlReq) Check() error { -// if x.Name == "" { -// return errs.ErrArgs.Wrap("Name is empty") -// } -// return nil -//} -// -//func (x *GetPutReq) Check() error { -// if x.PutID == "" { -// return errs.ErrArgs.Wrap("PutID is empty") -// } -// return nil -//} -// -//func (x *GetHashInfoReq) Check() error { -// if x.Hash == "" { -// return errs.ErrArgs.Wrap("Hash is empty") -// } -// return nil -//} - -func (x *FcmUpdateTokenReq) Check() error { - if x.PlatformID < 1 || x.PlatformID > 9 { - return errs.ErrArgs.Wrap("PlatformID is invalid") - } - if x.FcmToken == "" { - return errs.ErrArgs.Wrap("FcmToken is empty") - } - if x.Account == "" { - return errs.ErrArgs.Wrap("Account is empty") - } - return nil -} - -func (x *SetAppBadgeReq) Check() error { - if x.UserID == "" { - return errs.ErrArgs.Wrap("UserID is empty") - } - return nil -} diff --git a/pkg/proto/third/third.pb.go b/pkg/proto/third/third.pb.go deleted file mode 100644 index 155b5f7cc..000000000 --- a/pkg/proto/third/third.pb.go +++ /dev/null @@ -1,2057 +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. - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.29.1 -// protoc v4.22.0 -// source: third/third.proto - -package third - -import ( - context "context" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type KeyValues struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key"` - Values []string `protobuf:"bytes,2,rep,name=values,proto3" json:"values"` -} - -func (x *KeyValues) Reset() { - *x = KeyValues{} - if protoimpl.UnsafeEnabled { - mi := &file_third_third_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *KeyValues) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*KeyValues) ProtoMessage() {} - -func (x *KeyValues) ProtoReflect() protoreflect.Message { - mi := &file_third_third_proto_msgTypes[0] - 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 KeyValues.ProtoReflect.Descriptor instead. -func (*KeyValues) Descriptor() ([]byte, []int) { - return file_third_third_proto_rawDescGZIP(), []int{0} -} - -func (x *KeyValues) GetKey() string { - if x != nil { - return x.Key - } - return "" -} - -func (x *KeyValues) GetValues() []string { - if x != nil { - return x.Values - } - return nil -} - -type SignPart struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - PartNumber int32 `protobuf:"varint,1,opt,name=partNumber,proto3" json:"partNumber"` - Url string `protobuf:"bytes,2,opt,name=url,proto3" json:"url"` - Query []*KeyValues `protobuf:"bytes,3,rep,name=query,proto3" json:"query"` - Header []*KeyValues `protobuf:"bytes,4,rep,name=header,proto3" json:"header"` -} - -func (x *SignPart) Reset() { - *x = SignPart{} - if protoimpl.UnsafeEnabled { - mi := &file_third_third_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SignPart) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SignPart) ProtoMessage() {} - -func (x *SignPart) ProtoReflect() protoreflect.Message { - mi := &file_third_third_proto_msgTypes[1] - 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 SignPart.ProtoReflect.Descriptor instead. -func (*SignPart) Descriptor() ([]byte, []int) { - return file_third_third_proto_rawDescGZIP(), []int{1} -} - -func (x *SignPart) GetPartNumber() int32 { - if x != nil { - return x.PartNumber - } - return 0 -} - -func (x *SignPart) GetUrl() string { - if x != nil { - return x.Url - } - return "" -} - -func (x *SignPart) GetQuery() []*KeyValues { - if x != nil { - return x.Query - } - return nil -} - -func (x *SignPart) GetHeader() []*KeyValues { - if x != nil { - return x.Header - } - return nil -} - -type AuthSignParts struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url"` - Query []*KeyValues `protobuf:"bytes,2,rep,name=query,proto3" json:"query"` - Header []*KeyValues `protobuf:"bytes,3,rep,name=header,proto3" json:"header"` - Parts []*SignPart `protobuf:"bytes,4,rep,name=parts,proto3" json:"parts"` -} - -func (x *AuthSignParts) Reset() { - *x = AuthSignParts{} - if protoimpl.UnsafeEnabled { - mi := &file_third_third_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *AuthSignParts) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*AuthSignParts) ProtoMessage() {} - -func (x *AuthSignParts) ProtoReflect() protoreflect.Message { - mi := &file_third_third_proto_msgTypes[2] - 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 AuthSignParts.ProtoReflect.Descriptor instead. -func (*AuthSignParts) Descriptor() ([]byte, []int) { - return file_third_third_proto_rawDescGZIP(), []int{2} -} - -func (x *AuthSignParts) GetUrl() string { - if x != nil { - return x.Url - } - return "" -} - -func (x *AuthSignParts) GetQuery() []*KeyValues { - if x != nil { - return x.Query - } - return nil -} - -func (x *AuthSignParts) GetHeader() []*KeyValues { - if x != nil { - return x.Header - } - return nil -} - -func (x *AuthSignParts) GetParts() []*SignPart { - if x != nil { - return x.Parts - } - return nil -} - -type PartLimitReq struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *PartLimitReq) Reset() { - *x = PartLimitReq{} - if protoimpl.UnsafeEnabled { - mi := &file_third_third_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *PartLimitReq) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*PartLimitReq) ProtoMessage() {} - -func (x *PartLimitReq) ProtoReflect() protoreflect.Message { - mi := &file_third_third_proto_msgTypes[3] - 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 PartLimitReq.ProtoReflect.Descriptor instead. -func (*PartLimitReq) Descriptor() ([]byte, []int) { - return file_third_third_proto_rawDescGZIP(), []int{3} -} - -type PartLimitResp struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - MinPartSize int64 `protobuf:"varint,1,opt,name=minPartSize,proto3" json:"minPartSize"` - MaxPartSize int64 `protobuf:"varint,2,opt,name=maxPartSize,proto3" json:"maxPartSize"` - MaxNumSize int32 `protobuf:"varint,3,opt,name=maxNumSize,proto3" json:"maxNumSize"` -} - -func (x *PartLimitResp) Reset() { - *x = PartLimitResp{} - if protoimpl.UnsafeEnabled { - mi := &file_third_third_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *PartLimitResp) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*PartLimitResp) ProtoMessage() {} - -func (x *PartLimitResp) ProtoReflect() protoreflect.Message { - mi := &file_third_third_proto_msgTypes[4] - 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 PartLimitResp.ProtoReflect.Descriptor instead. -func (*PartLimitResp) Descriptor() ([]byte, []int) { - return file_third_third_proto_rawDescGZIP(), []int{4} -} - -func (x *PartLimitResp) GetMinPartSize() int64 { - if x != nil { - return x.MinPartSize - } - return 0 -} - -func (x *PartLimitResp) GetMaxPartSize() int64 { - if x != nil { - return x.MaxPartSize - } - return 0 -} - -func (x *PartLimitResp) GetMaxNumSize() int32 { - if x != nil { - return x.MaxNumSize - } - return 0 -} - -type PartSizeReq struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Size int64 `protobuf:"varint,1,opt,name=size,proto3" json:"size"` -} - -func (x *PartSizeReq) Reset() { - *x = PartSizeReq{} - if protoimpl.UnsafeEnabled { - mi := &file_third_third_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *PartSizeReq) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*PartSizeReq) ProtoMessage() {} - -func (x *PartSizeReq) ProtoReflect() protoreflect.Message { - mi := &file_third_third_proto_msgTypes[5] - 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 PartSizeReq.ProtoReflect.Descriptor instead. -func (*PartSizeReq) Descriptor() ([]byte, []int) { - return file_third_third_proto_rawDescGZIP(), []int{5} -} - -func (x *PartSizeReq) GetSize() int64 { - if x != nil { - return x.Size - } - return 0 -} - -type PartSizeResp struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Size int64 `protobuf:"varint,2,opt,name=size,proto3" json:"size"` -} - -func (x *PartSizeResp) Reset() { - *x = PartSizeResp{} - if protoimpl.UnsafeEnabled { - mi := &file_third_third_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *PartSizeResp) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*PartSizeResp) ProtoMessage() {} - -func (x *PartSizeResp) ProtoReflect() protoreflect.Message { - mi := &file_third_third_proto_msgTypes[6] - 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 PartSizeResp.ProtoReflect.Descriptor instead. -func (*PartSizeResp) Descriptor() ([]byte, []int) { - return file_third_third_proto_rawDescGZIP(), []int{6} -} - -func (x *PartSizeResp) GetSize() int64 { - if x != nil { - return x.Size - } - return 0 -} - -type InitiateMultipartUploadReq struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Hash string `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash"` - Size int64 `protobuf:"varint,2,opt,name=size,proto3" json:"size"` - PartSize int64 `protobuf:"varint,3,opt,name=partSize,proto3" json:"partSize"` - MaxParts int32 `protobuf:"varint,4,opt,name=maxParts,proto3" json:"maxParts"` - Cause string `protobuf:"bytes,5,opt,name=cause,proto3" json:"cause"` - Name string `protobuf:"bytes,6,opt,name=name,proto3" json:"name"` - ContentType string `protobuf:"bytes,7,opt,name=contentType,proto3" json:"contentType"` -} - -func (x *InitiateMultipartUploadReq) Reset() { - *x = InitiateMultipartUploadReq{} - if protoimpl.UnsafeEnabled { - mi := &file_third_third_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *InitiateMultipartUploadReq) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*InitiateMultipartUploadReq) ProtoMessage() {} - -func (x *InitiateMultipartUploadReq) ProtoReflect() protoreflect.Message { - mi := &file_third_third_proto_msgTypes[7] - 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 InitiateMultipartUploadReq.ProtoReflect.Descriptor instead. -func (*InitiateMultipartUploadReq) Descriptor() ([]byte, []int) { - return file_third_third_proto_rawDescGZIP(), []int{7} -} - -func (x *InitiateMultipartUploadReq) GetHash() string { - if x != nil { - return x.Hash - } - return "" -} - -func (x *InitiateMultipartUploadReq) GetSize() int64 { - if x != nil { - return x.Size - } - return 0 -} - -func (x *InitiateMultipartUploadReq) GetPartSize() int64 { - if x != nil { - return x.PartSize - } - return 0 -} - -func (x *InitiateMultipartUploadReq) GetMaxParts() int32 { - if x != nil { - return x.MaxParts - } - return 0 -} - -func (x *InitiateMultipartUploadReq) GetCause() string { - if x != nil { - return x.Cause - } - return "" -} - -func (x *InitiateMultipartUploadReq) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *InitiateMultipartUploadReq) GetContentType() string { - if x != nil { - return x.ContentType - } - return "" -} - -type UploadInfo struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - UploadID string `protobuf:"bytes,1,opt,name=uploadID,proto3" json:"uploadID"` - PartSize int64 `protobuf:"varint,2,opt,name=partSize,proto3" json:"partSize"` - Sign *AuthSignParts `protobuf:"bytes,3,opt,name=sign,proto3" json:"sign"` - ExpireTime int64 `protobuf:"varint,4,opt,name=expireTime,proto3" json:"expireTime"` -} - -func (x *UploadInfo) Reset() { - *x = UploadInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_third_third_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *UploadInfo) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*UploadInfo) ProtoMessage() {} - -func (x *UploadInfo) ProtoReflect() protoreflect.Message { - mi := &file_third_third_proto_msgTypes[8] - 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 UploadInfo.ProtoReflect.Descriptor instead. -func (*UploadInfo) Descriptor() ([]byte, []int) { - return file_third_third_proto_rawDescGZIP(), []int{8} -} - -func (x *UploadInfo) GetUploadID() string { - if x != nil { - return x.UploadID - } - return "" -} - -func (x *UploadInfo) GetPartSize() int64 { - if x != nil { - return x.PartSize - } - return 0 -} - -func (x *UploadInfo) GetSign() *AuthSignParts { - if x != nil { - return x.Sign - } - return nil -} - -func (x *UploadInfo) GetExpireTime() int64 { - if x != nil { - return x.ExpireTime - } - return 0 -} - -type InitiateMultipartUploadResp struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url"` - Upload *UploadInfo `protobuf:"bytes,2,opt,name=upload,proto3" json:"upload"` -} - -func (x *InitiateMultipartUploadResp) Reset() { - *x = InitiateMultipartUploadResp{} - if protoimpl.UnsafeEnabled { - mi := &file_third_third_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *InitiateMultipartUploadResp) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*InitiateMultipartUploadResp) ProtoMessage() {} - -func (x *InitiateMultipartUploadResp) ProtoReflect() protoreflect.Message { - mi := &file_third_third_proto_msgTypes[9] - 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 InitiateMultipartUploadResp.ProtoReflect.Descriptor instead. -func (*InitiateMultipartUploadResp) Descriptor() ([]byte, []int) { - return file_third_third_proto_rawDescGZIP(), []int{9} -} - -func (x *InitiateMultipartUploadResp) GetUrl() string { - if x != nil { - return x.Url - } - return "" -} - -func (x *InitiateMultipartUploadResp) GetUpload() *UploadInfo { - if x != nil { - return x.Upload - } - return nil -} - -type AuthSignReq struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - UploadID string `protobuf:"bytes,1,opt,name=uploadID,proto3" json:"uploadID"` - PartNumbers []int32 `protobuf:"varint,2,rep,packed,name=partNumbers,proto3" json:"partNumbers"` -} - -func (x *AuthSignReq) Reset() { - *x = AuthSignReq{} - if protoimpl.UnsafeEnabled { - mi := &file_third_third_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *AuthSignReq) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*AuthSignReq) ProtoMessage() {} - -func (x *AuthSignReq) ProtoReflect() protoreflect.Message { - mi := &file_third_third_proto_msgTypes[10] - 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 AuthSignReq.ProtoReflect.Descriptor instead. -func (*AuthSignReq) Descriptor() ([]byte, []int) { - return file_third_third_proto_rawDescGZIP(), []int{10} -} - -func (x *AuthSignReq) GetUploadID() string { - if x != nil { - return x.UploadID - } - return "" -} - -func (x *AuthSignReq) GetPartNumbers() []int32 { - if x != nil { - return x.PartNumbers - } - return nil -} - -type AuthSignResp struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url"` - Query []*KeyValues `protobuf:"bytes,2,rep,name=query,proto3" json:"query"` - Header []*KeyValues `protobuf:"bytes,3,rep,name=header,proto3" json:"header"` - Parts []*SignPart `protobuf:"bytes,4,rep,name=parts,proto3" json:"parts"` -} - -func (x *AuthSignResp) Reset() { - *x = AuthSignResp{} - if protoimpl.UnsafeEnabled { - mi := &file_third_third_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *AuthSignResp) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*AuthSignResp) ProtoMessage() {} - -func (x *AuthSignResp) ProtoReflect() protoreflect.Message { - mi := &file_third_third_proto_msgTypes[11] - 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 AuthSignResp.ProtoReflect.Descriptor instead. -func (*AuthSignResp) Descriptor() ([]byte, []int) { - return file_third_third_proto_rawDescGZIP(), []int{11} -} - -func (x *AuthSignResp) GetUrl() string { - if x != nil { - return x.Url - } - return "" -} - -func (x *AuthSignResp) GetQuery() []*KeyValues { - if x != nil { - return x.Query - } - return nil -} - -func (x *AuthSignResp) GetHeader() []*KeyValues { - if x != nil { - return x.Header - } - return nil -} - -func (x *AuthSignResp) GetParts() []*SignPart { - if x != nil { - return x.Parts - } - return nil -} - -type CompleteMultipartUploadReq struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - UploadID string `protobuf:"bytes,1,opt,name=uploadID,proto3" json:"uploadID"` - Parts []string `protobuf:"bytes,2,rep,name=parts,proto3" json:"parts"` - Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name"` - ContentType string `protobuf:"bytes,4,opt,name=contentType,proto3" json:"contentType"` - Cause string `protobuf:"bytes,5,opt,name=cause,proto3" json:"cause"` -} - -func (x *CompleteMultipartUploadReq) Reset() { - *x = CompleteMultipartUploadReq{} - if protoimpl.UnsafeEnabled { - mi := &file_third_third_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CompleteMultipartUploadReq) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CompleteMultipartUploadReq) ProtoMessage() {} - -func (x *CompleteMultipartUploadReq) ProtoReflect() protoreflect.Message { - mi := &file_third_third_proto_msgTypes[12] - 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 CompleteMultipartUploadReq.ProtoReflect.Descriptor instead. -func (*CompleteMultipartUploadReq) Descriptor() ([]byte, []int) { - return file_third_third_proto_rawDescGZIP(), []int{12} -} - -func (x *CompleteMultipartUploadReq) GetUploadID() string { - if x != nil { - return x.UploadID - } - return "" -} - -func (x *CompleteMultipartUploadReq) GetParts() []string { - if x != nil { - return x.Parts - } - return nil -} - -func (x *CompleteMultipartUploadReq) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *CompleteMultipartUploadReq) GetContentType() string { - if x != nil { - return x.ContentType - } - return "" -} - -func (x *CompleteMultipartUploadReq) GetCause() string { - if x != nil { - return x.Cause - } - return "" -} - -type CompleteMultipartUploadResp struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url"` -} - -func (x *CompleteMultipartUploadResp) Reset() { - *x = CompleteMultipartUploadResp{} - if protoimpl.UnsafeEnabled { - mi := &file_third_third_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CompleteMultipartUploadResp) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CompleteMultipartUploadResp) ProtoMessage() {} - -func (x *CompleteMultipartUploadResp) ProtoReflect() protoreflect.Message { - mi := &file_third_third_proto_msgTypes[13] - 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 CompleteMultipartUploadResp.ProtoReflect.Descriptor instead. -func (*CompleteMultipartUploadResp) Descriptor() ([]byte, []int) { - return file_third_third_proto_rawDescGZIP(), []int{13} -} - -func (x *CompleteMultipartUploadResp) GetUrl() string { - if x != nil { - return x.Url - } - return "" -} - -type AccessURLReq struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name"` -} - -func (x *AccessURLReq) Reset() { - *x = AccessURLReq{} - if protoimpl.UnsafeEnabled { - mi := &file_third_third_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *AccessURLReq) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*AccessURLReq) ProtoMessage() {} - -func (x *AccessURLReq) ProtoReflect() protoreflect.Message { - mi := &file_third_third_proto_msgTypes[14] - 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 AccessURLReq.ProtoReflect.Descriptor instead. -func (*AccessURLReq) Descriptor() ([]byte, []int) { - return file_third_third_proto_rawDescGZIP(), []int{14} -} - -func (x *AccessURLReq) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -type AccessURLResp struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url"` - ExpireTime int64 `protobuf:"varint,2,opt,name=expireTime,proto3" json:"expireTime"` -} - -func (x *AccessURLResp) Reset() { - *x = AccessURLResp{} - if protoimpl.UnsafeEnabled { - mi := &file_third_third_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *AccessURLResp) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*AccessURLResp) ProtoMessage() {} - -func (x *AccessURLResp) ProtoReflect() protoreflect.Message { - mi := &file_third_third_proto_msgTypes[15] - 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 AccessURLResp.ProtoReflect.Descriptor instead. -func (*AccessURLResp) Descriptor() ([]byte, []int) { - return file_third_third_proto_rawDescGZIP(), []int{15} -} - -func (x *AccessURLResp) GetUrl() string { - if x != nil { - return x.Url - } - return "" -} - -func (x *AccessURLResp) GetExpireTime() int64 { - if x != nil { - return x.ExpireTime - } - return 0 -} - -type FcmUpdateTokenReq struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - PlatformID int32 `protobuf:"varint,1,opt,name=platformID,proto3" json:"platformID"` - FcmToken string `protobuf:"bytes,2,opt,name=fcmToken,proto3" json:"fcmToken"` - Account string `protobuf:"bytes,3,opt,name=account,proto3" json:"account"` - ExpireTime int64 `protobuf:"varint,4,opt,name=expireTime,proto3" json:"expireTime"` -} - -func (x *FcmUpdateTokenReq) Reset() { - *x = FcmUpdateTokenReq{} - if protoimpl.UnsafeEnabled { - mi := &file_third_third_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *FcmUpdateTokenReq) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*FcmUpdateTokenReq) ProtoMessage() {} - -func (x *FcmUpdateTokenReq) ProtoReflect() protoreflect.Message { - mi := &file_third_third_proto_msgTypes[16] - 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 FcmUpdateTokenReq.ProtoReflect.Descriptor instead. -func (*FcmUpdateTokenReq) Descriptor() ([]byte, []int) { - return file_third_third_proto_rawDescGZIP(), []int{16} -} - -func (x *FcmUpdateTokenReq) GetPlatformID() int32 { - if x != nil { - return x.PlatformID - } - return 0 -} - -func (x *FcmUpdateTokenReq) GetFcmToken() string { - if x != nil { - return x.FcmToken - } - return "" -} - -func (x *FcmUpdateTokenReq) GetAccount() string { - if x != nil { - return x.Account - } - return "" -} - -func (x *FcmUpdateTokenReq) GetExpireTime() int64 { - if x != nil { - return x.ExpireTime - } - return 0 -} - -type FcmUpdateTokenResp struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *FcmUpdateTokenResp) Reset() { - *x = FcmUpdateTokenResp{} - if protoimpl.UnsafeEnabled { - mi := &file_third_third_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *FcmUpdateTokenResp) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*FcmUpdateTokenResp) ProtoMessage() {} - -func (x *FcmUpdateTokenResp) ProtoReflect() protoreflect.Message { - mi := &file_third_third_proto_msgTypes[17] - 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 FcmUpdateTokenResp.ProtoReflect.Descriptor instead. -func (*FcmUpdateTokenResp) Descriptor() ([]byte, []int) { - return file_third_third_proto_rawDescGZIP(), []int{17} -} - -type SetAppBadgeReq struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - UserID string `protobuf:"bytes,1,opt,name=userID,proto3" json:"userID"` - AppUnreadCount int32 `protobuf:"varint,2,opt,name=appUnreadCount,proto3" json:"appUnreadCount"` -} - -func (x *SetAppBadgeReq) Reset() { - *x = SetAppBadgeReq{} - if protoimpl.UnsafeEnabled { - mi := &file_third_third_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SetAppBadgeReq) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SetAppBadgeReq) ProtoMessage() {} - -func (x *SetAppBadgeReq) ProtoReflect() protoreflect.Message { - mi := &file_third_third_proto_msgTypes[18] - 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 SetAppBadgeReq.ProtoReflect.Descriptor instead. -func (*SetAppBadgeReq) Descriptor() ([]byte, []int) { - return file_third_third_proto_rawDescGZIP(), []int{18} -} - -func (x *SetAppBadgeReq) GetUserID() string { - if x != nil { - return x.UserID - } - return "" -} - -func (x *SetAppBadgeReq) GetAppUnreadCount() int32 { - if x != nil { - return x.AppUnreadCount - } - return 0 -} - -type SetAppBadgeResp struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *SetAppBadgeResp) Reset() { - *x = SetAppBadgeResp{} - if protoimpl.UnsafeEnabled { - mi := &file_third_third_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SetAppBadgeResp) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SetAppBadgeResp) ProtoMessage() {} - -func (x *SetAppBadgeResp) ProtoReflect() protoreflect.Message { - mi := &file_third_third_proto_msgTypes[19] - 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 SetAppBadgeResp.ProtoReflect.Descriptor instead. -func (*SetAppBadgeResp) Descriptor() ([]byte, []int) { - return file_third_third_proto_rawDescGZIP(), []int{19} -} - -var File_third_third_proto protoreflect.FileDescriptor - -var file_third_third_proto_rawDesc = []byte{ - 0x0a, 0x11, 0x74, 0x68, 0x69, 0x72, 0x64, 0x2f, 0x74, 0x68, 0x69, 0x72, 0x64, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x12, 0x12, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, - 0x72, 0x2e, 0x74, 0x68, 0x69, 0x72, 0x64, 0x22, 0x35, 0x0a, 0x09, 0x4b, 0x65, 0x79, 0x56, 0x61, - 0x6c, 0x75, 0x65, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, - 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x22, 0xa8, - 0x01, 0x0a, 0x08, 0x53, 0x69, 0x67, 0x6e, 0x50, 0x61, 0x72, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x70, - 0x61, 0x72, 0x74, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, - 0x0a, 0x70, 0x61, 0x72, 0x74, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x10, 0x0a, 0x03, 0x75, - 0x72, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x12, 0x33, 0x0a, - 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x4f, - 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x74, 0x68, 0x69, 0x72, - 0x64, 0x2e, 0x4b, 0x65, 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x52, 0x05, 0x71, 0x75, 0x65, - 0x72, 0x79, 0x12, 0x35, 0x0a, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x04, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, - 0x72, 0x2e, 0x74, 0x68, 0x69, 0x72, 0x64, 0x2e, 0x4b, 0x65, 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65, - 0x73, 0x52, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x22, 0xc1, 0x01, 0x0a, 0x0d, 0x41, 0x75, - 0x74, 0x68, 0x53, 0x69, 0x67, 0x6e, 0x50, 0x61, 0x72, 0x74, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x75, - 0x72, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x12, 0x33, 0x0a, - 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x4f, - 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x74, 0x68, 0x69, 0x72, - 0x64, 0x2e, 0x4b, 0x65, 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x52, 0x05, 0x71, 0x75, 0x65, - 0x72, 0x79, 0x12, 0x35, 0x0a, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x03, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, - 0x72, 0x2e, 0x74, 0x68, 0x69, 0x72, 0x64, 0x2e, 0x4b, 0x65, 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65, - 0x73, 0x52, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x32, 0x0a, 0x05, 0x70, 0x61, 0x72, - 0x74, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, - 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x74, 0x68, 0x69, 0x72, 0x64, 0x2e, 0x53, 0x69, - 0x67, 0x6e, 0x50, 0x61, 0x72, 0x74, 0x52, 0x05, 0x70, 0x61, 0x72, 0x74, 0x73, 0x22, 0x0e, 0x0a, - 0x0c, 0x50, 0x61, 0x72, 0x74, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x52, 0x65, 0x71, 0x22, 0x73, 0x0a, - 0x0d, 0x50, 0x61, 0x72, 0x74, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x20, - 0x0a, 0x0b, 0x6d, 0x69, 0x6e, 0x50, 0x61, 0x72, 0x74, 0x53, 0x69, 0x7a, 0x65, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x03, 0x52, 0x0b, 0x6d, 0x69, 0x6e, 0x50, 0x61, 0x72, 0x74, 0x53, 0x69, 0x7a, 0x65, - 0x12, 0x20, 0x0a, 0x0b, 0x6d, 0x61, 0x78, 0x50, 0x61, 0x72, 0x74, 0x53, 0x69, 0x7a, 0x65, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x6d, 0x61, 0x78, 0x50, 0x61, 0x72, 0x74, 0x53, 0x69, - 0x7a, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x6d, 0x61, 0x78, 0x4e, 0x75, 0x6d, 0x53, 0x69, 0x7a, 0x65, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x6d, 0x61, 0x78, 0x4e, 0x75, 0x6d, 0x53, 0x69, - 0x7a, 0x65, 0x22, 0x21, 0x0a, 0x0b, 0x50, 0x61, 0x72, 0x74, 0x53, 0x69, 0x7a, 0x65, 0x52, 0x65, - 0x71, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, - 0x04, 0x73, 0x69, 0x7a, 0x65, 0x22, 0x22, 0x0a, 0x0c, 0x50, 0x61, 0x72, 0x74, 0x53, 0x69, 0x7a, - 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x03, 0x52, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x22, 0xc8, 0x01, 0x0a, 0x1a, 0x49, 0x6e, - 0x69, 0x74, 0x69, 0x61, 0x74, 0x65, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x61, 0x72, 0x74, 0x55, - 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x65, 0x71, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x61, 0x73, 0x68, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x68, 0x61, 0x73, 0x68, 0x12, 0x12, 0x0a, 0x04, - 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x73, 0x69, 0x7a, 0x65, - 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61, 0x72, 0x74, 0x53, 0x69, 0x7a, 0x65, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x03, 0x52, 0x08, 0x70, 0x61, 0x72, 0x74, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x1a, 0x0a, 0x08, - 0x6d, 0x61, 0x78, 0x50, 0x61, 0x72, 0x74, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, - 0x6d, 0x61, 0x78, 0x50, 0x61, 0x72, 0x74, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x61, 0x75, 0x73, - 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x63, 0x61, 0x75, 0x73, 0x65, 0x12, 0x12, - 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, - 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, - 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, - 0x54, 0x79, 0x70, 0x65, 0x22, 0x9b, 0x01, 0x0a, 0x0a, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x49, - 0x6e, 0x66, 0x6f, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x49, 0x44, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x49, 0x44, 0x12, - 0x1a, 0x0a, 0x08, 0x70, 0x61, 0x72, 0x74, 0x53, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x03, 0x52, 0x08, 0x70, 0x61, 0x72, 0x74, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x35, 0x0a, 0x04, 0x73, - 0x69, 0x67, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x4f, 0x70, 0x65, 0x6e, - 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x74, 0x68, 0x69, 0x72, 0x64, 0x2e, 0x41, - 0x75, 0x74, 0x68, 0x53, 0x69, 0x67, 0x6e, 0x50, 0x61, 0x72, 0x74, 0x73, 0x52, 0x04, 0x73, 0x69, - 0x67, 0x6e, 0x12, 0x1e, 0x0a, 0x0a, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x54, 0x69, 0x6d, 0x65, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x54, 0x69, - 0x6d, 0x65, 0x22, 0x67, 0x0a, 0x1b, 0x49, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x74, 0x65, 0x4d, 0x75, - 0x6c, 0x74, 0x69, 0x70, 0x61, 0x72, 0x74, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x65, 0x73, - 0x70, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, - 0x75, 0x72, 0x6c, 0x12, 0x36, 0x0a, 0x06, 0x75, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, - 0x65, 0x72, 0x2e, 0x74, 0x68, 0x69, 0x72, 0x64, 0x2e, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x49, - 0x6e, 0x66, 0x6f, 0x52, 0x06, 0x75, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x22, 0x4b, 0x0a, 0x0b, 0x41, - 0x75, 0x74, 0x68, 0x53, 0x69, 0x67, 0x6e, 0x52, 0x65, 0x71, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x70, - 0x6c, 0x6f, 0x61, 0x64, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, 0x70, - 0x6c, 0x6f, 0x61, 0x64, 0x49, 0x44, 0x12, 0x20, 0x0a, 0x0b, 0x70, 0x61, 0x72, 0x74, 0x4e, 0x75, - 0x6d, 0x62, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x05, 0x52, 0x0b, 0x70, 0x61, 0x72, - 0x74, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x22, 0xc0, 0x01, 0x0a, 0x0c, 0x41, 0x75, 0x74, - 0x68, 0x53, 0x69, 0x67, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x12, 0x33, 0x0a, 0x05, 0x71, - 0x75, 0x65, 0x72, 0x79, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x4f, 0x70, 0x65, - 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x74, 0x68, 0x69, 0x72, 0x64, 0x2e, - 0x4b, 0x65, 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x52, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, - 0x12, 0x35, 0x0a, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x1d, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, - 0x74, 0x68, 0x69, 0x72, 0x64, 0x2e, 0x4b, 0x65, 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x52, - 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x32, 0x0a, 0x05, 0x70, 0x61, 0x72, 0x74, 0x73, - 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, - 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x74, 0x68, 0x69, 0x72, 0x64, 0x2e, 0x53, 0x69, 0x67, 0x6e, - 0x50, 0x61, 0x72, 0x74, 0x52, 0x05, 0x70, 0x61, 0x72, 0x74, 0x73, 0x22, 0x9a, 0x01, 0x0a, 0x1a, - 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x61, 0x72, - 0x74, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x65, 0x71, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x70, - 0x6c, 0x6f, 0x61, 0x64, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, 0x70, - 0x6c, 0x6f, 0x61, 0x64, 0x49, 0x44, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x61, 0x72, 0x74, 0x73, 0x18, - 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x70, 0x61, 0x72, 0x74, 0x73, 0x12, 0x12, 0x0a, 0x04, - 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, - 0x12, 0x20, 0x0a, 0x0b, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x54, 0x79, - 0x70, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x61, 0x75, 0x73, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x05, 0x63, 0x61, 0x75, 0x73, 0x65, 0x22, 0x2f, 0x0a, 0x1b, 0x43, 0x6f, 0x6d, 0x70, - 0x6c, 0x65, 0x74, 0x65, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x61, 0x72, 0x74, 0x55, 0x70, 0x6c, - 0x6f, 0x61, 0x64, 0x52, 0x65, 0x73, 0x70, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x22, 0x22, 0x0a, 0x0c, 0x41, 0x63, 0x63, - 0x65, 0x73, 0x73, 0x55, 0x52, 0x4c, 0x52, 0x65, 0x71, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, - 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x41, 0x0a, - 0x0d, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x55, 0x52, 0x4c, 0x52, 0x65, 0x73, 0x70, 0x12, 0x10, - 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6c, - 0x12, 0x1e, 0x0a, 0x0a, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x54, 0x69, 0x6d, 0x65, - 0x22, 0x89, 0x01, 0x0a, 0x11, 0x46, 0x63, 0x6d, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x6f, - 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x71, 0x12, 0x1e, 0x0a, 0x0a, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, - 0x72, 0x6d, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x70, 0x6c, 0x61, 0x74, - 0x66, 0x6f, 0x72, 0x6d, 0x49, 0x44, 0x12, 0x1a, 0x0a, 0x08, 0x66, 0x63, 0x6d, 0x54, 0x6f, 0x6b, - 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x66, 0x63, 0x6d, 0x54, 0x6f, 0x6b, - 0x65, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1e, 0x0a, 0x0a, - 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, - 0x52, 0x0a, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x22, 0x14, 0x0a, 0x12, - 0x46, 0x63, 0x6d, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, - 0x73, 0x70, 0x22, 0x50, 0x0a, 0x0e, 0x53, 0x65, 0x74, 0x41, 0x70, 0x70, 0x42, 0x61, 0x64, 0x67, - 0x65, 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, 0x12, 0x26, 0x0a, 0x0e, - 0x61, 0x70, 0x70, 0x55, 0x6e, 0x72, 0x65, 0x61, 0x64, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x05, 0x52, 0x0e, 0x61, 0x70, 0x70, 0x55, 0x6e, 0x72, 0x65, 0x61, 0x64, 0x43, - 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x11, 0x0a, 0x0f, 0x53, 0x65, 0x74, 0x41, 0x70, 0x70, 0x42, 0x61, - 0x64, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x32, 0xfa, 0x05, 0x0a, 0x05, 0x74, 0x68, 0x69, 0x72, - 0x64, 0x12, 0x50, 0x0a, 0x09, 0x50, 0x61, 0x72, 0x74, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x20, - 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x74, 0x68, - 0x69, 0x72, 0x64, 0x2e, 0x50, 0x61, 0x72, 0x74, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x52, 0x65, 0x71, - 0x1a, 0x21, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, - 0x74, 0x68, 0x69, 0x72, 0x64, 0x2e, 0x50, 0x61, 0x72, 0x74, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x52, - 0x65, 0x73, 0x70, 0x12, 0x4d, 0x0a, 0x08, 0x50, 0x61, 0x72, 0x74, 0x53, 0x69, 0x7a, 0x65, 0x12, - 0x1f, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x74, - 0x68, 0x69, 0x72, 0x64, 0x2e, 0x50, 0x61, 0x72, 0x74, 0x53, 0x69, 0x7a, 0x65, 0x52, 0x65, 0x71, - 0x1a, 0x20, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, - 0x74, 0x68, 0x69, 0x72, 0x64, 0x2e, 0x50, 0x61, 0x72, 0x74, 0x53, 0x69, 0x7a, 0x65, 0x52, 0x65, - 0x73, 0x70, 0x12, 0x7a, 0x0a, 0x17, 0x49, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x74, 0x65, 0x4d, 0x75, - 0x6c, 0x74, 0x69, 0x70, 0x61, 0x72, 0x74, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x2e, 0x2e, - 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x74, 0x68, 0x69, - 0x72, 0x64, 0x2e, 0x49, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x74, 0x65, 0x4d, 0x75, 0x6c, 0x74, 0x69, - 0x70, 0x61, 0x72, 0x74, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x65, 0x71, 0x1a, 0x2f, 0x2e, - 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x74, 0x68, 0x69, - 0x72, 0x64, 0x2e, 0x49, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x74, 0x65, 0x4d, 0x75, 0x6c, 0x74, 0x69, - 0x70, 0x61, 0x72, 0x74, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x65, 0x73, 0x70, 0x12, 0x4d, - 0x0a, 0x08, 0x41, 0x75, 0x74, 0x68, 0x53, 0x69, 0x67, 0x6e, 0x12, 0x1f, 0x2e, 0x4f, 0x70, 0x65, - 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x74, 0x68, 0x69, 0x72, 0x64, 0x2e, - 0x41, 0x75, 0x74, 0x68, 0x53, 0x69, 0x67, 0x6e, 0x52, 0x65, 0x71, 0x1a, 0x20, 0x2e, 0x4f, 0x70, - 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x74, 0x68, 0x69, 0x72, 0x64, - 0x2e, 0x41, 0x75, 0x74, 0x68, 0x53, 0x69, 0x67, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x12, 0x7a, 0x0a, - 0x17, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x61, - 0x72, 0x74, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x2e, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, - 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x74, 0x68, 0x69, 0x72, 0x64, 0x2e, 0x43, 0x6f, - 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x61, 0x72, 0x74, 0x55, - 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x65, 0x71, 0x1a, 0x2f, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, - 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x74, 0x68, 0x69, 0x72, 0x64, 0x2e, 0x43, 0x6f, - 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x61, 0x72, 0x74, 0x55, - 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x65, 0x73, 0x70, 0x12, 0x50, 0x0a, 0x09, 0x41, 0x63, 0x63, - 0x65, 0x73, 0x73, 0x55, 0x52, 0x4c, 0x12, 0x20, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, - 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x74, 0x68, 0x69, 0x72, 0x64, 0x2e, 0x41, 0x63, 0x63, 0x65, - 0x73, 0x73, 0x55, 0x52, 0x4c, 0x52, 0x65, 0x71, 0x1a, 0x21, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, - 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x74, 0x68, 0x69, 0x72, 0x64, 0x2e, 0x41, 0x63, - 0x63, 0x65, 0x73, 0x73, 0x55, 0x52, 0x4c, 0x52, 0x65, 0x73, 0x70, 0x12, 0x5f, 0x0a, 0x0e, 0x46, - 0x63, 0x6d, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x25, 0x2e, - 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x74, 0x68, 0x69, - 0x72, 0x64, 0x2e, 0x46, 0x63, 0x6d, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x6f, 0x6b, 0x65, - 0x6e, 0x52, 0x65, 0x71, 0x1a, 0x26, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, - 0x76, 0x65, 0x72, 0x2e, 0x74, 0x68, 0x69, 0x72, 0x64, 0x2e, 0x46, 0x63, 0x6d, 0x55, 0x70, 0x64, - 0x61, 0x74, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x12, 0x56, 0x0a, 0x0b, - 0x53, 0x65, 0x74, 0x41, 0x70, 0x70, 0x42, 0x61, 0x64, 0x67, 0x65, 0x12, 0x22, 0x2e, 0x4f, 0x70, - 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x74, 0x68, 0x69, 0x72, 0x64, - 0x2e, 0x53, 0x65, 0x74, 0x41, 0x70, 0x70, 0x42, 0x61, 0x64, 0x67, 0x65, 0x52, 0x65, 0x71, 0x1a, - 0x23, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x74, - 0x68, 0x69, 0x72, 0x64, 0x2e, 0x53, 0x65, 0x74, 0x41, 0x70, 0x70, 0x42, 0x61, 0x64, 0x67, 0x65, - 0x52, 0x65, 0x73, 0x70, 0x42, 0x35, 0x5a, 0x33, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, - 0x6f, 0x6d, 0x2f, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x44, 0x4b, 0x2f, 0x4f, 0x70, 0x65, - 0x6e, 0x2d, 0x49, 0x4d, 0x2d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2f, 0x70, 0x6b, 0x67, 0x2f, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x74, 0x68, 0x69, 0x72, 0x64, 0x62, 0x06, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x33, -} - -var ( - file_third_third_proto_rawDescOnce sync.Once - file_third_third_proto_rawDescData = file_third_third_proto_rawDesc -) - -func file_third_third_proto_rawDescGZIP() []byte { - file_third_third_proto_rawDescOnce.Do(func() { - file_third_third_proto_rawDescData = protoimpl.X.CompressGZIP(file_third_third_proto_rawDescData) - }) - return file_third_third_proto_rawDescData -} - -var file_third_third_proto_msgTypes = make([]protoimpl.MessageInfo, 20) -var file_third_third_proto_goTypes = []interface{}{ - (*KeyValues)(nil), // 0: OpenIMServer.third.KeyValues - (*SignPart)(nil), // 1: OpenIMServer.third.SignPart - (*AuthSignParts)(nil), // 2: OpenIMServer.third.AuthSignParts - (*PartLimitReq)(nil), // 3: OpenIMServer.third.PartLimitReq - (*PartLimitResp)(nil), // 4: OpenIMServer.third.PartLimitResp - (*PartSizeReq)(nil), // 5: OpenIMServer.third.PartSizeReq - (*PartSizeResp)(nil), // 6: OpenIMServer.third.PartSizeResp - (*InitiateMultipartUploadReq)(nil), // 7: OpenIMServer.third.InitiateMultipartUploadReq - (*UploadInfo)(nil), // 8: OpenIMServer.third.UploadInfo - (*InitiateMultipartUploadResp)(nil), // 9: OpenIMServer.third.InitiateMultipartUploadResp - (*AuthSignReq)(nil), // 10: OpenIMServer.third.AuthSignReq - (*AuthSignResp)(nil), // 11: OpenIMServer.third.AuthSignResp - (*CompleteMultipartUploadReq)(nil), // 12: OpenIMServer.third.CompleteMultipartUploadReq - (*CompleteMultipartUploadResp)(nil), // 13: OpenIMServer.third.CompleteMultipartUploadResp - (*AccessURLReq)(nil), // 14: OpenIMServer.third.AccessURLReq - (*AccessURLResp)(nil), // 15: OpenIMServer.third.AccessURLResp - (*FcmUpdateTokenReq)(nil), // 16: OpenIMServer.third.FcmUpdateTokenReq - (*FcmUpdateTokenResp)(nil), // 17: OpenIMServer.third.FcmUpdateTokenResp - (*SetAppBadgeReq)(nil), // 18: OpenIMServer.third.SetAppBadgeReq - (*SetAppBadgeResp)(nil), // 19: OpenIMServer.third.SetAppBadgeResp -} -var file_third_third_proto_depIdxs = []int32{ - 0, // 0: OpenIMServer.third.SignPart.query:type_name -> OpenIMServer.third.KeyValues - 0, // 1: OpenIMServer.third.SignPart.header:type_name -> OpenIMServer.third.KeyValues - 0, // 2: OpenIMServer.third.AuthSignParts.query:type_name -> OpenIMServer.third.KeyValues - 0, // 3: OpenIMServer.third.AuthSignParts.header:type_name -> OpenIMServer.third.KeyValues - 1, // 4: OpenIMServer.third.AuthSignParts.parts:type_name -> OpenIMServer.third.SignPart - 2, // 5: OpenIMServer.third.UploadInfo.sign:type_name -> OpenIMServer.third.AuthSignParts - 8, // 6: OpenIMServer.third.InitiateMultipartUploadResp.upload:type_name -> OpenIMServer.third.UploadInfo - 0, // 7: OpenIMServer.third.AuthSignResp.query:type_name -> OpenIMServer.third.KeyValues - 0, // 8: OpenIMServer.third.AuthSignResp.header:type_name -> OpenIMServer.third.KeyValues - 1, // 9: OpenIMServer.third.AuthSignResp.parts:type_name -> OpenIMServer.third.SignPart - 3, // 10: OpenIMServer.third.third.PartLimit:input_type -> OpenIMServer.third.PartLimitReq - 5, // 11: OpenIMServer.third.third.PartSize:input_type -> OpenIMServer.third.PartSizeReq - 7, // 12: OpenIMServer.third.third.InitiateMultipartUpload:input_type -> OpenIMServer.third.InitiateMultipartUploadReq - 10, // 13: OpenIMServer.third.third.AuthSign:input_type -> OpenIMServer.third.AuthSignReq - 12, // 14: OpenIMServer.third.third.CompleteMultipartUpload:input_type -> OpenIMServer.third.CompleteMultipartUploadReq - 14, // 15: OpenIMServer.third.third.AccessURL:input_type -> OpenIMServer.third.AccessURLReq - 16, // 16: OpenIMServer.third.third.FcmUpdateToken:input_type -> OpenIMServer.third.FcmUpdateTokenReq - 18, // 17: OpenIMServer.third.third.SetAppBadge:input_type -> OpenIMServer.third.SetAppBadgeReq - 4, // 18: OpenIMServer.third.third.PartLimit:output_type -> OpenIMServer.third.PartLimitResp - 6, // 19: OpenIMServer.third.third.PartSize:output_type -> OpenIMServer.third.PartSizeResp - 9, // 20: OpenIMServer.third.third.InitiateMultipartUpload:output_type -> OpenIMServer.third.InitiateMultipartUploadResp - 11, // 21: OpenIMServer.third.third.AuthSign:output_type -> OpenIMServer.third.AuthSignResp - 13, // 22: OpenIMServer.third.third.CompleteMultipartUpload:output_type -> OpenIMServer.third.CompleteMultipartUploadResp - 15, // 23: OpenIMServer.third.third.AccessURL:output_type -> OpenIMServer.third.AccessURLResp - 17, // 24: OpenIMServer.third.third.FcmUpdateToken:output_type -> OpenIMServer.third.FcmUpdateTokenResp - 19, // 25: OpenIMServer.third.third.SetAppBadge:output_type -> OpenIMServer.third.SetAppBadgeResp - 18, // [18:26] is the sub-list for method output_type - 10, // [10:18] is the sub-list for method input_type - 10, // [10:10] is the sub-list for extension type_name - 10, // [10:10] is the sub-list for extension extendee - 0, // [0:10] is the sub-list for field type_name -} - -func init() { file_third_third_proto_init() } -func file_third_third_proto_init() { - if File_third_third_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_third_third_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*KeyValues); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_third_third_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SignPart); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_third_third_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AuthSignParts); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_third_third_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PartLimitReq); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_third_third_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PartLimitResp); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_third_third_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PartSizeReq); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_third_third_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PartSizeResp); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_third_third_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*InitiateMultipartUploadReq); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_third_third_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UploadInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_third_third_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*InitiateMultipartUploadResp); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_third_third_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AuthSignReq); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_third_third_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AuthSignResp); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_third_third_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CompleteMultipartUploadReq); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_third_third_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CompleteMultipartUploadResp); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_third_third_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AccessURLReq); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_third_third_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AccessURLResp); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_third_third_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FcmUpdateTokenReq); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_third_third_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FcmUpdateTokenResp); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_third_third_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SetAppBadgeReq); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_third_third_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SetAppBadgeResp); 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{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_third_third_proto_rawDesc, - NumEnums: 0, - NumMessages: 20, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_third_third_proto_goTypes, - DependencyIndexes: file_third_third_proto_depIdxs, - MessageInfos: file_third_third_proto_msgTypes, - }.Build() - File_third_third_proto = out.File - file_third_third_proto_rawDesc = nil - file_third_third_proto_goTypes = nil - file_third_third_proto_depIdxs = nil -} - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConnInterface - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion6 - -// ThirdClient is the client API for Third service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type ThirdClient interface { - PartLimit(ctx context.Context, in *PartLimitReq, opts ...grpc.CallOption) (*PartLimitResp, error) - PartSize(ctx context.Context, in *PartSizeReq, opts ...grpc.CallOption) (*PartSizeResp, error) - InitiateMultipartUpload(ctx context.Context, in *InitiateMultipartUploadReq, opts ...grpc.CallOption) (*InitiateMultipartUploadResp, error) - AuthSign(ctx context.Context, in *AuthSignReq, opts ...grpc.CallOption) (*AuthSignResp, error) - CompleteMultipartUpload(ctx context.Context, in *CompleteMultipartUploadReq, opts ...grpc.CallOption) (*CompleteMultipartUploadResp, error) - AccessURL(ctx context.Context, in *AccessURLReq, opts ...grpc.CallOption) (*AccessURLResp, error) - FcmUpdateToken(ctx context.Context, in *FcmUpdateTokenReq, opts ...grpc.CallOption) (*FcmUpdateTokenResp, error) - SetAppBadge(ctx context.Context, in *SetAppBadgeReq, opts ...grpc.CallOption) (*SetAppBadgeResp, error) -} - -type thirdClient struct { - cc grpc.ClientConnInterface -} - -func NewThirdClient(cc grpc.ClientConnInterface) ThirdClient { - return &thirdClient{cc} -} - -func (c *thirdClient) PartLimit(ctx context.Context, in *PartLimitReq, opts ...grpc.CallOption) (*PartLimitResp, error) { - out := new(PartLimitResp) - err := c.cc.Invoke(ctx, "/OpenIMServer.third.third/PartLimit", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *thirdClient) PartSize(ctx context.Context, in *PartSizeReq, opts ...grpc.CallOption) (*PartSizeResp, error) { - out := new(PartSizeResp) - err := c.cc.Invoke(ctx, "/OpenIMServer.third.third/PartSize", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *thirdClient) InitiateMultipartUpload(ctx context.Context, in *InitiateMultipartUploadReq, opts ...grpc.CallOption) (*InitiateMultipartUploadResp, error) { - out := new(InitiateMultipartUploadResp) - err := c.cc.Invoke(ctx, "/OpenIMServer.third.third/InitiateMultipartUpload", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *thirdClient) AuthSign(ctx context.Context, in *AuthSignReq, opts ...grpc.CallOption) (*AuthSignResp, error) { - out := new(AuthSignResp) - err := c.cc.Invoke(ctx, "/OpenIMServer.third.third/AuthSign", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *thirdClient) CompleteMultipartUpload(ctx context.Context, in *CompleteMultipartUploadReq, opts ...grpc.CallOption) (*CompleteMultipartUploadResp, error) { - out := new(CompleteMultipartUploadResp) - err := c.cc.Invoke(ctx, "/OpenIMServer.third.third/CompleteMultipartUpload", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *thirdClient) AccessURL(ctx context.Context, in *AccessURLReq, opts ...grpc.CallOption) (*AccessURLResp, error) { - out := new(AccessURLResp) - err := c.cc.Invoke(ctx, "/OpenIMServer.third.third/AccessURL", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *thirdClient) FcmUpdateToken(ctx context.Context, in *FcmUpdateTokenReq, opts ...grpc.CallOption) (*FcmUpdateTokenResp, error) { - out := new(FcmUpdateTokenResp) - err := c.cc.Invoke(ctx, "/OpenIMServer.third.third/FcmUpdateToken", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *thirdClient) SetAppBadge(ctx context.Context, in *SetAppBadgeReq, opts ...grpc.CallOption) (*SetAppBadgeResp, error) { - out := new(SetAppBadgeResp) - err := c.cc.Invoke(ctx, "/OpenIMServer.third.third/SetAppBadge", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// ThirdServer is the server API for Third service. -type ThirdServer interface { - PartLimit(context.Context, *PartLimitReq) (*PartLimitResp, error) - PartSize(context.Context, *PartSizeReq) (*PartSizeResp, error) - InitiateMultipartUpload(context.Context, *InitiateMultipartUploadReq) (*InitiateMultipartUploadResp, error) - AuthSign(context.Context, *AuthSignReq) (*AuthSignResp, error) - CompleteMultipartUpload(context.Context, *CompleteMultipartUploadReq) (*CompleteMultipartUploadResp, error) - AccessURL(context.Context, *AccessURLReq) (*AccessURLResp, error) - FcmUpdateToken(context.Context, *FcmUpdateTokenReq) (*FcmUpdateTokenResp, error) - SetAppBadge(context.Context, *SetAppBadgeReq) (*SetAppBadgeResp, error) -} - -// UnimplementedThirdServer can be embedded to have forward compatible implementations. -type UnimplementedThirdServer struct { -} - -func (*UnimplementedThirdServer) PartLimit(context.Context, *PartLimitReq) (*PartLimitResp, error) { - return nil, status.Errorf(codes.Unimplemented, "method PartLimit not implemented") -} -func (*UnimplementedThirdServer) PartSize(context.Context, *PartSizeReq) (*PartSizeResp, error) { - return nil, status.Errorf(codes.Unimplemented, "method PartSize not implemented") -} -func (*UnimplementedThirdServer) InitiateMultipartUpload(context.Context, *InitiateMultipartUploadReq) (*InitiateMultipartUploadResp, error) { - return nil, status.Errorf(codes.Unimplemented, "method InitiateMultipartUpload not implemented") -} -func (*UnimplementedThirdServer) AuthSign(context.Context, *AuthSignReq) (*AuthSignResp, error) { - return nil, status.Errorf(codes.Unimplemented, "method AuthSign not implemented") -} -func (*UnimplementedThirdServer) CompleteMultipartUpload(context.Context, *CompleteMultipartUploadReq) (*CompleteMultipartUploadResp, error) { - return nil, status.Errorf(codes.Unimplemented, "method CompleteMultipartUpload not implemented") -} -func (*UnimplementedThirdServer) AccessURL(context.Context, *AccessURLReq) (*AccessURLResp, error) { - return nil, status.Errorf(codes.Unimplemented, "method AccessURL not implemented") -} -func (*UnimplementedThirdServer) FcmUpdateToken(context.Context, *FcmUpdateTokenReq) (*FcmUpdateTokenResp, error) { - return nil, status.Errorf(codes.Unimplemented, "method FcmUpdateToken not implemented") -} -func (*UnimplementedThirdServer) SetAppBadge(context.Context, *SetAppBadgeReq) (*SetAppBadgeResp, error) { - return nil, status.Errorf(codes.Unimplemented, "method SetAppBadge not implemented") -} - -func RegisterThirdServer(s *grpc.Server, srv ThirdServer) { - s.RegisterService(&_Third_serviceDesc, srv) -} - -func _Third_PartLimit_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(PartLimitReq) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ThirdServer).PartLimit(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/OpenIMServer.third.third/PartLimit", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ThirdServer).PartLimit(ctx, req.(*PartLimitReq)) - } - return interceptor(ctx, in, info, handler) -} - -func _Third_PartSize_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(PartSizeReq) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ThirdServer).PartSize(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/OpenIMServer.third.third/PartSize", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ThirdServer).PartSize(ctx, req.(*PartSizeReq)) - } - return interceptor(ctx, in, info, handler) -} - -func _Third_InitiateMultipartUpload_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(InitiateMultipartUploadReq) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ThirdServer).InitiateMultipartUpload(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/OpenIMServer.third.third/InitiateMultipartUpload", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ThirdServer).InitiateMultipartUpload(ctx, req.(*InitiateMultipartUploadReq)) - } - return interceptor(ctx, in, info, handler) -} - -func _Third_AuthSign_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(AuthSignReq) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ThirdServer).AuthSign(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/OpenIMServer.third.third/AuthSign", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ThirdServer).AuthSign(ctx, req.(*AuthSignReq)) - } - return interceptor(ctx, in, info, handler) -} - -func _Third_CompleteMultipartUpload_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(CompleteMultipartUploadReq) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ThirdServer).CompleteMultipartUpload(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/OpenIMServer.third.third/CompleteMultipartUpload", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ThirdServer).CompleteMultipartUpload(ctx, req.(*CompleteMultipartUploadReq)) - } - return interceptor(ctx, in, info, handler) -} - -func _Third_AccessURL_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(AccessURLReq) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ThirdServer).AccessURL(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/OpenIMServer.third.third/AccessURL", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ThirdServer).AccessURL(ctx, req.(*AccessURLReq)) - } - return interceptor(ctx, in, info, handler) -} - -func _Third_FcmUpdateToken_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(FcmUpdateTokenReq) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ThirdServer).FcmUpdateToken(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/OpenIMServer.third.third/FcmUpdateToken", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ThirdServer).FcmUpdateToken(ctx, req.(*FcmUpdateTokenReq)) - } - return interceptor(ctx, in, info, handler) -} - -func _Third_SetAppBadge_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(SetAppBadgeReq) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ThirdServer).SetAppBadge(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/OpenIMServer.third.third/SetAppBadge", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ThirdServer).SetAppBadge(ctx, req.(*SetAppBadgeReq)) - } - return interceptor(ctx, in, info, handler) -} - -var _Third_serviceDesc = grpc.ServiceDesc{ - ServiceName: "OpenIMServer.third.third", - HandlerType: (*ThirdServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "PartLimit", - Handler: _Third_PartLimit_Handler, - }, - { - MethodName: "PartSize", - Handler: _Third_PartSize_Handler, - }, - { - MethodName: "InitiateMultipartUpload", - Handler: _Third_InitiateMultipartUpload_Handler, - }, - { - MethodName: "AuthSign", - Handler: _Third_AuthSign_Handler, - }, - { - MethodName: "CompleteMultipartUpload", - Handler: _Third_CompleteMultipartUpload_Handler, - }, - { - MethodName: "AccessURL", - Handler: _Third_AccessURL_Handler, - }, - { - MethodName: "FcmUpdateToken", - Handler: _Third_FcmUpdateToken_Handler, - }, - { - MethodName: "SetAppBadge", - Handler: _Third_SetAppBadge_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "third/third.proto", -} diff --git a/pkg/proto/third/third.proto b/pkg/proto/third/third.proto deleted file mode 100644 index 3b2456983..000000000 --- a/pkg/proto/third/third.proto +++ /dev/null @@ -1,144 +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. - -syntax = "proto3"; -package OpenIMServer.third; -option go_package = "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/third"; - -message KeyValues { - string key = 1; - repeated string values = 2; -} - -message SignPart { - int32 partNumber = 1; - string url = 2; - repeated KeyValues query = 3; - repeated KeyValues header = 4; -} - -message AuthSignParts { - string url = 1; - repeated KeyValues query = 2; - repeated KeyValues header = 3; - repeated SignPart parts = 4; -} - -message PartLimitReq { -} - -message PartLimitResp { - int64 minPartSize = 1; - int64 maxPartSize = 2; - int32 maxNumSize = 3; -} - -message PartSizeReq { - int64 size = 1; -} - -message PartSizeResp { - int64 size = 2; -} - -message InitiateMultipartUploadReq { - string hash = 1; - int64 size = 2; - int64 partSize = 3; - int32 maxParts = 4; - string cause = 5; - string name = 6; - string contentType = 7; -} - -message UploadInfo { - string uploadID = 1; - int64 partSize = 2; - AuthSignParts sign = 3; - int64 expireTime = 4; -} - -message InitiateMultipartUploadResp { - string url = 1; - UploadInfo upload = 2; -} - -message AuthSignReq { - string uploadID = 1; - repeated int32 partNumbers = 2; -} - -message AuthSignResp { - string url = 1; - repeated KeyValues query = 2; - repeated KeyValues header = 3; - repeated SignPart parts = 4; -} - -message CompleteMultipartUploadReq { - string uploadID = 1; - repeated string parts = 2; - string name = 3; - string contentType = 4; - string cause = 5; -} - -message CompleteMultipartUploadResp { - string url = 1; -} - -message AccessURLReq { - string name = 1; -} - -message AccessURLResp { - string url = 1; - int64 expireTime = 2; -} - -message FcmUpdateTokenReq { - int32 platformID = 1; - string fcmToken = 2; - string account = 3; - int64 expireTime = 4; -} - -message FcmUpdateTokenResp { -} - -message SetAppBadgeReq { - string userID = 1; - int32 appUnreadCount = 2; -} - -message SetAppBadgeResp { -} - -service third { - rpc PartLimit(PartLimitReq) returns(PartLimitResp); - rpc PartSize(PartSizeReq) returns(PartSizeResp); - rpc InitiateMultipartUpload(InitiateMultipartUploadReq) returns(InitiateMultipartUploadResp); - rpc AuthSign(AuthSignReq) returns(AuthSignResp); - rpc CompleteMultipartUpload(CompleteMultipartUploadReq) returns(CompleteMultipartUploadResp); - rpc AccessURL(AccessURLReq) returns(AccessURLResp); - - rpc FcmUpdateToken(FcmUpdateTokenReq) returns(FcmUpdateTokenResp); - rpc SetAppBadge(SetAppBadgeReq) returns(SetAppBadgeResp); -} - - - - - - diff --git a/pkg/proto/user/user.go b/pkg/proto/user/user.go deleted file mode 100644 index 06f07cb6e..000000000 --- a/pkg/proto/user/user.go +++ /dev/null @@ -1,161 +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. - -package user - -import "github.com/OpenIMSDK/Open-IM-Server/pkg/errs" - -func (x *GetAllUserIDReq) Check() error { - if x.Pagination == nil { - return errs.ErrArgs.Wrap("pagination is empty") - } - if x.Pagination.PageNumber < 1 { - return errs.ErrArgs.Wrap("pageNumber is invalid") - } - return nil -} - -func (x *AccountCheckReq) Check() error { - if x.CheckUserIDs == nil { - return errs.ErrArgs.Wrap("CheckUserIDs is empty") - } - return nil -} - -func (x *GetDesignateUsersReq) Check() error { - if x.UserIDs == nil { - return errs.ErrArgs.Wrap("UserIDs is empty") - } - return nil -} - -func (x *UpdateUserInfoReq) Check() error { - if x.UserInfo == nil { - return errs.ErrArgs.Wrap("UserInfo is empty") - } - if x.UserInfo.UserID == "" { - return errs.ErrArgs.Wrap("UserID is empty") - } - return nil -} - -func (x *SetGlobalRecvMessageOptReq) Check() error { - if x.GlobalRecvMsgOpt > 2 || x.GlobalRecvMsgOpt < 0 { - return errs.ErrArgs.Wrap("GlobalRecvMsgOpt is invalid") - } - if x.UserID == "" { - return errs.ErrArgs.Wrap("UserID is empty") - } - return nil -} - -func (x *SetConversationReq) Check() error { - if err := x.Conversation.Check(); err != nil { - return err - } - if x.NotificationType < 1 || x.NotificationType > 3 { - return errs.ErrArgs.Wrap("NotificationType is invalid") - } - return nil -} - -func (x *SetRecvMsgOptReq) Check() error { - if x.OwnerUserID == "" { - return errs.ErrArgs.Wrap("OwnerUserID is empty") - } - if x.ConversationID == "" { - return errs.ErrArgs.Wrap("ConversationID is empty") - } - if x.RecvMsgOpt < 0 || x.RecvMsgOpt > 2 { - return errs.ErrArgs.Wrap("RecvMsgOpt is invalid") - } - if x.NotificationType < 1 || x.NotificationType > 3 { - return errs.ErrArgs.Wrap("NotificationType is invalid") - } - return nil -} - -func (x *GetConversationReq) Check() error { - if x.OwnerUserID == "" { - return errs.ErrArgs.Wrap("OwnerUserID is empty") - } - if x.ConversationID == "" { - return errs.ErrArgs.Wrap("ConversationID is empty") - } - return nil -} - -func (x *GetConversationsReq) Check() error { - if x.OwnerUserID == "" { - return errs.ErrArgs.Wrap("OwnerUserID is empty") - } - if x.ConversationIDs == nil { - return errs.ErrArgs.Wrap("ConversationIDs is empty") - } - return nil -} - -func (x *GetAllConversationsReq) Check() error { - if x.OwnerUserID == "" { - return errs.ErrArgs.Wrap("OwnerUserID is empty") - } - return nil -} - -func (x *BatchSetConversationsReq) Check() error { - if x.OwnerUserID == "" { - return errs.ErrArgs.Wrap("OwnerUserID is empty") - } - if x.Conversations == nil { - return errs.ErrArgs.Wrap("ConversationIDs is empty") - } - if x.NotificationType < 1 || x.NotificationType > 3 { - return errs.ErrArgs.Wrap("NotificationType is invalid") - } - return nil -} - -func (x *GetPaginationUsersReq) Check() error { - if x.Pagination == nil { - return errs.ErrArgs.Wrap("pagination is empty") - } - if x.Pagination.PageNumber < 1 { - return errs.ErrArgs.Wrap("pageNumber is invalid") - } - return nil -} - -func (x *UserRegisterReq) Check() error { - if x.Users == nil { - return errs.ErrArgs.Wrap("Users is empty") - } - return nil -} - -func (x *GetGlobalRecvMessageOptReq) Check() error { - if x.UserID == "" { - return errs.ErrArgs.Wrap("UserID is empty") - } - return nil -} - -func (x *UserRegisterCountReq) Check() error { - if x.Start <= 0 { - return errs.ErrArgs.Wrap("start is invalid") - } - if x.End <= 0 { - return errs.ErrArgs.Wrap("end is invalid") - } - return nil -} diff --git a/pkg/proto/user/user.pb.go b/pkg/proto/user/user.pb.go deleted file mode 100644 index 5046505db..000000000 --- a/pkg/proto/user/user.pb.go +++ /dev/null @@ -1,2763 +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. - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.29.1 -// protoc v4.22.0 -// source: user/user.proto - -package user - -import ( - context "context" - conversation "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/conversation" - sdkws "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/sdkws" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type GetAllUserIDReq struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Pagination *sdkws.RequestPagination `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination"` -} - -func (x *GetAllUserIDReq) Reset() { - *x = GetAllUserIDReq{} - if protoimpl.UnsafeEnabled { - mi := &file_user_user_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetAllUserIDReq) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetAllUserIDReq) ProtoMessage() {} - -func (x *GetAllUserIDReq) ProtoReflect() protoreflect.Message { - mi := &file_user_user_proto_msgTypes[0] - 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 GetAllUserIDReq.ProtoReflect.Descriptor instead. -func (*GetAllUserIDReq) Descriptor() ([]byte, []int) { - return file_user_user_proto_rawDescGZIP(), []int{0} -} - -func (x *GetAllUserIDReq) GetPagination() *sdkws.RequestPagination { - if x != nil { - return x.Pagination - } - return nil -} - -type GetAllUserIDResp struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Total int32 `protobuf:"varint,1,opt,name=total,proto3" json:"total"` - UserIDs []string `protobuf:"bytes,2,rep,name=userIDs,proto3" json:"userIDs"` -} - -func (x *GetAllUserIDResp) Reset() { - *x = GetAllUserIDResp{} - if protoimpl.UnsafeEnabled { - mi := &file_user_user_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetAllUserIDResp) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetAllUserIDResp) ProtoMessage() {} - -func (x *GetAllUserIDResp) ProtoReflect() protoreflect.Message { - mi := &file_user_user_proto_msgTypes[1] - 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 GetAllUserIDResp.ProtoReflect.Descriptor instead. -func (*GetAllUserIDResp) Descriptor() ([]byte, []int) { - return file_user_user_proto_rawDescGZIP(), []int{1} -} - -func (x *GetAllUserIDResp) GetTotal() int32 { - if x != nil { - return x.Total - } - return 0 -} - -func (x *GetAllUserIDResp) GetUserIDs() []string { - if x != nil { - return x.UserIDs - } - return nil -} - -type AccountCheckReq struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - CheckUserIDs []string `protobuf:"bytes,1,rep,name=checkUserIDs,proto3" json:"checkUserIDs"` -} - -func (x *AccountCheckReq) Reset() { - *x = AccountCheckReq{} - if protoimpl.UnsafeEnabled { - mi := &file_user_user_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *AccountCheckReq) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*AccountCheckReq) ProtoMessage() {} - -func (x *AccountCheckReq) ProtoReflect() protoreflect.Message { - mi := &file_user_user_proto_msgTypes[2] - 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 AccountCheckReq.ProtoReflect.Descriptor instead. -func (*AccountCheckReq) Descriptor() ([]byte, []int) { - return file_user_user_proto_rawDescGZIP(), []int{2} -} - -func (x *AccountCheckReq) GetCheckUserIDs() []string { - if x != nil { - return x.CheckUserIDs - } - return nil -} - -type AccountCheckResp struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Results []*AccountCheckRespSingleUserStatus `protobuf:"bytes,1,rep,name=results,proto3" json:"results"` -} - -func (x *AccountCheckResp) Reset() { - *x = AccountCheckResp{} - if protoimpl.UnsafeEnabled { - mi := &file_user_user_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *AccountCheckResp) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*AccountCheckResp) ProtoMessage() {} - -func (x *AccountCheckResp) ProtoReflect() protoreflect.Message { - mi := &file_user_user_proto_msgTypes[3] - 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 AccountCheckResp.ProtoReflect.Descriptor instead. -func (*AccountCheckResp) Descriptor() ([]byte, []int) { - return file_user_user_proto_rawDescGZIP(), []int{3} -} - -func (x *AccountCheckResp) GetResults() []*AccountCheckRespSingleUserStatus { - if x != nil { - return x.Results - } - return nil -} - -type GetDesignateUsersReq struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - UserIDs []string `protobuf:"bytes,1,rep,name=userIDs,proto3" json:"userIDs"` -} - -func (x *GetDesignateUsersReq) Reset() { - *x = GetDesignateUsersReq{} - if protoimpl.UnsafeEnabled { - mi := &file_user_user_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetDesignateUsersReq) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetDesignateUsersReq) ProtoMessage() {} - -func (x *GetDesignateUsersReq) ProtoReflect() protoreflect.Message { - mi := &file_user_user_proto_msgTypes[4] - 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 GetDesignateUsersReq.ProtoReflect.Descriptor instead. -func (*GetDesignateUsersReq) Descriptor() ([]byte, []int) { - return file_user_user_proto_rawDescGZIP(), []int{4} -} - -func (x *GetDesignateUsersReq) GetUserIDs() []string { - if x != nil { - return x.UserIDs - } - return nil -} - -type GetDesignateUsersResp struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - UsersInfo []*sdkws.UserInfo `protobuf:"bytes,1,rep,name=usersInfo,proto3" json:"usersInfo"` -} - -func (x *GetDesignateUsersResp) Reset() { - *x = GetDesignateUsersResp{} - if protoimpl.UnsafeEnabled { - mi := &file_user_user_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetDesignateUsersResp) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetDesignateUsersResp) ProtoMessage() {} - -func (x *GetDesignateUsersResp) ProtoReflect() protoreflect.Message { - mi := &file_user_user_proto_msgTypes[5] - 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 GetDesignateUsersResp.ProtoReflect.Descriptor instead. -func (*GetDesignateUsersResp) Descriptor() ([]byte, []int) { - return file_user_user_proto_rawDescGZIP(), []int{5} -} - -func (x *GetDesignateUsersResp) GetUsersInfo() []*sdkws.UserInfo { - if x != nil { - return x.UsersInfo - } - return nil -} - -type UpdateUserInfoReq struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - UserInfo *sdkws.UserInfo `protobuf:"bytes,1,opt,name=userInfo,proto3" json:"userInfo"` -} - -func (x *UpdateUserInfoReq) Reset() { - *x = UpdateUserInfoReq{} - if protoimpl.UnsafeEnabled { - mi := &file_user_user_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *UpdateUserInfoReq) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*UpdateUserInfoReq) ProtoMessage() {} - -func (x *UpdateUserInfoReq) ProtoReflect() protoreflect.Message { - mi := &file_user_user_proto_msgTypes[6] - 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 UpdateUserInfoReq.ProtoReflect.Descriptor instead. -func (*UpdateUserInfoReq) Descriptor() ([]byte, []int) { - return file_user_user_proto_rawDescGZIP(), []int{6} -} - -func (x *UpdateUserInfoReq) GetUserInfo() *sdkws.UserInfo { - if x != nil { - return x.UserInfo - } - return nil -} - -type UpdateUserInfoResp struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *UpdateUserInfoResp) Reset() { - *x = UpdateUserInfoResp{} - if protoimpl.UnsafeEnabled { - mi := &file_user_user_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *UpdateUserInfoResp) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*UpdateUserInfoResp) ProtoMessage() {} - -func (x *UpdateUserInfoResp) ProtoReflect() protoreflect.Message { - mi := &file_user_user_proto_msgTypes[7] - 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 UpdateUserInfoResp.ProtoReflect.Descriptor instead. -func (*UpdateUserInfoResp) Descriptor() ([]byte, []int) { - return file_user_user_proto_rawDescGZIP(), []int{7} -} - -type SetGlobalRecvMessageOptReq struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - UserID string `protobuf:"bytes,1,opt,name=userID,proto3" json:"userID"` - GlobalRecvMsgOpt int32 `protobuf:"varint,3,opt,name=globalRecvMsgOpt,proto3" json:"globalRecvMsgOpt"` -} - -func (x *SetGlobalRecvMessageOptReq) Reset() { - *x = SetGlobalRecvMessageOptReq{} - if protoimpl.UnsafeEnabled { - mi := &file_user_user_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SetGlobalRecvMessageOptReq) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SetGlobalRecvMessageOptReq) ProtoMessage() {} - -func (x *SetGlobalRecvMessageOptReq) ProtoReflect() protoreflect.Message { - mi := &file_user_user_proto_msgTypes[8] - 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 SetGlobalRecvMessageOptReq.ProtoReflect.Descriptor instead. -func (*SetGlobalRecvMessageOptReq) Descriptor() ([]byte, []int) { - return file_user_user_proto_rawDescGZIP(), []int{8} -} - -func (x *SetGlobalRecvMessageOptReq) GetUserID() string { - if x != nil { - return x.UserID - } - return "" -} - -func (x *SetGlobalRecvMessageOptReq) GetGlobalRecvMsgOpt() int32 { - if x != nil { - return x.GlobalRecvMsgOpt - } - return 0 -} - -type SetGlobalRecvMessageOptResp struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *SetGlobalRecvMessageOptResp) Reset() { - *x = SetGlobalRecvMessageOptResp{} - if protoimpl.UnsafeEnabled { - mi := &file_user_user_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SetGlobalRecvMessageOptResp) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SetGlobalRecvMessageOptResp) ProtoMessage() {} - -func (x *SetGlobalRecvMessageOptResp) ProtoReflect() protoreflect.Message { - mi := &file_user_user_proto_msgTypes[9] - 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 SetGlobalRecvMessageOptResp.ProtoReflect.Descriptor instead. -func (*SetGlobalRecvMessageOptResp) Descriptor() ([]byte, []int) { - return file_user_user_proto_rawDescGZIP(), []int{9} -} - -type SetConversationReq struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Conversation *conversation.Conversation `protobuf:"bytes,1,opt,name=conversation,proto3" json:"conversation"` - NotificationType int32 `protobuf:"varint,2,opt,name=notificationType,proto3" json:"notificationType"` - OperationID string `protobuf:"bytes,3,opt,name=operationID,proto3" json:"operationID"` -} - -func (x *SetConversationReq) Reset() { - *x = SetConversationReq{} - if protoimpl.UnsafeEnabled { - mi := &file_user_user_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SetConversationReq) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SetConversationReq) ProtoMessage() {} - -func (x *SetConversationReq) ProtoReflect() protoreflect.Message { - mi := &file_user_user_proto_msgTypes[10] - 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 SetConversationReq.ProtoReflect.Descriptor instead. -func (*SetConversationReq) Descriptor() ([]byte, []int) { - return file_user_user_proto_rawDescGZIP(), []int{10} -} - -func (x *SetConversationReq) GetConversation() *conversation.Conversation { - if x != nil { - return x.Conversation - } - return nil -} - -func (x *SetConversationReq) GetNotificationType() int32 { - if x != nil { - return x.NotificationType - } - return 0 -} - -func (x *SetConversationReq) GetOperationID() string { - if x != nil { - return x.OperationID - } - return "" -} - -type SetConversationResp struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *SetConversationResp) Reset() { - *x = SetConversationResp{} - if protoimpl.UnsafeEnabled { - mi := &file_user_user_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SetConversationResp) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SetConversationResp) ProtoMessage() {} - -func (x *SetConversationResp) ProtoReflect() protoreflect.Message { - mi := &file_user_user_proto_msgTypes[11] - 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 SetConversationResp.ProtoReflect.Descriptor instead. -func (*SetConversationResp) Descriptor() ([]byte, []int) { - return file_user_user_proto_rawDescGZIP(), []int{11} -} - -type SetRecvMsgOptReq struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - OwnerUserID string `protobuf:"bytes,1,opt,name=ownerUserID,proto3" json:"ownerUserID"` - ConversationID string `protobuf:"bytes,2,opt,name=conversationID,proto3" json:"conversationID"` - RecvMsgOpt int32 `protobuf:"varint,3,opt,name=recvMsgOpt,proto3" json:"recvMsgOpt"` - NotificationType int32 `protobuf:"varint,4,opt,name=notificationType,proto3" json:"notificationType"` - OperationID string `protobuf:"bytes,5,opt,name=operationID,proto3" json:"operationID"` -} - -func (x *SetRecvMsgOptReq) Reset() { - *x = SetRecvMsgOptReq{} - if protoimpl.UnsafeEnabled { - mi := &file_user_user_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SetRecvMsgOptReq) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SetRecvMsgOptReq) ProtoMessage() {} - -func (x *SetRecvMsgOptReq) ProtoReflect() protoreflect.Message { - mi := &file_user_user_proto_msgTypes[12] - 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 SetRecvMsgOptReq.ProtoReflect.Descriptor instead. -func (*SetRecvMsgOptReq) Descriptor() ([]byte, []int) { - return file_user_user_proto_rawDescGZIP(), []int{12} -} - -func (x *SetRecvMsgOptReq) GetOwnerUserID() string { - if x != nil { - return x.OwnerUserID - } - return "" -} - -func (x *SetRecvMsgOptReq) GetConversationID() string { - if x != nil { - return x.ConversationID - } - return "" -} - -func (x *SetRecvMsgOptReq) GetRecvMsgOpt() int32 { - if x != nil { - return x.RecvMsgOpt - } - return 0 -} - -func (x *SetRecvMsgOptReq) GetNotificationType() int32 { - if x != nil { - return x.NotificationType - } - return 0 -} - -func (x *SetRecvMsgOptReq) GetOperationID() string { - if x != nil { - return x.OperationID - } - return "" -} - -type SetRecvMsgOptResp struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *SetRecvMsgOptResp) Reset() { - *x = SetRecvMsgOptResp{} - if protoimpl.UnsafeEnabled { - mi := &file_user_user_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SetRecvMsgOptResp) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SetRecvMsgOptResp) ProtoMessage() {} - -func (x *SetRecvMsgOptResp) ProtoReflect() protoreflect.Message { - mi := &file_user_user_proto_msgTypes[13] - 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 SetRecvMsgOptResp.ProtoReflect.Descriptor instead. -func (*SetRecvMsgOptResp) Descriptor() ([]byte, []int) { - return file_user_user_proto_rawDescGZIP(), []int{13} -} - -type GetConversationReq struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - ConversationID string `protobuf:"bytes,1,opt,name=conversationID,proto3" json:"conversationID"` - OwnerUserID string `protobuf:"bytes,2,opt,name=ownerUserID,proto3" json:"ownerUserID"` - OperationID string `protobuf:"bytes,3,opt,name=operationID,proto3" json:"operationID"` -} - -func (x *GetConversationReq) Reset() { - *x = GetConversationReq{} - if protoimpl.UnsafeEnabled { - mi := &file_user_user_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetConversationReq) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetConversationReq) ProtoMessage() {} - -func (x *GetConversationReq) ProtoReflect() protoreflect.Message { - mi := &file_user_user_proto_msgTypes[14] - 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 GetConversationReq.ProtoReflect.Descriptor instead. -func (*GetConversationReq) Descriptor() ([]byte, []int) { - return file_user_user_proto_rawDescGZIP(), []int{14} -} - -func (x *GetConversationReq) GetConversationID() string { - if x != nil { - return x.ConversationID - } - return "" -} - -func (x *GetConversationReq) GetOwnerUserID() string { - if x != nil { - return x.OwnerUserID - } - return "" -} - -func (x *GetConversationReq) GetOperationID() string { - if x != nil { - return x.OperationID - } - return "" -} - -type GetConversationResp struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Conversation *conversation.Conversation `protobuf:"bytes,2,opt,name=conversation,proto3" json:"conversation"` -} - -func (x *GetConversationResp) Reset() { - *x = GetConversationResp{} - if protoimpl.UnsafeEnabled { - mi := &file_user_user_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetConversationResp) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetConversationResp) ProtoMessage() {} - -func (x *GetConversationResp) ProtoReflect() protoreflect.Message { - mi := &file_user_user_proto_msgTypes[15] - 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 GetConversationResp.ProtoReflect.Descriptor instead. -func (*GetConversationResp) Descriptor() ([]byte, []int) { - return file_user_user_proto_rawDescGZIP(), []int{15} -} - -func (x *GetConversationResp) GetConversation() *conversation.Conversation { - if x != nil { - return x.Conversation - } - return nil -} - -type GetConversationsReq struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - OwnerUserID string `protobuf:"bytes,1,opt,name=ownerUserID,proto3" json:"ownerUserID"` - ConversationIDs []string `protobuf:"bytes,2,rep,name=conversationIDs,proto3" json:"conversationIDs"` - OperationID string `protobuf:"bytes,3,opt,name=operationID,proto3" json:"operationID"` -} - -func (x *GetConversationsReq) Reset() { - *x = GetConversationsReq{} - if protoimpl.UnsafeEnabled { - mi := &file_user_user_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetConversationsReq) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetConversationsReq) ProtoMessage() {} - -func (x *GetConversationsReq) ProtoReflect() protoreflect.Message { - mi := &file_user_user_proto_msgTypes[16] - 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 GetConversationsReq.ProtoReflect.Descriptor instead. -func (*GetConversationsReq) Descriptor() ([]byte, []int) { - return file_user_user_proto_rawDescGZIP(), []int{16} -} - -func (x *GetConversationsReq) GetOwnerUserID() string { - if x != nil { - return x.OwnerUserID - } - return "" -} - -func (x *GetConversationsReq) GetConversationIDs() []string { - if x != nil { - return x.ConversationIDs - } - return nil -} - -func (x *GetConversationsReq) GetOperationID() string { - if x != nil { - return x.OperationID - } - return "" -} - -type GetConversationsResp struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Conversations []*conversation.Conversation `protobuf:"bytes,2,rep,name=conversations,proto3" json:"conversations"` -} - -func (x *GetConversationsResp) Reset() { - *x = GetConversationsResp{} - if protoimpl.UnsafeEnabled { - mi := &file_user_user_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetConversationsResp) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetConversationsResp) ProtoMessage() {} - -func (x *GetConversationsResp) ProtoReflect() protoreflect.Message { - mi := &file_user_user_proto_msgTypes[17] - 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 GetConversationsResp.ProtoReflect.Descriptor instead. -func (*GetConversationsResp) Descriptor() ([]byte, []int) { - return file_user_user_proto_rawDescGZIP(), []int{17} -} - -func (x *GetConversationsResp) GetConversations() []*conversation.Conversation { - if x != nil { - return x.Conversations - } - return nil -} - -type GetAllConversationsReq struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - OwnerUserID string `protobuf:"bytes,1,opt,name=ownerUserID,proto3" json:"ownerUserID"` - OperationID string `protobuf:"bytes,2,opt,name=operationID,proto3" json:"operationID"` -} - -func (x *GetAllConversationsReq) Reset() { - *x = GetAllConversationsReq{} - if protoimpl.UnsafeEnabled { - mi := &file_user_user_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetAllConversationsReq) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetAllConversationsReq) ProtoMessage() {} - -func (x *GetAllConversationsReq) ProtoReflect() protoreflect.Message { - mi := &file_user_user_proto_msgTypes[18] - 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 GetAllConversationsReq.ProtoReflect.Descriptor instead. -func (*GetAllConversationsReq) Descriptor() ([]byte, []int) { - return file_user_user_proto_rawDescGZIP(), []int{18} -} - -func (x *GetAllConversationsReq) GetOwnerUserID() string { - if x != nil { - return x.OwnerUserID - } - return "" -} - -func (x *GetAllConversationsReq) GetOperationID() string { - if x != nil { - return x.OperationID - } - return "" -} - -type GetAllConversationsResp struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Conversations []*conversation.Conversation `protobuf:"bytes,2,rep,name=conversations,proto3" json:"conversations"` -} - -func (x *GetAllConversationsResp) Reset() { - *x = GetAllConversationsResp{} - if protoimpl.UnsafeEnabled { - mi := &file_user_user_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetAllConversationsResp) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetAllConversationsResp) ProtoMessage() {} - -func (x *GetAllConversationsResp) ProtoReflect() protoreflect.Message { - mi := &file_user_user_proto_msgTypes[19] - 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 GetAllConversationsResp.ProtoReflect.Descriptor instead. -func (*GetAllConversationsResp) Descriptor() ([]byte, []int) { - return file_user_user_proto_rawDescGZIP(), []int{19} -} - -func (x *GetAllConversationsResp) GetConversations() []*conversation.Conversation { - if x != nil { - return x.Conversations - } - return nil -} - -type BatchSetConversationsReq struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Conversations []*conversation.Conversation `protobuf:"bytes,1,rep,name=conversations,proto3" json:"conversations"` - OwnerUserID string `protobuf:"bytes,2,opt,name=OwnerUserID,proto3" json:"OwnerUserID"` - NotificationType int32 `protobuf:"varint,3,opt,name=notificationType,proto3" json:"notificationType"` - OperationID string `protobuf:"bytes,4,opt,name=OperationID,proto3" json:"OperationID"` -} - -func (x *BatchSetConversationsReq) Reset() { - *x = BatchSetConversationsReq{} - if protoimpl.UnsafeEnabled { - mi := &file_user_user_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *BatchSetConversationsReq) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*BatchSetConversationsReq) ProtoMessage() {} - -func (x *BatchSetConversationsReq) ProtoReflect() protoreflect.Message { - mi := &file_user_user_proto_msgTypes[20] - 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 BatchSetConversationsReq.ProtoReflect.Descriptor instead. -func (*BatchSetConversationsReq) Descriptor() ([]byte, []int) { - return file_user_user_proto_rawDescGZIP(), []int{20} -} - -func (x *BatchSetConversationsReq) GetConversations() []*conversation.Conversation { - if x != nil { - return x.Conversations - } - return nil -} - -func (x *BatchSetConversationsReq) GetOwnerUserID() string { - if x != nil { - return x.OwnerUserID - } - return "" -} - -func (x *BatchSetConversationsReq) GetNotificationType() int32 { - if x != nil { - return x.NotificationType - } - return 0 -} - -func (x *BatchSetConversationsReq) GetOperationID() string { - if x != nil { - return x.OperationID - } - return "" -} - -type BatchSetConversationsResp struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Success []string `protobuf:"bytes,2,rep,name=Success,proto3" json:"Success"` - Failed []string `protobuf:"bytes,3,rep,name=Failed,proto3" json:"Failed"` -} - -func (x *BatchSetConversationsResp) Reset() { - *x = BatchSetConversationsResp{} - if protoimpl.UnsafeEnabled { - mi := &file_user_user_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *BatchSetConversationsResp) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*BatchSetConversationsResp) ProtoMessage() {} - -func (x *BatchSetConversationsResp) ProtoReflect() protoreflect.Message { - mi := &file_user_user_proto_msgTypes[21] - 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 BatchSetConversationsResp.ProtoReflect.Descriptor instead. -func (*BatchSetConversationsResp) Descriptor() ([]byte, []int) { - return file_user_user_proto_rawDescGZIP(), []int{21} -} - -func (x *BatchSetConversationsResp) GetSuccess() []string { - if x != nil { - return x.Success - } - return nil -} - -func (x *BatchSetConversationsResp) GetFailed() []string { - if x != nil { - return x.Failed - } - return nil -} - -type GetPaginationUsersReq struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Pagination *sdkws.RequestPagination `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination"` -} - -func (x *GetPaginationUsersReq) Reset() { - *x = GetPaginationUsersReq{} - if protoimpl.UnsafeEnabled { - mi := &file_user_user_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetPaginationUsersReq) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetPaginationUsersReq) ProtoMessage() {} - -func (x *GetPaginationUsersReq) ProtoReflect() protoreflect.Message { - mi := &file_user_user_proto_msgTypes[22] - 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 GetPaginationUsersReq.ProtoReflect.Descriptor instead. -func (*GetPaginationUsersReq) Descriptor() ([]byte, []int) { - return file_user_user_proto_rawDescGZIP(), []int{22} -} - -func (x *GetPaginationUsersReq) GetPagination() *sdkws.RequestPagination { - if x != nil { - return x.Pagination - } - return nil -} - -type GetPaginationUsersResp struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Total int32 `protobuf:"varint,1,opt,name=total,proto3" json:"total"` - Users []*sdkws.UserInfo `protobuf:"bytes,2,rep,name=users,proto3" json:"users"` -} - -func (x *GetPaginationUsersResp) Reset() { - *x = GetPaginationUsersResp{} - if protoimpl.UnsafeEnabled { - mi := &file_user_user_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetPaginationUsersResp) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetPaginationUsersResp) ProtoMessage() {} - -func (x *GetPaginationUsersResp) ProtoReflect() protoreflect.Message { - mi := &file_user_user_proto_msgTypes[23] - 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 GetPaginationUsersResp.ProtoReflect.Descriptor instead. -func (*GetPaginationUsersResp) Descriptor() ([]byte, []int) { - return file_user_user_proto_rawDescGZIP(), []int{23} -} - -func (x *GetPaginationUsersResp) GetTotal() int32 { - if x != nil { - return x.Total - } - return 0 -} - -func (x *GetPaginationUsersResp) GetUsers() []*sdkws.UserInfo { - if x != nil { - return x.Users - } - return nil -} - -type UserRegisterReq struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Secret string `protobuf:"bytes,1,opt,name=secret,proto3" json:"secret"` - Users []*sdkws.UserInfo `protobuf:"bytes,2,rep,name=users,proto3" json:"users"` -} - -func (x *UserRegisterReq) Reset() { - *x = UserRegisterReq{} - if protoimpl.UnsafeEnabled { - mi := &file_user_user_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *UserRegisterReq) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*UserRegisterReq) ProtoMessage() {} - -func (x *UserRegisterReq) ProtoReflect() protoreflect.Message { - mi := &file_user_user_proto_msgTypes[24] - 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 UserRegisterReq.ProtoReflect.Descriptor instead. -func (*UserRegisterReq) Descriptor() ([]byte, []int) { - return file_user_user_proto_rawDescGZIP(), []int{24} -} - -func (x *UserRegisterReq) GetSecret() string { - if x != nil { - return x.Secret - } - return "" -} - -func (x *UserRegisterReq) GetUsers() []*sdkws.UserInfo { - if x != nil { - return x.Users - } - return nil -} - -type UserRegisterResp struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *UserRegisterResp) Reset() { - *x = UserRegisterResp{} - if protoimpl.UnsafeEnabled { - mi := &file_user_user_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *UserRegisterResp) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*UserRegisterResp) ProtoMessage() {} - -func (x *UserRegisterResp) ProtoReflect() protoreflect.Message { - mi := &file_user_user_proto_msgTypes[25] - 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 UserRegisterResp.ProtoReflect.Descriptor instead. -func (*UserRegisterResp) Descriptor() ([]byte, []int) { - return file_user_user_proto_rawDescGZIP(), []int{25} -} - -type GetGlobalRecvMessageOptReq struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - UserID string `protobuf:"bytes,1,opt,name=userID,proto3" json:"userID"` -} - -func (x *GetGlobalRecvMessageOptReq) Reset() { - *x = GetGlobalRecvMessageOptReq{} - if protoimpl.UnsafeEnabled { - mi := &file_user_user_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetGlobalRecvMessageOptReq) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetGlobalRecvMessageOptReq) ProtoMessage() {} - -func (x *GetGlobalRecvMessageOptReq) ProtoReflect() protoreflect.Message { - mi := &file_user_user_proto_msgTypes[26] - 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 GetGlobalRecvMessageOptReq.ProtoReflect.Descriptor instead. -func (*GetGlobalRecvMessageOptReq) Descriptor() ([]byte, []int) { - return file_user_user_proto_rawDescGZIP(), []int{26} -} - -func (x *GetGlobalRecvMessageOptReq) GetUserID() string { - if x != nil { - return x.UserID - } - return "" -} - -type GetGlobalRecvMessageOptResp struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - GlobalRecvMsgOpt int32 `protobuf:"varint,1,opt,name=globalRecvMsgOpt,proto3" json:"globalRecvMsgOpt"` -} - -func (x *GetGlobalRecvMessageOptResp) Reset() { - *x = GetGlobalRecvMessageOptResp{} - if protoimpl.UnsafeEnabled { - mi := &file_user_user_proto_msgTypes[27] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetGlobalRecvMessageOptResp) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetGlobalRecvMessageOptResp) ProtoMessage() {} - -func (x *GetGlobalRecvMessageOptResp) ProtoReflect() protoreflect.Message { - mi := &file_user_user_proto_msgTypes[27] - 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 GetGlobalRecvMessageOptResp.ProtoReflect.Descriptor instead. -func (*GetGlobalRecvMessageOptResp) Descriptor() ([]byte, []int) { - return file_user_user_proto_rawDescGZIP(), []int{27} -} - -func (x *GetGlobalRecvMessageOptResp) GetGlobalRecvMsgOpt() int32 { - if x != nil { - return x.GlobalRecvMsgOpt - } - return 0 -} - -type UserRegisterCountReq struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Start int64 `protobuf:"varint,1,opt,name=start,proto3" json:"start"` - End int64 `protobuf:"varint,2,opt,name=end,proto3" json:"end"` -} - -func (x *UserRegisterCountReq) Reset() { - *x = UserRegisterCountReq{} - if protoimpl.UnsafeEnabled { - mi := &file_user_user_proto_msgTypes[28] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *UserRegisterCountReq) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*UserRegisterCountReq) ProtoMessage() {} - -func (x *UserRegisterCountReq) ProtoReflect() protoreflect.Message { - mi := &file_user_user_proto_msgTypes[28] - 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 UserRegisterCountReq.ProtoReflect.Descriptor instead. -func (*UserRegisterCountReq) Descriptor() ([]byte, []int) { - return file_user_user_proto_rawDescGZIP(), []int{28} -} - -func (x *UserRegisterCountReq) GetStart() int64 { - if x != nil { - return x.Start - } - return 0 -} - -func (x *UserRegisterCountReq) GetEnd() int64 { - if x != nil { - return x.End - } - return 0 -} - -type UserRegisterCountResp struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Total int64 `protobuf:"varint,1,opt,name=total,proto3" json:"total"` - Before int64 `protobuf:"varint,2,opt,name=before,proto3" json:"before"` - Count map[string]int64 `protobuf:"bytes,3,rep,name=count,proto3" json:"count" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` -} - -func (x *UserRegisterCountResp) Reset() { - *x = UserRegisterCountResp{} - if protoimpl.UnsafeEnabled { - mi := &file_user_user_proto_msgTypes[29] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *UserRegisterCountResp) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*UserRegisterCountResp) ProtoMessage() {} - -func (x *UserRegisterCountResp) ProtoReflect() protoreflect.Message { - mi := &file_user_user_proto_msgTypes[29] - 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 UserRegisterCountResp.ProtoReflect.Descriptor instead. -func (*UserRegisterCountResp) Descriptor() ([]byte, []int) { - return file_user_user_proto_rawDescGZIP(), []int{29} -} - -func (x *UserRegisterCountResp) GetTotal() int64 { - if x != nil { - return x.Total - } - return 0 -} - -func (x *UserRegisterCountResp) GetBefore() int64 { - if x != nil { - return x.Before - } - return 0 -} - -func (x *UserRegisterCountResp) GetCount() map[string]int64 { - if x != nil { - return x.Count - } - return nil -} - -type AccountCheckRespSingleUserStatus struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - UserID string `protobuf:"bytes,1,opt,name=userID,proto3" json:"userID"` - AccountStatus string `protobuf:"bytes,2,opt,name=accountStatus,proto3" json:"accountStatus"` -} - -func (x *AccountCheckRespSingleUserStatus) Reset() { - *x = AccountCheckRespSingleUserStatus{} - if protoimpl.UnsafeEnabled { - mi := &file_user_user_proto_msgTypes[30] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *AccountCheckRespSingleUserStatus) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*AccountCheckRespSingleUserStatus) ProtoMessage() {} - -func (x *AccountCheckRespSingleUserStatus) ProtoReflect() protoreflect.Message { - mi := &file_user_user_proto_msgTypes[30] - 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 AccountCheckRespSingleUserStatus.ProtoReflect.Descriptor instead. -func (*AccountCheckRespSingleUserStatus) Descriptor() ([]byte, []int) { - return file_user_user_proto_rawDescGZIP(), []int{3, 0} -} - -func (x *AccountCheckRespSingleUserStatus) GetUserID() string { - if x != nil { - return x.UserID - } - return "" -} - -func (x *AccountCheckRespSingleUserStatus) GetAccountStatus() string { - if x != nil { - return x.AccountStatus - } - return "" -} - -var File_user_user_proto protoreflect.FileDescriptor - -var file_user_user_proto_rawDesc = []byte{ - 0x0a, 0x0f, 0x75, 0x73, 0x65, 0x72, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x12, 0x11, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, - 0x75, 0x73, 0x65, 0x72, 0x1a, 0x11, 0x73, 0x64, 0x6b, 0x77, 0x73, 0x2f, 0x73, 0x64, 0x6b, 0x77, - 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x58, 0x0a, 0x0f, 0x67, 0x65, 0x74, 0x41, - 0x6c, 0x6c, 0x55, 0x73, 0x65, 0x72, 0x49, 0x44, 0x52, 0x65, 0x71, 0x12, 0x45, 0x0a, 0x0a, 0x70, - 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x25, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 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, 0x42, 0x0a, 0x10, 0x67, 0x65, 0x74, 0x41, 0x6c, 0x6c, 0x55, 0x73, 0x65, 0x72, - 0x49, 0x44, 0x52, 0x65, 0x73, 0x70, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x12, 0x18, 0x0a, 0x07, - 0x75, 0x73, 0x65, 0x72, 0x49, 0x44, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x75, - 0x73, 0x65, 0x72, 0x49, 0x44, 0x73, 0x22, 0x35, 0x0a, 0x0f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, - 0x74, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x12, 0x22, 0x0a, 0x0c, 0x63, 0x68, 0x65, - 0x63, 0x6b, 0x55, 0x73, 0x65, 0x72, 0x49, 0x44, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, - 0x0c, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x55, 0x73, 0x65, 0x72, 0x49, 0x44, 0x73, 0x22, 0xb4, 0x01, - 0x0a, 0x10, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, - 0x73, 0x70, 0x12, 0x4e, 0x0a, 0x07, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x18, 0x01, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, - 0x65, 0x72, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x43, - 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x2e, 0x73, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x55, - 0x73, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x07, 0x72, 0x65, 0x73, 0x75, 0x6c, - 0x74, 0x73, 0x1a, 0x50, 0x0a, 0x10, 0x73, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x55, 0x73, 0x65, 0x72, - 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x44, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x44, 0x12, 0x24, - 0x0a, 0x0d, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x53, 0x74, - 0x61, 0x74, 0x75, 0x73, 0x22, 0x30, 0x0a, 0x14, 0x67, 0x65, 0x74, 0x44, 0x65, 0x73, 0x69, 0x67, - 0x6e, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x73, 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, 0x53, 0x0a, 0x15, 0x67, 0x65, 0x74, 0x44, 0x65, 0x73, - 0x69, 0x67, 0x6e, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x12, - 0x3a, 0x0a, 0x09, 0x75, 0x73, 0x65, 0x72, 0x73, 0x49, 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, - 0x72, 0x2e, 0x73, 0x64, 0x6b, 0x77, 0x73, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, - 0x52, 0x09, 0x75, 0x73, 0x65, 0x72, 0x73, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0x4d, 0x0a, 0x11, 0x75, - 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, - 0x12, 0x38, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, - 0x72, 0x2e, 0x73, 0x64, 0x6b, 0x77, 0x73, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, - 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0x14, 0x0a, 0x12, 0x75, 0x70, - 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, - 0x22, 0x60, 0x0a, 0x1a, 0x73, 0x65, 0x74, 0x47, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x52, 0x65, 0x63, - 0x76, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x4f, 0x70, 0x74, 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, 0x12, 0x2a, 0x0a, 0x10, 0x67, 0x6c, 0x6f, 0x62, 0x61, 0x6c, - 0x52, 0x65, 0x63, 0x76, 0x4d, 0x73, 0x67, 0x4f, 0x70, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, - 0x52, 0x10, 0x67, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x52, 0x65, 0x63, 0x76, 0x4d, 0x73, 0x67, 0x4f, - 0x70, 0x74, 0x22, 0x1d, 0x0a, 0x1b, 0x73, 0x65, 0x74, 0x47, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x52, - 0x65, 0x63, 0x76, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x4f, 0x70, 0x74, 0x52, 0x65, 0x73, - 0x70, 0x22, 0xaf, 0x01, 0x0a, 0x12, 0x73, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x12, 0x4b, 0x0a, 0x0c, 0x63, 0x6f, 0x6e, 0x76, - 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, - 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x63, 0x6f, - 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x6f, 0x6e, 0x76, 0x65, - 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2a, 0x0a, 0x10, 0x6e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, - 0x10, 0x6e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, - 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x49, 0x44, 0x22, 0x15, 0x0a, 0x13, 0x73, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, - 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x22, 0xca, 0x01, 0x0a, 0x10, 0x73, - 0x65, 0x74, 0x52, 0x65, 0x63, 0x76, 0x4d, 0x73, 0x67, 0x4f, 0x70, 0x74, 0x52, 0x65, 0x71, 0x12, - 0x20, 0x0a, 0x0b, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x55, 0x73, 0x65, 0x72, 0x49, 0x44, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x55, 0x73, 0x65, 0x72, 0x49, - 0x44, 0x12, 0x26, 0x0a, 0x0e, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x63, 0x6f, 0x6e, 0x76, 0x65, - 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x12, 0x1e, 0x0a, 0x0a, 0x72, 0x65, 0x63, - 0x76, 0x4d, 0x73, 0x67, 0x4f, 0x70, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x72, - 0x65, 0x63, 0x76, 0x4d, 0x73, 0x67, 0x4f, 0x70, 0x74, 0x12, 0x2a, 0x0a, 0x10, 0x6e, 0x6f, 0x74, - 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x05, 0x52, 0x10, 0x6e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x49, 0x44, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6f, 0x70, 0x65, 0x72, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x22, 0x13, 0x0a, 0x11, 0x73, 0x65, 0x74, 0x52, 0x65, - 0x63, 0x76, 0x4d, 0x73, 0x67, 0x4f, 0x70, 0x74, 0x52, 0x65, 0x73, 0x70, 0x22, 0x80, 0x01, 0x0a, - 0x12, 0x67, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x52, 0x65, 0x71, 0x12, 0x26, 0x0a, 0x0e, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x63, 0x6f, 0x6e, - 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x12, 0x20, 0x0a, 0x0b, 0x6f, - 0x77, 0x6e, 0x65, 0x72, 0x55, 0x73, 0x65, 0x72, 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0b, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x55, 0x73, 0x65, 0x72, 0x49, 0x44, 0x12, 0x20, 0x0a, - 0x0b, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0b, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x22, - 0x62, 0x0a, 0x13, 0x67, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x12, 0x4b, 0x0a, 0x0c, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, - 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x4f, - 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x63, 0x6f, 0x6e, 0x76, - 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x22, 0x83, 0x01, 0x0a, 0x13, 0x67, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x76, 0x65, - 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x12, 0x20, 0x0a, 0x0b, 0x6f, - 0x77, 0x6e, 0x65, 0x72, 0x55, 0x73, 0x65, 0x72, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0b, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x55, 0x73, 0x65, 0x72, 0x49, 0x44, 0x12, 0x28, 0x0a, - 0x0f, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x73, - 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0f, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x73, 0x12, 0x20, 0x0a, 0x0b, 0x6f, 0x70, 0x65, 0x72, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6f, 0x70, - 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x22, 0x65, 0x0a, 0x14, 0x67, 0x65, 0x74, - 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, - 0x70, 0x12, 0x4d, 0x0a, 0x0d, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, - 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x52, 0x0d, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x22, 0x5c, 0x0a, 0x16, 0x67, 0x65, 0x74, 0x41, 0x6c, 0x6c, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, - 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x12, 0x20, 0x0a, 0x0b, 0x6f, 0x77, - 0x6e, 0x65, 0x72, 0x55, 0x73, 0x65, 0x72, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0b, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x55, 0x73, 0x65, 0x72, 0x49, 0x44, 0x12, 0x20, 0x0a, 0x0b, - 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0b, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x22, 0x68, - 0x0a, 0x17, 0x67, 0x65, 0x74, 0x41, 0x6c, 0x6c, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x12, 0x4d, 0x0a, 0x0d, 0x63, 0x6f, 0x6e, - 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x27, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, - 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x6f, 0x6e, - 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0d, 0x63, 0x6f, 0x6e, 0x76, 0x65, - 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xd9, 0x01, 0x0a, 0x18, 0x62, 0x61, 0x74, - 0x63, 0x68, 0x53, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x52, 0x65, 0x71, 0x12, 0x4d, 0x0a, 0x0d, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x4f, - 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x63, 0x6f, 0x6e, 0x76, - 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0d, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x20, 0x0a, 0x0b, 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x55, 0x73, 0x65, - 0x72, 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x4f, 0x77, 0x6e, 0x65, 0x72, - 0x55, 0x73, 0x65, 0x72, 0x49, 0x44, 0x12, 0x2a, 0x0a, 0x10, 0x6e, 0x6f, 0x74, 0x69, 0x66, 0x69, - 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, - 0x52, 0x10, 0x6e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, - 0x70, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, - 0x44, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x49, 0x44, 0x22, 0x4d, 0x0a, 0x19, 0x62, 0x61, 0x74, 0x63, 0x68, 0x53, 0x65, 0x74, - 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, - 0x70, 0x12, 0x18, 0x0a, 0x07, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x03, - 0x28, 0x09, 0x52, 0x07, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x46, - 0x61, 0x69, 0x6c, 0x65, 0x64, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x46, 0x61, 0x69, - 0x6c, 0x65, 0x64, 0x22, 0x5e, 0x0a, 0x15, 0x67, 0x65, 0x74, 0x50, 0x61, 0x67, 0x69, 0x6e, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x55, 0x73, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x12, 0x45, 0x0a, 0x0a, - 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x25, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 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, 0x16, 0x67, 0x65, 0x74, 0x50, 0x61, 0x67, 0x69, 0x6e, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x55, 0x73, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x12, 0x14, 0x0a, - 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x74, 0x6f, - 0x74, 0x61, 0x6c, 0x12, 0x32, 0x0a, 0x05, 0x75, 0x73, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, - 0x72, 0x2e, 0x73, 0x64, 0x6b, 0x77, 0x73, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, - 0x52, 0x05, 0x75, 0x73, 0x65, 0x72, 0x73, 0x22, 0x5d, 0x0a, 0x0f, 0x75, 0x73, 0x65, 0x72, 0x52, - 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x65, - 0x63, 0x72, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x65, 0x63, 0x72, - 0x65, 0x74, 0x12, 0x32, 0x0a, 0x05, 0x75, 0x73, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x1c, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, - 0x2e, 0x73, 0x64, 0x6b, 0x77, 0x73, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, - 0x05, 0x75, 0x73, 0x65, 0x72, 0x73, 0x22, 0x12, 0x0a, 0x10, 0x75, 0x73, 0x65, 0x72, 0x52, 0x65, - 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x22, 0x34, 0x0a, 0x1a, 0x67, 0x65, - 0x74, 0x47, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x52, 0x65, 0x63, 0x76, 0x4d, 0x65, 0x73, 0x73, 0x61, - 0x67, 0x65, 0x4f, 0x70, 0x74, 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, 0x49, 0x0a, 0x1b, 0x67, 0x65, 0x74, 0x47, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x52, 0x65, 0x63, - 0x76, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x4f, 0x70, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, - 0x2a, 0x0a, 0x10, 0x67, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x52, 0x65, 0x63, 0x76, 0x4d, 0x73, 0x67, - 0x4f, 0x70, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x10, 0x67, 0x6c, 0x6f, 0x62, 0x61, - 0x6c, 0x52, 0x65, 0x63, 0x76, 0x4d, 0x73, 0x67, 0x4f, 0x70, 0x74, 0x22, 0x3e, 0x0a, 0x14, 0x75, - 0x73, 0x65, 0x72, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x75, 0x6e, 0x74, - 0x52, 0x65, 0x71, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x03, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x65, 0x6e, 0x64, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x65, 0x6e, 0x64, 0x22, 0xca, 0x01, 0x0a, 0x15, - 0x75, 0x73, 0x65, 0x72, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x75, 0x6e, - 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x12, 0x16, 0x0a, 0x06, 0x62, - 0x65, 0x66, 0x6f, 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x62, 0x65, 0x66, - 0x6f, 0x72, 0x65, 0x12, 0x49, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, - 0x72, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x52, 0x65, 0x67, 0x69, 0x73, - 0x74, 0x65, 0x72, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x2e, 0x43, 0x6f, 0x75, - 0x6e, 0x74, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x1a, 0x38, - 0x0a, 0x0a, 0x43, 0x6f, 0x75, 0x6e, 0x74, 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, 0x03, 0x52, 0x05, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x32, 0x9f, 0x07, 0x0a, 0x04, 0x75, 0x73, 0x65, - 0x72, 0x12, 0x66, 0x0a, 0x11, 0x67, 0x65, 0x74, 0x44, 0x65, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, - 0x65, 0x55, 0x73, 0x65, 0x72, 0x73, 0x12, 0x27, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, - 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x67, 0x65, 0x74, 0x44, 0x65, - 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x1a, - 0x28, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x75, - 0x73, 0x65, 0x72, 0x2e, 0x67, 0x65, 0x74, 0x44, 0x65, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x65, - 0x55, 0x73, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x12, 0x5d, 0x0a, 0x0e, 0x75, 0x70, 0x64, - 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x24, 0x2e, 0x4f, 0x70, - 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, - 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, - 0x71, 0x1a, 0x25, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, - 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, - 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x12, 0x78, 0x0a, 0x17, 0x73, 0x65, 0x74, 0x47, - 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x52, 0x65, 0x63, 0x76, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, - 0x4f, 0x70, 0x74, 0x12, 0x2d, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, - 0x65, 0x72, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x73, 0x65, 0x74, 0x47, 0x6c, 0x6f, 0x62, 0x61, - 0x6c, 0x52, 0x65, 0x63, 0x76, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x4f, 0x70, 0x74, 0x52, - 0x65, 0x71, 0x1a, 0x2e, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, - 0x72, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x73, 0x65, 0x74, 0x47, 0x6c, 0x6f, 0x62, 0x61, 0x6c, - 0x52, 0x65, 0x63, 0x76, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x4f, 0x70, 0x74, 0x52, 0x65, - 0x73, 0x70, 0x12, 0x78, 0x0a, 0x17, 0x67, 0x65, 0x74, 0x47, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x52, - 0x65, 0x63, 0x76, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x4f, 0x70, 0x74, 0x12, 0x2d, 0x2e, - 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x75, 0x73, 0x65, - 0x72, 0x2e, 0x67, 0x65, 0x74, 0x47, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x52, 0x65, 0x63, 0x76, 0x4d, - 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x4f, 0x70, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x2e, 0x2e, 0x4f, - 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x75, 0x73, 0x65, 0x72, - 0x2e, 0x67, 0x65, 0x74, 0x47, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x52, 0x65, 0x63, 0x76, 0x4d, 0x65, - 0x73, 0x73, 0x61, 0x67, 0x65, 0x4f, 0x70, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x57, 0x0a, 0x0c, - 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x12, 0x22, 0x2e, 0x4f, - 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x75, 0x73, 0x65, 0x72, - 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x71, - 0x1a, 0x23, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, - 0x75, 0x73, 0x65, 0x72, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x43, 0x68, 0x65, 0x63, - 0x6b, 0x52, 0x65, 0x73, 0x70, 0x12, 0x69, 0x0a, 0x12, 0x67, 0x65, 0x74, 0x50, 0x61, 0x67, 0x69, - 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x55, 0x73, 0x65, 0x72, 0x73, 0x12, 0x28, 0x2e, 0x4f, 0x70, - 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, - 0x67, 0x65, 0x74, 0x50, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x55, 0x73, 0x65, - 0x72, 0x73, 0x52, 0x65, 0x71, 0x1a, 0x29, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, - 0x72, 0x76, 0x65, 0x72, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x67, 0x65, 0x74, 0x50, 0x61, 0x67, - 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x55, 0x73, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, - 0x12, 0x57, 0x0a, 0x0c, 0x75, 0x73, 0x65, 0x72, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, - 0x12, 0x22, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, - 0x75, 0x73, 0x65, 0x72, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, - 0x72, 0x52, 0x65, 0x71, 0x1a, 0x23, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, - 0x76, 0x65, 0x72, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x52, 0x65, 0x67, - 0x69, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x12, 0x57, 0x0a, 0x0c, 0x67, 0x65, 0x74, - 0x41, 0x6c, 0x6c, 0x55, 0x73, 0x65, 0x72, 0x49, 0x44, 0x12, 0x22, 0x2e, 0x4f, 0x70, 0x65, 0x6e, - 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x67, 0x65, - 0x74, 0x41, 0x6c, 0x6c, 0x55, 0x73, 0x65, 0x72, 0x49, 0x44, 0x52, 0x65, 0x71, 0x1a, 0x23, 0x2e, - 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x75, 0x73, 0x65, - 0x72, 0x2e, 0x67, 0x65, 0x74, 0x41, 0x6c, 0x6c, 0x55, 0x73, 0x65, 0x72, 0x49, 0x44, 0x52, 0x65, - 0x73, 0x70, 0x12, 0x66, 0x0a, 0x11, 0x75, 0x73, 0x65, 0x72, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, - 0x65, 0x72, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x27, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, - 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x75, 0x73, 0x65, 0x72, - 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, - 0x1a, 0x28, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, - 0x75, 0x73, 0x65, 0x72, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, - 0x72, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x42, 0x34, 0x5a, 0x32, 0x67, 0x69, - 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, - 0x44, 0x4b, 0x2f, 0x4f, 0x70, 0x65, 0x6e, 0x2d, 0x49, 0x4d, 0x2d, 0x53, 0x65, 0x72, 0x76, 0x65, - 0x72, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x75, 0x73, 0x65, 0x72, - 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_user_user_proto_rawDescOnce sync.Once - file_user_user_proto_rawDescData = file_user_user_proto_rawDesc -) - -func file_user_user_proto_rawDescGZIP() []byte { - file_user_user_proto_rawDescOnce.Do(func() { - file_user_user_proto_rawDescData = protoimpl.X.CompressGZIP(file_user_user_proto_rawDescData) - }) - return file_user_user_proto_rawDescData -} - -var file_user_user_proto_msgTypes = make([]protoimpl.MessageInfo, 32) -var file_user_user_proto_goTypes = []interface{}{ - (*GetAllUserIDReq)(nil), // 0: OpenIMServer.user.getAllUserIDReq - (*GetAllUserIDResp)(nil), // 1: OpenIMServer.user.getAllUserIDResp - (*AccountCheckReq)(nil), // 2: OpenIMServer.user.accountCheckReq - (*AccountCheckResp)(nil), // 3: OpenIMServer.user.accountCheckResp - (*GetDesignateUsersReq)(nil), // 4: OpenIMServer.user.getDesignateUsersReq - (*GetDesignateUsersResp)(nil), // 5: OpenIMServer.user.getDesignateUsersResp - (*UpdateUserInfoReq)(nil), // 6: OpenIMServer.user.updateUserInfoReq - (*UpdateUserInfoResp)(nil), // 7: OpenIMServer.user.updateUserInfoResp - (*SetGlobalRecvMessageOptReq)(nil), // 8: OpenIMServer.user.setGlobalRecvMessageOptReq - (*SetGlobalRecvMessageOptResp)(nil), // 9: OpenIMServer.user.setGlobalRecvMessageOptResp - (*SetConversationReq)(nil), // 10: OpenIMServer.user.setConversationReq - (*SetConversationResp)(nil), // 11: OpenIMServer.user.setConversationResp - (*SetRecvMsgOptReq)(nil), // 12: OpenIMServer.user.setRecvMsgOptReq - (*SetRecvMsgOptResp)(nil), // 13: OpenIMServer.user.setRecvMsgOptResp - (*GetConversationReq)(nil), // 14: OpenIMServer.user.getConversationReq - (*GetConversationResp)(nil), // 15: OpenIMServer.user.getConversationResp - (*GetConversationsReq)(nil), // 16: OpenIMServer.user.getConversationsReq - (*GetConversationsResp)(nil), // 17: OpenIMServer.user.getConversationsResp - (*GetAllConversationsReq)(nil), // 18: OpenIMServer.user.getAllConversationsReq - (*GetAllConversationsResp)(nil), // 19: OpenIMServer.user.getAllConversationsResp - (*BatchSetConversationsReq)(nil), // 20: OpenIMServer.user.batchSetConversationsReq - (*BatchSetConversationsResp)(nil), // 21: OpenIMServer.user.batchSetConversationsResp - (*GetPaginationUsersReq)(nil), // 22: OpenIMServer.user.getPaginationUsersReq - (*GetPaginationUsersResp)(nil), // 23: OpenIMServer.user.getPaginationUsersResp - (*UserRegisterReq)(nil), // 24: OpenIMServer.user.userRegisterReq - (*UserRegisterResp)(nil), // 25: OpenIMServer.user.userRegisterResp - (*GetGlobalRecvMessageOptReq)(nil), // 26: OpenIMServer.user.getGlobalRecvMessageOptReq - (*GetGlobalRecvMessageOptResp)(nil), // 27: OpenIMServer.user.getGlobalRecvMessageOptResp - (*UserRegisterCountReq)(nil), // 28: OpenIMServer.user.userRegisterCountReq - (*UserRegisterCountResp)(nil), // 29: OpenIMServer.user.userRegisterCountResp - (*AccountCheckRespSingleUserStatus)(nil), // 30: OpenIMServer.user.accountCheckResp.singleUserStatus - nil, // 31: OpenIMServer.user.userRegisterCountResp.CountEntry - (*sdkws.RequestPagination)(nil), // 32: OpenIMServer.sdkws.RequestPagination - (*sdkws.UserInfo)(nil), // 33: OpenIMServer.sdkws.UserInfo - (*conversation.Conversation)(nil), // 34: OpenIMServer.conversation.Conversation -} -var file_user_user_proto_depIdxs = []int32{ - 32, // 0: OpenIMServer.user.getAllUserIDReq.pagination:type_name -> OpenIMServer.sdkws.RequestPagination - 30, // 1: OpenIMServer.user.accountCheckResp.results:type_name -> OpenIMServer.user.accountCheckResp.singleUserStatus - 33, // 2: OpenIMServer.user.getDesignateUsersResp.usersInfo:type_name -> OpenIMServer.sdkws.UserInfo - 33, // 3: OpenIMServer.user.updateUserInfoReq.userInfo:type_name -> OpenIMServer.sdkws.UserInfo - 34, // 4: OpenIMServer.user.setConversationReq.conversation:type_name -> OpenIMServer.conversation.Conversation - 34, // 5: OpenIMServer.user.getConversationResp.conversation:type_name -> OpenIMServer.conversation.Conversation - 34, // 6: OpenIMServer.user.getConversationsResp.conversations:type_name -> OpenIMServer.conversation.Conversation - 34, // 7: OpenIMServer.user.getAllConversationsResp.conversations:type_name -> OpenIMServer.conversation.Conversation - 34, // 8: OpenIMServer.user.batchSetConversationsReq.conversations:type_name -> OpenIMServer.conversation.Conversation - 32, // 9: OpenIMServer.user.getPaginationUsersReq.pagination:type_name -> OpenIMServer.sdkws.RequestPagination - 33, // 10: OpenIMServer.user.getPaginationUsersResp.users:type_name -> OpenIMServer.sdkws.UserInfo - 33, // 11: OpenIMServer.user.userRegisterReq.users:type_name -> OpenIMServer.sdkws.UserInfo - 31, // 12: OpenIMServer.user.userRegisterCountResp.count:type_name -> OpenIMServer.user.userRegisterCountResp.CountEntry - 4, // 13: OpenIMServer.user.user.getDesignateUsers:input_type -> OpenIMServer.user.getDesignateUsersReq - 6, // 14: OpenIMServer.user.user.updateUserInfo:input_type -> OpenIMServer.user.updateUserInfoReq - 8, // 15: OpenIMServer.user.user.setGlobalRecvMessageOpt:input_type -> OpenIMServer.user.setGlobalRecvMessageOptReq - 26, // 16: OpenIMServer.user.user.getGlobalRecvMessageOpt:input_type -> OpenIMServer.user.getGlobalRecvMessageOptReq - 2, // 17: OpenIMServer.user.user.accountCheck:input_type -> OpenIMServer.user.accountCheckReq - 22, // 18: OpenIMServer.user.user.getPaginationUsers:input_type -> OpenIMServer.user.getPaginationUsersReq - 24, // 19: OpenIMServer.user.user.userRegister:input_type -> OpenIMServer.user.userRegisterReq - 0, // 20: OpenIMServer.user.user.getAllUserID:input_type -> OpenIMServer.user.getAllUserIDReq - 28, // 21: OpenIMServer.user.user.userRegisterCount:input_type -> OpenIMServer.user.userRegisterCountReq - 5, // 22: OpenIMServer.user.user.getDesignateUsers:output_type -> OpenIMServer.user.getDesignateUsersResp - 7, // 23: OpenIMServer.user.user.updateUserInfo:output_type -> OpenIMServer.user.updateUserInfoResp - 9, // 24: OpenIMServer.user.user.setGlobalRecvMessageOpt:output_type -> OpenIMServer.user.setGlobalRecvMessageOptResp - 27, // 25: OpenIMServer.user.user.getGlobalRecvMessageOpt:output_type -> OpenIMServer.user.getGlobalRecvMessageOptResp - 3, // 26: OpenIMServer.user.user.accountCheck:output_type -> OpenIMServer.user.accountCheckResp - 23, // 27: OpenIMServer.user.user.getPaginationUsers:output_type -> OpenIMServer.user.getPaginationUsersResp - 25, // 28: OpenIMServer.user.user.userRegister:output_type -> OpenIMServer.user.userRegisterResp - 1, // 29: OpenIMServer.user.user.getAllUserID:output_type -> OpenIMServer.user.getAllUserIDResp - 29, // 30: OpenIMServer.user.user.userRegisterCount:output_type -> OpenIMServer.user.userRegisterCountResp - 22, // [22:31] is the sub-list for method output_type - 13, // [13:22] is the sub-list for method input_type - 13, // [13:13] is the sub-list for extension type_name - 13, // [13:13] is the sub-list for extension extendee - 0, // [0:13] is the sub-list for field type_name -} - -func init() { file_user_user_proto_init() } -func file_user_user_proto_init() { - if File_user_user_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_user_user_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetAllUserIDReq); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_user_user_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetAllUserIDResp); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_user_user_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AccountCheckReq); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_user_user_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AccountCheckResp); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_user_user_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetDesignateUsersReq); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_user_user_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetDesignateUsersResp); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_user_user_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UpdateUserInfoReq); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_user_user_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UpdateUserInfoResp); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_user_user_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SetGlobalRecvMessageOptReq); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_user_user_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SetGlobalRecvMessageOptResp); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_user_user_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SetConversationReq); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_user_user_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SetConversationResp); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_user_user_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SetRecvMsgOptReq); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_user_user_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SetRecvMsgOptResp); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_user_user_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetConversationReq); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_user_user_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetConversationResp); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_user_user_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetConversationsReq); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_user_user_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetConversationsResp); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_user_user_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetAllConversationsReq); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_user_user_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetAllConversationsResp); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_user_user_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BatchSetConversationsReq); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_user_user_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BatchSetConversationsResp); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_user_user_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetPaginationUsersReq); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_user_user_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetPaginationUsersResp); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_user_user_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UserRegisterReq); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_user_user_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UserRegisterResp); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_user_user_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetGlobalRecvMessageOptReq); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_user_user_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetGlobalRecvMessageOptResp); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_user_user_proto_msgTypes[28].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UserRegisterCountReq); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_user_user_proto_msgTypes[29].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UserRegisterCountResp); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_user_user_proto_msgTypes[30].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AccountCheckRespSingleUserStatus); 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{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_user_user_proto_rawDesc, - NumEnums: 0, - NumMessages: 32, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_user_user_proto_goTypes, - DependencyIndexes: file_user_user_proto_depIdxs, - MessageInfos: file_user_user_proto_msgTypes, - }.Build() - File_user_user_proto = out.File - file_user_user_proto_rawDesc = nil - file_user_user_proto_goTypes = nil - file_user_user_proto_depIdxs = nil -} - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConnInterface - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion6 - -// UserClient is the client API for User service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type UserClient interface { - // 获取指定的用户信息 全字段 - GetDesignateUsers(ctx context.Context, in *GetDesignateUsersReq, opts ...grpc.CallOption) (*GetDesignateUsersResp, error) - // 更新用户信息 - UpdateUserInfo(ctx context.Context, in *UpdateUserInfoReq, opts ...grpc.CallOption) (*UpdateUserInfoResp, error) - // 设置用户消息接收选项 - SetGlobalRecvMessageOpt(ctx context.Context, in *SetGlobalRecvMessageOptReq, opts ...grpc.CallOption) (*SetGlobalRecvMessageOptResp, error) - // 获取用户消息接收选项 没找到不返回错误 - GetGlobalRecvMessageOpt(ctx context.Context, in *GetGlobalRecvMessageOptReq, opts ...grpc.CallOption) (*GetGlobalRecvMessageOptResp, error) - // 检查userID是否存在 - AccountCheck(ctx context.Context, in *AccountCheckReq, opts ...grpc.CallOption) (*AccountCheckResp, error) - // 翻页(或指定userID,昵称)拉取用户信息 全字段 - GetPaginationUsers(ctx context.Context, in *GetPaginationUsersReq, opts ...grpc.CallOption) (*GetPaginationUsersResp, error) - // 用户注册 - UserRegister(ctx context.Context, in *UserRegisterReq, opts ...grpc.CallOption) (*UserRegisterResp, error) - // 获取所有用户ID - GetAllUserID(ctx context.Context, in *GetAllUserIDReq, opts ...grpc.CallOption) (*GetAllUserIDResp, error) - // 获取用户总数和指定时间段内的用户增量 - UserRegisterCount(ctx context.Context, in *UserRegisterCountReq, opts ...grpc.CallOption) (*UserRegisterCountResp, error) -} - -type userClient struct { - cc grpc.ClientConnInterface -} - -func NewUserClient(cc grpc.ClientConnInterface) UserClient { - return &userClient{cc} -} - -func (c *userClient) GetDesignateUsers(ctx context.Context, in *GetDesignateUsersReq, opts ...grpc.CallOption) (*GetDesignateUsersResp, error) { - out := new(GetDesignateUsersResp) - err := c.cc.Invoke(ctx, "/OpenIMServer.user.user/getDesignateUsers", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *userClient) UpdateUserInfo(ctx context.Context, in *UpdateUserInfoReq, opts ...grpc.CallOption) (*UpdateUserInfoResp, error) { - out := new(UpdateUserInfoResp) - err := c.cc.Invoke(ctx, "/OpenIMServer.user.user/updateUserInfo", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *userClient) SetGlobalRecvMessageOpt(ctx context.Context, in *SetGlobalRecvMessageOptReq, opts ...grpc.CallOption) (*SetGlobalRecvMessageOptResp, error) { - out := new(SetGlobalRecvMessageOptResp) - err := c.cc.Invoke(ctx, "/OpenIMServer.user.user/setGlobalRecvMessageOpt", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *userClient) GetGlobalRecvMessageOpt(ctx context.Context, in *GetGlobalRecvMessageOptReq, opts ...grpc.CallOption) (*GetGlobalRecvMessageOptResp, error) { - out := new(GetGlobalRecvMessageOptResp) - err := c.cc.Invoke(ctx, "/OpenIMServer.user.user/getGlobalRecvMessageOpt", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *userClient) AccountCheck(ctx context.Context, in *AccountCheckReq, opts ...grpc.CallOption) (*AccountCheckResp, error) { - out := new(AccountCheckResp) - err := c.cc.Invoke(ctx, "/OpenIMServer.user.user/accountCheck", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *userClient) GetPaginationUsers(ctx context.Context, in *GetPaginationUsersReq, opts ...grpc.CallOption) (*GetPaginationUsersResp, error) { - out := new(GetPaginationUsersResp) - err := c.cc.Invoke(ctx, "/OpenIMServer.user.user/getPaginationUsers", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *userClient) UserRegister(ctx context.Context, in *UserRegisterReq, opts ...grpc.CallOption) (*UserRegisterResp, error) { - out := new(UserRegisterResp) - err := c.cc.Invoke(ctx, "/OpenIMServer.user.user/userRegister", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *userClient) GetAllUserID(ctx context.Context, in *GetAllUserIDReq, opts ...grpc.CallOption) (*GetAllUserIDResp, error) { - out := new(GetAllUserIDResp) - err := c.cc.Invoke(ctx, "/OpenIMServer.user.user/getAllUserID", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *userClient) UserRegisterCount(ctx context.Context, in *UserRegisterCountReq, opts ...grpc.CallOption) (*UserRegisterCountResp, error) { - out := new(UserRegisterCountResp) - err := c.cc.Invoke(ctx, "/OpenIMServer.user.user/userRegisterCount", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// UserServer is the server API for User service. -type UserServer interface { - // 获取指定的用户信息 全字段 - GetDesignateUsers(context.Context, *GetDesignateUsersReq) (*GetDesignateUsersResp, error) - // 更新用户信息 - UpdateUserInfo(context.Context, *UpdateUserInfoReq) (*UpdateUserInfoResp, error) - // 设置用户消息接收选项 - SetGlobalRecvMessageOpt(context.Context, *SetGlobalRecvMessageOptReq) (*SetGlobalRecvMessageOptResp, error) - // 获取用户消息接收选项 没找到不返回错误 - GetGlobalRecvMessageOpt(context.Context, *GetGlobalRecvMessageOptReq) (*GetGlobalRecvMessageOptResp, error) - // 检查userID是否存在 - AccountCheck(context.Context, *AccountCheckReq) (*AccountCheckResp, error) - // 翻页(或指定userID,昵称)拉取用户信息 全字段 - GetPaginationUsers(context.Context, *GetPaginationUsersReq) (*GetPaginationUsersResp, error) - // 用户注册 - UserRegister(context.Context, *UserRegisterReq) (*UserRegisterResp, error) - // 获取所有用户ID - GetAllUserID(context.Context, *GetAllUserIDReq) (*GetAllUserIDResp, error) - // 获取用户总数和指定时间段内的用户增量 - UserRegisterCount(context.Context, *UserRegisterCountReq) (*UserRegisterCountResp, error) -} - -// UnimplementedUserServer can be embedded to have forward compatible implementations. -type UnimplementedUserServer struct { -} - -func (*UnimplementedUserServer) GetDesignateUsers(context.Context, *GetDesignateUsersReq) (*GetDesignateUsersResp, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetDesignateUsers not implemented") -} -func (*UnimplementedUserServer) UpdateUserInfo(context.Context, *UpdateUserInfoReq) (*UpdateUserInfoResp, error) { - return nil, status.Errorf(codes.Unimplemented, "method UpdateUserInfo not implemented") -} -func (*UnimplementedUserServer) SetGlobalRecvMessageOpt(context.Context, *SetGlobalRecvMessageOptReq) (*SetGlobalRecvMessageOptResp, error) { - return nil, status.Errorf(codes.Unimplemented, "method SetGlobalRecvMessageOpt not implemented") -} -func (*UnimplementedUserServer) GetGlobalRecvMessageOpt(context.Context, *GetGlobalRecvMessageOptReq) (*GetGlobalRecvMessageOptResp, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetGlobalRecvMessageOpt not implemented") -} -func (*UnimplementedUserServer) AccountCheck(context.Context, *AccountCheckReq) (*AccountCheckResp, error) { - return nil, status.Errorf(codes.Unimplemented, "method AccountCheck not implemented") -} -func (*UnimplementedUserServer) GetPaginationUsers(context.Context, *GetPaginationUsersReq) (*GetPaginationUsersResp, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetPaginationUsers not implemented") -} -func (*UnimplementedUserServer) UserRegister(context.Context, *UserRegisterReq) (*UserRegisterResp, error) { - return nil, status.Errorf(codes.Unimplemented, "method UserRegister not implemented") -} -func (*UnimplementedUserServer) GetAllUserID(context.Context, *GetAllUserIDReq) (*GetAllUserIDResp, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetAllUserID not implemented") -} -func (*UnimplementedUserServer) UserRegisterCount(context.Context, *UserRegisterCountReq) (*UserRegisterCountResp, error) { - return nil, status.Errorf(codes.Unimplemented, "method UserRegisterCount not implemented") -} - -func RegisterUserServer(s *grpc.Server, srv UserServer) { - s.RegisterService(&_User_serviceDesc, srv) -} - -func _User_GetDesignateUsers_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetDesignateUsersReq) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(UserServer).GetDesignateUsers(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/OpenIMServer.user.user/GetDesignateUsers", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(UserServer).GetDesignateUsers(ctx, req.(*GetDesignateUsersReq)) - } - return interceptor(ctx, in, info, handler) -} - -func _User_UpdateUserInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(UpdateUserInfoReq) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(UserServer).UpdateUserInfo(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/OpenIMServer.user.user/UpdateUserInfo", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(UserServer).UpdateUserInfo(ctx, req.(*UpdateUserInfoReq)) - } - return interceptor(ctx, in, info, handler) -} - -func _User_SetGlobalRecvMessageOpt_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(SetGlobalRecvMessageOptReq) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(UserServer).SetGlobalRecvMessageOpt(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/OpenIMServer.user.user/SetGlobalRecvMessageOpt", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(UserServer).SetGlobalRecvMessageOpt(ctx, req.(*SetGlobalRecvMessageOptReq)) - } - return interceptor(ctx, in, info, handler) -} - -func _User_GetGlobalRecvMessageOpt_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetGlobalRecvMessageOptReq) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(UserServer).GetGlobalRecvMessageOpt(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/OpenIMServer.user.user/GetGlobalRecvMessageOpt", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(UserServer).GetGlobalRecvMessageOpt(ctx, req.(*GetGlobalRecvMessageOptReq)) - } - return interceptor(ctx, in, info, handler) -} - -func _User_AccountCheck_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(AccountCheckReq) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(UserServer).AccountCheck(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/OpenIMServer.user.user/AccountCheck", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(UserServer).AccountCheck(ctx, req.(*AccountCheckReq)) - } - return interceptor(ctx, in, info, handler) -} - -func _User_GetPaginationUsers_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetPaginationUsersReq) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(UserServer).GetPaginationUsers(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/OpenIMServer.user.user/GetPaginationUsers", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(UserServer).GetPaginationUsers(ctx, req.(*GetPaginationUsersReq)) - } - return interceptor(ctx, in, info, handler) -} - -func _User_UserRegister_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(UserRegisterReq) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(UserServer).UserRegister(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/OpenIMServer.user.user/UserRegister", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(UserServer).UserRegister(ctx, req.(*UserRegisterReq)) - } - return interceptor(ctx, in, info, handler) -} - -func _User_GetAllUserID_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetAllUserIDReq) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(UserServer).GetAllUserID(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/OpenIMServer.user.user/GetAllUserID", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(UserServer).GetAllUserID(ctx, req.(*GetAllUserIDReq)) - } - return interceptor(ctx, in, info, handler) -} - -func _User_UserRegisterCount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(UserRegisterCountReq) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(UserServer).UserRegisterCount(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/OpenIMServer.user.user/UserRegisterCount", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(UserServer).UserRegisterCount(ctx, req.(*UserRegisterCountReq)) - } - return interceptor(ctx, in, info, handler) -} - -var _User_serviceDesc = grpc.ServiceDesc{ - ServiceName: "OpenIMServer.user.user", - HandlerType: (*UserServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "getDesignateUsers", - Handler: _User_GetDesignateUsers_Handler, - }, - { - MethodName: "updateUserInfo", - Handler: _User_UpdateUserInfo_Handler, - }, - { - MethodName: "setGlobalRecvMessageOpt", - Handler: _User_SetGlobalRecvMessageOpt_Handler, - }, - { - MethodName: "getGlobalRecvMessageOpt", - Handler: _User_GetGlobalRecvMessageOpt_Handler, - }, - { - MethodName: "accountCheck", - Handler: _User_AccountCheck_Handler, - }, - { - MethodName: "getPaginationUsers", - Handler: _User_GetPaginationUsers_Handler, - }, - { - MethodName: "userRegister", - Handler: _User_UserRegister_Handler, - }, - { - MethodName: "getAllUserID", - Handler: _User_GetAllUserID_Handler, - }, - { - MethodName: "userRegisterCount", - Handler: _User_UserRegisterCount_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "user/user.proto", -} diff --git a/pkg/proto/user/user.proto b/pkg/proto/user/user.proto deleted file mode 100644 index 10035642c..000000000 --- a/pkg/proto/user/user.proto +++ /dev/null @@ -1,182 +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. - -syntax = "proto3"; -package OpenIMServer.user; -import "sdkws/sdkws.proto"; -import "conversation/conversation.proto"; -option go_package = "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/user"; - -message getAllUserIDReq{ - sdkws.RequestPagination pagination = 1; -} -message getAllUserIDResp{ - int32 total = 1; - repeated string userIDs = 2; -} - - -message accountCheckReq{ - repeated string checkUserIDs = 1; -} -message accountCheckResp{ - message singleUserStatus { - string userID = 1; - string accountStatus = 2; - } - repeated singleUserStatus results = 1; -} - - -message getDesignateUsersReq{ - repeated string userIDs = 1; -} -message getDesignateUsersResp{ - repeated sdkws.UserInfo usersInfo = 1; -} - -message updateUserInfoReq{ - sdkws.UserInfo userInfo = 1; -} -message updateUserInfoResp{ -} - -message setGlobalRecvMessageOptReq{ - string userID = 1; - int32 globalRecvMsgOpt = 3; -} -message setGlobalRecvMessageOptResp{ -} - -message setConversationReq{ - OpenIMServer.conversation.Conversation conversation = 1; - int32 notificationType = 2; - string operationID = 3; -} - -message setConversationResp{ - -} - -message setRecvMsgOptReq { - string ownerUserID = 1; - string conversationID = 2; - int32 recvMsgOpt = 3; - int32 notificationType = 4; - string operationID = 5; -} - -message setRecvMsgOptResp { - -} - -message getConversationReq{ - string conversationID = 1; - string ownerUserID = 2; - string operationID = 3; -} - -message getConversationResp{ - OpenIMServer.conversation.Conversation conversation = 2; -} - -message getConversationsReq{ - string ownerUserID = 1; - repeated string conversationIDs = 2; - string operationID = 3; -} - -message getConversationsResp{ - repeated OpenIMServer.conversation.Conversation conversations = 2; -} - -message getAllConversationsReq{ - string ownerUserID = 1; - string operationID = 2; -} - -message getAllConversationsResp{ - repeated OpenIMServer.conversation.Conversation conversations = 2; -} - -message batchSetConversationsReq{ - repeated OpenIMServer.conversation.Conversation conversations = 1; - string OwnerUserID = 2; - int32 notificationType = 3; - string OperationID = 4; -} - -message batchSetConversationsResp{ - repeated string Success = 2; - repeated string Failed = 3; -} - - -message getPaginationUsersReq { - sdkws.RequestPagination pagination = 2; -} - -message getPaginationUsersResp{ - int32 total = 1; - repeated sdkws.UserInfo users = 2; -} - -message userRegisterReq { - string secret = 1; - repeated sdkws.UserInfo users = 2; -} -message userRegisterResp { -} - - -message getGlobalRecvMessageOptReq{ - string userID = 1; -} - -message getGlobalRecvMessageOptResp{ - int32 globalRecvMsgOpt = 1; -} - -message userRegisterCountReq { - int64 start = 1; - int64 end = 2; -} - -message userRegisterCountResp { - int64 total = 1; - int64 before = 2; - map count = 3; -} - -service user { - //获取指定的用户信息 全字段 - rpc getDesignateUsers(getDesignateUsersReq) returns(getDesignateUsersResp); - //更新用户信息 - rpc updateUserInfo(updateUserInfoReq) returns(updateUserInfoResp); - //设置用户消息接收选项 - rpc setGlobalRecvMessageOpt(setGlobalRecvMessageOptReq) returns(setGlobalRecvMessageOptResp); - //获取用户消息接收选项 没找到不返回错误 - rpc getGlobalRecvMessageOpt(getGlobalRecvMessageOptReq) returns(getGlobalRecvMessageOptResp); - //检查userID是否存在 - rpc accountCheck(accountCheckReq) returns (accountCheckResp); - //翻页(或指定userID,昵称)拉取用户信息 全字段 - rpc getPaginationUsers(getPaginationUsersReq) returns (getPaginationUsersResp); - //用户注册 - rpc userRegister(userRegisterReq) returns (userRegisterResp); - //获取所有用户ID - rpc getAllUserID(getAllUserIDReq) returns (getAllUserIDResp); - // 获取用户总数和指定时间段内的用户增量 - rpc userRegisterCount(userRegisterCountReq)returns(userRegisterCountResp); -} - diff --git a/pkg/proto/wrapperspb/wrapperspb.go b/pkg/proto/wrapperspb/wrapperspb.go deleted file mode 100644 index b7d4b0c31..000000000 --- a/pkg/proto/wrapperspb/wrapperspb.go +++ /dev/null @@ -1,299 +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. - -package wrapperspb - -import ( - "encoding/base64" - "encoding/json" - "errors" - "strconv" -) - -func Double(value float64) *DoubleValue { - return &DoubleValue{Value: value} -} - -func Float(value float32) *FloatValue { - return &FloatValue{Value: value} -} - -func Int64(value int64) *Int64Value { - return &Int64Value{Value: value} -} - -func UInt64(value uint64) *UInt64Value { - return &UInt64Value{Value: value} -} - -func Int32(value int32) *Int32Value { - return &Int32Value{Value: value} -} - -func UInt32(value uint32) *UInt32Value { - return &UInt32Value{Value: value} -} - -func Bool(value bool) *BoolValue { - return &BoolValue{Value: value} -} - -func String(value string) *StringValue { - return &StringValue{Value: value} -} - -func Bytes(value []byte) *BytesValue { - return &BytesValue{Value: value} -} - -func DoublePtr(value *float64) *DoubleValue { - if value == nil { - return nil - } - return &DoubleValue{Value: *value} -} - -func FloatPtr(value *float32) *FloatValue { - if value == nil { - return nil - } - return &FloatValue{Value: *value} -} - -func Int64Ptr(value *int64) *Int64Value { - if value == nil { - return nil - } - return &Int64Value{Value: *value} -} - -func UInt64Ptr(value *uint64) *UInt64Value { - if value == nil { - return nil - } - return &UInt64Value{Value: *value} -} - -func Int32Ptr(value *int32) *Int32Value { - if value == nil { - return nil - } - return &Int32Value{Value: *value} -} - -func UInt32Ptr(value *uint32) *UInt32Value { - if value == nil { - return nil - } - return &UInt32Value{Value: *value} -} - -func BoolPtr(value *bool) *BoolValue { - if value == nil { - return nil - } - return &BoolValue{Value: *value} -} - -func StringPtr(value *string) *StringValue { - if value == nil { - return nil - } - return &StringValue{Value: *value} -} - -func BytesPtr(value *[]byte) *BytesValue { - if value == nil { - return nil - } - return &BytesValue{Value: *value} -} - -func (m *DoubleValue) UnmarshalJSON(p []byte) error { - value, err := strconv.ParseFloat(string(p), 64) - if err != nil { - return err - } - m.Value = value - return nil -} - -func (m *DoubleValue) MarshalJSON() ([]byte, error) { - return []byte(strconv.FormatFloat(m.Value, 'f', -1, 64)), nil -} - -func (m *FloatValue) UnmarshalJSON(p []byte) error { - value, err := strconv.ParseFloat(string(p), 64) - if err != nil { - return err - } - m.Value = float32(value) - return nil -} - -func (m *FloatValue) MarshalJSON() ([]byte, error) { - return []byte(strconv.FormatFloat(float64(m.Value), 'f', -1, 32)), nil -} - -func (m *Int64Value) UnmarshalJSON(p []byte) error { - value, err := strconv.ParseInt(string(p), 10, 64) - if err != nil { - return err - } - m.Value = value - return nil -} - -func (m *Int64Value) MarshalJSON() ([]byte, error) { - return []byte(strconv.FormatInt(m.Value, 10)), nil -} - -func (m *UInt64Value) UnmarshalJSON(p []byte) error { - value, err := strconv.ParseUint(string(p), 10, 64) - if err != nil { - return err - } - m.Value = value - return nil -} - -func (m *UInt64Value) MarshalJSON() ([]byte, error) { - return []byte(strconv.FormatUint(m.Value, 10)), nil -} - -func (m *Int32Value) UnmarshalJSON(p []byte) error { - value, err := strconv.ParseInt(string(p), 10, 32) - if err != nil { - return err - } - m.Value = int32(value) - return nil -} - -func (m *Int32Value) MarshalJSON() ([]byte, error) { - return []byte(strconv.FormatInt(int64(m.Value), 10)), nil -} - -func (m *UInt32Value) UnmarshalJSON(p []byte) error { - value, err := strconv.ParseUint(string(p), 10, 32) - if err != nil { - return err - } - m.Value = uint32(value) - return nil -} - -func (m *UInt32Value) MarshalJSON() ([]byte, error) { - return []byte(strconv.FormatUint(uint64(m.Value), 10)), nil -} - -func (m *BoolValue) UnmarshalJSON(p []byte) error { - value, err := strconv.ParseBool(string(p)) - if err != nil { - return err - } - m.Value = value - return nil -} - -func (m *BoolValue) MarshalJSON() ([]byte, error) { - return []byte(strconv.FormatBool(m.Value)), nil -} - -func (m *StringValue) UnmarshalJSON(p []byte) error { - return json.Unmarshal(p, &m.Value) -} - -func (m *StringValue) MarshalJSON() ([]byte, error) { - return json.Marshal(m.Value) -} - -func (m *BytesValue) UnmarshalJSON(p []byte) error { - if len(p) < 2 || p[0] != '"' || p[len(p)-1] != '"' { - return errors.New("invalid bytes value") - } - value, err := base64.StdEncoding.DecodeString(string(p[1 : len(p)-1])) - if err != nil { - return err - } - m.Value = value - return nil -} - -func (m *BytesValue) MarshalJSON() ([]byte, error) { - return []byte(`"` + base64.StdEncoding.EncodeToString(m.Value) + `"`), nil -} - -func (m *DoubleValue) GetValuePtr() *float64 { - if m == nil { - return nil - } - return &m.Value -} - -func (m *FloatValue) GetValuePtr() *float32 { - if m == nil { - return nil - } - return &m.Value -} - -func (m *Int64Value) GetValuePtr() *int64 { - if m == nil { - return nil - } - return &m.Value -} - -func (m *UInt64Value) GetValuePtr() *uint64 { - if m == nil { - return nil - } - return &m.Value -} - -func (m *Int32Value) GetValuePtr() *int32 { - if m == nil { - return nil - } - return &m.Value -} - -func (m *UInt32Value) GetValuePtr() *uint32 { - if m == nil { - return nil - } - return &m.Value -} - -func (m *BoolValue) GetValuePtr() *bool { - if m == nil { - return nil - } - return &m.Value -} - -func (m *StringValue) GetValuePtr() *string { - if m == nil { - return nil - } - return &m.Value -} - -func (m *BytesValue) GetValuePtr() *[]byte { - if m == nil { - return nil - } - return &m.Value -} diff --git a/pkg/proto/wrapperspb/wrapperspb.pb.go b/pkg/proto/wrapperspb/wrapperspb.pb.go deleted file mode 100644 index 9678bb2a0..000000000 --- a/pkg/proto/wrapperspb/wrapperspb.pb.go +++ /dev/null @@ -1,694 +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. - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.29.1 -// protoc v4.22.0 -// source: wrapperspb/wrapperspb.proto - -package wrapperspb - -import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// Wrapper message for `double`. -// -// The JSON representation for `DoubleValue` is JSON number. -type DoubleValue struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The double value. - Value float64 `protobuf:"fixed64,1,opt,name=value,proto3" json:"value"` -} - -func (x *DoubleValue) Reset() { - *x = DoubleValue{} - if protoimpl.UnsafeEnabled { - mi := &file_wrapperspb_wrapperspb_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DoubleValue) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DoubleValue) ProtoMessage() {} - -func (x *DoubleValue) ProtoReflect() protoreflect.Message { - mi := &file_wrapperspb_wrapperspb_proto_msgTypes[0] - 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 DoubleValue.ProtoReflect.Descriptor instead. -func (*DoubleValue) Descriptor() ([]byte, []int) { - return file_wrapperspb_wrapperspb_proto_rawDescGZIP(), []int{0} -} - -func (x *DoubleValue) GetValue() float64 { - if x != nil { - return x.Value - } - return 0 -} - -// Wrapper message for `float`. -// -// The JSON representation for `FloatValue` is JSON number. -type FloatValue struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The float value. - Value float32 `protobuf:"fixed32,1,opt,name=value,proto3" json:"value"` -} - -func (x *FloatValue) Reset() { - *x = FloatValue{} - if protoimpl.UnsafeEnabled { - mi := &file_wrapperspb_wrapperspb_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *FloatValue) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*FloatValue) ProtoMessage() {} - -func (x *FloatValue) ProtoReflect() protoreflect.Message { - mi := &file_wrapperspb_wrapperspb_proto_msgTypes[1] - 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 FloatValue.ProtoReflect.Descriptor instead. -func (*FloatValue) Descriptor() ([]byte, []int) { - return file_wrapperspb_wrapperspb_proto_rawDescGZIP(), []int{1} -} - -func (x *FloatValue) GetValue() float32 { - if x != nil { - return x.Value - } - return 0 -} - -// Wrapper message for `int64`. -// -// The JSON representation for `Int64Value` is JSON string. -type Int64Value struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The int64 value. - Value int64 `protobuf:"varint,1,opt,name=value,proto3" json:"value"` -} - -func (x *Int64Value) Reset() { - *x = Int64Value{} - if protoimpl.UnsafeEnabled { - mi := &file_wrapperspb_wrapperspb_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Int64Value) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Int64Value) ProtoMessage() {} - -func (x *Int64Value) ProtoReflect() protoreflect.Message { - mi := &file_wrapperspb_wrapperspb_proto_msgTypes[2] - 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 Int64Value.ProtoReflect.Descriptor instead. -func (*Int64Value) Descriptor() ([]byte, []int) { - return file_wrapperspb_wrapperspb_proto_rawDescGZIP(), []int{2} -} - -func (x *Int64Value) GetValue() int64 { - if x != nil { - return x.Value - } - return 0 -} - -// Wrapper message for `uint64`. -// -// The JSON representation for `UInt64Value` is JSON string. -type UInt64Value struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The uint64 value. - Value uint64 `protobuf:"varint,1,opt,name=value,proto3" json:"value"` -} - -func (x *UInt64Value) Reset() { - *x = UInt64Value{} - if protoimpl.UnsafeEnabled { - mi := &file_wrapperspb_wrapperspb_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *UInt64Value) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*UInt64Value) ProtoMessage() {} - -func (x *UInt64Value) ProtoReflect() protoreflect.Message { - mi := &file_wrapperspb_wrapperspb_proto_msgTypes[3] - 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 UInt64Value.ProtoReflect.Descriptor instead. -func (*UInt64Value) Descriptor() ([]byte, []int) { - return file_wrapperspb_wrapperspb_proto_rawDescGZIP(), []int{3} -} - -func (x *UInt64Value) GetValue() uint64 { - if x != nil { - return x.Value - } - return 0 -} - -// Wrapper message for `int32`. -// -// The JSON representation for `Int32Value` is JSON number. -type Int32Value struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The int32 value. - Value int32 `protobuf:"varint,1,opt,name=value,proto3" json:"value"` -} - -func (x *Int32Value) Reset() { - *x = Int32Value{} - if protoimpl.UnsafeEnabled { - mi := &file_wrapperspb_wrapperspb_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Int32Value) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Int32Value) ProtoMessage() {} - -func (x *Int32Value) ProtoReflect() protoreflect.Message { - mi := &file_wrapperspb_wrapperspb_proto_msgTypes[4] - 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 Int32Value.ProtoReflect.Descriptor instead. -func (*Int32Value) Descriptor() ([]byte, []int) { - return file_wrapperspb_wrapperspb_proto_rawDescGZIP(), []int{4} -} - -func (x *Int32Value) GetValue() int32 { - if x != nil { - return x.Value - } - return 0 -} - -// Wrapper message for `uint32`. -// -// The JSON representation for `UInt32Value` is JSON number. -type UInt32Value struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The uint32 value. - Value uint32 `protobuf:"varint,1,opt,name=value,proto3" json:"value"` -} - -func (x *UInt32Value) Reset() { - *x = UInt32Value{} - if protoimpl.UnsafeEnabled { - mi := &file_wrapperspb_wrapperspb_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *UInt32Value) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*UInt32Value) ProtoMessage() {} - -func (x *UInt32Value) ProtoReflect() protoreflect.Message { - mi := &file_wrapperspb_wrapperspb_proto_msgTypes[5] - 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 UInt32Value.ProtoReflect.Descriptor instead. -func (*UInt32Value) Descriptor() ([]byte, []int) { - return file_wrapperspb_wrapperspb_proto_rawDescGZIP(), []int{5} -} - -func (x *UInt32Value) GetValue() uint32 { - if x != nil { - return x.Value - } - return 0 -} - -// Wrapper message for `bool`. -// -// The JSON representation for `BoolValue` is JSON `true` and `false`. -type BoolValue struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The bool value. - Value bool `protobuf:"varint,1,opt,name=value,proto3" json:"value"` -} - -func (x *BoolValue) Reset() { - *x = BoolValue{} - if protoimpl.UnsafeEnabled { - mi := &file_wrapperspb_wrapperspb_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *BoolValue) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*BoolValue) ProtoMessage() {} - -func (x *BoolValue) ProtoReflect() protoreflect.Message { - mi := &file_wrapperspb_wrapperspb_proto_msgTypes[6] - 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 BoolValue.ProtoReflect.Descriptor instead. -func (*BoolValue) Descriptor() ([]byte, []int) { - return file_wrapperspb_wrapperspb_proto_rawDescGZIP(), []int{6} -} - -func (x *BoolValue) GetValue() bool { - if x != nil { - return x.Value - } - return false -} - -// Wrapper message for `string`. -// -// The JSON representation for `StringValue` is JSON string. -type StringValue struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The string value. - Value string `protobuf:"bytes,1,opt,name=value,proto3" json:"value"` -} - -func (x *StringValue) Reset() { - *x = StringValue{} - if protoimpl.UnsafeEnabled { - mi := &file_wrapperspb_wrapperspb_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *StringValue) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*StringValue) ProtoMessage() {} - -func (x *StringValue) ProtoReflect() protoreflect.Message { - mi := &file_wrapperspb_wrapperspb_proto_msgTypes[7] - 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 StringValue.ProtoReflect.Descriptor instead. -func (*StringValue) Descriptor() ([]byte, []int) { - return file_wrapperspb_wrapperspb_proto_rawDescGZIP(), []int{7} -} - -func (x *StringValue) GetValue() string { - if x != nil { - return x.Value - } - return "" -} - -// Wrapper message for `bytes`. -// -// The JSON representation for `BytesValue` is JSON string. -type BytesValue struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The bytes value. - Value []byte `protobuf:"bytes,1,opt,name=value,proto3" json:"value"` -} - -func (x *BytesValue) Reset() { - *x = BytesValue{} - if protoimpl.UnsafeEnabled { - mi := &file_wrapperspb_wrapperspb_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *BytesValue) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*BytesValue) ProtoMessage() {} - -func (x *BytesValue) ProtoReflect() protoreflect.Message { - mi := &file_wrapperspb_wrapperspb_proto_msgTypes[8] - 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 BytesValue.ProtoReflect.Descriptor instead. -func (*BytesValue) Descriptor() ([]byte, []int) { - return file_wrapperspb_wrapperspb_proto_rawDescGZIP(), []int{8} -} - -func (x *BytesValue) GetValue() []byte { - if x != nil { - return x.Value - } - return nil -} - -var File_wrapperspb_wrapperspb_proto protoreflect.FileDescriptor - -var file_wrapperspb_wrapperspb_proto_rawDesc = []byte{ - 0x0a, 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, 0x12, 0x15, 0x4f, - 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x22, 0x23, 0x0a, 0x0b, 0x44, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x56, 0x61, - 0x6c, 0x75, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x22, 0x0a, 0x0a, 0x46, 0x6c, 0x6f, - 0x61, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x02, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x22, 0x0a, - 0x0a, 0x49, 0x6e, 0x74, 0x36, 0x34, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x22, 0x23, 0x0a, 0x0b, 0x55, 0x49, 0x6e, 0x74, 0x36, 0x34, 0x56, 0x61, 0x6c, 0x75, 0x65, - 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, - 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x22, 0x0a, 0x0a, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, - 0x61, 0x6c, 0x75, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x05, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x23, 0x0a, 0x0b, 0x55, 0x49, - 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, - 0x21, 0x0a, 0x09, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x14, 0x0a, 0x05, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x22, 0x23, 0x0a, 0x0b, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, - 0x65, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x22, 0x0a, 0x0a, 0x42, 0x79, 0x74, 0x65, 0x73, - 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x3a, 0x5a, 0x38, 0x67, - 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, - 0x53, 0x44, 0x4b, 0x2f, 0x4f, 0x70, 0x65, 0x6e, 0x2d, 0x49, 0x4d, 0x2d, 0x53, 0x65, 0x72, 0x76, - 0x65, 0x72, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x77, 0x72, 0x61, - 0x70, 0x70, 0x65, 0x72, 0x73, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_wrapperspb_wrapperspb_proto_rawDescOnce sync.Once - file_wrapperspb_wrapperspb_proto_rawDescData = file_wrapperspb_wrapperspb_proto_rawDesc -) - -func file_wrapperspb_wrapperspb_proto_rawDescGZIP() []byte { - file_wrapperspb_wrapperspb_proto_rawDescOnce.Do(func() { - file_wrapperspb_wrapperspb_proto_rawDescData = protoimpl.X.CompressGZIP(file_wrapperspb_wrapperspb_proto_rawDescData) - }) - return file_wrapperspb_wrapperspb_proto_rawDescData -} - -var file_wrapperspb_wrapperspb_proto_msgTypes = make([]protoimpl.MessageInfo, 9) -var file_wrapperspb_wrapperspb_proto_goTypes = []interface{}{ - (*DoubleValue)(nil), // 0: OpenIMServer.protobuf.DoubleValue - (*FloatValue)(nil), // 1: OpenIMServer.protobuf.FloatValue - (*Int64Value)(nil), // 2: OpenIMServer.protobuf.Int64Value - (*UInt64Value)(nil), // 3: OpenIMServer.protobuf.UInt64Value - (*Int32Value)(nil), // 4: OpenIMServer.protobuf.Int32Value - (*UInt32Value)(nil), // 5: OpenIMServer.protobuf.UInt32Value - (*BoolValue)(nil), // 6: OpenIMServer.protobuf.BoolValue - (*StringValue)(nil), // 7: OpenIMServer.protobuf.StringValue - (*BytesValue)(nil), // 8: OpenIMServer.protobuf.BytesValue -} -var file_wrapperspb_wrapperspb_proto_depIdxs = []int32{ - 0, // [0:0] is the sub-list for method output_type - 0, // [0:0] is the sub-list for method input_type - 0, // [0:0] is the sub-list for extension type_name - 0, // [0:0] is the sub-list for extension extendee - 0, // [0:0] is the sub-list for field type_name -} - -func init() { file_wrapperspb_wrapperspb_proto_init() } -func file_wrapperspb_wrapperspb_proto_init() { - if File_wrapperspb_wrapperspb_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_wrapperspb_wrapperspb_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DoubleValue); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_wrapperspb_wrapperspb_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FloatValue); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_wrapperspb_wrapperspb_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Int64Value); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_wrapperspb_wrapperspb_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UInt64Value); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_wrapperspb_wrapperspb_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Int32Value); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_wrapperspb_wrapperspb_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UInt32Value); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_wrapperspb_wrapperspb_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BoolValue); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_wrapperspb_wrapperspb_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*StringValue); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_wrapperspb_wrapperspb_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BytesValue); 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{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_wrapperspb_wrapperspb_proto_rawDesc, - NumEnums: 0, - NumMessages: 9, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_wrapperspb_wrapperspb_proto_goTypes, - DependencyIndexes: file_wrapperspb_wrapperspb_proto_depIdxs, - MessageInfos: file_wrapperspb_wrapperspb_proto_msgTypes, - }.Build() - File_wrapperspb_wrapperspb_proto = out.File - file_wrapperspb_wrapperspb_proto_rawDesc = nil - file_wrapperspb_wrapperspb_proto_goTypes = nil - file_wrapperspb_wrapperspb_proto_depIdxs = nil -} diff --git a/pkg/proto/wrapperspb/wrapperspb.proto b/pkg/proto/wrapperspb/wrapperspb.proto deleted file mode 100644 index ec1bdca20..000000000 --- a/pkg/proto/wrapperspb/wrapperspb.proto +++ /dev/null @@ -1,91 +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. - -syntax = "proto3"; - -package OpenIMServer.protobuf; - -option go_package = "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/wrapperspb"; - -// Wrapper message for `double`. -// -// The JSON representation for `DoubleValue` is JSON number. -message DoubleValue { - // The double value. - double value = 1; -} - -// Wrapper message for `float`. -// -// The JSON representation for `FloatValue` is JSON number. -message FloatValue { - // The float value. - float value = 1; -} - -// Wrapper message for `int64`. -// -// The JSON representation for `Int64Value` is JSON string. -message Int64Value { - // The int64 value. - int64 value = 1; -} - -// Wrapper message for `uint64`. -// -// The JSON representation for `UInt64Value` is JSON string. -message UInt64Value { - // The uint64 value. - uint64 value = 1; -} - -// Wrapper message for `int32`. -// -// The JSON representation for `Int32Value` is JSON number. -message Int32Value { - // The int32 value. - int32 value = 1; -} - -// Wrapper message for `uint32`. -// -// The JSON representation for `UInt32Value` is JSON number. -message UInt32Value { - // The uint32 value. - uint32 value = 1; -} - -// Wrapper message for `bool`. -// -// The JSON representation for `BoolValue` is JSON `true` and `false`. -message BoolValue { - // The bool value. - bool value = 1; -} - -// Wrapper message for `string`. -// -// The JSON representation for `StringValue` is JSON string. -message StringValue { - // The string value. - string value = 1; -} - -// Wrapper message for `bytes`. -// -// The JSON representation for `BytesValue` is JSON string. -message BytesValue { - // The bytes value. - bytes value = 1; -} \ No newline at end of file diff --git a/pkg/rpcclient/auth.go b/pkg/rpcclient/auth.go index aa13ed898..9d667f1ad 100644 --- a/pkg/rpcclient/auth.go +++ b/pkg/rpcclient/auth.go @@ -19,9 +19,9 @@ import ( "google.golang.org/grpc" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/config" - "github.com/OpenIMSDK/Open-IM-Server/pkg/discoveryregistry" - "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/auth" + "github.com/OpenIMSDK/protocol/auth" + "github.com/OpenIMSDK/tools/config" + "github.com/OpenIMSDK/tools/discoveryregistry" ) func NewAuth(discov discoveryregistry.SvcDiscoveryRegistry) *Auth { diff --git a/pkg/rpcclient/conversation.go b/pkg/rpcclient/conversation.go index 71867620d..d4116e9f9 100644 --- a/pkg/rpcclient/conversation.go +++ b/pkg/rpcclient/conversation.go @@ -20,10 +20,10 @@ import ( "google.golang.org/grpc" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/config" - "github.com/OpenIMSDK/Open-IM-Server/pkg/discoveryregistry" - "github.com/OpenIMSDK/Open-IM-Server/pkg/errs" - pbConversation "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/conversation" + pbConversation "github.com/OpenIMSDK/protocol/conversation" + "github.com/OpenIMSDK/tools/config" + "github.com/OpenIMSDK/tools/discoveryregistry" + "github.com/OpenIMSDK/tools/errs" ) type Conversation struct { diff --git a/pkg/rpcclient/friend.go b/pkg/rpcclient/friend.go index 5a8ac0633..c27f4ef3f 100644 --- a/pkg/rpcclient/friend.go +++ b/pkg/rpcclient/friend.go @@ -19,10 +19,10 @@ import ( "google.golang.org/grpc" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/config" - "github.com/OpenIMSDK/Open-IM-Server/pkg/discoveryregistry" - "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/friend" - sdkws "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/sdkws" + "github.com/OpenIMSDK/protocol/friend" + sdkws "github.com/OpenIMSDK/protocol/sdkws" + "github.com/OpenIMSDK/tools/config" + "github.com/OpenIMSDK/tools/discoveryregistry" ) type Friend struct { diff --git a/pkg/rpcclient/group.go b/pkg/rpcclient/group.go index 06333234f..ce624a085 100644 --- a/pkg/rpcclient/group.go +++ b/pkg/rpcclient/group.go @@ -20,13 +20,13 @@ import ( "google.golang.org/grpc" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/config" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/constant" - "github.com/OpenIMSDK/Open-IM-Server/pkg/discoveryregistry" - "github.com/OpenIMSDK/Open-IM-Server/pkg/errs" - "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/group" - "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/sdkws" - "github.com/OpenIMSDK/Open-IM-Server/pkg/utils" + "github.com/OpenIMSDK/protocol/group" + "github.com/OpenIMSDK/protocol/sdkws" + "github.com/OpenIMSDK/tools/config" + "github.com/OpenIMSDK/tools/constant" + "github.com/OpenIMSDK/tools/discoveryregistry" + "github.com/OpenIMSDK/tools/errs" + "github.com/OpenIMSDK/tools/utils" ) type Group struct { diff --git a/pkg/rpcclient/msg.go b/pkg/rpcclient/msg.go index a012a5a5f..bfc7bf73f 100644 --- a/pkg/rpcclient/msg.go +++ b/pkg/rpcclient/msg.go @@ -21,13 +21,13 @@ import ( "google.golang.org/grpc" "google.golang.org/protobuf/proto" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/config" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/constant" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/log" - "github.com/OpenIMSDK/Open-IM-Server/pkg/discoveryregistry" - "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/msg" - "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/sdkws" - "github.com/OpenIMSDK/Open-IM-Server/pkg/utils" + "github.com/OpenIMSDK/protocol/msg" + "github.com/OpenIMSDK/protocol/sdkws" + "github.com/OpenIMSDK/tools/config" + "github.com/OpenIMSDK/tools/constant" + "github.com/OpenIMSDK/tools/discoveryregistry" + "github.com/OpenIMSDK/tools/log" + "github.com/OpenIMSDK/tools/utils" // "google.golang.org/protobuf/proto". ) diff --git a/pkg/rpcclient/notification/conevrsation.go b/pkg/rpcclient/notification/conevrsation.go index d2995df3d..ac40eb887 100644 --- a/pkg/rpcclient/notification/conevrsation.go +++ b/pkg/rpcclient/notification/conevrsation.go @@ -17,9 +17,9 @@ package notification import ( "context" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/constant" - "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/sdkws" "github.com/OpenIMSDK/Open-IM-Server/pkg/rpcclient" + "github.com/OpenIMSDK/protocol/sdkws" + "github.com/OpenIMSDK/tools/constant" ) type ConversationNotificationSender struct { diff --git a/pkg/rpcclient/notification/friend.go b/pkg/rpcclient/notification/friend.go index e7df2e6cd..05c2b1e6f 100644 --- a/pkg/rpcclient/notification/friend.go +++ b/pkg/rpcclient/notification/friend.go @@ -17,15 +17,15 @@ package notification import ( "context" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/mcontext" + "github.com/OpenIMSDK/tools/mcontext" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/constant" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/convert" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/controller" relationTb "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/table/relation" - pbFriend "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/friend" - "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/sdkws" "github.com/OpenIMSDK/Open-IM-Server/pkg/rpcclient" + pbFriend "github.com/OpenIMSDK/protocol/friend" + "github.com/OpenIMSDK/protocol/sdkws" + "github.com/OpenIMSDK/tools/constant" ) type FriendNotificationSender struct { diff --git a/pkg/rpcclient/notification/group.go b/pkg/rpcclient/notification/group.go index 22aa694c7..e70bf38e1 100644 --- a/pkg/rpcclient/notification/group.go +++ b/pkg/rpcclient/notification/group.go @@ -18,16 +18,16 @@ import ( "context" "fmt" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/constant" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/controller" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/table/relation" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/log" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/mcontext" - "github.com/OpenIMSDK/Open-IM-Server/pkg/errs" - pbGroup "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/group" - "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/sdkws" "github.com/OpenIMSDK/Open-IM-Server/pkg/rpcclient" - "github.com/OpenIMSDK/Open-IM-Server/pkg/utils" + pbGroup "github.com/OpenIMSDK/protocol/group" + "github.com/OpenIMSDK/protocol/sdkws" + "github.com/OpenIMSDK/tools/constant" + "github.com/OpenIMSDK/tools/errs" + "github.com/OpenIMSDK/tools/log" + "github.com/OpenIMSDK/tools/mcontext" + "github.com/OpenIMSDK/tools/utils" ) func NewGroupNotificationSender( diff --git a/pkg/rpcclient/notification/msg.go b/pkg/rpcclient/notification/msg.go index bcc6865b1..f9cf68bcb 100644 --- a/pkg/rpcclient/notification/msg.go +++ b/pkg/rpcclient/notification/msg.go @@ -17,9 +17,9 @@ package notification import ( "context" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/constant" - "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/sdkws" "github.com/OpenIMSDK/Open-IM-Server/pkg/rpcclient" + "github.com/OpenIMSDK/protocol/sdkws" + "github.com/OpenIMSDK/tools/constant" ) type MsgNotificationSender struct { diff --git a/pkg/rpcclient/push.go b/pkg/rpcclient/push.go index 8e19782bd..a4b122a29 100644 --- a/pkg/rpcclient/push.go +++ b/pkg/rpcclient/push.go @@ -19,9 +19,9 @@ import ( "google.golang.org/grpc" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/config" - "github.com/OpenIMSDK/Open-IM-Server/pkg/discoveryregistry" - "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/push" + "github.com/OpenIMSDK/protocol/push" + "github.com/OpenIMSDK/tools/config" + "github.com/OpenIMSDK/tools/discoveryregistry" ) type Push struct { diff --git a/pkg/rpcclient/third.go b/pkg/rpcclient/third.go index e1181b8f4..9822f48fa 100644 --- a/pkg/rpcclient/third.go +++ b/pkg/rpcclient/third.go @@ -23,9 +23,9 @@ import ( "google.golang.org/grpc" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/config" - "github.com/OpenIMSDK/Open-IM-Server/pkg/discoveryregistry" - "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/third" + "github.com/OpenIMSDK/protocol/third" + "github.com/OpenIMSDK/tools/config" + "github.com/OpenIMSDK/tools/discoveryregistry" ) type Third struct { diff --git a/pkg/rpcclient/user.go b/pkg/rpcclient/user.go index 023c26d3c..7e5079f8c 100644 --- a/pkg/rpcclient/user.go +++ b/pkg/rpcclient/user.go @@ -20,13 +20,13 @@ import ( "google.golang.org/grpc" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/config" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/tokenverify" - "github.com/OpenIMSDK/Open-IM-Server/pkg/discoveryregistry" - "github.com/OpenIMSDK/Open-IM-Server/pkg/errs" - "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/sdkws" - "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/user" - "github.com/OpenIMSDK/Open-IM-Server/pkg/utils" + "github.com/OpenIMSDK/protocol/sdkws" + "github.com/OpenIMSDK/protocol/user" + "github.com/OpenIMSDK/tools/config" + "github.com/OpenIMSDK/tools/discoveryregistry" + "github.com/OpenIMSDK/tools/errs" + "github.com/OpenIMSDK/tools/tokenverify" + "github.com/OpenIMSDK/tools/utils" ) type User struct { diff --git a/pkg/startrpc/start.go b/pkg/startrpc/start.go deleted file mode 100644 index 3eeaaa3a2..000000000 --- a/pkg/startrpc/start.go +++ /dev/null @@ -1,112 +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. - -package startrpc - -import ( - "fmt" - "net" - "strconv" - "time" - - grpcPrometheus "github.com/grpc-ecosystem/go-grpc-prometheus" - "google.golang.org/grpc" - "google.golang.org/grpc/credentials/insecure" - - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/config" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/log" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/mw" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/network" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/prome" - "github.com/OpenIMSDK/Open-IM-Server/pkg/discoveryregistry" - openKeeper "github.com/OpenIMSDK/Open-IM-Server/pkg/discoveryregistry/zookeeper" - "github.com/OpenIMSDK/Open-IM-Server/pkg/utils" -) - -func Start( - rpcPort int, - rpcRegisterName string, - prometheusPort int, - rpcFn func(client discoveryregistry.SvcDiscoveryRegistry, server *grpc.Server) error, - options ...grpc.ServerOption, -) error { - fmt.Println( - "start", - rpcRegisterName, - "server, port: ", - rpcPort, - "prometheusPort:", - prometheusPort, - ", OpenIM version: ", - config.Version, - ) - listener, err := net.Listen( - "tcp", - net.JoinHostPort(network.GetListenIP(config.Config.Rpc.ListenIP), strconv.Itoa(rpcPort)), - ) - if err != nil { - return err - } - defer listener.Close() - zkClient, err := openKeeper.NewClient(config.Config.Zookeeper.ZkAddr, config.Config.Zookeeper.Schema, - openKeeper.WithFreq(time.Hour), openKeeper.WithUserNameAndPassword( - config.Config.Zookeeper.Username, - config.Config.Zookeeper.Password, - ), openKeeper.WithRoundRobin(), openKeeper.WithTimeout(10), openKeeper.WithLogger(log.NewZkLogger())) - if err != nil { - return utils.Wrap1(err) - } - defer zkClient.CloseZK() - zkClient.AddOption(mw.GrpcClient(), grpc.WithTransportCredentials(insecure.NewCredentials())) - registerIP, err := network.GetRpcRegisterIP(config.Config.Rpc.RegisterIP) - if err != nil { - return err - } - // ctx 中间件 - if config.Config.Prometheus.Enable { - prome.NewGrpcRequestCounter() - prome.NewGrpcRequestFailedCounter() - prome.NewGrpcRequestSuccessCounter() - unaryInterceptor := mw.InterceptChain(grpcPrometheus.UnaryServerInterceptor, mw.RpcServerInterceptor) - options = append(options, []grpc.ServerOption{ - grpc.StreamInterceptor(grpcPrometheus.StreamServerInterceptor), - grpc.UnaryInterceptor(unaryInterceptor), - }...) - } else { - options = append(options, mw.GrpcServer()) - } - srv := grpc.NewServer(options...) - defer srv.GracefulStop() - err = rpcFn(zkClient, srv) - if err != nil { - return utils.Wrap1(err) - } - err = zkClient.Register( - rpcRegisterName, - registerIP, - rpcPort, - grpc.WithTransportCredentials(insecure.NewCredentials()), - ) - if err != nil { - return utils.Wrap1(err) - } - go func() { - if config.Config.Prometheus.Enable && prometheusPort != 0 { - if err := prome.StartPrometheusSrv(prometheusPort); err != nil { - panic(err.Error()) - } - } - }() - return utils.Wrap1(srv.Serve(listener)) -} diff --git a/pkg/statistics/statistics.go b/pkg/statistics/statistics.go index 2a6ae01ae..de6d04fec 100644 --- a/pkg/statistics/statistics.go +++ b/pkg/statistics/statistics.go @@ -18,7 +18,7 @@ import ( "context" "time" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/log" + "github.com/OpenIMSDK/tools/log" ) type Statistics struct { diff --git a/pkg/utils/base64.go b/pkg/utils/base64.go deleted file mode 100644 index 9502dcde8..000000000 --- a/pkg/utils/base64.go +++ /dev/null @@ -1,26 +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. - -package utils - -import "encoding/base64" - -func Base64Encode(data string) string { - return base64.StdEncoding.EncodeToString([]byte(data)) -} - -func Base64Decode(data string) string { - decodedByte, _ := base64.StdEncoding.DecodeString(data) - return string(decodedByte) -} diff --git a/pkg/utils/callback.go b/pkg/utils/callback.go deleted file mode 100644 index 7eed52409..000000000 --- a/pkg/utils/callback.go +++ /dev/null @@ -1,33 +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. - -package utils - -import ( - "google.golang.org/protobuf/proto" - - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/constant" - sdkws "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/sdkws" -) - -func GetContent(msg *sdkws.MsgData) string { - if msg.ContentType >= constant.NotificationBegin && msg.ContentType <= constant.NotificationEnd { - var tips sdkws.TipsComm - _ = proto.Unmarshal(msg.Content, &tips) - content := tips.JsonDetail - return content - } else { - return string(msg.Content) - } -} diff --git a/pkg/utils/encryption.go b/pkg/utils/encryption.go deleted file mode 100644 index 23266d8f7..000000000 --- a/pkg/utils/encryption.go +++ /dev/null @@ -1,78 +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. - -package utils - -import ( - "bytes" - "crypto/aes" - "crypto/cipher" - "crypto/md5" - "encoding/hex" - "errors" -) - -func Md5(s string, salt ...string) string { - h := md5.New() - h.Write([]byte(s)) - if len(salt) > 0 { - h.Write([]byte(salt[0])) - } - cipher := h.Sum(nil) - return hex.EncodeToString(cipher) -} - -func AesEncrypt(data []byte, key []byte) ([]byte, error) { - block, err := aes.NewCipher(key) - if err != nil { - return nil, err - } - blockSize := block.BlockSize() - encryptBytes := pkcs7Padding(data, blockSize) - crypted := make([]byte, len(encryptBytes)) - blockMode := cipher.NewCBCEncrypter(block, key[:blockSize]) - blockMode.CryptBlocks(crypted, encryptBytes) - return crypted, nil -} - -func AesDecrypt(data []byte, key []byte) ([]byte, error) { - block, err := aes.NewCipher(key) - if err != nil { - return nil, err - } - blockSize := block.BlockSize() - blockMode := cipher.NewCBCDecrypter(block, key[:blockSize]) - crypted := make([]byte, len(data)) - blockMode.CryptBlocks(crypted, data) - crypted, err = pkcs7UnPadding(crypted) - if err != nil { - return nil, err - } - return crypted, nil -} - -func pkcs7Padding(data []byte, blockSize int) []byte { - padding := blockSize - len(data)%blockSize - padText := bytes.Repeat([]byte{byte(padding)}, padding) - return append(data, padText...) -} - -func pkcs7UnPadding(data []byte) ([]byte, error) { - length := len(data) - if length == 0 { - return nil, errors.New("encrypt error") - } - unPadding := int(data[length-1]) - return data[:(length - unPadding)], nil -} diff --git a/pkg/utils/file.go b/pkg/utils/file.go deleted file mode 100644 index 79528661d..000000000 --- a/pkg/utils/file.go +++ /dev/null @@ -1,98 +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. - -package utils - -import ( - "fmt" - "math/rand" - "os" - "path" - "strconv" - "strings" - "time" - - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/constant" -) - -const ( - BYTE = 1 << (10 * iota) - KILOBYTE - MEGABYTE - GIGABYTE - TERABYTE - PETABYTE - EXABYTE -) - -// Determine whether the given path is a folder -func IsDir(path string) bool { - s, err := os.Stat(path) - if err != nil { - return false - } - return s.IsDir() -} - -// Determine whether the given path is a file -func IsFile(path string) bool { - return !IsDir(path) -} - -// Create a directory -func MkDir(path string) error { - return os.MkdirAll(path, os.ModePerm) -} - -func GetNewFileNameAndContentType(fileName string, fileType int) (string, string) { - suffix := path.Ext(fileName) - newName := fmt.Sprintf("%d-%d%s", time.Now().UnixNano(), rand.Int(), fileName) - contentType := "" - if fileType == constant.ImageType { - contentType = "image/" + suffix[1:] - } - return newName, contentType -} - -func ByteSize(bytes uint64) string { - unit := "" - value := float64(bytes) - switch { - case bytes >= EXABYTE: - unit = "E" - value = value / EXABYTE - case bytes >= PETABYTE: - unit = "P" - value = value / PETABYTE - case bytes >= TERABYTE: - unit = "T" - value = value / TERABYTE - case bytes >= GIGABYTE: - unit = "G" - value = value / GIGABYTE - case bytes >= MEGABYTE: - unit = "M" - value = value / MEGABYTE - case bytes >= KILOBYTE: - unit = "K" - value = value / KILOBYTE - case bytes >= BYTE: - unit = "B" - case bytes == 0: - return "0" - } - result := strconv.FormatFloat(value, 'f', 1, 64) - result = strings.TrimSuffix(result, ".0") - return result + unit -} diff --git a/pkg/utils/get_server_ip.go b/pkg/utils/get_server_ip.go deleted file mode 100644 index aad0bf2cc..000000000 --- a/pkg/utils/get_server_ip.go +++ /dev/null @@ -1,39 +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. - -package utils - -import ( - "errors" - "net" -) - -var ServerIP = "" - -func GetLocalIP() (string, error) { - addrs, err := net.InterfaceAddrs() - if err != nil { - return "", err - } - for _, address := range addrs { - - if ipnet, ok := address.(*net.IPNet); ok && !ipnet.IP.IsLoopback() { - if ipnet.IP.To4() != nil { - return ipnet.IP.String(), nil - } - } - } - - return "", errors.New("no ip") -} diff --git a/pkg/utils/id.go b/pkg/utils/id.go deleted file mode 100644 index 25e942f36..000000000 --- a/pkg/utils/id.go +++ /dev/null @@ -1,42 +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. - -package utils - -import ( - "github.com/bwmarrin/snowflake" -) - -func init() { - var err error - idGenerator, err = snowflake.NewNode(getNodeNum()) - if err != nil { - panic(err) - } -} - -func getNodeNum() int64 { - return 1 -} - -var idGenerator *snowflake.Node - -func GenID() string { - return idGenerator.Generate().String() -} - -func GenIDs(count int) []string { - //impl - return []string{} -} diff --git a/pkg/utils/id_test.go b/pkg/utils/id_test.go deleted file mode 100644 index d6ab3e665..000000000 --- a/pkg/utils/id_test.go +++ /dev/null @@ -1,29 +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. - -package utils - -import "testing" - -func TestGenID(t *testing.T) { - m := map[string]struct{}{} - for i := 0; i < 2000; i++ { - got := GenID() - if _, ok := m[got]; !ok { - m[got] = struct{}{} - } else { - t.Error("id generate error", got) - } - } -} diff --git a/pkg/utils/image.go b/pkg/utils/image.go deleted file mode 100644 index f93591f9e..000000000 --- a/pkg/utils/image.go +++ /dev/null @@ -1,69 +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. - -package utils - -import ( - "errors" - "image" - "image/gif" - "image/jpeg" - "image/png" - "io" - "os" - - "github.com/nfnt/resize" - "golang.org/x/image/bmp" -) - -func GenSmallImage(src, dst string) error { - fIn, _ := os.Open(src) - defer fIn.Close() - - fOut, _ := os.Create(dst) - defer fOut.Close() - - if err := scale(fIn, fOut, 0, 0, 0); err != nil { - return err - } - return nil -} - -func scale(in io.Reader, out io.Writer, width, height, quality int) error { - origin, fm, err := image.Decode(in) - if err != nil { - return err - } - if width == 0 || height == 0 { - width = origin.Bounds().Max.X / 2 - height = origin.Bounds().Max.Y / 2 - } - if quality == 0 { - quality = 25 - } - canvas := resize.Thumbnail(uint(width), uint(height), origin, resize.Lanczos3) - - switch fm { - case "jpeg": - return jpeg.Encode(out, canvas, &jpeg.Options{quality}) - case "png": - return png.Encode(out, canvas) - case "gif": - return gif.Encode(out, canvas, &gif.Options{}) - case "bmp": - return bmp.Encode(out, canvas) - default: - return errors.New("ERROR FORMAT") - } -} diff --git a/pkg/utils/image_test.go b/pkg/utils/image_test.go deleted file mode 100644 index 87d78620f..000000000 --- a/pkg/utils/image_test.go +++ /dev/null @@ -1,41 +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. - -package utils - -import ( - "path/filepath" - "runtime" - "testing" - - "github.com/stretchr/testify/assert" -) - -var ( - _, b, _, _ = runtime.Caller(0) - // Root folder of this project - Root = filepath.Join(filepath.Dir(b), "../..") -) - -func Test_GenSmallImage(t *testing.T) { - println(Root) - err := GenSmallImage(Root+"/docs/open-im-logo.png", Root+"/out-test/open-im-logo-test.png") - assert.Nil(t, err) - - err = GenSmallImage(Root+"/docs/open-im-logo.png", "out-test/open-im-logo-test.png") - assert.Nil(t, err) - - err = GenSmallImage(Root+"/docs/Architecture.jpg", "out-test/Architecture-test.jpg") - assert.Nil(t, err) -} diff --git a/pkg/utils/map.go b/pkg/utils/map.go deleted file mode 100644 index cd7f3f1de..000000000 --- a/pkg/utils/map.go +++ /dev/null @@ -1,147 +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. - -package utils - -import ( - "encoding/json" - "sync" -) - -type Map struct { - sync.RWMutex - m map[interface{}]interface{} -} - -func (m *Map) init() { - if m.m == nil { - m.m = make(map[interface{}]interface{}) - } -} - -func (m *Map) UnsafeGet(key interface{}) interface{} { - if m.m == nil { - return nil - } else { - return m.m[key] - } -} - -func (m *Map) Get(key interface{}) interface{} { - m.RLock() - defer m.RUnlock() - return m.UnsafeGet(key) -} - -func (m *Map) UnsafeSet(key interface{}, value interface{}) { - m.init() - m.m[key] = value -} - -func (m *Map) Set(key interface{}, value interface{}) { - m.Lock() - defer m.Unlock() - m.UnsafeSet(key, value) -} - -func (m *Map) TestAndSet(key interface{}, value interface{}) interface{} { - m.Lock() - defer m.Unlock() - - m.init() - - if v, ok := m.m[key]; ok { - return v - } else { - m.m[key] = value - return nil - } -} - -func (m *Map) UnsafeDel(key interface{}) { - m.init() - delete(m.m, key) -} - -func (m *Map) Del(key interface{}) { - m.Lock() - defer m.Unlock() - m.UnsafeDel(key) -} - -func (m *Map) UnsafeLen() int { - if m.m == nil { - return 0 - } else { - return len(m.m) - } -} - -func (m *Map) Len() int { - m.RLock() - defer m.RUnlock() - return m.UnsafeLen() -} - -func (m *Map) UnsafeRange(f func(interface{}, interface{})) { - if m.m == nil { - return - } - for k, v := range m.m { - f(k, v) - } -} - -func (m *Map) RLockRange(f func(interface{}, interface{})) { - m.RLock() - defer m.RUnlock() - m.UnsafeRange(f) -} - -func (m *Map) LockRange(f func(interface{}, interface{})) { - m.Lock() - defer m.Unlock() - m.UnsafeRange(f) -} - -func MapToJsonString(param map[string]interface{}) string { - dataType, _ := json.Marshal(param) - dataString := string(dataType) - return dataString -} -func MapIntToJsonString(param map[string]int32) string { - dataType, _ := json.Marshal(param) - dataString := string(dataType) - return dataString -} -func JsonStringToMap(str string) (tempMap map[string]int32) { - _ = json.Unmarshal([]byte(str), &tempMap) - return tempMap -} -func GetSwitchFromOptions(Options map[string]bool, key string) (result bool) { - if Options == nil { - return true - } - if flag, ok := Options[key]; !ok || flag { - return true - } - return false -} - -func SetSwitchFromOptions(options map[string]bool, key string, value bool) { - if options == nil { - options = make(map[string]bool, 5) - } - options[key] = value -} diff --git a/pkg/utils/md5_test.go b/pkg/utils/md5_test.go deleted file mode 100644 index 1add67f32..000000000 --- a/pkg/utils/md5_test.go +++ /dev/null @@ -1,29 +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. - -package utils - -import ( - "testing" - - "github.com/stretchr/testify/assert" -) - -func Test_Md5(t *testing.T) { - result := Md5("go") - assert.Equal(t, result, "34d1f91fb2e514b8576fab1a75a89a6b") - - result2 := Md5("go") - assert.Equal(t, result, result2) -} diff --git a/pkg/utils/options.go b/pkg/utils/options.go deleted file mode 100644 index 0ade70dfe..000000000 --- a/pkg/utils/options.go +++ /dev/null @@ -1,181 +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. - -package utils - -import "github.com/OpenIMSDK/Open-IM-Server/pkg/common/constant" - -type Options map[string]bool -type OptionsOpt func(Options) - -func NewOptions(opts ...OptionsOpt) Options { - options := make(map[string]bool, 11) - options[constant.IsNotNotification] = false - options[constant.IsSendMsg] = false - options[constant.IsHistory] = false - options[constant.IsPersistent] = false - options[constant.IsOfflinePush] = false - options[constant.IsUnreadCount] = false - options[constant.IsConversationUpdate] = false - options[constant.IsSenderSync] = false - options[constant.IsNotPrivate] = false - options[constant.IsSenderConversationUpdate] = false - options[constant.IsSenderNotificationPush] = false - options[constant.IsReactionFromCache] = false - for _, opt := range opts { - opt(options) - } - return options -} - -func NewMsgOptions() Options { - options := make(map[string]bool, 11) - options[constant.IsOfflinePush] = false - return make(map[string]bool) -} - -func WithOptions(options Options, opts ...OptionsOpt) Options { - for _, opt := range opts { - opt(options) - } - return options -} - -func WithNotNotification(b bool) OptionsOpt { - return func(options Options) { - options[constant.IsNotNotification] = b - } -} - -func WithSendMsg(b bool) OptionsOpt { - return func(options Options) { - options[constant.IsSendMsg] = b - } -} - -func WithHistory(b bool) OptionsOpt { - return func(options Options) { - options[constant.IsHistory] = b - } -} - -func WithPersistent() OptionsOpt { - return func(options Options) { - options[constant.IsPersistent] = true - } -} - -func WithOfflinePush(b bool) OptionsOpt { - return func(options Options) { - options[constant.IsOfflinePush] = b - } -} - -func WithUnreadCount(b bool) OptionsOpt { - return func(options Options) { - options[constant.IsUnreadCount] = b - } -} - -func WithConversationUpdate() OptionsOpt { - return func(options Options) { - options[constant.IsConversationUpdate] = true - } -} - -func WithSenderSync() OptionsOpt { - return func(options Options) { - options[constant.IsSenderSync] = true - } -} - -func WithNotPrivate() OptionsOpt { - return func(options Options) { - options[constant.IsNotPrivate] = true - } -} - -func WithSenderConversationUpdate() OptionsOpt { - return func(options Options) { - options[constant.IsSenderConversationUpdate] = true - } -} - -func WithSenderNotificationPush() OptionsOpt { - return func(options Options) { - options[constant.IsSenderNotificationPush] = true - } -} - -func WithReactionFromCache() OptionsOpt { - return func(options Options) { - options[constant.IsReactionFromCache] = true - } -} - -func (o Options) Is(notification string) bool { - v, ok := o[notification] - if !ok || v { - return true - } - return false -} - -func (o Options) IsNotNotification() bool { - return o.Is(constant.IsNotNotification) -} - -func (o Options) IsSendMsg() bool { - return o.Is(constant.IsSendMsg) -} - -func (o Options) IsHistory() bool { - return o.Is(constant.IsHistory) -} - -func (o Options) IsPersistent() bool { - return o.Is(constant.IsPersistent) -} - -func (o Options) IsOfflinePush() bool { - return o.Is(constant.IsOfflinePush) -} - -func (o Options) IsUnreadCount() bool { - return o.Is(constant.IsUnreadCount) -} - -func (o Options) IsConversationUpdate() bool { - return o.Is(constant.IsConversationUpdate) -} - -func (o Options) IsSenderSync() bool { - return o.Is(constant.IsSenderSync) -} - -func (o Options) IsNotPrivate() bool { - return o.Is(constant.IsNotPrivate) -} - -func (o Options) IsSenderConversationUpdate() bool { - return o.Is(constant.IsSenderConversationUpdate) -} - -func (o Options) IsSenderNotificationPush() bool { - return o.Is(constant.IsSenderNotificationPush) -} - -func (o Options) IsReactionFromCache() bool { - return o.Is(constant.IsReactionFromCache) -} diff --git a/pkg/utils/page.go b/pkg/utils/page.go deleted file mode 100644 index ad19decb0..000000000 --- a/pkg/utils/page.go +++ /dev/null @@ -1,24 +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. - -package utils - -import "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/sdkws" - -func GetPage(pagination *sdkws.RequestPagination) (pageNumber, showNumber int32) { - if pagination != nil { - return pagination.PageNumber, pagination.ShowNumber - } - return -} diff --git a/pkg/utils/platform_number_id_to_name_test.go b/pkg/utils/platform_number_id_to_name_test.go deleted file mode 100644 index 47c4016ed..000000000 --- a/pkg/utils/platform_number_id_to_name_test.go +++ /dev/null @@ -1,61 +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. - -package utils - -import ( - "testing" - - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/constant" - - "github.com/stretchr/testify/assert" -) - -func Test_PlatformIDToName(t *testing.T) { - assert.Equal(t, constant.PlatformIDToName(1), "IOS") - assert.Equal(t, constant.PlatformIDToName(2), "Android") - assert.Equal(t, constant.PlatformIDToName(3), "Windows") - assert.Equal(t, constant.PlatformIDToName(4), "OSX") - assert.Equal(t, constant.PlatformIDToName(5), "Web") - assert.Equal(t, constant.PlatformIDToName(6), "MiniWeb") - assert.Equal(t, constant.PlatformIDToName(7), "Linux") - - assert.Equal(t, constant.PlatformIDToName(0), "") -} - -func Test_PlatformNameToID(t *testing.T) { - assert.Equal(t, constant.PlatformNameToID("IOS"), int32(1)) - assert.Equal(t, constant.PlatformNameToID("Android"), int32(2)) - assert.Equal(t, constant.PlatformNameToID("Windows"), int32(3)) - assert.Equal(t, constant.PlatformNameToID("OSX"), int32(4)) - assert.Equal(t, constant.PlatformNameToID("Web"), int32(5)) - assert.Equal(t, constant.PlatformNameToID("MiniWeb"), int32(6)) - assert.Equal(t, constant.PlatformNameToID("Linux"), int32(7)) - - assert.Equal(t, constant.PlatformNameToID("UnknownDevice"), int32(0)) - assert.Equal(t, constant.PlatformNameToID(""), int32(0)) -} - -func Test_PlatformNameToClass(t *testing.T) { - assert.Equal(t, constant.PlatformNameToClass("IOS"), "Mobile") - assert.Equal(t, constant.PlatformNameToClass("Android"), "Mobile") - assert.Equal(t, constant.PlatformNameToClass("OSX"), "PC") - assert.Equal(t, constant.PlatformNameToClass("Windows"), "PC") - assert.Equal(t, constant.PlatformNameToClass("Web"), "PC") - assert.Equal(t, constant.PlatformNameToClass("MiniWeb"), "Mobile") - assert.Equal(t, constant.PlatformNameToClass("Linux"), "PC") - - assert.Equal(t, constant.PlatformNameToClass("UnknownDevice"), "") - assert.Equal(t, constant.PlatformNameToClass(""), "") -} diff --git a/pkg/utils/retry/retry.go b/pkg/utils/retry/retry.go deleted file mode 100644 index eb2a387cb..000000000 --- a/pkg/utils/retry/retry.go +++ /dev/null @@ -1,198 +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. - -package retry - -import ( - "context" - "errors" - "fmt" - "runtime/debug" - "time" -) - -var ( - ErrorAbort = errors.New("stop retry") - ErrorTimeout = errors.New("retry timeout") - ErrorContextDeadlineExceed = errors.New("context deadline exceeded") - ErrorEmptyRetryFunc = errors.New("empty retry function") - ErrorTimeFormat = errors.New("time out err") -) - -type RetriesFunc func() error -type Option func(c *Config) -type HookFunc func() -type RetriesChecker func(err error) (needRetry bool) -type Config struct { - MaxRetryTimes int - Timeout time.Duration - RetryChecker RetriesChecker - Strategy Strategy - RecoverPanic bool - BeforeTry HookFunc - AfterTry HookFunc -} - -var ( - DefaultMaxRetryTimes = 3 - DefaultTimeout = time.Minute - DefaultInterval = time.Second * 2 - DefaultRetryChecker = func(err error) bool { - return !errors.Is(err, ErrorAbort) // not abort error, should continue retry - } -) - -func newDefaultConfig() *Config { - return &Config{ - MaxRetryTimes: DefaultMaxRetryTimes, - RetryChecker: DefaultRetryChecker, - Timeout: DefaultTimeout, - Strategy: NewLinear(DefaultInterval), - BeforeTry: func() {}, - AfterTry: func() {}, - } -} - -func WithTimeout(timeout time.Duration) Option { - return func(c *Config) { - c.Timeout = timeout - } -} - -func WithMaxRetryTimes(times int) Option { - return func(c *Config) { - c.MaxRetryTimes = times - } -} - -func WithRecoverPanic() Option { - return func(c *Config) { - c.RecoverPanic = true - } -} - -func WithBeforeHook(hook HookFunc) Option { - return func(c *Config) { - c.BeforeTry = hook - } -} - -func WithAfterHook(hook HookFunc) Option { - return func(c *Config) { - c.AfterTry = hook - } -} - -func WithRetryChecker(checker RetriesChecker) Option { - return func(c *Config) { - c.RetryChecker = checker - } -} - -func WithBackOffStrategy(s BackoffStrategy, duration time.Duration) Option { - return func(c *Config) { - switch s { - case StrategyConstant: - c.Strategy = NewConstant(duration) - case StrategyLinear: - c.Strategy = NewLinear(duration) - case StrategyFibonacci: - c.Strategy = NewFibonacci(duration) - } - } -} - -func WithCustomStrategy(s Strategy) Option { - return func(c *Config) { - c.Strategy = s - } -} - -func Do(ctx context.Context, fn RetriesFunc, opts ...Option) error { - if fn == nil { - return ErrorEmptyRetryFunc - } - var ( - abort = make(chan struct{}, 1) // caller choose to abort retry - run = make(chan error, 1) - panicInfoChan = make(chan string, 1) - - timer *time.Timer - runErr error - ) - config := newDefaultConfig() - for _, o := range opts { - o(config) - } - if config.Timeout > 0 { - timer = time.NewTimer(config.Timeout) - } else { - return ErrorTimeFormat - } - go func() { - var err error - defer func() { - if e := recover(); e == nil { - return - } else { - panicInfoChan <- fmt.Sprintf("retry function panic has occured, err=%v, stack:%s", e, string(debug.Stack())) - } - }() - for i := 0; i < config.MaxRetryTimes; i++ { - config.BeforeTry() - err = fn() - config.AfterTry() - if err == nil { - run <- nil - return - } - // check whether to retry - if config.RetryChecker != nil { - needRetry := config.RetryChecker(err) - if !needRetry { - abort <- struct{}{} - return - } - } - if config.Strategy != nil { - interval := config.Strategy.Sleep(i + 1) - <-time.After(interval) - } - } - run <- err - }() - select { - case <-ctx.Done(): - // context deadline exceed - return ErrorContextDeadlineExceed - case <-timer.C: - // timeout - return ErrorTimeout - case <-abort: - // caller abort - return ErrorAbort - case msg := <-panicInfoChan: - // panic occurred - if !config.RecoverPanic { - panic(msg) - } - runErr = fmt.Errorf("panic occurred=%s", msg) - case e := <-run: - // normal run - if e != nil { - runErr = fmt.Errorf("retry failed, err=%w", e) - } - } - return runErr -} diff --git a/pkg/utils/retry/stratey.go b/pkg/utils/retry/stratey.go deleted file mode 100644 index 8dca54161..000000000 --- a/pkg/utils/retry/stratey.go +++ /dev/null @@ -1,70 +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. - -package retry - -import "time" - -type BackoffStrategy int - -const ( - StrategyConstant BackoffStrategy = iota - StrategyLinear - StrategyFibonacci -) - -type Strategy interface { - Sleep(times int) time.Duration -} -type Constant struct { - startInterval time.Duration -} - -func NewConstant(d time.Duration) *Constant { - return &Constant{startInterval: d} -} - -type Linear struct { - startInterval time.Duration -} - -func NewLinear(d time.Duration) *Linear { - return &Linear{startInterval: d} -} - -type Fibonacci struct { - startInterval time.Duration -} - -func NewFibonacci(d time.Duration) *Fibonacci { - return &Fibonacci{startInterval: d} -} - -func (c *Constant) Sleep(_ int) time.Duration { - return c.startInterval -} -func (l *Linear) Sleep(times int) time.Duration { - return l.startInterval * time.Duration(times) - -} -func (f *Fibonacci) Sleep(times int) time.Duration { - return f.startInterval * time.Duration(fibonacciNumber(times)) - -} -func fibonacciNumber(n int) int { - if n == 0 || n == 1 { - return n - } - return fibonacciNumber(n-1) + fibonacciNumber(n-2) -} diff --git a/pkg/utils/splitter/tools.go b/pkg/utils/splitter/tools.go deleted file mode 100644 index d36b9c3be..000000000 --- a/pkg/utils/splitter/tools.go +++ /dev/null @@ -1,42 +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. - -package splitter - -type SplitResult struct { - Item []string -} -type Splitter struct { - splitCount int - data []string -} - -func NewSplitter(splitCount int, data []string) *Splitter { - return &Splitter{splitCount: splitCount, data: data} -} -func (s *Splitter) GetSplitResult() (result []*SplitResult) { - remain := len(s.data) % s.splitCount - integer := len(s.data) / s.splitCount - for i := 0; i < integer; i++ { - r := new(SplitResult) - r.Item = s.data[i*s.splitCount : (i+1)*s.splitCount] - result = append(result, r) - } - if remain > 0 { - r := new(SplitResult) - r.Item = s.data[integer*s.splitCount:] - result = append(result, r) - } - return result -} diff --git a/pkg/utils/strings.go b/pkg/utils/strings.go deleted file mode 100644 index 641c43e9f..000000000 --- a/pkg/utils/strings.go +++ /dev/null @@ -1,141 +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. - -package utils - -import ( - "encoding/json" - "math/rand" - "strconv" -) - -func IntToString(i int) string { - return strconv.FormatInt(int64(i), 10) -} - -func StringToInt(i string) int { - j, _ := strconv.Atoi(i) - return j -} -func StringToInt64(i string) int64 { - j, _ := strconv.ParseInt(i, 10, 64) - return j -} -func StringToInt32(i string) int32 { - j, _ := strconv.ParseInt(i, 10, 64) - return int32(j) -} -func Int32ToString(i int32) string { - return strconv.FormatInt(int64(i), 10) -} - -func Uint32ToString(i uint32) string { - return strconv.FormatInt(int64(i), 10) -} - -// judge a string whether in the string list -func IsContain(target string, List []string) bool { - for _, element := range List { - - if target == element { - return true - } - } - return false -} -func IsContainInt32(target int32, List []int32) bool { - for _, element := range List { - if target == element { - return true - } - } - return false -} -func IsContainInt(target int, List []int) bool { - for _, element := range List { - if target == element { - return true - } - } - return false -} -func InterfaceArrayToStringArray(data []interface{}) (i []string) { - for _, param := range data { - i = append(i, param.(string)) - } - return i -} -func StructToJsonString(param interface{}) string { - dataType, _ := json.Marshal(param) - dataString := string(dataType) - return dataString -} - -func StructToJsonBytes(param interface{}) []byte { - dataType, _ := json.Marshal(param) - return dataType -} - -// The incoming parameter must be a pointer -func JsonStringToStruct(s string, args interface{}) error { - err := json.Unmarshal([]byte(s), args) - return err -} - -func GetMsgID(sendID string) string { - t := int64ToString(GetCurrentTimestampByNano()) - return Md5(t + sendID + int64ToString(rand.Int63n(GetCurrentTimestampByNano()))) -} - -func int64ToString(i int64) string { - return strconv.FormatInt(i, 10) -} -func Int64ToString(i int64) string { - return strconv.FormatInt(i, 10) -} - -func RemoveDuplicateElement(idList []string) []string { - result := make([]string, 0, len(idList)) - temp := map[string]struct{}{} - for _, item := range idList { - if _, ok := temp[item]; !ok { - temp[item] = struct{}{} - result = append(result, item) - } - } - return result -} - -func RemoveDuplicate[T comparable](arr []T) []T { - result := make([]T, 0, len(arr)) - temp := map[T]struct{}{} - for _, item := range arr { - if _, ok := temp[item]; !ok { - temp[item] = struct{}{} - result = append(result, item) - } - } - return result -} - -func IsDuplicateStringSlice(arr []string) bool { - t := make(map[string]struct{}) - for _, s := range arr { - if _, ok := t[s]; ok { - return true - } - t[s] = struct{}{} - } - return false -} diff --git a/pkg/utils/time_format.go b/pkg/utils/time_format.go deleted file mode 100644 index 9278a58ef..000000000 --- a/pkg/utils/time_format.go +++ /dev/null @@ -1,97 +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. - -package utils - -import ( - "strconv" - "time" -) - -const ( - TimeOffset = 8 * 3600 //8 hour offset - HalfOffset = 12 * 3600 //Half-day hourly offset -) - -// Get the current timestamp by Second -func GetCurrentTimestampBySecond() int64 { - return time.Now().Unix() -} - -// Convert timestamp to time.Time type -func UnixSecondToTime(second int64) time.Time { - return time.Unix(second, 0) -} - -// Convert nano timestamp to time.Time type -func UnixNanoSecondToTime(nanoSecond int64) time.Time { - return time.Unix(0, nanoSecond) -} -func UnixMillSecondToTime(millSecond int64) time.Time { - return time.Unix(0, millSecond*1e6) -} - -// Get the current timestamp by Nano -func GetCurrentTimestampByNano() int64 { - return time.Now().UnixNano() -} - -// Get the current timestamp by Mill -func GetCurrentTimestampByMill() int64 { - return time.Now().UnixNano() / 1e6 -} - -// Get the timestamp at 0 o'clock of the day -func GetCurDayZeroTimestamp() int64 { - timeStr := time.Now().Format("2006-01-02") - t, _ := time.Parse("2006-01-02", timeStr) - return t.Unix() - TimeOffset -} - -// Get the timestamp at 12 o'clock on the day -func GetCurDayHalfTimestamp() int64 { - return GetCurDayZeroTimestamp() + HalfOffset - -} - -// Get the formatted time at 0 o'clock of the day, the format is "2006-01-02_00-00-00" -func GetCurDayZeroTimeFormat() string { - return time.Unix(GetCurDayZeroTimestamp(), 0).Format("2006-01-02_15-04-05") -} - -// Get the formatted time at 12 o'clock of the day, the format is "2006-01-02_12-00-00" -func GetCurDayHalfTimeFormat() string { - return time.Unix(GetCurDayZeroTimestamp()+HalfOffset, 0).Format("2006-01-02_15-04-05") -} -func GetTimeStampByFormat(datetime string) string { - timeLayout := "2006-01-02 15:04:05" - loc, _ := time.LoadLocation("Local") - tmp, _ := time.ParseInLocation(timeLayout, datetime, loc) - timestamp := tmp.Unix() - return strconv.FormatInt(timestamp, 10) -} - -func TimeStringFormatTimeUnix(timeFormat string, timeSrc string) int64 { - tm, _ := time.Parse(timeFormat, timeSrc) - return tm.Unix() -} - -func TimeStringToTime(timeString string) (time.Time, error) { - t, err := time.Parse("2006-01-02", timeString) - return t, err -} - -func TimeToString(t time.Time) string { - return t.Format("2006-01-02") -} diff --git a/pkg/utils/utils.go b/pkg/utils/utils.go deleted file mode 100644 index 2662e0a61..000000000 --- a/pkg/utils/utils.go +++ /dev/null @@ -1,393 +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. - -package utils - -import ( - "hash/crc32" - "math/rand" - "runtime" - "sort" - "strconv" - "strings" - "time" - - "github.com/jinzhu/copier" - "github.com/pkg/errors" - "google.golang.org/protobuf/proto" - - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/constant" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/table/unrelation" - sdkws "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/sdkws" -) - -// copy a by b b->a -func CopyStructFields(a interface{}, b interface{}, fields ...string) (err error) { - return copier.Copy(a, b) -} - -func Wrap1(err error) error { - return errors.Wrap(err, "==> "+printCallerNameAndLine()) -} - -func Wrap2[T any](a T, err error) (T, error) { - if err != nil { - return a, errors.Wrap(err, "==> "+printCallerNameAndLine()) - } - return a, nil -} - -func Wrap3[T any, V any](a T, b V, err error) (T, V, error) { - if err != nil { - return a, b, errors.Wrap(err, "==> "+printCallerNameAndLine()) - } - return a, b, nil -} - -func Wrap(err error, message string) error { - return errors.Wrap(err, "==> "+printCallerNameAndLine()+message) -} - -func WithMessage(err error, message string) error { - return errors.WithMessage(err, "==> "+printCallerNameAndLine()+message) -} - -func printCallerNameAndLine() string { - pc, _, line, _ := runtime.Caller(2) - return runtime.FuncForPC(pc).Name() + "()@" + strconv.Itoa(line) + ": " -} - -func GetSelfFuncName() string { - pc, _, _, _ := runtime.Caller(1) - return cleanUpFuncName(runtime.FuncForPC(pc).Name()) -} - -func GetFuncName(skips ...int) string { - skip := 1 - if len(skips) > 0 { - skip = skips[0] + 1 - } - pc, _, _, _ := runtime.Caller(skip) - return cleanUpFuncName(runtime.FuncForPC(pc).Name()) -} - -func cleanUpFuncName(funcName string) string { - end := strings.LastIndex(funcName, ".") - if end == -1 { - return "" - } - return funcName[end+1:] -} - -// Get the intersection of two slices -func Intersect(slice1, slice2 []int64) []int64 { - m := make(map[int64]bool) - n := make([]int64, 0) - for _, v := range slice1 { - m[v] = true - } - for _, v := range slice2 { - flag, _ := m[v] - if flag { - n = append(n, v) - } - } - return n -} - -// Get the diff of two slices -func Difference(slice1, slice2 []int64) []int64 { - m := make(map[int64]bool) - n := make([]int64, 0) - inter := Intersect(slice1, slice2) - for _, v := range inter { - m[v] = true - } - for _, v := range slice1 { - if !m[v] { - n = append(n, v) - } - } - - for _, v := range slice2 { - if !m[v] { - n = append(n, v) - } - } - return n -} - -// Get the intersection of two slices -func IntersectString(slice1, slice2 []string) []string { - m := make(map[string]bool) - n := make([]string, 0) - for _, v := range slice1 { - m[v] = true - } - for _, v := range slice2 { - flag, _ := m[v] - if flag { - n = append(n, v) - } - } - return n -} - -// Get the diff of two slices -func DifferenceString(slice1, slice2 []string) []string { - m := make(map[string]bool) - n := make([]string, 0) - inter := IntersectString(slice1, slice2) - for _, v := range inter { - m[v] = true - } - for _, v := range slice1 { - if !m[v] { - n = append(n, v) - } - } - - for _, v := range slice2 { - if !m[v] { - n = append(n, v) - } - } - return n -} - -func OperationIDGenerator() string { - return strconv.FormatInt(time.Now().UnixNano()+int64(rand.Uint32()), 10) -} - -func Pb2String(pb proto.Message) (string, error) { - s, err := proto.Marshal(pb) - if err != nil { - return "", err - } - return string(s), nil -} - -func String2Pb(s string, pb proto.Message) error { - return proto.Unmarshal([]byte(s), pb) -} - -func GetHashCode(s string) uint32 { - return crc32.ChecksumIEEE([]byte(s)) -} - -func GetNotificationConversationID(msg *sdkws.MsgData) string { - switch msg.SessionType { - case constant.SingleChatType: - l := []string{msg.SendID, msg.RecvID} - sort.Strings(l) - return "n_" + strings.Join(l, "_") - case constant.GroupChatType: - return "n_" + msg.GroupID - case constant.SuperGroupChatType: - return "n_" + msg.GroupID - case constant.NotificationChatType: - return "n_" + msg.SendID + "_" + msg.RecvID - } - return "" -} - -func GetChatConversationIDByMsg(msg *sdkws.MsgData) string { - switch msg.SessionType { - case constant.SingleChatType: - l := []string{msg.SendID, msg.RecvID} - sort.Strings(l) - return "si_" + strings.Join(l, "_") - case constant.GroupChatType: - return "g_" + msg.GroupID - case constant.SuperGroupChatType: - return "sg_" + msg.GroupID - case constant.NotificationChatType: - return "sn_" + msg.SendID + "_" + msg.RecvID - } - return "" -} - -func GenConversationIDForSingle(sendID, recvID string) string { - l := []string{sendID, recvID} - sort.Strings(l) - return "si_" + strings.Join(l, "_") -} - -func GenConversationUniqueKeyForGroup(groupID string) string { - return groupID -} - -func GenGroupConversationID(groupID string) string { - return "sg_" + groupID -} - -func GenConversationUniqueKeyForSingle(sendID, recvID string) string { - l := []string{sendID, recvID} - sort.Strings(l) - return strings.Join(l, "_") -} - -func GenConversationUniqueKey(msg *sdkws.MsgData) string { - switch msg.SessionType { - case constant.SingleChatType, constant.NotificationChatType: - l := []string{msg.SendID, msg.RecvID} - sort.Strings(l) - return strings.Join(l, "_") - case constant.SuperGroupChatType: - return msg.GroupID - } - return "" -} - -func GetConversationIDByMsgModel(msg *unrelation.MsgDataModel) string { - options := Options(msg.Options) - switch msg.SessionType { - case constant.SingleChatType: - l := []string{msg.SendID, msg.RecvID} - sort.Strings(l) - if !options.IsNotNotification() { - return "n_" + strings.Join(l, "_") - } - return "si_" + strings.Join(l, "_") // single chat - case constant.GroupChatType: - if !options.IsNotNotification() { - return "n_" + msg.GroupID // group chat - } - return "g_" + msg.GroupID // group chat - case constant.SuperGroupChatType: - if !options.IsNotNotification() { - return "n_" + msg.GroupID // super group chat - } - return "sg_" + msg.GroupID // super group chat - case constant.NotificationChatType: - if !options.IsNotNotification() { - return "n_" + msg.SendID + "_" + msg.RecvID // super group chat - } - return "sn_" + msg.SendID + "_" + msg.RecvID // server notification chat - } - return "" -} - -func GetConversationIDByMsg(msg *sdkws.MsgData) string { - options := Options(msg.Options) - switch msg.SessionType { - case constant.SingleChatType: - l := []string{msg.SendID, msg.RecvID} - sort.Strings(l) - if !options.IsNotNotification() { - return "n_" + strings.Join(l, "_") - } - return "si_" + strings.Join(l, "_") // single chat - case constant.GroupChatType: - if !options.IsNotNotification() { - return "n_" + msg.GroupID // group chat - } - return "g_" + msg.GroupID // group chat - case constant.SuperGroupChatType: - if !options.IsNotNotification() { - return "n_" + msg.GroupID // super group chat - } - return "sg_" + msg.GroupID // super group chat - case constant.NotificationChatType: - if !options.IsNotNotification() { - return "n_" + msg.SendID + "_" + msg.RecvID // super group chat - } - return "sn_" + msg.SendID + "_" + msg.RecvID // server notification chat - } - return "" -} - -func GetConversationIDBySessionType(sessionType int, ids ...string) string { - sort.Strings(ids) - if len(ids) > 2 || len(ids) < 1 { - return "" - } - switch sessionType { - case constant.SingleChatType: - return "si_" + strings.Join(ids, "_") // single chat - case constant.GroupChatType: - return "g_" + ids[0] // group chat - case constant.SuperGroupChatType: - return "sg_" + ids[0] // super group chat - case constant.NotificationChatType: - return "sn_" + ids[0] // server notification chat - } - return "" -} - -func IsNotification(conversationID string) bool { - return strings.HasPrefix(conversationID, "n_") -} - -func IsNotificationByMsg(msg *sdkws.MsgData) bool { - return !Options(msg.Options).IsNotNotification() -} - -func ParseConversationID(msg *sdkws.MsgData) (isNotification bool, conversationID string) { - options := Options(msg.Options) - switch msg.SessionType { - case constant.SingleChatType: - l := []string{msg.SendID, msg.RecvID} - sort.Strings(l) - if !options.IsNotNotification() { - return true, "n_" + strings.Join(l, "_") - } - return false, "si_" + strings.Join(l, "_") // single chat - case constant.SuperGroupChatType: - if !options.IsNotNotification() { - return true, "n_" + msg.GroupID // super group chat - } - return false, "sg_" + msg.GroupID // super group chat - case constant.NotificationChatType: - if !options.IsNotNotification() { - return true, "n_" + msg.SendID + "_" + msg.RecvID // super group chat - } - return false, "sn_" + msg.SendID + "_" + msg.RecvID // server notification chat - } - return false, "" -} - -func GetNotificationConversationIDByConversationID(conversationID string) string { - l := strings.Split(conversationID, "_") - if len(l) > 1 { - l[0] = "n" - return strings.Join(l, "_") - } - return "" -} - -func GetSelfNotificationConversationID(userID string) string { - return "n_" + userID + "_" + userID -} - -func GetSeqsBeginEnd(seqs []int64) (int64, int64) { - if len(seqs) == 0 { - return 0, 0 - } - return seqs[0], seqs[len(seqs)-1] -} - -type MsgBySeq []*sdkws.MsgData - -func (s MsgBySeq) Len() int { - return len(s) -} - -func (s MsgBySeq) Less(i, j int) bool { - return s[i].Seq < s[j].Seq -} - -func (s MsgBySeq) Swap(i, j int) { - s[i], s[j] = s[j], s[i] -} diff --git a/pkg/utils/utils_v2.go b/pkg/utils/utils_v2.go deleted file mode 100644 index dc14fe4e8..000000000 --- a/pkg/utils/utils_v2.go +++ /dev/null @@ -1,557 +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. - -package utils - -import ( - "encoding/json" - "sort" -) - -// SliceSub a中存在,b中不存在 (a-b) -func SliceSub[E comparable](a, b []E) []E { - k := make(map[E]struct{}) - for i := 0; i < len(b); i++ { - k[b[i]] = struct{}{} - } - t := make(map[E]struct{}) - rs := make([]E, 0, len(a)) - for i := 0; i < len(a); i++ { - e := a[i] - if _, ok := t[e]; ok { - continue - } - if _, ok := k[e]; ok { - continue - } - rs = append(rs, e) - t[e] = struct{}{} - } - return rs -} - -// SliceSubAny a中存在,b中不存在 (a-b) -func SliceSubAny[E comparable, T any](a []E, b []T, fn func(t T) E) []E { - return SliceSub(a, Slice(b, fn)) -} - -// SliceAnySub a中存在,b中不存在 (a-b) fn 返回的是uuid -func SliceAnySub[E any, T comparable](a, b []E, fn func(t E) T) []E { - m := make(map[T]E) - for i := 0; i < len(b); i++ { - v := b[i] - m[fn(v)] = v - } - var es []E - for i := 0; i < len(a); i++ { - v := a[i] - if _, ok := m[fn(v)]; !ok { - es = append(es, v) - } - } - return es -} - -// DistinctAny 去重 -func DistinctAny[E any, K comparable](es []E, fn func(e E) K) []E { - v := make([]E, 0, len(es)) - tmp := map[K]struct{}{} - for i := 0; i < len(es); i++ { - t := es[i] - k := fn(t) - if _, ok := tmp[k]; !ok { - tmp[k] = struct{}{} - v = append(v, t) - } - } - return v -} - -func DistinctAnyGetComparable[E any, K comparable](es []E, fn func(e E) K) []K { - v := make([]K, 0, len(es)) - tmp := map[K]struct{}{} - for i := 0; i < len(es); i++ { - t := es[i] - k := fn(t) - if _, ok := tmp[k]; !ok { - tmp[k] = struct{}{} - v = append(v, k) - } - } - return v -} - -// Distinct 去重 -func Distinct[T comparable](ts []T) []T { - if len(ts) < 2 { - return ts - } else if len(ts) == 2 { - if ts[0] == ts[1] { - return ts[:1] - } else { - return ts - } - } - return DistinctAny(ts, func(t T) T { - return t - }) -} - -// Delete 删除切片元素, 支持负数删除倒数第几个 -func Delete[E any](es []E, index ...int) []E { - switch len(index) { - case 0: - return es - case 1: - i := index[0] - if i < 0 { - i = len(es) + i - } - if len(es) <= i { - return es - } - return append(es[:i], es[i+1:]...) - default: - tmp := make(map[int]struct{}) - for _, i := range index { - if i < 0 { - i = len(es) + i - } - tmp[i] = struct{}{} - } - v := make([]E, 0, len(es)) - for i := 0; i < len(es); i++ { - if _, ok := tmp[i]; !ok { - v = append(v, es[i]) - } - } - return v - } -} - -// DeleteAt 删除切片元素, 支持负数删除倒数第几个 -func DeleteAt[E any](es *[]E, index ...int) []E { - v := Delete(*es, index...) - *es = v - return v -} - -// IndexAny get the index of the element -func IndexAny[E any, K comparable](e E, es []E, fn func(e E) K) int { - k := fn(e) - for i := 0; i < len(es); i++ { - if fn(es[i]) == k { - return i - } - } - return -1 -} - -// IndexOf get the index of the element -func IndexOf[E comparable](e E, es ...E) int { - return IndexAny(e, es, func(t E) E { - return t - }) -} - -// Contain 是否包含 -func Contain[E comparable](e E, es ...E) bool { - return IndexOf(e, es...) >= 0 -} - -// DuplicateAny 是否有重复的 -func DuplicateAny[E any, K comparable](es []E, fn func(e E) K) bool { - t := make(map[K]struct{}) - for _, e := range es { - k := fn(e) - if _, ok := t[k]; ok { - return true - } - t[k] = struct{}{} - } - return false -} - -// Duplicate 是否有重复的 -func Duplicate[E comparable](es []E) bool { - return DuplicateAny(es, func(e E) E { - return e - }) -} - -// SliceToMapOkAny slice to map (自定义类型, 筛选) -func SliceToMapOkAny[E any, K comparable, V any](es []E, fn func(e E) (K, V, bool)) map[K]V { - kv := make(map[K]V) - for i := 0; i < len(es); i++ { - t := es[i] - if k, v, ok := fn(t); ok { - kv[k] = v - } - } - return kv -} - -// SliceToMapAny slice to map (自定义类型) -func SliceToMapAny[E any, K comparable, V any](es []E, fn func(e E) (K, V)) map[K]V { - return SliceToMapOkAny(es, func(e E) (K, V, bool) { - k, v := fn(e) - return k, v, true - }) -} - -// SliceToMap slice to map -func SliceToMap[E any, K comparable](es []E, fn func(e E) K) map[K]E { - return SliceToMapOkAny(es, func(e E) (K, E, bool) { - k := fn(e) - return k, e, true - }) -} - -// SliceSetAny slice to map[K]struct{} -func SliceSetAny[E any, K comparable](es []E, fn func(e E) K) map[K]struct{} { - return SliceToMapAny(es, func(e E) (K, struct{}) { - return fn(e), struct{}{} - }) -} - -func Filter[E, T any](es []E, fn func(e E) (T, bool)) []T { - rs := make([]T, 0, len(es)) - for i := 0; i < len(es); i++ { - e := es[i] - if t, ok := fn(e); ok { - rs = append(rs, t) - } - } - return rs -} - -// Slice 批量转换切片类型 -func Slice[E any, T any](es []E, fn func(e E) T) []T { - v := make([]T, len(es)) - for i := 0; i < len(es); i++ { - v[i] = fn(es[i]) - } - return v -} - -// SliceSet slice to map[E]struct{} -func SliceSet[E comparable](es []E) map[E]struct{} { - return SliceSetAny(es, func(e E) E { - return e - }) -} - -// HasKey get whether the map contains key -func HasKey[K comparable, V any](m map[K]V, k K) bool { - if m == nil { - return false - } - _, ok := m[k] - return ok -} - -// Min get minimum value -func Min[E Ordered](e ...E) E { - v := e[0] - for _, t := range e[1:] { - if v > t { - v = t - } - } - return v -} - -// Max get maximum value -func Max[E Ordered](e ...E) E { - v := e[0] - for _, t := range e[1:] { - if v < t { - v = t - } - } - return v -} - -func Paginate[E any](es []E, pageNumber int, showNumber int) []E { - if pageNumber <= 0 { - return []E{} - } - if showNumber <= 0 { - return []E{} - } - start := (pageNumber - 1) * showNumber - end := start + showNumber - if start >= len(es) { - return []E{} - } - if end > len(es) { - end = len(es) - } - return es[start:end] -} - -// BothExistAny 获取切片中共同存在的元素(交集) -func BothExistAny[E any, K comparable](es [][]E, fn func(e E) K) []E { - if len(es) == 0 { - return []E{} - } - var idx int - ei := make([]map[K]E, len(es)) - for i := 0; i < len(ei); i++ { - e := es[i] - if len(e) == 0 { - return []E{} - } - kv := make(map[K]E) - for j := 0; j < len(e); j++ { - t := e[j] - k := fn(t) - kv[k] = t - } - ei[i] = kv - if len(kv) < len(ei[idx]) { - idx = i - } - } - v := make([]E, 0, len(ei[idx])) - for k := range ei[idx] { - all := true - for i := 0; i < len(ei); i++ { - if i == idx { - continue - } - if _, ok := ei[i][k]; !ok { - all = false - break - } - } - if !all { - continue - } - v = append(v, ei[idx][k]) - } - return v -} - -// BothExist 获取切片中共同存在的元素(交集) -func BothExist[E comparable](es ...[]E) []E { - return BothExistAny(es, func(e E) E { - return e - }) -} - -//// CompleteAny a中存在b的所有元素, 同时b中的所有元素a -//func CompleteAny[K comparable, E any](ks []K, es []E, fn func(e E) K) bool { -// if len(ks) == 0 && len(es) == 0 { -// return true -// } -// kn := make(map[K]uint8) -// for _, e := range Distinct(ks) { -// kn[e]++ -// } -// for k := range SliceSetAny(es, fn) { -// kn[k]++ -// } -// for _, n := range kn { -// if n != 2 { -// return false -// } -// } -// return true -//} - -// Complete a和b去重后是否相等(忽略顺序) -func Complete[E comparable](a []E, b []E) bool { - return len(Single(a, b)) == 0 -} - -// Keys get map keys -func Keys[K comparable, V any](kv map[K]V) []K { - ks := make([]K, 0, len(kv)) - for k := range kv { - ks = append(ks, k) - } - return ks -} - -// Values get map values -func Values[K comparable, V any](kv map[K]V) []V { - vs := make([]V, 0, len(kv)) - for k := range kv { - vs = append(vs, kv[k]) - } - return vs -} - -// Sort basic type sorting -func Sort[E Ordered](es []E, asc bool) []E { - SortAny(es, func(a, b E) bool { - if asc { - return a < b - } else { - return a > b - } - }) - return es -} - -// SortAny custom sort method -func SortAny[E any](es []E, fn func(a, b E) bool) { - sort.Sort(&sortSlice[E]{ - ts: es, - fn: fn, - }) -} - -// If true -> a, false -> b -func If[T any](isa bool, a, b T) T { - if isa { - return a - } - return b -} - -func ToPtr[T any](t T) *T { - return &t -} - -// Equal 比较切片是否相对(包括元素顺序) -func Equal[E comparable](a []E, b []E) bool { - if len(a) != len(b) { - return false - } - for i := 0; i < len(a); i++ { - if a[i] != b[i] { - return false - } - } - return true -} - -// Single a中存在,b中不存在 或 b中存在,a中不存在 -func Single[E comparable](a, b []E) []E { - kn := make(map[E]uint8) - for _, e := range Distinct(a) { - kn[e]++ - } - for _, e := range Distinct(b) { - kn[e]++ - } - v := make([]E, 0, len(kn)) - for k, n := range kn { - if n == 1 { - v = append(v, k) - } - } - return v -} - -// Order 将ts按es排序 -func Order[E comparable, T any](es []E, ts []T, fn func(t T) E) []T { - if len(es) == 0 || len(ts) == 0 { - return ts - } - kv := make(map[E][]T) - for i := 0; i < len(ts); i++ { - t := ts[i] - k := fn(t) - kv[k] = append(kv[k], t) - } - rs := make([]T, 0, len(ts)) - for _, e := range es { - vs := kv[e] - delete(kv, e) - rs = append(rs, vs...) - } - for k := range kv { - rs = append(rs, kv[k]...) - } - return rs -} - -func OrderPtr[E comparable, T any](es []E, ts *[]T, fn func(t T) E) []T { - *ts = Order(es, *ts, fn) - return *ts -} - -func UniqueJoin(s ...string) string { - data, _ := json.Marshal(s) - return string(data) -} - -type sortSlice[E any] struct { - ts []E - fn func(a, b E) bool -} - -func (o *sortSlice[E]) Len() int { - return len(o.ts) -} - -func (o *sortSlice[E]) Less(i, j int) bool { - return o.fn(o.ts[i], o.ts[j]) -} - -func (o *sortSlice[E]) Swap(i, j int) { - o.ts[i], o.ts[j] = o.ts[j], o.ts[i] -} - -// Ordered types that can be sorted -type Ordered interface { - ~int | ~int8 | ~int16 | ~int32 | ~int64 | ~uint | ~uint8 | ~uint16 | ~uint32 | ~uint64 | ~uintptr | ~float32 | ~float64 | ~string -} - -func Unwrap(err error) error { - for err != nil { - unwrap, ok := err.(interface { - Unwrap() error - }) - if !ok { - break - } - err = unwrap.Unwrap() - } - return err -} - -// NotNilReplace 当new_不为空时, 将old设置为new_ -func NotNilReplace[T any](old, new_ *T) { - if new_ == nil { - return - } - *old = *new_ -} - -func Batch[T any, V any](fn func(T) V, ts []T) []V { - if ts == nil { - return nil - } - res := make([]V, 0, len(ts)) - for i := range ts { - res = append(res, fn(ts[i])) - } - return res -} - -func InitSlice[T any](val *[]T) { - if val != nil && *val == nil { - *val = []T{} - } -} - -func InitMap[K comparable, V any](val *map[K]V) { - if val != nil && *val == nil { - *val = map[K]V{} - } -} diff --git a/pkg/utils/utils_v2_test.go b/pkg/utils/utils_v2_test.go deleted file mode 100644 index ba55b8941..000000000 --- a/pkg/utils/utils_v2_test.go +++ /dev/null @@ -1,98 +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. - -package utils - -import ( - "fmt" - "testing" -) - -func TestDistinct(t *testing.T) { - arr := []int{1, 1, 1, 4, 4, 5, 2, 3, 3, 3, 6} - fmt.Println(Distinct(arr)) -} - -func TestDeleteAt(t *testing.T) { - arr := []int{0, 1, 2, 3, 4, 5, 6, 7, 8, 9} - fmt.Println(Delete(arr, 0, 1, -1, -2)) - fmt.Println(Delete(arr)) - fmt.Println(Delete(arr, 1)) -} - -func TestSliceToMap(t *testing.T) { - type Item struct { - ID string - Name string - } - list := []Item{ - {ID: "111", Name: "111"}, - {ID: "222", Name: "222"}, - {ID: "333", Name: "333"}, - } - - m := SliceToMap(list, func(t Item) string { - return t.ID - }) - - fmt.Printf("%+v\n", m) - -} - -func TestIndexOf(t *testing.T) { - arr := []int{0, 1, 2, 3, 4, 5, 6, 7, 8, 9} - - fmt.Println(IndexOf(3, arr...)) - -} - -func TestSort(t *testing.T) { - arr := []int{1, 1, 1, 4, 4, 5, 2, 3, 3, 3, 6} - fmt.Println(Sort(arr, false)) -} - -func TestBothExist(t *testing.T) { - arr1 := []int{1, 1, 1, 4, 4, 5, 2, 3, 3, 3, 6} - arr2 := []int{6, 1, 3} - arr3 := []int{5, 1, 3, 6} - fmt.Println(BothExist(arr1, arr2, arr3)) -} - -func TestCompleteAny(t *testing.T) { - type Item struct { - ID int - Value string - } - - ids := []int{1, 2, 3, 4, 5, 6, 7, 8} - - var list []Item - - for _, id := range ids { - list = append(list, Item{ - ID: id, - Value: fmt.Sprintf("%d", id*1000), - }) - } - - DeleteAt(&list, -1) - DeleteAt(&ids, -1) - - ok := Complete(ids, Slice(list, func(t Item) int { - return t.ID - })) - - fmt.Printf("%+v\n", ok) - -} From 4bb2ffa3995858fe4ee19ca03e568d0dbf69171e Mon Sep 17 00:00:00 2001 From: Xinwei Xiong <3293172751@qq.com> Date: Wed, 26 Jul 2023 17:03:17 +0800 Subject: [PATCH 08/61] feat: add test format (#657) * feat: add test format Signed-off-by: Xinwei Xiong(cubxxw-openim) <3293172751nss@gmail.com> * fix: fix github auto gh pr Signed-off-by: Xinwei Xiong(cubxxw-openim) <3293172751nss@gmail.com> * feat: add build Signed-off-by: Xinwei Xiong(cubxxw-openim) <3293172751nss@gmail.com> * build: add build copyright admin Signed-off-by: Xinwei Xiong(cubxxw-openim) <3293172751nss@gmail.com> * docs: design documentation and deployment devops flow Signed-off-by: Xinwei Xiong(cubxxw-openim) <3293172751nss@gmail.com> * feat: add docker file and version appoint Signed-off-by: Xinwei Xiong(cubxxw-openim) <3293172751nss@gmail.com> * feat: add go release Signed-off-by: Xinwei Xiong(cubxxw-openim) <3293172751nss@gmail.com> * feat: add go release Signed-off-by: Xinwei Xiong(cubxxw-openim) <3293172751nss@gmail.com> * feat: add go release Signed-off-by: Xinwei Xiong(cubxxw-openim) <3293172751nss@gmail.com> * feat: add go release Signed-off-by: Xinwei Xiong(cubxxw-openim) <3293172751nss@gmail.com> * feat: add go release Signed-off-by: Xinwei Xiong(cubxxw-openim) <3293172751nss@gmail.com> feat: add go release Signed-off-by: Xinwei Xiong(cubxxw-openim) <3293172751nss@gmail.com> feat: add go release Signed-off-by: Xinwei Xiong(cubxxw-openim) <3293172751nss@gmail.com> * feat: set pull request Signed-off-by: Xinwei Xiong(cubxxw-openim) <3293172751nss@gmail.com> * feat: set pull request Signed-off-by: Xinwei Xiong(cubxxw-openim) <3293172751nss@gmail.com> * feat: set pull request Signed-off-by: Xinwei Xiong(cubxxw-openim) <3293172751nss@gmail.com> * feat: set pull request Signed-off-by: Xinwei Xiong(cubxxw-openim) <3293172751nss@gmail.com> --------- Signed-off-by: Xinwei Xiong(cubxxw-openim) <3293172751nss@gmail.com> --- .github/.codecov.yml | 14 + .github/labels.yml | 14 + .github/sync.yml | 14 + .github/weekly-digest.yml | 14 + .github/workflows/auto-assign-issue.yml | 14 + .github/workflows/auto-gh-pr.yml | 45 +- .github/workflows/auto-invite.yml | 14 + .github/workflows/bot-auto-cherry-pick.yml | 14 + .github/workflows/bot-cherry-pick.yml | 14 + .github/workflows/build-docker-image.yml | 107 ++- .github/workflows/check-coverage.yml | 14 + .github/workflows/cla.yml | 14 + .github/workflows/codeql-analysis.yml | 16 +- .github/workflows/create_branch_on_tag.yml | 62 ++ .github/workflows/deploy.yml | 14 + .github/workflows/e2e-test.yml | 14 + .github/workflows/gosec.yml | 14 + .github/workflows/help-comment-issue.yml | 14 + .github/workflows/issue-robot.yml | 14 + .github/workflows/link-pr.yml | 17 +- .github/workflows/lock-issue.yml | 14 + .github/workflows/opencommit.yml | 14 + .github/workflows/openimci.yml | 8 + .github/workflows/pull-request.yml | 99 +- .github/workflows/release.yml | 14 + .github/workflows/scripts-test.yml | 14 + .github/workflows/stale.yml | 14 + .goreleaser.yaml | 133 ++- CHANGELOG/CHANGELOG.md | 5 + README.md | 2 +- build/docker/openim-api/Dockerfile | 12 + build/docker/openim-cmdutils/Dockerfile | 0 build/docker/openim-crontask/Dockerfile | 0 build/docker/openim-msggateway/Dockerfile | 0 build/docker/openim-msgtransfer/Dockerfile | 0 build/docker/openim-push/Dockerfile | 0 build/docker/openim-rpc-auth/Dockerfile | 0 .../docker/openim-rpc-conversation/Dockerfile | 0 build/docker/openim-rpc-friend/Dockerfile | 0 build/docker/openim-rpc-group/Dockerfile | 0 build/docker/openim-rpc-msg/Dockerfile | 0 build/docker/openim-rpc-third/Dockerfile | 0 build/docker/openim-rpc-user/Dockerfile | 0 config/config.yaml | 18 +- docs/conversions/README.md | 9 + docs/conversions/api.md | 5 + docs/conversions/commit.md | 9 + docs/conversions/directory.md | 3 + docs/conversions/error_code.md | 22 + docs/conversions/go_code.md | 901 ++++++++++++++++++ docs/conversions/logging.md | 20 + docs/conversions/version.md | 57 ++ scripts/make-rules/common.mk | 10 +- scripts/make-rules/golang.mk | 6 +- 54 files changed, 1739 insertions(+), 107 deletions(-) create mode 100644 .github/workflows/create_branch_on_tag.yml create mode 100644 build/docker/openim-api/Dockerfile create mode 100644 build/docker/openim-cmdutils/Dockerfile create mode 100644 build/docker/openim-crontask/Dockerfile create mode 100644 build/docker/openim-msggateway/Dockerfile create mode 100644 build/docker/openim-msgtransfer/Dockerfile create mode 100644 build/docker/openim-push/Dockerfile create mode 100644 build/docker/openim-rpc-auth/Dockerfile create mode 100644 build/docker/openim-rpc-conversation/Dockerfile create mode 100644 build/docker/openim-rpc-friend/Dockerfile create mode 100644 build/docker/openim-rpc-group/Dockerfile create mode 100644 build/docker/openim-rpc-msg/Dockerfile create mode 100644 build/docker/openim-rpc-third/Dockerfile create mode 100644 build/docker/openim-rpc-user/Dockerfile create mode 100644 docs/conversions/README.md create mode 100644 docs/conversions/api.md create mode 100644 docs/conversions/commit.md create mode 100644 docs/conversions/directory.md create mode 100644 docs/conversions/error_code.md create mode 100644 docs/conversions/go_code.md create mode 100644 docs/conversions/logging.md create mode 100644 docs/conversions/version.md diff --git a/.github/.codecov.yml b/.github/.codecov.yml index 45e213180..9e262e0e3 100644 --- a/.github/.codecov.yml +++ b/.github/.codecov.yml @@ -1,3 +1,17 @@ +# 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. + coverage: status: project: diff --git a/.github/labels.yml b/.github/labels.yml index 037790523..b85a824b4 100644 --- a/.github/labels.yml +++ b/.github/labels.yml @@ -1,3 +1,17 @@ +# 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. + # Refer to Kubernetes for size/* Settings # https://github.com/Kubernetes/Kubernetes XS: diff --git a/.github/sync.yml b/.github/sync.yml index 4e9f9d17e..413e5fcc7 100644 --- a/.github/sync.yml +++ b/.github/sync.yml @@ -1,3 +1,17 @@ +# 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. + # https://github.com/BetaHuhn/repo-file-sync-action # Synchronization for the.github repository OpenIMSDK/.github: diff --git a/.github/weekly-digest.yml b/.github/weekly-digest.yml index 9deb72e7b..fb3614ad8 100644 --- a/.github/weekly-digest.yml +++ b/.github/weekly-digest.yml @@ -1,3 +1,17 @@ +# 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. + # https://github.com/apps/weekly-digest/installations/new publishDay: sun canPublishIssues: true diff --git a/.github/workflows/auto-assign-issue.yml b/.github/workflows/auto-assign-issue.yml index 06fee28a1..d87a571dc 100644 --- a/.github/workflows/auto-assign-issue.yml +++ b/.github/workflows/auto-assign-issue.yml @@ -1,3 +1,17 @@ +# 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: Assign issue to comment author on: issue_comment: diff --git a/.github/workflows/auto-gh-pr.yml b/.github/workflows/auto-gh-pr.yml index efa77ee29..1d8c90d33 100644 --- a/.github/workflows/auto-gh-pr.yml +++ b/.github/workflows/auto-gh-pr.yml @@ -1,3 +1,17 @@ +# 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: Auto PR to release on: @@ -5,16 +19,10 @@ on: # types: # - closed -env: - GH_TOKEN: ${{ secrets.REDBOT_GITHUB_TOKEN }} - ISSUE: ${{ github.event.issue.html_url }} - OWNER: ${{ github.repository_owner }} - REPO: ${{ github.event.repository.name }} - jobs: create-pr: runs-on: ubuntu-latest - if: github.event.pull_request.merged == true && github.event.pull_request.base.ref == 'main' + if: github.event.pull_request.base.ref == 'main' steps: - name: Check out code uses: actions/checkout@v3 @@ -29,14 +37,14 @@ jobs: sudo apt-get install gh continue-on-error: true - - name: Configure GitHub CLI - run: | - git config --global user.email "3293172751ysy@gmail.com" - git config --global user.name "kubbot" - echo "${{ secrets.BOT_GITHUB_TOKEN }}" | gh auth login --with-token + # - name: Configure GitHub CLI + # run: | + # git config --global user.email "3293172751ysy@gmail.com" + # git config --global user.name "kubbot" + # echo "${{ secrets.BOT_GITHUB_TOKEN }}" | gh auth login --with-token - name: Create PR to release branch run: | - ISSUEID=$(gh pr view 642 --repo $OWNER/$REPO | grep -oP 'Fixes #\K\d+') + ISSUEID=$(gh pr view ${{ github.event.pull_request.number }} --repo $OWNER/$REPO | grep -oP 'Fixes #\K\d+') echo "===========> $ISSUEID" ISSUE=$(gh issue view $ISSUEID --repo $OWNER/$REPO --json labels,assignees,milestone,title) echo "===========> $ISSUE" @@ -46,12 +54,17 @@ jobs: MILESTONE=$(echo $ISSUE | jq -r '.milestone | select(.title) | .title') TITLE=$(echo $ISSUE | jq -r '.title') - echo $ISSUE | jq - gh pr edit ${{ github.event.pull_request.number }} --repo $OWNER/$REPO --add-label "$LABELS" --add-assignee "$ASSIGNEES" --milestone "$MILESTONE" git checkout -b bot/merge-to-release-$ISSUEID git push origin bot/merge-to-release-$ISSUEID gh pr create --base release --head bot/merge-to-release-$ISSUEID --title "Merge main to release" --body "" - # gh pr create --base main --head feat/auto-release-pr-624 --title "The bug is fixed" --body "$x" --repo OpenIMSDK/Open-IM-Server --reviewer "cubxxw" \ No newline at end of file + # gh pr create --base main --head feat/auto-release-pr-624 --title "The bug is fixed" --body "$x" --repo OpenIMSDK/Open-IM-Server --reviewer "cubxxw" + continue-on-error: true + env: + GITHUB_TOKEN: ${{ secrets.BOT_GITHUB_TOKEN }} + GH_TOKEN: ${{ github.token }} + ISSUE: ${{ github.event.issue.html_url }} + OWNER: ${{ github.repository_owner }} + REPO: ${{ github.event.repository.name }} \ No newline at end of file diff --git a/.github/workflows/auto-invite.yml b/.github/workflows/auto-invite.yml index 9d8effb51..2bc644bfb 100644 --- a/.github/workflows/auto-invite.yml +++ b/.github/workflows/auto-invite.yml @@ -1,3 +1,17 @@ +# 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: Invite users to join our group on: issue_comment: diff --git a/.github/workflows/bot-auto-cherry-pick.yml b/.github/workflows/bot-auto-cherry-pick.yml index 4cb2cf0ec..0d545813a 100644 --- a/.github/workflows/bot-auto-cherry-pick.yml +++ b/.github/workflows/bot-auto-cherry-pick.yml @@ -1,3 +1,17 @@ +# 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: 'Github Rebot for Cherry Pick when PR is merged' on: pull_request_target: diff --git a/.github/workflows/bot-cherry-pick.yml b/.github/workflows/bot-cherry-pick.yml index 9b5ff49bb..59a4979cf 100644 --- a/.github/workflows/bot-cherry-pick.yml +++ b/.github/workflows/bot-cherry-pick.yml @@ -1,3 +1,17 @@ +# 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: Github Rebot for Cherry Pick On Comment on: issue_comment: diff --git a/.github/workflows/build-docker-image.yml b/.github/workflows/build-docker-image.yml index 31e0a5b65..ff58d8d8f 100644 --- a/.github/workflows/build-docker-image.yml +++ b/.github/workflows/build-docker-image.yml @@ -12,38 +12,99 @@ # See the License for the specific language governing permissions and # limitations under the License. -name: OpenIM Build Docker Images +name: Publish Docker image + on: push: + branches: + - main tags: - v* + workflow_dispatch: + jobs: build: runs-on: ubuntu-latest - strategy: - matrix: - bin: - - openim-server steps: - - name: Checkout + - name: Check out the repo uses: actions/checkout@v3 - - name: Setup Docker Buildx - uses: docker/setup-buildx-action@v2 - - name: Login to GitHub Container Registry - uses: docker/login-action@v2 + + - name: Log in to Docker Hub + uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9 with: - registry: ghcr.io - username: ${{ github.repository_owner }} - password: ${{ secrets.GITHUB_TOKEN }} - - name: Docker metadata - id: metadata - uses: docker/metadata-action@v4 + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + + - name: Extract metadata (tags, labels) for Docker + id: meta + uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38 with: - images: ghcr.io/${{ github.repository_owner }}/openim-${{ matrix.bin }} - - name: Build and release Docker images - uses: docker/build-push-action@v3 + images: openim/openim-server + tags: latest + + - name: Build and push Docker image + uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc with: - platforms: linux/386,linux/amd64,linux/arm64/v8 - target: ${{ matrix.bin }} - tags: ${{ steps.metadata.outputs.tags }} - push: true \ No newline at end of file + context: . + push: true + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} + + + - name: Log in to AliYun Docker Hub + uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9 + with: + registry: registry.cn-hangzhou.aliyuncs.com + username: ${{ secrets.ALIREGISTRY_USERNAME }} + password: ${{ secrets.ALIREGISTRY_TOKEN }} + + - name: Extract metadata (tags, labels) for Docker + id: meta2 + uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38 + with: + images: registry.cn-hangzhou.aliyuncs.com/openimsdk/openim-server + tags: latest + + - name: Build and push Docker image + uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc + with: + context: . + push: true + tags: ${{ steps.meta2.outputs.tags }} + labels: ${{ steps.meta2.outputs.labels }} + +# name: OpenIM Build Docker Images +# on: +# push: +# tags: +# - v* +# jobs: +# build: +# runs-on: ubuntu-latest +# strategy: +# matrix: +# bin: +# - openim-server +# steps: +# - name: Checkout +# uses: actions/checkout@v3 +# - name: Setup Docker Buildx +# uses: docker/setup-buildx-action@v2 +# - name: Login to GitHub Container Registry +# uses: docker/login-action@v2 +# with: +# registry: ghcr.io +# username: ${{ github.repository_owner }} +# password: ${{ secrets.GITHUB_TOKEN }} +# - name: Docker metadata +# id: metadata +# uses: docker/metadata-action@v4 +# with: +# images: ghcr.io/${{ github.repository_owner }}/openim-${{ matrix.bin }} +# - name: Build and release Docker images +# uses: docker/build-push-action@v3 +# with: +# platforms: linux/386,linux/amd64,linux/arm64/v8 +# target: ${{ matrix.bin }} +# tags: ${{ steps.metadata.outputs.tags }} +# push: true \ No newline at end of file diff --git a/.github/workflows/check-coverage.yml b/.github/workflows/check-coverage.yml index cc596a0e0..937af89d6 100644 --- a/.github/workflows/check-coverage.yml +++ b/.github/workflows/check-coverage.yml @@ -1,3 +1,17 @@ +# 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: Check-Coverage on: diff --git a/.github/workflows/cla.yml b/.github/workflows/cla.yml index 603a49399..3f658284a 100644 --- a/.github/workflows/cla.yml +++ b/.github/workflows/cla.yml @@ -1,3 +1,17 @@ +# 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: "OpenIM CLA Assistant" on: issue_comment: diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 6233ffcad..a76979ab9 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -13,7 +13,7 @@ # limitations under the License. -name: "Code Scanning - Action" +name: "OpenIM Code Scanning - Action" on: push: @@ -42,8 +42,8 @@ jobs: security-events: write # only required for workflows in private repositories - actions: read - contents: read + actions: write + contents: write steps: - name: Checkout repository @@ -53,8 +53,8 @@ jobs: - name: Initialize CodeQL uses: github/codeql-action/init@v2 # Override language selection by uncommenting this and choosing your languages - # with: - # languages: go, javascript, csharp, python, cpp, java, ruby + with: + languages: go # Autobuild attempts to build any compiled languages (C/C++, C#, Go, or Java). # If this step fails, then you should remove it and run the build manually (see below). @@ -68,9 +68,9 @@ jobs: # three lines and modify them (or add more) to build your code if your # project uses a compiled language - #- run: | - # make bootstrap - # make release + # - run: | + # make bootstrap + # make release - name: Perform CodeQL Analysis uses: github/codeql-action/analyze@v2 \ No newline at end of file diff --git a/.github/workflows/create_branch_on_tag.yml b/.github/workflows/create_branch_on_tag.yml new file mode 100644 index 000000000..bdb53e80a --- /dev/null +++ b/.github/workflows/create_branch_on_tag.yml @@ -0,0 +1,62 @@ +name: Create Branch on Tag + +on: + push: + tags: + - 'v*.*.0' + +jobs: + create-branch: + runs-on: ubuntu-latest + steps: + - name: Check out code + uses: actions/checkout@v3 + with: + fetch-depth: 0 + + - name: Set up Git + run: | + git config --global user.name 'kubbot' + git config --global user.email '3293172751yxy@gmail.com' + + - name: Install git-chglog + run: make install.git-chglog + + - name: Create Branch + run: | + TAG_NAME=${GITHUB_REF/refs\/tags\//} + IFS='.' read -ra VERSION_PARTS <<< "$TAG_NAME" + if [[ "${VERSION_PARTS[2]}" = "0" ]]; then + BRANCH_NAME="release-v${VERSION_PARTS[0]}.${VERSION_PARTS[1]}" + echo "Creating branch $BRANCH_NAME" + git checkout -b "$BRANCH_NAME" + git push origin "$BRANCH_NAME" + fi + + - name: Push Changes + uses: stefanzweifel/git-auto-commit-action@v4 + with: + commit_message: "Auto Commit CHANGELOG" + branch: release-v${VERSION_PARTS[0]}.${VERSION_PARTS[1]} + env: + GITHUB_TOKEN: ${{ secrets.BOT_GITHUB_TOKEN }} + + - name: Create and Push CHANGELOG + run: | + git checkout main + TAG_NAME=${GITHUB_REF/refs\/tags\//} + IFS='.' read -ra VERSION_PARTS <<< "$TAG_NAME" + if [[ "${VERSION_PARTS[2]}" = "0" ]]; then + cd CHANGELOG + git-chglog --tag-filter-pattern "v${VERSION_PARTS[0]}.${VERSION_PARTS[1]}.*" -o "CHANGELOG-${VERSION_PARTS[0]}.${VERSION_PARTS[1]}.md" + git add "CHANGELOG-${VERSION_PARTS[0]}.${VERSION_PARTS[1]}.md" + git commit -m "Update CHANGELOG for $TAG_NAME" + fi + + - name: Push Changes + uses: stefanzweifel/git-auto-commit-action@v4 + with: + commit_message: "Auto Commit CHANGELOG" + branch: main + env: + GITHUB_TOKEN: ${{ secrets.BOT_GITHUB_TOKEN }} \ No newline at end of file diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 3fbad1e5f..ef50743a1 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -1,3 +1,17 @@ +# 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: deploy for dev on: diff --git a/.github/workflows/e2e-test.yml b/.github/workflows/e2e-test.yml index a3451d6aa..b9fa29aef 100644 --- a/.github/workflows/e2e-test.yml +++ b/.github/workflows/e2e-test.yml @@ -1,2 +1,16 @@ +# 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 e2e Test diff --git a/.github/workflows/gosec.yml b/.github/workflows/gosec.yml index 43fba5c0c..708eca4f8 100644 --- a/.github/workflows/gosec.yml +++ b/.github/workflows/gosec.yml @@ -1,3 +1,17 @@ +# 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 Run Gosec # gosec is a source code security audit tool for the Go language. It performs a static diff --git a/.github/workflows/help-comment-issue.yml b/.github/workflows/help-comment-issue.yml index 5f52e638f..755fb035d 100644 --- a/.github/workflows/help-comment-issue.yml +++ b/.github/workflows/help-comment-issue.yml @@ -1,3 +1,17 @@ +# 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: Good frist issue add comment on: issues: diff --git a/.github/workflows/issue-robot.yml b/.github/workflows/issue-robot.yml index 74927a0c2..b421a5314 100644 --- a/.github/workflows/issue-robot.yml +++ b/.github/workflows/issue-robot.yml @@ -1,3 +1,17 @@ +# 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: 'issue translator' on: issue_comment: diff --git a/.github/workflows/link-pr.yml b/.github/workflows/link-pr.yml index c6da4cb5f..07b9d46a9 100644 --- a/.github/workflows/link-pr.yml +++ b/.github/workflows/link-pr.yml @@ -1,12 +1,23 @@ +# 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: Github Rebot for Link check error # Every Monday at 12:30 p.m on: schedule: - cron: '30 12 * * 1' - push: - branches: - - main jobs: linkChecker: diff --git a/.github/workflows/lock-issue.yml b/.github/workflows/lock-issue.yml index 8cf0433d6..6a9aed9ba 100644 --- a/.github/workflows/lock-issue.yml +++ b/.github/workflows/lock-issue.yml @@ -1,3 +1,17 @@ +# 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: diff --git a/.github/workflows/opencommit.yml b/.github/workflows/opencommit.yml index 69f7d7f23..36307c00f 100644 --- a/.github/workflows/opencommit.yml +++ b/.github/workflows/opencommit.yml @@ -1,3 +1,17 @@ +# 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 Commit Action' on: diff --git a/.github/workflows/openimci.yml b/.github/workflows/openimci.yml index cd055b5b7..07133126b 100644 --- a/.github/workflows/openimci.yml +++ b/.github/workflows/openimci.yml @@ -128,6 +128,14 @@ jobs: # commit_author: Kubbot # defaults to author of the commit that triggered the run continue-on-error: true + - name: Commit Changes + uses: stefanzweifel/git-auto-commit-action@v4 + with: + commit_message: "chore(fmt): robot automated format and lint Change" + commit_options: '--no-verify --signoff' + branch: main + continue-on-error: true + - name: Set Current Directory id: set_directory run: | diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index 726d57e14..3405e479e 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -1,11 +1,24 @@ +# 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: Github Pull Request on: push: branches: [main] paths-ignore: - 'README.md' - - 'CONTRIBUTING.md' - + - 'CONTRIBUTING.md' - 'docs/**' pull_request: branches: [main] @@ -22,18 +35,80 @@ jobs: build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - name: checkout + uses: actions/checkout@v3 + with: + fetch-depth: 0 + + - name: Get League branch Patch + run: | + git config user.name 'openimbot' + git config user.email 'openimsdk@qq.com' + git checkout -b cicd/patch-${{ github.event.number }} - uses: actions/setup-node@v3 + - name: Setup Go + uses: actions/setup-go@v2 + - name: Run go modules tidy + run: | + sudo make tidy + sudo make tools.verify.go-gitlint + echo "Run go modules tidy successfully" + + - 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 + run: | + make generate + echo "Generate all necessary files successfully" + continue-on-error: true + + - name: Run unit test and get test coverage + run: | + make cover + echo "Run unit test and get test coverage successfully" + continue-on-error: true + + - name: Initialize CodeQL + uses: github/codeql-action/init@v2 + with: + languages: go + + - name: Build source code for host platform + run: | + sudo make build + echo "Build source code for host platform successfully" + + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v2 + + - name: OpenIM verify copyright + run: | + sudo make verify-copyright + sudo make add-copyright + echo "OpenIM verify successfully" + continue-on-error: true + + - name: Commit code + run: | + git add . + - name: Create Pull Request uses: peter-evans/create-pull-request@v5 with: - token: ${{ secrets.BOT_GITHUB_TOKEN }} - commit-message: 'build: update distribution' - title: 'build: update distribution' + commit-message: "cicd: bump League Patch to cicd/patch-${{ github.event.number }}" + title: Bump League Patch to cicd/patch-${{ github.event.number }} body: | - - Updates the distribution for changes on `main` - - Auto-generated by [create-pull-request][1] - - [1]: https://github.com/OpenIMSDK/Open-IM-Sever - branch: 'bot/update-distribution' \ No newline at end of file + Review criteria: + + - [ ] Disenchanter can connect and issue actions + + This is an automated PR. + [workflow](https://github.com/OpenIMSDK/Open-IM-Server/blob/main/.github/workflows/pull-request.yml). + base: main + branch: cicd/patch-${{ github.event.number }} + labels: kind/documentation, area/test, ok-to-test + token: ${{ secrets.REDBOT_GITHUB_TOKEN }} \ No newline at end of file diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c4f190766..45ed79df2 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,3 +1,17 @@ +# 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 Server Release on: diff --git a/.github/workflows/scripts-test.yml b/.github/workflows/scripts-test.yml index badb33012..e59e696f8 100644 --- a/.github/workflows/scripts-test.yml +++ b/.github/workflows/scripts-test.yml @@ -1,3 +1,17 @@ +# 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 Start Execute Scripts on: diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml index 2cad62c85..7790aa944 100644 --- a/.github/workflows/stale.yml +++ b/.github/workflows/stale.yml @@ -1,3 +1,17 @@ +# 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. + # 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. diff --git a/.goreleaser.yaml b/.goreleaser.yaml index f9ca78474..cbb9ba483 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -36,8 +36,9 @@ builds: - ppc64le - arm64 goarm: - - 6 - - 7 + - "6" + - "7" + - binary: openim-cmdutils id: openim-cmdutils main: ./cmd/openim-cmdutils/main.go @@ -53,8 +54,9 @@ builds: - ppc64le - arm64 goarm: - - 6 - - 7 + - "6" + - "7" + - binary: openim-crontask id: openim-crontask main: ./cmd/openim-crontask/main.go @@ -70,8 +72,9 @@ builds: - ppc64le - arm64 goarm: - - 6 - - 7 + - "6" + - "7" + - binary: openim-msggateway id: openim-msggateway main: ./cmd/openim-msggateway/main.go @@ -87,8 +90,9 @@ builds: - ppc64le - arm64 goarm: - - 6 - - 7 + - "6" + - "7" + - binary: openim-msgtransfer id: openim-msgtransfer main: ./cmd/openim-msgtransfer/main.go @@ -104,8 +108,9 @@ builds: - ppc64le - arm64 goarm: - - 6 - - 7 + - "6" + - "7" + - binary: openim-push id: openim-push main: ./cmd/openim-push/main.go @@ -121,8 +126,9 @@ builds: - ppc64le - arm64 goarm: - - 6 - - 7 + - "6" + - "7" + - binary: openim-rpc-auth id: openim-rpc-auth main: ./cmd/openim-rpc/openim-rpc-auth/main.go @@ -138,8 +144,9 @@ builds: - ppc64le - arm64 goarm: - - 6 - - 7 + - "6" + - "7" + - binary: openim-rpc-conversation id: openim-rpc-conversation main: ./cmd/openim-rpc/openim-rpc-conversation/main.go @@ -155,8 +162,9 @@ builds: - ppc64le - arm64 goarm: - - 6 - - 7 + - "6" + - "7" + - binary: openim-rpc-friend id: openim-rpc-friend main: ./cmd/openim-rpc/openim-rpc-friend/main.go @@ -172,8 +180,9 @@ builds: - ppc64le - arm64 goarm: - - 6 - - 7 + - "6" + - "7" + - binary: openim-rpc-group id: openim-rpc-group main: ./cmd/openim-rpc/openim-rpc-group/main.go @@ -189,8 +198,9 @@ builds: - ppc64le - arm64 goarm: - - 6 - - 7 + - "6" + - "7" + - binary: openim-rpc-msg id: openim-rpc-msg main: ./cmd/openim-rpc/openim-rpc-msg/main.go @@ -206,8 +216,9 @@ builds: - ppc64le - arm64 goarm: - - 6 - - 7 + - "6" + - "7" + - binary: openim-rpc-third id: openim-rpc-third main: ./cmd/openim-rpc/openim-rpc-third/main.go @@ -223,8 +234,9 @@ builds: - ppc64le - arm64 goarm: - - 6 - - 7 + - "6" + - "7" + - binary: openim-rpc-user id: openim-rpc-user main: ./cmd/openim-rpc/openim-rpc-user/main.go @@ -240,8 +252,8 @@ builds: - ppc64le - arm64 goarm: - - 6 - - 7 + - "6" + - "7" archives: - format: tar.gz @@ -323,6 +335,66 @@ changelog: - title: Other work order: 9999 +dockers: + - image_templates: + - "openimsdk/open-im-server:{{ .Tag }}-amd64" + - "ghcr.io/goreleaser/goreleaser:{{ .Tag }}-amd64" + dockerfile: Dockerfile + use: buildx + build_flag_templates: + - "--pull" + - "--label=io.artifacthub.package.readme-url=https://raw.githubusercontent.com/goreleaser/goreleaser/main/README.md" + - "--label=io.artifacthub.package.logo-url=https://goreleaser.com/static/avatar.png" + - '--label=io.artifacthub.package.maintainers=[{"name":"Carlos Alexandro Becker","email":"carlos@carlosbecker.dev"}]' + - "--label=io.artifacthub.package.license=MIT" + - "--label=org.opencontainers.image.description=Deliver Go binaries as fast and easily as possible" + - "--label=org.opencontainers.image.created={{.Date}}" + - "--label=org.opencontainers.image.name={{.ProjectName}}" + - "--label=org.opencontainers.image.revision={{.FullCommit}}" + - "--label=org.opencontainers.image.version={{.Version}}" + - "--label=org.opencontainers.image.source={{.GitURL}}" + - "--platform=linux/amd64" + extra_files: + - scripts/entrypoint.sh + - image_templates: + - "goreleaser/goreleaser:{{ .Tag }}-arm64" + - "ghcr.io/goreleaser/goreleaser:{{ .Tag }}-arm64" + dockerfile: Dockerfile + use: buildx + build_flag_templates: + - "--pull" + - "--label=io.artifacthub.package.readme-url=https://raw.githubusercontent.com/goreleaser/goreleaser/main/README.md" + - "--label=io.artifacthub.package.logo-url=https://goreleaser.com/static/avatar.png" + - '--label=io.artifacthub.package.maintainers=[{"name":"Carlos Alexandro Becker","email":"carlos@carlosbecker.dev"}]' + - "--label=io.artifacthub.package.license=MIT" + - "--label=org.opencontainers.image.description=Deliver Go binaries as fast and easily as possible" + - "--label=org.opencontainers.image.created={{.Date}}" + - "--label=org.opencontainers.image.name={{.ProjectName}}" + - "--label=org.opencontainers.image.revision={{.FullCommit}}" + - "--label=org.opencontainers.image.version={{.Version}}" + - "--label=org.opencontainers.image.source={{.GitURL}}" + - "--platform=linux/arm64" + goarch: arm64 + extra_files: + - scripts/entrypoint.sh + +docker_manifests: + - name_template: "goreleaser/goreleaser:{{ .Tag }}" + image_templates: + - "goreleaser/goreleaser:{{ .Tag }}-amd64" + - "goreleaser/goreleaser:{{ .Tag }}-arm64" + - name_template: "ghcr.io/goreleaser/goreleaser:{{ .Tag }}" + image_templates: + - "ghcr.io/goreleaser/goreleaser:{{ .Tag }}-amd64" + - "ghcr.io/goreleaser/goreleaser:{{ .Tag }}-arm64" + - name_template: "goreleaser/goreleaser:latest" + image_templates: + - "goreleaser/goreleaser:{{ .Tag }}-amd64" + - "goreleaser/goreleaser:{{ .Tag }}-arm64" + - name_template: "ghcr.io/goreleaser/goreleaser:latest" + image_templates: + - "ghcr.io/goreleaser/goreleaser:{{ .Tag }}-amd64" + - "ghcr.io/goreleaser/goreleaser:{{ .Tag }}-arm64" nfpms: - id: packages @@ -412,19 +484,22 @@ release: ## Helping out + We release logs are recorded on [✨ CHANGELOG](https://github.com/OpenIMSDK/Open-IM-Server/blob/main/CHANGELOG/CHANGELOG.md) + This release is only possible thanks to **all** the support of some **awesome people**! - Want to be one of them? + **Want to be one of them 😘?** + Contributions to this project are welcome! Please see [CONTRIBUTING.md](https://github.com/OpenIMSDK/Open-IM-Server/blob/main/CONTRIBUTING.md) for details.

- + - +

diff --git a/CHANGELOG/CHANGELOG.md b/CHANGELOG/CHANGELOG.md index 2d788d4c4..822e9bc92 100644 --- a/CHANGELOG/CHANGELOG.md +++ b/CHANGELOG/CHANGELOG.md @@ -1,6 +1,7 @@ # Changelog - [Changelog](#changelog) + - [OpenIM versioning policy](#openim-versioning-policy) - [command](#command) - [create next tag](#create-next-tag) - [Release version logs](#release-version-logs) @@ -15,6 +16,10 @@ All notable changes to this project will be documented in this file. + [https://github.com/OpenIMSDK/Open-IM-Server/releases](https://github.com/OpenIMSDK/Open-IM-Server/releases) +## OpenIM versioning policy + ++ [OpenIM Version](../docs/conversions/version.md) + ## command ```bash diff --git a/README.md b/README.md index c4a4318b2..11471ac0f 100644 --- a/README.md +++ b/README.md @@ -69,7 +69,7 @@ DATA_DIR=./ #designate large disk directory 1. Deploy and start -Note: This command can only be executed once. It will modify the component passwords in docker-compose based on the PASSWORD variable in .env, and modify the component passwords in config/config.yaml. If the password in .env changes, you need to first execute docker-compose down; rm components -rf and then execute this command. +> **Note**: This command can only be executed once. It will modify the component passwords in docker-compose based on the PASSWORD variable in .env, and modify the component passwords in config/config.yaml. If the password in .env changes, you need to first execute docker-compose down; rm components -rf and then execute this command. ``` chmod +x install_im_server.sh; diff --git a/build/docker/openim-api/Dockerfile b/build/docker/openim-api/Dockerfile new file mode 100644 index 000000000..1bf965ea4 --- /dev/null +++ b/build/docker/openim-api/Dockerfile @@ -0,0 +1,12 @@ +FROM golang:1.20.0 as build + +WORKDIR /openim + +RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && \ + echo "Asia/Shanghai" > /etc/timezone && \ + mkdir -p /var/log/miniblog + +COPY miniblog /openim + +EXPOSE 10002 +CMD ["./bin/openim-api","--port", "10002"] \ No newline at end of file diff --git a/build/docker/openim-cmdutils/Dockerfile b/build/docker/openim-cmdutils/Dockerfile new file mode 100644 index 000000000..e69de29bb diff --git a/build/docker/openim-crontask/Dockerfile b/build/docker/openim-crontask/Dockerfile new file mode 100644 index 000000000..e69de29bb diff --git a/build/docker/openim-msggateway/Dockerfile b/build/docker/openim-msggateway/Dockerfile new file mode 100644 index 000000000..e69de29bb diff --git a/build/docker/openim-msgtransfer/Dockerfile b/build/docker/openim-msgtransfer/Dockerfile new file mode 100644 index 000000000..e69de29bb diff --git a/build/docker/openim-push/Dockerfile b/build/docker/openim-push/Dockerfile new file mode 100644 index 000000000..e69de29bb diff --git a/build/docker/openim-rpc-auth/Dockerfile b/build/docker/openim-rpc-auth/Dockerfile new file mode 100644 index 000000000..e69de29bb diff --git a/build/docker/openim-rpc-conversation/Dockerfile b/build/docker/openim-rpc-conversation/Dockerfile new file mode 100644 index 000000000..e69de29bb diff --git a/build/docker/openim-rpc-friend/Dockerfile b/build/docker/openim-rpc-friend/Dockerfile new file mode 100644 index 000000000..e69de29bb diff --git a/build/docker/openim-rpc-group/Dockerfile b/build/docker/openim-rpc-group/Dockerfile new file mode 100644 index 000000000..e69de29bb diff --git a/build/docker/openim-rpc-msg/Dockerfile b/build/docker/openim-rpc-msg/Dockerfile new file mode 100644 index 000000000..e69de29bb diff --git a/build/docker/openim-rpc-third/Dockerfile b/build/docker/openim-rpc-third/Dockerfile new file mode 100644 index 000000000..e69de29bb diff --git a/build/docker/openim-rpc-user/Dockerfile b/build/docker/openim-rpc-user/Dockerfile new file mode 100644 index 000000000..e69de29bb diff --git a/config/config.yaml b/config/config.yaml index 10d43bd3e..1c01031dc 100644 --- a/config/config.yaml +++ b/config/config.yaml @@ -24,8 +24,8 @@ zookeeper: mysql: address: [ 127.0.0.1:13306 ] #目前仅支持单机 - username: root - password: openIM123 + username: root #用户名 + password: openIM123 #密码 database: openIM_v3 #不建议修改 maxOpenConn: 1000 #最大连接数 maxIdleConn: 100 #最大空闲连接数 @@ -37,14 +37,14 @@ mongo: uri: #不为空则直接使用该值 address: [ 127.0.0.1:37017 ] #单机时为mongo地址,使用分片集群时,为mongos地址 database: openIM_v3 #mongo db 默认即可 - username: root - password: openIM123 + username: root #用户名 + password: openIM123 #密码 maxPoolSize: 100 redis: address: [ 127.0.0.1:16379 ] # username: #only redis version 6.0+ need username - password: openIM123 + password: openIM123 #密码 kafka: username: #用户名 @@ -77,9 +77,9 @@ object: apiURL: "http://127.0.0.1:10002/object/" #地址需要app能访问到 minio: bucket: "openim" #不建议修改 - endpoint: http://127.0.0.1:10005 #地址需要app能够访问 - accessKeyID: root - secretAccessKey: openIM123 + endpoint: "http://127.0.0.1:10005" #minio对外服务的ip和端口,app要能访问此ip和端口 + accessKeyID: "root" #ID + secretAccessKey: "openIM123" #秘钥 sessionToken: "" #token cos: #tencent cos bucketURL: "https://temp-1252357374.cos.ap-chengdu.myqcloud.com" @@ -167,7 +167,7 @@ retainChatRecords: 365 #mongo保存离线消息 chatRecordsClearTime: "0 2 * * 3" #每周三凌晨2点清理mongo中的过期(超过retainChatRecords时间)消息,这个删除是为了清理满足上个配置retainChatRecords的过期消息,不会发送通知,仅仅作为清理磁盘使用 msgDestructTime: "0 2 * * *" #消息自动删除时间,每天凌晨2点删除过期消息,这个删除是为了删除保留时间超过超过会话字段msg_destruct_time(秒)的消息。 -secret: openIM123 +secret: tuoyun #秘钥,获取token时校验 tokenPolicy: expire: 90 #过期时间(天) diff --git a/docs/conversions/README.md b/docs/conversions/README.md new file mode 100644 index 000000000..05fd7dcb1 --- /dev/null +++ b/docs/conversions/README.md @@ -0,0 +1,9 @@ +## OpenIM Project Development Standards + +- [Code Standards](https://chat.openai.com/go_code.md) +- [Directory Standards](https://chat.openai.com/directory.md) +- [Commit Standards](https://chat.openai.com/commit.md) +- [Versioning Standards](https://chat.openai.com/version.md) +- [Interface Standards](https://chat.openai.com/api.md) +- [Log Standards](https://chat.openai.com/log.md) +- [Error Code Standards](https://chat.openai.com/error_code.md) \ No newline at end of file diff --git a/docs/conversions/api.md b/docs/conversions/api.md new file mode 100644 index 000000000..1dd389258 --- /dev/null +++ b/docs/conversions/api.md @@ -0,0 +1,5 @@ +## Interface Standards + +Our project, OpenIM, adheres to the [OpenAPI 3.0](https://spec.openapis.org/oas/latest.html) interface standards. + +> Chinese translation: [OpenAPI Specification Chinese Translation](https://fishead.gitbook.io/openapi-specification-zhcn-translation/3.0.0.zhcn) \ No newline at end of file diff --git a/docs/conversions/commit.md b/docs/conversions/commit.md new file mode 100644 index 000000000..661661fe9 --- /dev/null +++ b/docs/conversions/commit.md @@ -0,0 +1,9 @@ +## Commit Standards + +Our project, OpenIM, follows the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0) standards. + +> Chinese translation: [Conventional Commits: A Specification Making Commit Logs More Human and Machine-friendly](https://tool.lu/en_US/article/2ac/preview) + +In addition to adhering to these standards, we encourage all contributors to the OpenIM project to ensure that their commit messages are clear and descriptive. This helps in maintaining a clean and meaningful project history. Each commit message should succinctly describe the changes made and, where necessary, the reasoning behind those changes. + +To facilitate a streamlined process, we also recommend using appropriate commit type based on Conventional Commits guidelines such as `fix:` for bug fixes, `feat:` for new features, and so forth. Understanding and using these conventions helps in generating automatic release notes, making versioning easier, and improving overall readability of commit history. \ No newline at end of file diff --git a/docs/conversions/directory.md b/docs/conversions/directory.md new file mode 100644 index 000000000..4e30d3854 --- /dev/null +++ b/docs/conversions/directory.md @@ -0,0 +1,3 @@ +## Catalog Service Interface Specification + ++ [https://github.com/kubecub/go-project-layout](https://github.com/kubecub/go-project-layout) \ No newline at end of file diff --git a/docs/conversions/error_code.md b/docs/conversions/error_code.md new file mode 100644 index 000000000..169567b33 --- /dev/null +++ b/docs/conversions/error_code.md @@ -0,0 +1,22 @@ +## Error Code Standards + +Error codes are one of the important means for users to locate and solve problems. When an application encounters an exception, users can quickly locate and resolve the problem based on the error code and the description and solution of the error code in the documentation. + +### Error Code Naming Standards + +- Follow CamelCase notation; +- Error codes are divided into two levels. For example, `InvalidParameter.BindError`, separated by a `.`. The first-level error code is platform-level, and the second-level error code is resource-level, which can be customized according to the scenario; +- The second-level error code can only use English letters or numbers ([a-zA-Z0-9]), and should use standard English word spelling, standard abbreviations, RFC term abbreviations, etc.; +- The error code should avoid multiple definitions of the same semantics, for example: `InvalidParameter.ErrorBind`, `InvalidParameter.BindError`. + +### First-Level Common Error Codes + +| Error Code | Error Description | Error Type | +| ---------------- | ------------------------------------------------------------ | ---------- | +| InternalError | Internal error | 1 | +| InvalidParameter | Parameter error (including errors in parameter type, format, value, etc.) | 0 | +| AuthFailure | Authentication / Authorization error | 0 | +| ResourceNotFound | Resource does not exist | 0 | +| FailedOperation | Operation failed | 2 | + +> Error Type: 0 represents the client, 1 represents the server, 2 represents both the client / server. \ No newline at end of file diff --git a/docs/conversions/go_code.md b/docs/conversions/go_code.md new file mode 100644 index 000000000..85d099f9c --- /dev/null +++ b/docs/conversions/go_code.md @@ -0,0 +1,901 @@ +## Go 代码开发规范 +在Go 项目开发中,一个好的编码规范可以极大的提高代码质量。为了帮你节省时间和精力,这里我整理了一份清晰、可直接套用的 Go 编码规范,供你参考。 + +这份规范,是我参考了 Go 官方提供的编码规范,以及 Go 社区沉淀的一些比较合理的规范之后,加入自己的理解总结出的,它比很多公司内部的规范更全面,你掌握了,以后在面试大厂的时候,或者在大厂里写代码的时候,都会让人高看你一眼,觉得你code很专业。 + +这份编码规范中包含代码风格、命名规范、注释规范、类型、控制结构、函数、GOPATH 设置规范、依赖管理和最佳实践九类规范。如果你觉得这些规范内容太多了,看完一遍也记不住,这完全没关系。你可以多看几遍,也可以在用到时把它翻出来,在实际应用中掌握。这篇特别放送的内容,更多是作为写代码时候的一个参考手册。 + +## 1. 代码风格 + +### 1.1 代码格式 + +- 代码都必须用 `gofmt` 进行格式化。 +- 运算符和操作数之间要留空格。 +- 建议一行代码不超过120个字符,超过部分,请采用合适的换行方式换行。但也有些例外场景,例如import行、工具自动生成的代码、带tag的struct字段。 +- 文件长度不能超过800行。 +- 函数长度不能超过80行。 +- import规范 + - 代码都必须用`goimports`进行格式化(建议将代码Go代码编辑器设置为:保存时运行 `goimports`)。 + - 不要使用相对路径引入包,例如 `import ../util/net` 。 + - 包名称与导入路径的最后一个目录名不匹配时,或者多个相同包名冲突时,则必须使用导入别名。 + +```go + // bad + "github.com/dgrijalva/jwt-go/v4" + + //good + jwt "github.com/dgrijalva/jwt-go/v4" +``` + - 导入的包建议进行分组,匿名包的引用使用一个新的分组,并对匿名包引用进行说明。 + +```go + import ( + // go 标准包 + "fmt" + + // 第三方包 + "github.com/jinzhu/gorm" + "github.com/spf13/cobra" + "github.com/spf13/viper" + + // 匿名包单独分组,并对匿名包引用进行说明 + // import mysql driver + _ "github.com/jinzhu/gorm/dialects/mysql" + + // 内部包 + v1 "github.com/marmotedu/api/apiserver/v1" + metav1 "github.com/marmotedu/apimachinery/pkg/meta/v1" + "github.com/marmotedu/iam/pkg/cli/genericclioptions" + ) +``` + +### 1.2 声明、初始化和定义 + +当函数中需要使用到多个变量时,可以在函数开始处使用`var`声明。在函数外部声明必须使用 `var` ,不要采用 `:=` ,容易踩到变量的作用域的问题。 + +```go +var ( + Width int + Height int +) +``` + +- 在初始化结构引用时,请使用`&T{}`代替`new(T)`,以使其与结构体初始化一致。 + +```go +// bad +sptr := new(T) +sptr.Name = "bar" + +// good +sptr := &T{Name: "bar"} +``` + +- struct 声明和初始化格式采用多行,定义如下。 + +```go +type User struct{ + Username string + Email string +} + +user := User{ + Username: "belm", + Email: "nosbelm@qq.com", +} +``` + +- 相似的声明放在一组,同样适用于常量、变量和类型声明。 + +```go +// bad +import "a" +import "b" + +// good +import ( + "a" + "b" +) +``` + +- 尽可能指定容器容量,以便为容器预先分配内存,例如: + +```go +v := make(map[int]string, 4) +v := make([]string, 0, 4) +``` + +- 在顶层,使用标准var关键字。请勿指定类型,除非它与表达式的类型不同。 + +```go +// bad +var _s string = F() + +func F() string { return "A" } + +// good +var _s = F() +// 由于 F 已经明确了返回一个字符串类型,因此我们没有必要显式指定_s 的类型 +// 还是那种类型 + +func F() string { return "A" } +``` + +- 对于未导出的顶层常量和变量,使用`_`作为前缀。 + +```go +// bad +const ( + defaultHost = "127.0.0.1" + defaultPort = 8080 +) + +// good +const ( + _defaultHost = "127.0.0.1" + _defaultPort = 8080 +) +``` + +- 嵌入式类型(例如 mutex)应位于结构体内的字段列表的顶部,并且必须有一个空行将嵌入式字段与常规字段分隔开。 + +```go +// bad +type Client struct { + version int + http.Client +} + +// good +type Client struct { + http.Client + + version int +} +``` + +### 1.3 错误处理 + +- `error`作为函数的值返回,必须对`error`进行处理,或将返回值赋值给明确忽略。对于`defer xx.Close()`可以不用显式处理。 + +```go +func load() error { + // normal code +} + +// bad +load() + +// good + _ = load() +``` + +- `error`作为函数的值返回且有多个返回值的时候,`error`必须是最后一个参数。 + +```go +// bad +func load() (error, int) { + // normal code +} + +// good +func load() (int, error) { + // normal code +} +``` + +- 尽早进行错误处理,并尽早返回,减少嵌套。 + +```go +// bad +if err != nil { + // error code +} else { + // normal code +} + +// good +if err != nil { + // error handling + return err +} +// normal code +``` + +- 如果需要在 if 之外使用函数调用的结果,则应采用下面的方式。 + +```go +// bad +if v, err := foo(); err != nil { + // error handling +} + +// good +v, err := foo() +if err != nil { + // error handling +} +``` + +- 错误要单独判断,不与其他逻辑组合判断。 + +```go +// bad +v, err := foo() +if err != nil || v == nil { + // error handling + return err +} + +// good +v, err := foo() +if err != nil { + // error handling + return err +} + +if v == nil { + // error handling + return errors.New("invalid value v") +} +``` + +- 如果返回值需要初始化,则采用下面的方式。 + +```go +v, err := f() +if err != nil { + // error handling + return // or continue. +} +``` + +- 错误描述建议 + - 错误描述用小写字母开头,结尾不要加标点符号,例如: +```go + // bad + errors.New("Redis connection failed") + errors.New("redis connection failed.") + + // good + errors.New("redis connection failed") +``` + - 告诉用户他们可以做什么,而不是告诉他们不能做什么。 + - 当声明一个需求时,用must 而不是should。例如,`must be greater than 0、must match regex '[a-z]+'`。 + - 当声明一个格式不对时,用must not。例如,`must not contain`。 + - 当声明一个动作时用may not。例如,`may not be specified when otherField is empty、only name may be specified`。 + - 引用文字字符串值时,请在单引号中指示文字。例如,`ust not contain '..'`。 + - 当引用另一个字段名称时,请在反引号中指定该名称。例如,must be greater than `request`。 + - 指定不等时,请使用单词而不是符号。例如,`must be less than 256、must be greater than or equal to 0 (不要用 larger than、bigger than、more than、higher than)`。 + - 指定数字范围时,请尽可能使用包含范围。 + - 建议 Go 1.13 以上,error 生成方式为 `fmt.Errorf("module xxx: %w", err)`。 + +### 1.4 panic处理 + +- 在业务逻辑处理中禁止使用panic。 +- 在main包中,只有当程序完全不可运行时使用panic,例如无法打开文件、无法连接数据库导致程序无法正常运行。 +- 在main包中,使用 `log.Fatal` 来记录错误,这样就可以由log来结束程序,或者将panic抛出的异常记录到日志文件中,方便排查问题。 +- 可导出的接口一定不能有panic。 +- 包内建议采用error而不是panic来传递错误。 + +### 1.5 单元测试 + +- 单元测试文件名命名规范为 `example_test.go`。 +- 每个重要的可导出函数都要编写测试用例。 +- 因为单元测试文件内的函数都是不对外的,所以可导出的结构体、函数等可以不带注释。 +- 如果存在 `func (b *Bar) Foo` ,单测函数可以为 `func TestBar_Foo`。 + +### 1.6 类型断言失败处理 + +- type assertion 的单个返回值针对不正确的类型将产生 panic。请始终使用 “comma ok”的惯用法。 + +```go +// bad +t := n.(int) + +// good +t, ok := n.(int) +if !ok { + // error handling +} +``` + +## 2. 命名规范 + +命名规范是代码规范中非常重要的一部分,一个统一的、短小的、精确的命名规范可以大大提高代码的可读性,也可以借此规避一些不必要的Bug。 + +### 2.1 包命名 + +- 包名必须和目录名一致,尽量采取有意义、简短的包名,不要和标准库冲突。 +- 包名全部小写,没有大写或下划线,使用多级目录来划分层级。 +- 项目名可以通过中划线来连接多个单词。 +- 包名以及包所在的目录名,不要使用复数,例如,是`net/url`,而不是`net/urls`。 +- 不要用 common、util、shared 或者 lib 这类宽泛的、无意义的包名。 +- 包名要简单明了,例如 net、time、log。 + +### 2.2 函数命名 + +- 函数名采用驼峰式,首字母根据访问控制决定使用大写或小写,例如:`MixedCaps`或者`mixedCaps`。 +- 代码生成工具自动生成的代码(如`xxxx.pb.go`)和为了对相关测试用例进行分组,而采用的下划线(如`TestMyFunction_WhatIsBeingTested`)排除此规则。 + +### 2.3 文件命名 + +- 文件名要简短有意义。 +- 文件名应小写,并使用下划线分割单词。 + +### 2.4 结构体命名 + +- 采用驼峰命名方式,首字母根据访问控制决定使用大写或小写,例如`MixedCaps`或者`mixedCaps`。 +- 结构体名不应该是动词,应该是名词,比如 `Node`、`NodeSpec`。 +- 避免使用Data、Info这类无意义的结构体名。 +- 结构体的声明和初始化应采用多行,例如: + +```go +// User 多行声明 +type User struct { + Name string + Email string +} + +// 多行初始化 +u := User{ + UserName: "belm", + Email: "nosbelm@qq.com", +} +``` + +### 2.5 接口命名 + +- 接口命名的规则,基本和结构体命名规则保持一致: + - 单个函数的接口名以 “er"”作为后缀(例如Reader,Writer),有时候可能导致蹩脚的英文,但是没关系。 + - 两个函数的接口名以两个函数名命名,例如ReadWriter。 + - 三个以上函数的接口名,类似于结构体名。 + +例如: + +``` + // Seeking to an offset before the start of the file is an error. + // Seeking to any positive offset is legal, but the behavior of subsequent + // I/O operations on the underlying object is implementation-dependent. + type Seeker interface { + Seek(offset int64, whence int) (int64, error) + } + + // ReadWriter is the interface that groups the basic Read and Write methods. + type ReadWriter interface { + Reader + Writer + } +``` + +### 2.6 变量命名 + +- 变量名必须遵循驼峰式,首字母根据访问控制决定使用大写或小写。 +- 在相对简单(对象数量少、针对性强)的环境中,可以将一些名称由完整单词简写为单个字母,例如: + - user 可以简写为 u; + - userID 可以简写 uid。 +- 特有名词时,需要遵循以下规则: + - 如果变量为私有,且特有名词为首个单词,则使用小写,如 apiClient。 + - 其他情况都应当使用该名词原有的写法,如 APIClient、repoID、UserID。 + +下面列举了一些常见的特有名词。 + +``` +// A GonicMapper that contains a list of common initialisms taken from golang/lint +var LintGonicMapper = GonicMapper{ + "API": true, + "ASCII": true, + "CPU": true, + "CSS": true, + "DNS": true, + "EOF": true, + "GUID": true, + "HTML": true, + "HTTP": true, + "HTTPS": true, + "ID": true, + "IP": true, + "JSON": true, + "LHS": true, + "QPS": true, + "RAM": true, + "RHS": true, + "RPC": true, + "SLA": true, + "SMTP": true, + "SSH": true, + "TLS": true, + "TTL": true, + "UI": true, + "UID": true, + "UUID": true, + "URI": true, + "URL": true, + "UTF8": true, + "VM": true, + "XML": true, + "XSRF": true, + "XSS": true, +} +``` + +- 若变量类型为bool类型,则名称应以Has,Is,Can或Allow开头,例如: + +```go +var hasConflict bool +var isExist bool +var canManage bool +var allowGitHook bool +``` + +- 局部变量应当尽可能短小,比如使用buf指代buffer,使用i指代index。 +- 代码生成工具自动生成的代码可排除此规则(如`xxx.pb.go`里面的Id) + +### 2.7 常量命名 + +- 常量名必须遵循驼峰式,首字母根据访问控制决定使用大写或小写。 +- 如果是枚举类型的常量,需要先创建相应类型: + +```go +// Code defines an error code type. +type Code int + +// Internal errors. +const ( + // ErrUnknown - 0: An unknown error occurred. + ErrUnknown Code = iota + // ErrFatal - 1: An fatal error occurred. + ErrFatal +) +``` + +### 2.8 Error的命名 + +- Error类型应该写成FooError的形式。 + +```go +type ExitError struct { + // .... +} +``` + +- Error变量写成ErrFoo的形式。 + +```go +var ErrFormat = errors.New("unknown format") +``` + +## 3. 注释规范 + +- 每个可导出的名字都要有注释,该注释对导出的变量、函数、结构体、接口等进行简要介绍。 +- 全部使用单行注释,禁止使用多行注释。 +- 和代码的规范一样,单行注释不要过长,禁止超过 120 字符,超过的请使用换行展示,尽量保持格式优雅。 +- 注释必须是完整的句子,以需要注释的内容作为开头,句点作为结尾,`格式为 // 名称 描述.`。例如: + +```go +// bad +// logs the flags in the flagset. +func PrintFlags(flags *pflag.FlagSet) { + // normal code +} + +// good +// PrintFlags logs the flags in the flagset. +func PrintFlags(flags *pflag.FlagSet) { + // normal code +} +``` + +- 所有注释掉的代码在提交code review前都应该被删除,否则应该说明为什么不删除,并给出后续处理建议。 + +- 在多段注释之间可以使用空行分隔加以区分,如下所示: + +```go +// Package superman implements methods for saving the world. +// +// Experience has shown that a small number of procedures can prove +// helpful when attempting to save the world. +package superman +``` + +### 3.1 包注释 + +- 每个包都有且仅有一个包级别的注释。 +- 包注释统一用 // 进行注释,格式为 `// Package 包名 包描述`,例如: + +```go +// Package genericclioptions contains flags which can be added to you command, bound, completed, and produce +// useful helper functions. +package genericclioptions +``` + +### 3.2 变量/常量注释 + +- 每个可导出的变量/常量都必须有注释说明,`格式为// 变量名 变量描述`,例如: + +```go +// ErrSigningMethod defines invalid signing method error. +var ErrSigningMethod = errors.New("Invalid signing method") +``` +- 出现大块常量或变量定义时,可在前面注释一个总的说明,然后在每一行常量的前一行或末尾详细注释该常量的定义,例如: +```go +// Code must start with 1xxxxx. +const ( + // ErrSuccess - 200: OK. + ErrSuccess int = iota + 100001 + + // ErrUnknown - 500: Internal server error. + ErrUnknown + + // ErrBind - 400: Error occurred while binding the request body to the struct. + ErrBind + + // ErrValidation - 400: Validation failed. + ErrValidation +) +``` +### 3.3 结构体注释 + +- 每个需要导出的结构体或者接口都必须有注释说明,格式为 `// 结构体名 结构体描述.`。 +- 结构体内的可导出成员变量名,如果意义不明确,必须要给出注释,放在成员变量的前一行或同一行的末尾。例如: + +```go +// User represents a user restful resource. It is also used as gorm model. +type User struct { + // Standard object's metadata. + metav1.ObjectMeta `json:"metadata,omitempty"` + + Nickname string `json:"nickname" gorm:"column:nickname"` + Password string `json:"password" gorm:"column:password"` + Email string `json:"email" gorm:"column:email"` + Phone string `json:"phone" gorm:"column:phone"` + IsAdmin int `json:"isAdmin,omitempty" gorm:"column:isAdmin"` +} +``` + +### 3.4 方法注释 + +每个需要导出的函数或者方法都必须有注释,格式为// 函数名 函数描述.,例如: + +```go +// BeforeUpdate run before update database record. +func (p *Policy) BeforeUpdate() (err error) { + // normal code + return nil +} +``` + +### 3.5 类型注释 + +- 每个需要导出的类型定义和类型别名都必须有注释说明,格式为 `// 类型名 类型描述.`,例如: + +```go +// Code defines an error code type. +type Code int +``` + +## 4. 类型 + +### 4.1 字符串 + +- 空字符串判断。 + +```go +// bad +if s == "" { + // normal code +} + +// good +if len(s) == 0 { + // normal code +} +``` + +- `[]byte`/`string`相等比较。 + +```go +// bad +var s1 []byte +var s2 []byte +... +bytes.Equal(s1, s2) == 0 +bytes.Equal(s1, s2) != 0 + +// good +var s1 []byte +var s2 []byte +... +bytes.Compare(s1, s2) == 0 +bytes.Compare(s1, s2) != 0 +``` + +- 复杂字符串使用raw字符串避免字符转义。 + +```go +// bad +regexp.MustCompile("\\.") + +// good +regexp.MustCompile(`\.`) +``` + +### 4.2 切片 + +- 空slice判断。 + +```go +// bad +if len(slice) = 0 { + // normal code +} + +// good +if slice != nil && len(slice) == 0 { + // normal code +} +``` + +上面判断同样适用于map、channel。 + +- 声明slice。 + +```go +// bad +s := []string{} +s := make([]string, 0) + +// good +var s []string +``` + +- slice复制。 + +```go +// bad +var b1, b2 []byte +for i, v := range b1 { + b2[i] = v +} +for i := range b1 { + b2[i] = b1[i] +} + +// good +copy(b2, b1) +``` + +- slice新增。 + +```go +// bad +var a, b []int +for _, v := range a { + b = append(b, v) +} + +// good +var a, b []int +b = append(b, a...) +``` + +### 4.3 结构体 + +- struct初始化。 + +struct以多行格式初始化。 + +```go +type user struct { + Id int64 + Name string +} + +u1 := user{100, "Colin"} + +u2 := user{ + Id: 200, + Name: "Lex", +} +``` + +## 5. 控制结构 + +### 5.1 if + +- if 接受初始化语句,约定如下方式建立局部变量。 + +```go +if err := loadConfig(); err != nil { + // error handling + return err +} +``` + +- if 对于bool类型的变量,应直接进行真假判断。 + +```go +var isAllow bool +if isAllow { + // normal code +} +``` + +### 5.2 for + +- 采用短声明建立局部变量。 + +```go +sum := 0 +for i := 0; i < 10; i++ { + sum += 1 +} +``` + +- 不要在 for 循环里面使用 defer,defer只有在函数退出时才会执行。 + +```go +// bad +for file := range files { + fd, err := os.Open(file) + if err != nil { + return err + } + defer fd.Close() + // normal code +} + +// good +for file := range files { + func() { + fd, err := os.Open(file) + if err != nil { + return err + } + defer fd.Close() + // normal code + }() +} +``` + +### 5.3 range + +- 如果只需要第一项(key),就丢弃第二个。 + +```go +for key := range keys { +// normal code +} +``` + +- 如果只需要第二项,则把第一项置为下划线。 + +```go +sum := 0 +for _, value := range array { + sum += value +} +``` + +### 5.4 switch + +- 必须要有default。 + +```go +switch os := runtime.GOOS; os { + case "linux": + fmt.Println("Linux.") + case "darwin": + fmt.Println("OS X.") + default: + fmt.Printf("%s.\n", os) +} +``` + +### 5.5 goto +- 业务代码禁止使用 goto 。 +- 框架或其他底层源码尽量不用。 + +## 6. 函数 + +- 传入变量和返回变量以小写字母开头。 +- 函数参数个数不能超过5个。 +- 函数分组与顺序 +- 函数应按粗略的调用顺序排序。 +- 同一文件中的函数应按接收者分组。 +- 尽量采用值传递,而非指针传递。 +- 传入参数是 map、slice、chan、interface ,不要传递指针。 + +### 6.1 函数参数 + +- 如果函数返回相同类型的两个或三个参数,或者如果从上下文中不清楚结果的含义,使用命名返回,其他情况不建议使用命名返回,例如: + +```go +func coordinate() (x, y float64, err error) { + // normal code +} +``` +- 传入变量和返回变量都以小写字母开头。 +- 尽量用值传递,非指针传递。 +- 参数数量均不能超过5个。 +- 多返回值最多返回三个,超过三个请使用 struct。 + +### 6.2 defer + +- 当存在资源创建时,应紧跟defer释放资源(可以大胆使用defer,defer在Go1.14版本中,性能大幅提升,defer的性能损耗即使在性能敏感型的业务中,也可以忽略)。 +- 先判断是否错误,再defer释放资源,例如: + +```go +rep, err := http.Get(url) +if err != nil { + return err +} + +defer resp.Body.Close() +``` + +### 6.3 方法的接收器 + +- 推荐以类名第一个英文首字母的小写作为接收器的命名。 +- 接收器的命名在函数超过20行的时候不要用单字符。 +- 接收器的命名不能采用me、this、self这类易混淆名称。 + +### 6.4 嵌套 +- 嵌套深度不能超过4层。 + +### 6.5 变量命名 +- 变量声明尽量放在变量第一次使用的前面,遵循就近原则。 +- 如果魔法数字出现超过两次,则禁止使用,改用一个常量代替,例如: + +```go +// PI ... +const Prise = 3.14 + +func getAppleCost(n float64) float64 { + return Prise * n +} + +func getOrangeCost(n float64) float64 { + return Prise * n +} +``` + +## 7. GOPATH 设置规范 +- Go 1.11 之后,弱化了 GOPATH 规则,已有代码(很多库肯定是在1.11之前建立的)肯定符合这个规则,建议保留 GOPATH 规则,便于维护代码。 +- 建议只使用一个 GOPATH,不建议使用多个 GOPATH。如果使用多个GOPATH,编译生效的 bin 目录是在第一个 GOPATH 下。 + +## 8. 依赖管理 + +- Go 1.11 以上必须使用 Go Modules。 +- 使用Go Modules作为依赖管理的项目时,不建议提交vendor目录。 +- 使用Go Modules作为依赖管理的项目时,必须提交go.sum文件。 + +### 9. 最佳实践 + +- 尽量少用全局变量,而是通过参数传递,使每个函数都是“无状态”的。这样可以减少耦合,也方便分工和单元测试。 +- 在编译时验证接口的符合性,例如: + +```go +type LogHandler struct { + h http.Handler + log *zap.Logger +} +var _ http.Handler = LogHandler{} +``` +- 服务器处理请求时,应该创建一个context,保存该请求的相关信息(如requestID),并在函数调用链中传递。 + +### 9.1 性能 +- string 表示的是不可变的字符串变量,对 string 的修改是比较重的操作,基本上都需要重新申请内存。所以,如果没有特殊需要,需要修改时多使用 []byte。 +- 优先使用 strconv 而不是 fmt。 + +### 9.2 注意事项 + +- append 要小心自动分配内存,append 返回的可能是新分配的地址。 +- 如果要直接修改 map 的 value 值,则 value 只能是指针,否则要覆盖原来的值。 +- map 在并发中需要加锁。 +- 编译过程无法检查 interface{} 的转换,只能在运行时检查,小心引起 panic。 + +## 总结 + +这里向你介绍了九类常用的编码规范。但今天的最后,我要在这里提醒你一句:规范是人定的,你也可以根据需要,制定符合你项目的规范,但同时我也建议你采纳这些业界沉淀下来的规范,并通过工具来确保规范的执行。 diff --git a/docs/conversions/logging.md b/docs/conversions/logging.md new file mode 100644 index 000000000..82f74c9aa --- /dev/null +++ b/docs/conversions/logging.md @@ -0,0 +1,20 @@ +## Log Standards + +### Log Standards + +- The unified log package `github.com/OpenIMSDK/Open-IM-Server/internal/pkg/log` should be used for all logging; +- Use structured logging formats: `log.Infow`, `log.Warnw`, `log.Errorw`, etc. For example: `log.Infow("Update post function called")`; +- All logs should start with an uppercase letter and should not end with a `.`. For example: `log.Infow("Update post function called")`; +- Use past tense. For example, use `Could not delete B` instead of `Cannot delete B`; +- Adhere to log level standards: + - Debug level logs use `log.Debugw`; + - Info level logs use `log.Infow`; + - Warning level logs use `log.Warnw`; + - Error level logs use `log.Errorw`; + - Panic level logs use `log.Panicw`; + - Fatal level logs use `log.Fatalw`. +- Log settings: + - Development and test environments: The log level is set to `debug`, the log format can be set to `console` / `json` as needed, and caller is enabled; + - Production environment: The log level is set to `info`, the log format is set to `json`, and caller is enabled. (**Note**: In the early stages of going online, to facilitate troubleshooting, the log level can be set to `debug`) +- When logging, avoid outputting sensitive information, such as passwords, keys, etc. +- If you are calling a logging function in a function/method with a `context.Context` parameter, it is recommended to use `log.L(ctx).Infow()` for logging. \ No newline at end of file diff --git a/docs/conversions/version.md b/docs/conversions/version.md new file mode 100644 index 000000000..a421dd549 --- /dev/null +++ b/docs/conversions/version.md @@ -0,0 +1,57 @@ +# OpenIM Branch Management and Versioning + +Our project, OpenIM, follows the [Semantic Versioning 2.0.0](https://semver.org/lang/zh-CN/) standards. + +## OpenIM version + +OpenIM manages two primary branches: `main` and `release`. The project uses Semantic Versioning 2.0.0 to tag different versions of the software, each indicating a significant milestone in the software's development. + +In the OpenIM repository, the versioning adheres to the `MAJOR.MINOR.PATCH` format, where: + +- `MAJOR` version changes when there are incompatible changes to the API, +- `MINOR` version changes when features are added in a backward-compatible manner, and +- `PATCH` version changes when backward-compatible bugs are fixed. + +## Milestones and Branching + +When a significant milestone like v3.1.0 is achieved, a new branch `release-v3.1` is created. This branch contains all the code pertaining to this stable release. All bug fixes and features intended for the next version, v3.2.0, are merged into this branch. + +The release of `PATCH` versions (Z in `X.Y.Z`) are driven by bug fixes, and these can be rolled out depending on the bug's priority or over a scheduled time. On the other hand, `MINOR` versions (Y in `X.Y.Z`) are released based on the project's roadmap, milestone completion, or on a scheduled timeline. Importantly, the API of minor versions is always backward-compatible. + +## Dealing with Major Bugs + +In the event of a major bug discovery, the fix would selectively be merged into the previous version (e.g., v3.1 or the `release-v3.1` branch), as well as into the `main` branch. This is to ensure that users relying on the older version can still receive important bug fixes, while also keeping the main branch updated. + +It's worth noting that a robust testing regime should be in place to ensure the integrity of all branches at any given time. Automated tests and code review sessions are crucial components of maintaining a healthy codebase. + +To summarize, OpenIM's approach to branch management and versioning ensures a balance between introducing new features, fixing bugs, and maintaining backward compatibility. This strategy is vital for managing user expectations, supporting older versions, and paving the way for the project's continuous growth. + +## Git Workflow Example + +To put the above principles into practice, here's a Git workflow example that you might follow when working on a bug fix: + +``` +bashCopy code# Checkout the branch for the version that needs the bug fix +git checkout release-v3.1 + +# Create a new branch for the bug fix +git checkout -b bug/bug-name + +# ... Make changes, commit your work ... + +# Push the branch to your remote repository +git push origin bug/bug-name + +# After the pull request is merged into the release-v3.1 branch, +# checkout and update your main branch +git checkout main +git pull origin main + +# Merge or rebase the changes from release-v3.1 into main +git merge release-v3.1 + +# Push the updates to the main branch +git push origin main +``` + +Remember, communication with your team is key throughout this process, keeping everyone up-to-date with the changes being made. \ No newline at end of file diff --git a/scripts/make-rules/common.mk b/scripts/make-rules/common.mk index d471ec112..93057fef5 100644 --- a/scripts/make-rules/common.mk +++ b/scripts/make-rules/common.mk @@ -60,6 +60,7 @@ endif ifeq ($(origin VERSION), undefined) # VERSION := $(shell git describe --abbrev=0 --dirty --always --tags | sed 's/-/./g') #v2.3.3.dirty +# git describe --tags --always --match="v*" --dirty VERSION := $(shell git describe --tags --always --match="v*" --dirty | sed 's/-/./g') #v2.3.3.631.g00abdc9b.dirty # v2.3.3: git tag endif @@ -110,13 +111,16 @@ else IMAGE_PLAT := $(PLATFORM) endif +# Protobuf file storage path +APIROOT=$(ROOT_DIR)/pkg/proto + # Linux command settings # TODO: Whether you need to join utils? -FIND := find . ! -path './utils/*' ! -path './vendor/*' -XARGS := xargs -r +FIND := find . ! -path './utils/*' ! -path './vendor/*' ! -path './third_party/*' +XARGS := xargs -r --no-run-if-empty # Linux command settings-CODE DIRS Copyright -CODE_DIRS := $(ROOT_DIR)/pkg $(ROOT_DIR)/cmd $(ROOT_DIR)/config $(ROOT_DIR)/db $(ROOT_DIR)/.docker-compose_cfg $(ROOT_DIR)/internal $(ROOT_DIR)/scripts $(ROOT_DIR)/test +CODE_DIRS := $(ROOT_DIR)/pkg $(ROOT_DIR)/cmd $(ROOT_DIR)/config $(ROOT_DIR)/db $(ROOT_DIR)/.docker-compose_cfg $(ROOT_DIR)/internal $(ROOT_DIR)/scripts $(ROOT_DIR)/test $(ROOT_DIR)/.github $(ROOT_DIR)/build $(ROOT_DIR)/build $(ROOT_DIR)/deployments FINDS := find $(CODE_DIRS) # Makefile settings: Select different behaviors by determining whether V option is set diff --git a/scripts/make-rules/golang.mk b/scripts/make-rules/golang.mk index cf07f0cda..282649d7e 100644 --- a/scripts/make-rules/golang.mk +++ b/scripts/make-rules/golang.mk @@ -173,9 +173,9 @@ go.test.cover: go.test.junit-report .PHONY: go.format go.format: tools.verify.golines tools.verify.goimports @echo "===========> Formating codes" - @$(FIND) -type f -name '*.go' | $(XARGS) gofmt -s -w - @$(FIND) -type f -name '*.go' | $(XARGS) $(TOOLS_DIR)/goimports -w -local $(ROOT_PACKAGE) - @$(FIND) -type f -name '*.go' | $(XARGS) $(TOOLS_DIR)/golines -w --max-len=200 --reformat-tags --shorten-comments --ignore-generated . + @$(FIND) -type f -name '*.go' -not -name '*pb*' | $(XARGS) gofmt -s -w + @$(FIND) -type f -name '*.go' -not -name '*pb*' | $(XARGS) $(TOOLS_DIR)/goimports -w -local $(ROOT_PACKAGE) + @$(FIND) -type f -name '*.go' -not -name '*pb*' | $(XARGS) $(TOOLS_DIR)/golines -w --max-len=200 --reformat-tags --shorten-comments --ignore-generated . @$(GO) mod edit -fmt ## imports: task to automatically handle import packages in Go files using goimports tool From 3dc19585253fb5095e1550468b9f5072572a4402 Mon Sep 17 00:00:00 2001 From: Xinwei Xiong <3293172751@qq.com> Date: Wed, 26 Jul 2023 17:28:35 +0800 Subject: [PATCH 09/61] Update README.md (#669) --- README.md | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 11471ac0f..37aedb0ee 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ A+ good first - +

@@ -69,7 +69,8 @@ DATA_DIR=./ #designate large disk directory 1. Deploy and start -> **Note**: This command can only be executed once. It will modify the component passwords in docker-compose based on the PASSWORD variable in .env, and modify the component passwords in config/config.yaml. If the password in .env changes, you need to first execute docker-compose down; rm components -rf and then execute this command. +> **Note** +> This command can only be executed once. It will modify the component passwords in docker-compose based on the PASSWORD variable in .env, and modify the component passwords in config/config.yaml. If the password in .env changes, you need to first execute docker-compose down; rm components -rf and then execute this command. ``` chmod +x install_im_server.sh; @@ -94,18 +95,19 @@ cd scripts; 2. Clone ``` - git clone https://github.com/OpenIMSDK/Open-IM-Server - cd Open-IM-Server - git checkout release-v3.0 #or other release branch + git clone https://github.com/OpenIMSDK/Open-IM-Server openim && export openim=$(pwd)/openim && cd $openim && make + git checkout release-v3.0 # or other tag ``` +Read about the [OpenIM Version Policy](https://github.com/OpenIMSDK/Open-IM-Server/blob/main/docs/conversions/version.md) + 3. Compile ``` - cd Open-IM-server/scripts - chmod +x *.sh - ./build_all_service.sh + cd $openim + make build ``` +`make help` to help you see the instructions supported by OpenIM. All services have been successfully built as shown in the figure From 28732a29cd6d2f27bd162cc838fcc78917dcd7a5 Mon Sep 17 00:00:00 2001 From: Xinwei Xiong <3293172751@qq.com> Date: Wed, 26 Jul 2023 17:43:18 +0800 Subject: [PATCH 10/61] Update CODEOWNERS (#670) --- docs/CODEOWNERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/CODEOWNERS b/docs/CODEOWNERS index a05a1866b..0d9b017f8 100644 --- a/docs/CODEOWNERS +++ b/docs/CODEOWNERS @@ -65,7 +65,7 @@ cmd/* config/* @skiffer-git # db directory -db/sdk @BanTanger @cubxxw @Gordon +db/sdk @cubxxw @FGadvancer # internal directory internal/ @openimsdk/openim @skiffer-git @FGadvancer From d7218dd5be348e286b2e7188c179bd2952252274 Mon Sep 17 00:00:00 2001 From: Xinwei Xiong <3293172751@qq.com> Date: Wed, 26 Jul 2023 18:50:50 +0800 Subject: [PATCH 11/61] docs: update README.md install (#673) --- README.md | 45 +++++++++++++++++---------------------------- 1 file changed, 17 insertions(+), 28 deletions(-) diff --git a/README.md b/README.md index 37aedb0ee..3c52475f3 100644 --- a/README.md +++ b/README.md @@ -51,15 +51,15 @@ Open-IM-Server is not a standalone product and does not include account registra 1. Clone the project -``` -clone https://github.com/OpenIMSDK/Open-IM-Server -cd Open-IM-Server -git checkout release-v3.0 #or other release branch +```bash +# choose what you need +BRANCH=release-v3.0 +git clone -b $BRANCH https://github.com/OpenIMSDK/Open-IM-Server openim && export openim=$(pwd)/openim && cd $openim && make build ``` -1. Modify .env +2. Modify .env -``` +```bash USER=root #no need to modify PASSWORD=openIM123 #A combination of 8 or more numbers and letters, this password applies to redis, mysql, mongo, as well as accessSecret in config/config.yaml ENDPOINT=http://127.0.0.1:10005 #minio's external service IP and port, or use the domain name storage.xx.xx, the app must be able to access this IP and port or domain, @@ -67,21 +67,19 @@ API_URL=http://127.0.0.1:10002/object/ #the app must be able to access this IP a DATA_DIR=./ #designate large disk directory ``` -1. Deploy and start +3. Deploy and start > **Note** > This command can only be executed once. It will modify the component passwords in docker-compose based on the PASSWORD variable in .env, and modify the component passwords in config/config.yaml. If the password in .env changes, you need to first execute docker-compose down; rm components -rf and then execute this command. ``` -chmod +x install_im_server.sh; -./install_im_server.sh; +make install ``` -1. Check the service +4. Check the service -``` -cd scripts; -./docker_check_service.sh +```bash +make check ``` ![https://github.com/OpenIMSDK/Open-IM-Server/blob/main/docs/images/docker_build.png](https://github.com/OpenIMSDK/Open-IM-Server/blob/main/docs/images/docker_build.png) @@ -90,23 +88,14 @@ cd scripts; ### Compile from source -1. Go 1.18 or higher version. - -2. Clone - - ``` - git clone https://github.com/OpenIMSDK/Open-IM-Server openim && export openim=$(pwd)/openim && cd $openim && make - git checkout release-v3.0 # or other tag - ``` +Ur need `Go 1.18` or higher version, and `make`. +```bash +# choose what you need +BRANCH=release-v3.0 +git clone -b $BRANCH https://github.com/OpenIMSDK/Open-IM-Server openim && export openim=$(pwd)/openim && cd $openim && make build +``` Read about the [OpenIM Version Policy](https://github.com/OpenIMSDK/Open-IM-Server/blob/main/docs/conversions/version.md) - -3. Compile - - ``` - cd $openim - make build - ``` `make help` to help you see the instructions supported by OpenIM. All services have been successfully built as shown in the figure From 5b85fa763a5c314d80a9d0982be330d6af395699 Mon Sep 17 00:00:00 2001 From: Gordon <46924906+FGadvancer@users.noreply.github.com> Date: Wed, 26 Jul 2023 19:45:23 +0800 Subject: [PATCH 12/61] Feat: Refactor project's references to shared modules (#672) * fix: to start im or chat, ZooKeeper must be started first. * fix: msg gateway start output err info Signed-off-by: Gordon <1432970085@qq.com> * fix: msg gateway start output err info Signed-off-by: Gordon <1432970085@qq.com> * chore: package path changes Signed-off-by: withchao <993506633@qq.com> * fix: go mod update Signed-off-by: Gordon <1432970085@qq.com> * fix: token update Signed-off-by: Gordon <1432970085@qq.com> * chore: package path changes Signed-off-by: withchao <993506633@qq.com> * chore: package path changes Signed-off-by: withchao <993506633@qq.com> * fix: token update Signed-off-by: Gordon <1432970085@qq.com> * fix: token update Signed-off-by: Gordon <1432970085@qq.com> * fix: token update Signed-off-by: Gordon <1432970085@qq.com> * fix: token update Signed-off-by: Gordon <1432970085@qq.com> * fix: token update Signed-off-by: Gordon <1432970085@qq.com> --------- Signed-off-by: Gordon <1432970085@qq.com> Signed-off-by: withchao <993506633@qq.com> Co-authored-by: withchao <993506633@qq.com> --- cmd/openim-api/main.go | 4 +- cmd/openim-push/main.go | 2 +- cmd/openim-rpc/openim-rpc-auth/main.go | 2 +- .../openim-rpc-conversation/main.go | 2 +- cmd/openim-rpc/openim-rpc-friend/main.go | 2 +- cmd/openim-rpc/openim-rpc-group/main.go | 2 +- cmd/openim-rpc/openim-rpc-msg/main.go | 2 +- cmd/openim-rpc/openim-rpc-third/main.go | 2 +- cmd/openim-rpc/openim-rpc-user/main.go | 2 +- docker-compose.yaml | 1 + go.mod | 6 +- go.sum | 8 +- internal/api/custom_validator.go | 2 +- internal/api/msg.go | 8 +- internal/api/route.go | 7 +- internal/api/user.go | 4 +- internal/msggateway/callback.go | 4 +- internal/msggateway/client.go | 7 +- internal/msggateway/context.go | 2 +- internal/msggateway/hub_server.go | 11 +- internal/msggateway/init.go | 12 +- internal/msggateway/n_ws_server.go | 8 +- internal/msgtransfer/init.go | 2 +- .../msgtransfer/online_history_msg_handler.go | 31 +- .../online_msg_to_mongo_handler.go | 2 +- .../msgtransfer/persistent_msg_handler.go | 4 +- internal/push/callback.go | 4 +- internal/push/offlinepush/fcm/push.go | 4 +- internal/push/offlinepush/getui/body.go | 2 +- internal/push/offlinepush/getui/push.go | 2 +- .../offlinepush/jpush/body/notification.go | 2 +- .../push/offlinepush/jpush/body/platform.go | 2 +- internal/push/offlinepush/jpush/push.go | 2 +- internal/push/push_handler.go | 4 +- internal/push/push_rpc_server.go | 2 +- internal/push/push_to_client.go | 9 +- internal/push/tools.go | 2 +- internal/rpc/auth/auth.go | 9 +- internal/rpc/conversation/conversaion.go | 5 +- internal/rpc/friend/black.go | 4 +- internal/rpc/friend/callback.go | 4 +- internal/rpc/friend/friend.go | 10 +- internal/rpc/group/callback.go | 4 +- internal/rpc/group/group.go | 35 +- internal/rpc/group/super_group.go | 2 +- internal/rpc/msg/as_read.go | 2 +- internal/rpc/msg/callback.go | 4 +- internal/rpc/msg/delete.go | 12 +- internal/rpc/msg/message_interceptor.go | 4 +- internal/rpc/msg/msg_status.go | 2 +- internal/rpc/msg/revoke.go | 10 +- internal/rpc/msg/send.go | 9 +- internal/rpc/msg/server.go | 2 +- internal/rpc/msg/sync_msg.go | 9 +- internal/rpc/msg/utils.go | 4 +- internal/rpc/msg/verify.go | 4 +- internal/rpc/third/third.go | 2 +- internal/rpc/third/tool.go | 4 +- internal/rpc/user/user.go | 15 +- internal/tools/cron_task.go | 2 +- internal/tools/msg.go | 2 +- internal/tools/msg_test.go | 355 ------------------ pkg/authverify/token.go | 62 +++ pkg/common/cmd/msg_gateway.go | 2 +- pkg/common/cmd/root.go | 6 +- pkg/common/cmd/rpc.go | 2 +- pkg/common/config/config.go | 333 ++++++++++++++++ pkg/common/config/parse.go | 27 +- pkg/common/db/cache/init_redis.go | 2 +- pkg/common/db/cache/msg.go | 11 +- pkg/common/db/controller/auth.go | 5 +- pkg/common/db/controller/conversation.go | 5 +- pkg/common/db/controller/friend.go | 2 +- pkg/common/db/controller/group.go | 2 +- pkg/common/db/controller/msg.go | 2 +- pkg/common/db/controller/msg_test.go | 4 +- pkg/common/db/relation/chat_log_model.go | 2 +- pkg/common/db/relation/conversation_model.go | 2 +- pkg/common/db/relation/group_member_model.go | 2 +- pkg/common/db/relation/group_model.go | 2 +- pkg/common/db/relation/mysql_init.go | 2 +- pkg/common/db/s3/cos/cos.go | 2 +- pkg/common/db/s3/minio/minio.go | 2 +- pkg/common/db/s3/oss/oss.go | 2 +- pkg/common/db/unrelation/mongo.go | 2 +- pkg/common/db/unrelation/msg.go | 2 +- pkg/common/http/http_client.go | 4 +- pkg/common/kafka/consumer.go | 2 +- pkg/common/kafka/producer.go | 4 +- pkg/common/prome/prometheus.go | 2 +- pkg/common/startrpc/start.go | 112 ++++++ pkg/msgprocessor/conversation.go | 158 ++++++++ pkg/msgprocessor/options.go | 181 +++++++++ pkg/rpcclient/auth.go | 2 +- pkg/rpcclient/conversation.go | 2 +- pkg/rpcclient/friend.go | 2 +- pkg/rpcclient/group.go | 4 +- pkg/rpcclient/msg.go | 4 +- pkg/rpcclient/notification/conevrsation.go | 2 +- pkg/rpcclient/notification/friend.go | 2 +- pkg/rpcclient/notification/group.go | 2 +- pkg/rpcclient/notification/msg.go | 2 +- pkg/rpcclient/push.go | 2 +- pkg/rpcclient/third.go | 2 +- pkg/rpcclient/user.go | 6 +- 105 files changed, 1088 insertions(+), 581 deletions(-) delete mode 100644 internal/tools/msg_test.go create mode 100644 pkg/authverify/token.go create mode 100644 pkg/common/config/config.go create mode 100644 pkg/common/startrpc/start.go create mode 100644 pkg/msgprocessor/conversation.go create mode 100644 pkg/msgprocessor/options.go diff --git a/cmd/openim-api/main.go b/cmd/openim-api/main.go index c967906e9..8350f4d05 100644 --- a/cmd/openim-api/main.go +++ b/cmd/openim-api/main.go @@ -28,9 +28,9 @@ import ( "github.com/OpenIMSDK/Open-IM-Server/internal/api" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/cmd" + "github.com/OpenIMSDK/Open-IM-Server/pkg/common/config" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/cache" - "github.com/OpenIMSDK/tools/config" - "github.com/OpenIMSDK/tools/constant" + "github.com/OpenIMSDK/protocol/constant" "github.com/OpenIMSDK/tools/discoveryregistry" openKeeper "github.com/OpenIMSDK/tools/discoveryregistry/zookeeper" "github.com/OpenIMSDK/tools/log" diff --git a/cmd/openim-push/main.go b/cmd/openim-push/main.go index adc3a7cb7..03db8ae03 100644 --- a/cmd/openim-push/main.go +++ b/cmd/openim-push/main.go @@ -17,7 +17,7 @@ package main import ( "github.com/OpenIMSDK/Open-IM-Server/internal/push" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/cmd" - "github.com/OpenIMSDK/tools/config" + "github.com/OpenIMSDK/Open-IM-Server/pkg/common/config" ) func main() { diff --git a/cmd/openim-rpc/openim-rpc-auth/main.go b/cmd/openim-rpc/openim-rpc-auth/main.go index 62bb65fab..524804988 100644 --- a/cmd/openim-rpc/openim-rpc-auth/main.go +++ b/cmd/openim-rpc/openim-rpc-auth/main.go @@ -17,7 +17,7 @@ package main import ( "github.com/OpenIMSDK/Open-IM-Server/internal/rpc/auth" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/cmd" - "github.com/OpenIMSDK/tools/config" + "github.com/OpenIMSDK/Open-IM-Server/pkg/common/config" ) func main() { diff --git a/cmd/openim-rpc/openim-rpc-conversation/main.go b/cmd/openim-rpc/openim-rpc-conversation/main.go index 0465de868..fec8226f8 100644 --- a/cmd/openim-rpc/openim-rpc-conversation/main.go +++ b/cmd/openim-rpc/openim-rpc-conversation/main.go @@ -17,7 +17,7 @@ package main import ( "github.com/OpenIMSDK/Open-IM-Server/internal/rpc/conversation" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/cmd" - "github.com/OpenIMSDK/tools/config" + "github.com/OpenIMSDK/Open-IM-Server/pkg/common/config" ) func main() { diff --git a/cmd/openim-rpc/openim-rpc-friend/main.go b/cmd/openim-rpc/openim-rpc-friend/main.go index 7a0631a20..fbd44038e 100644 --- a/cmd/openim-rpc/openim-rpc-friend/main.go +++ b/cmd/openim-rpc/openim-rpc-friend/main.go @@ -17,7 +17,7 @@ package main import ( "github.com/OpenIMSDK/Open-IM-Server/internal/rpc/friend" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/cmd" - "github.com/OpenIMSDK/tools/config" + "github.com/OpenIMSDK/Open-IM-Server/pkg/common/config" ) func main() { diff --git a/cmd/openim-rpc/openim-rpc-group/main.go b/cmd/openim-rpc/openim-rpc-group/main.go index af78868d2..06baac155 100644 --- a/cmd/openim-rpc/openim-rpc-group/main.go +++ b/cmd/openim-rpc/openim-rpc-group/main.go @@ -17,7 +17,7 @@ package main import ( "github.com/OpenIMSDK/Open-IM-Server/internal/rpc/group" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/cmd" - "github.com/OpenIMSDK/tools/config" + "github.com/OpenIMSDK/Open-IM-Server/pkg/common/config" ) func main() { diff --git a/cmd/openim-rpc/openim-rpc-msg/main.go b/cmd/openim-rpc/openim-rpc-msg/main.go index 6bdd4842d..356081d33 100644 --- a/cmd/openim-rpc/openim-rpc-msg/main.go +++ b/cmd/openim-rpc/openim-rpc-msg/main.go @@ -17,7 +17,7 @@ package main import ( "github.com/OpenIMSDK/Open-IM-Server/internal/rpc/msg" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/cmd" - "github.com/OpenIMSDK/tools/config" + "github.com/OpenIMSDK/Open-IM-Server/pkg/common/config" ) func main() { diff --git a/cmd/openim-rpc/openim-rpc-third/main.go b/cmd/openim-rpc/openim-rpc-third/main.go index 2136bc157..c070e6811 100644 --- a/cmd/openim-rpc/openim-rpc-third/main.go +++ b/cmd/openim-rpc/openim-rpc-third/main.go @@ -17,7 +17,7 @@ package main import ( "github.com/OpenIMSDK/Open-IM-Server/internal/rpc/third" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/cmd" - "github.com/OpenIMSDK/tools/config" + "github.com/OpenIMSDK/Open-IM-Server/pkg/common/config" ) func main() { diff --git a/cmd/openim-rpc/openim-rpc-user/main.go b/cmd/openim-rpc/openim-rpc-user/main.go index 16a24c812..6d6d9008d 100644 --- a/cmd/openim-rpc/openim-rpc-user/main.go +++ b/cmd/openim-rpc/openim-rpc-user/main.go @@ -17,7 +17,7 @@ package main import ( "github.com/OpenIMSDK/Open-IM-Server/internal/rpc/user" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/cmd" - "github.com/OpenIMSDK/tools/config" + "github.com/OpenIMSDK/Open-IM-Server/pkg/common/config" ) func main() { diff --git a/docker-compose.yaml b/docker-compose.yaml index 23565c23a..cd80dbf19 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -110,6 +110,7 @@ services: - ./scripts:/Open-IM-Server/scripts restart: always depends_on: + - zookeeper - kafka - mysql - mongodb diff --git a/go.mod b/go.mod index db50056c4..7acda0e12 100644 --- a/go.mod +++ b/go.mod @@ -13,7 +13,7 @@ require ( github.com/golang-jwt/jwt/v4 v4.5.0 github.com/golang/protobuf v1.5.3 github.com/gorilla/websocket v1.4.2 - github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 // indirect + github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 github.com/jinzhu/copier v0.3.5 github.com/lestrrat-go/file-rotatelogs v2.4.0+incompatible // indirect github.com/minio/minio-go/v7 v7.0.59 @@ -37,8 +37,8 @@ require ( require github.com/google/uuid v1.3.0 require ( - github.com/OpenIMSDK/protocol v0.0.0-20230725064305-11f0568fe5e9 - github.com/OpenIMSDK/tools v0.0.1 + github.com/OpenIMSDK/protocol v0.0.1 + github.com/OpenIMSDK/tools v0.0.4 github.com/aliyun/aliyun-oss-go-sdk v2.2.7+incompatible github.com/go-redis/redis v6.15.9+incompatible github.com/go-sql-driver/mysql v1.6.0 diff --git a/go.sum b/go.sum index 0c585411e..28b2c5c32 100644 --- a/go.sum +++ b/go.sum @@ -16,10 +16,10 @@ cloud.google.com/go/storage v1.28.1/go.mod h1:Qnisd4CqDdo6BGs2AD5LLnEsmSQ80wQ5og firebase.google.com/go v3.13.0+incompatible h1:3TdYC3DDi6aHn20qoRkxwGqNgdjtblwVAyRLQwGn/+4= firebase.google.com/go v3.13.0+incompatible/go.mod h1:xlah6XbEyW6tbfSklcfe5FHJIwjt8toICdV5Wh9ptHs= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/OpenIMSDK/protocol v0.0.0-20230725064305-11f0568fe5e9 h1:ZtW+z2j2kjk51awH9OFRXbgNI5Vcfq0Lu9//ax86ktc= -github.com/OpenIMSDK/protocol v0.0.0-20230725064305-11f0568fe5e9/go.mod h1:F25dFrwrIx3lkNoiuf6FkCfxuwf8L4Z8UIsdTHP/r0Y= -github.com/OpenIMSDK/tools v0.0.1 h1:lxTzjv0vOCH890K9C5LxMq3UCvioDMw0ZZQQtioauuI= -github.com/OpenIMSDK/tools v0.0.1/go.mod h1:/iSkny1+7i4Z09yddGa4o4fTu9dzJdOLxxe4pWuqI1A= +github.com/OpenIMSDK/protocol v0.0.1 h1:Q6J1jCU00dfqmguxw2XI+IGcVfBAkb5Tz8LgvyeNkk0= +github.com/OpenIMSDK/protocol v0.0.1/go.mod h1:F25dFrwrIx3lkNoiuf6FkCfxuwf8L4Z8UIsdTHP/r0Y= +github.com/OpenIMSDK/tools v0.0.4 h1:aSC5FWO/0ccxuLHs+E1Eeyj+XWL/2CzLy1XGmQgpaU4= +github.com/OpenIMSDK/tools v0.0.4/go.mod h1:eg+q4A34Qmu73xkY0mt37FHGMCMfC6CtmOnm0kFEGFI= github.com/QcloudApi/qcloud_sign_golang v0.0.0-20141224014652-e4130a326409/go.mod h1:1pk82RBxDY/JZnPQrtqHlUFfCctgdorsd9M06fMynOM= github.com/Shopify/sarama v1.29.0 h1:ARid8o8oieau9XrHI55f/L3EoRAhm9px6sonbD7yuUE= github.com/Shopify/sarama v1.29.0/go.mod h1:2QpgD79wpdAESqNQMxNc0KYMkycd4slxGdV3TWSVqrU= diff --git a/internal/api/custom_validator.go b/internal/api/custom_validator.go index 7425ecb38..8c5890501 100644 --- a/internal/api/custom_validator.go +++ b/internal/api/custom_validator.go @@ -17,7 +17,7 @@ package api import ( "github.com/go-playground/validator/v10" - "github.com/OpenIMSDK/tools/constant" + "github.com/OpenIMSDK/protocol/constant" ) func RequiredIf(fl validator.FieldLevel) bool { diff --git a/internal/api/msg.go b/internal/api/msg.go index d79be716b..8480ac7d3 100644 --- a/internal/api/msg.go +++ b/internal/api/msg.go @@ -15,6 +15,7 @@ package api import ( + "github.com/OpenIMSDK/Open-IM-Server/pkg/authverify" "github.com/gin-gonic/gin" "github.com/go-playground/validator/v10" "github.com/mitchellh/mapstructure" @@ -22,14 +23,13 @@ import ( "github.com/OpenIMSDK/Open-IM-Server/pkg/apistruct" "github.com/OpenIMSDK/Open-IM-Server/pkg/rpcclient" + "github.com/OpenIMSDK/protocol/constant" "github.com/OpenIMSDK/protocol/msg" "github.com/OpenIMSDK/protocol/sdkws" "github.com/OpenIMSDK/tools/a2r" "github.com/OpenIMSDK/tools/apiresp" - "github.com/OpenIMSDK/tools/constant" "github.com/OpenIMSDK/tools/errs" "github.com/OpenIMSDK/tools/log" - "github.com/OpenIMSDK/tools/tokenverify" "github.com/OpenIMSDK/tools/utils" ) @@ -205,7 +205,7 @@ func (m *MessageApi) SendMessage(c *gin.Context) { return } log.ZInfo(c, "SendMessage", "req", req) - if !tokenverify.IsAppManagerUid(c) { + if !authverify.IsAppManagerUid(c) { apiresp.GinError(c, errs.ErrNoPermission.Wrap("only app manager can send message")) return } @@ -245,7 +245,7 @@ func (m *MessageApi) BatchSendMsg(c *gin.Context) { return } log.ZInfo(c, "BatchSendMsg", "req", req) - if err := tokenverify.CheckAdmin(c); err != nil { + if err := authverify.CheckAdmin(c); err != nil { apiresp.GinError(c, errs.ErrNoPermission.Wrap("only app manager can send message")) return } diff --git a/internal/api/route.go b/internal/api/route.go index 453224263..262283019 100644 --- a/internal/api/route.go +++ b/internal/api/route.go @@ -16,10 +16,11 @@ package api import ( "context" + "github.com/OpenIMSDK/Open-IM-Server/pkg/authverify" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/cache" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/controller" + "github.com/OpenIMSDK/protocol/constant" "github.com/OpenIMSDK/tools/apiresp" - "github.com/OpenIMSDK/tools/constant" "github.com/OpenIMSDK/tools/errs" "github.com/OpenIMSDK/tools/tokenverify" "net/http" @@ -31,9 +32,9 @@ import ( "google.golang.org/grpc" "google.golang.org/grpc/credentials/insecure" + "github.com/OpenIMSDK/Open-IM-Server/pkg/common/config" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/prome" "github.com/OpenIMSDK/Open-IM-Server/pkg/rpcclient" - "github.com/OpenIMSDK/tools/config" "github.com/OpenIMSDK/tools/discoveryregistry" "github.com/OpenIMSDK/tools/log" "github.com/OpenIMSDK/tools/mw" @@ -210,7 +211,7 @@ func GinParseToken(rdb redis.UniversalClient) gin.HandlerFunc { c.Abort() return } - claims, err := tokenverify.GetClaimFromToken(token) + claims, err := tokenverify.GetClaimFromToken(token, authverify.Secret()) if err != nil { log.ZWarn(c, "jwt get token error", errs.ErrTokenUnknown.Wrap()) apiresp.GinError(c, errs.ErrTokenUnknown.Wrap()) diff --git a/internal/api/user.go b/internal/api/user.go index c7bcf7862..8595b3501 100644 --- a/internal/api/user.go +++ b/internal/api/user.go @@ -17,13 +17,13 @@ package api import ( "github.com/gin-gonic/gin" + "github.com/OpenIMSDK/Open-IM-Server/pkg/common/config" "github.com/OpenIMSDK/Open-IM-Server/pkg/rpcclient" + "github.com/OpenIMSDK/protocol/constant" "github.com/OpenIMSDK/protocol/msggateway" "github.com/OpenIMSDK/protocol/user" "github.com/OpenIMSDK/tools/a2r" "github.com/OpenIMSDK/tools/apiresp" - "github.com/OpenIMSDK/tools/config" - "github.com/OpenIMSDK/tools/constant" "github.com/OpenIMSDK/tools/errs" "github.com/OpenIMSDK/tools/log" ) diff --git a/internal/msggateway/callback.go b/internal/msggateway/callback.go index 530c18102..5ede3c854 100644 --- a/internal/msggateway/callback.go +++ b/internal/msggateway/callback.go @@ -19,9 +19,9 @@ import ( "time" cbapi "github.com/OpenIMSDK/Open-IM-Server/pkg/callbackstruct" + "github.com/OpenIMSDK/Open-IM-Server/pkg/common/config" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/http" - "github.com/OpenIMSDK/tools/config" - "github.com/OpenIMSDK/tools/constant" + "github.com/OpenIMSDK/protocol/constant" "github.com/OpenIMSDK/tools/mcontext" ) diff --git a/internal/msggateway/client.go b/internal/msggateway/client.go index bc5fa1511..096fd1463 100644 --- a/internal/msggateway/client.go +++ b/internal/msggateway/client.go @@ -18,14 +18,15 @@ import ( "context" "errors" "fmt" + "github.com/OpenIMSDK/Open-IM-Server/pkg/msgprocessor" "runtime/debug" "sync" "google.golang.org/protobuf/proto" + "github.com/OpenIMSDK/protocol/constant" "github.com/OpenIMSDK/protocol/sdkws" "github.com/OpenIMSDK/tools/apiresp" - "github.com/OpenIMSDK/tools/constant" "github.com/OpenIMSDK/tools/log" "github.com/OpenIMSDK/tools/mcontext" "github.com/OpenIMSDK/tools/utils" @@ -241,9 +242,9 @@ func (c *Client) replyMessage(ctx context.Context, binaryReq *Req, err error, re func (c *Client) PushMessage(ctx context.Context, msgData *sdkws.MsgData) error { var msg sdkws.PushMessages - conversationID := utils.GetConversationIDByMsg(msgData) + conversationID := msgprocessor.GetConversationIDByMsg(msgData) m := map[string]*sdkws.PullMsgs{conversationID: {Msgs: []*sdkws.MsgData{msgData}}} - if utils.IsNotification(conversationID) { + if msgprocessor.IsNotification(conversationID) { msg.NotificationMsgs = m } else { msg.Msgs = m diff --git a/internal/msggateway/context.go b/internal/msggateway/context.go index 672ba1dbe..601c28a34 100644 --- a/internal/msggateway/context.go +++ b/internal/msggateway/context.go @@ -19,7 +19,7 @@ import ( "strconv" "time" - "github.com/OpenIMSDK/tools/constant" + "github.com/OpenIMSDK/protocol/constant" "github.com/OpenIMSDK/tools/utils" ) diff --git a/internal/msggateway/hub_server.go b/internal/msggateway/hub_server.go index dc440a7c8..e9a53cbf7 100644 --- a/internal/msggateway/hub_server.go +++ b/internal/msggateway/hub_server.go @@ -16,20 +16,19 @@ package msggateway import ( "context" + "github.com/OpenIMSDK/Open-IM-Server/pkg/authverify" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/cache" "github.com/OpenIMSDK/tools/errs" - "github.com/OpenIMSDK/tools/tokenverify" - "google.golang.org/grpc" + "github.com/OpenIMSDK/Open-IM-Server/pkg/common/config" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/prome" + "github.com/OpenIMSDK/Open-IM-Server/pkg/common/startrpc" + "github.com/OpenIMSDK/protocol/constant" "github.com/OpenIMSDK/protocol/msggateway" - "github.com/OpenIMSDK/tools/config" - "github.com/OpenIMSDK/tools/constant" "github.com/OpenIMSDK/tools/discoveryregistry" "github.com/OpenIMSDK/tools/log" - "github.com/OpenIMSDK/tools/startrpc" "github.com/OpenIMSDK/tools/utils" ) @@ -84,7 +83,7 @@ func (s *Server) GetUsersOnlineStatus( ctx context.Context, req *msggateway.GetUsersOnlineStatusReq, ) (*msggateway.GetUsersOnlineStatusResp, error) { - if !tokenverify.IsAppManagerUid(ctx) { + if !authverify.IsAppManagerUid(ctx) { return nil, errs.ErrNoPermission.Wrap("only app manager") } var resp msggateway.GetUsersOnlineStatusResp diff --git a/internal/msggateway/init.go b/internal/msggateway/init.go index b6d4d3b58..03fe9f581 100644 --- a/internal/msggateway/init.go +++ b/internal/msggateway/init.go @@ -18,7 +18,7 @@ import ( "fmt" "time" - "github.com/OpenIMSDK/tools/config" + "github.com/OpenIMSDK/Open-IM-Server/pkg/common/config" ) func RunWsAndServer(rpcPort, wsPort, prometheusPort int) error { @@ -39,7 +39,11 @@ func RunWsAndServer(rpcPort, wsPort, prometheusPort int) error { return err } hubServer := NewServer(rpcPort, longServer) - go hubServer.Start() - hubServer.LongConnServer.Run() - return nil + go func() { + err := hubServer.Start() + if err != nil { + panic(err.Error()) + } + }() + return hubServer.LongConnServer.Run() } diff --git a/internal/msggateway/n_ws_server.go b/internal/msggateway/n_ws_server.go index 9715f21b6..c324f8a22 100644 --- a/internal/msggateway/n_ws_server.go +++ b/internal/msggateway/n_ws_server.go @@ -17,15 +17,16 @@ package msggateway import ( "context" "errors" + "github.com/OpenIMSDK/Open-IM-Server/pkg/authverify" "net/http" "strconv" "sync" "sync/atomic" "time" + "github.com/OpenIMSDK/Open-IM-Server/pkg/common/config" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/cache" - "github.com/OpenIMSDK/tools/config" - "github.com/OpenIMSDK/tools/constant" + "github.com/OpenIMSDK/protocol/constant" "github.com/redis/go-redis/v9" @@ -35,7 +36,6 @@ import ( "github.com/OpenIMSDK/tools/errs" "github.com/OpenIMSDK/tools/log" - "github.com/OpenIMSDK/tools/tokenverify" "github.com/OpenIMSDK/tools/utils" ) @@ -338,7 +338,7 @@ func (ws *WsServer) wsHandler(w http.ResponseWriter, r *http.Request) { httpError(connContext, errs.ErrConnArgsErr) return } - if err := tokenverify.WsVerifyToken(token, userID, platformID); err != nil { + if err := authverify.WsVerifyToken(token, userID, platformID); err != nil { httpError(connContext, err) return } diff --git a/internal/msgtransfer/init.go b/internal/msgtransfer/init.go index 037564f7a..d54e81240 100644 --- a/internal/msgtransfer/init.go +++ b/internal/msgtransfer/init.go @@ -22,6 +22,7 @@ import ( "google.golang.org/grpc" "google.golang.org/grpc/credentials/insecure" + "github.com/OpenIMSDK/Open-IM-Server/pkg/common/config" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/cache" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/controller" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/relation" @@ -29,7 +30,6 @@ import ( "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/unrelation" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/prome" "github.com/OpenIMSDK/Open-IM-Server/pkg/rpcclient" - "github.com/OpenIMSDK/tools/config" openKeeper "github.com/OpenIMSDK/tools/discoveryregistry/zookeeper" "github.com/OpenIMSDK/tools/log" "github.com/OpenIMSDK/tools/mw" diff --git a/internal/msgtransfer/online_history_msg_handler.go b/internal/msgtransfer/online_history_msg_handler.go index 19121334a..282f50119 100644 --- a/internal/msgtransfer/online_history_msg_handler.go +++ b/internal/msgtransfer/online_history_msg_handler.go @@ -16,6 +16,7 @@ package msgtransfer import ( "context" + "github.com/OpenIMSDK/Open-IM-Server/pkg/msgprocessor" "strconv" "strings" "sync" @@ -27,12 +28,12 @@ import ( "github.com/go-redis/redis" "google.golang.org/protobuf/proto" + "github.com/OpenIMSDK/Open-IM-Server/pkg/common/config" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/controller" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/kafka" "github.com/OpenIMSDK/Open-IM-Server/pkg/rpcclient" + "github.com/OpenIMSDK/protocol/constant" "github.com/OpenIMSDK/protocol/sdkws" - "github.com/OpenIMSDK/tools/config" - "github.com/OpenIMSDK/tools/constant" "github.com/OpenIMSDK/tools/log" "github.com/OpenIMSDK/tools/mcontext" "github.com/OpenIMSDK/tools/utils" @@ -141,8 +142,8 @@ func (och *OnlineHistoryRedisConsumerHandler) Run(channelID int) { "modifyMsgList", len(modifyMsgList), ) - conversationIDMsg := utils.GetChatConversationIDByMsg(ctxMsgList[0].message) - conversationIDNotification := utils.GetNotificationConversationID(ctxMsgList[0].message) + conversationIDMsg := msgprocessor.GetChatConversationIDByMsg(ctxMsgList[0].message) + conversationIDNotification := msgprocessor.GetNotificationConversationID(ctxMsgList[0].message) och.handleMsg(ctx, msgChannelValue.uniqueKey, conversationIDMsg, storageMsgList, notStorageMsgList) och.handleNotification( ctx, @@ -172,7 +173,7 @@ func (och *OnlineHistoryRedisConsumerHandler) getPushStorageMsgList( totalMsgs []*ContextMsg, ) (storageMsgList, notStorageMsgList, storageNotificatoinList, notStorageNotificationList, modifyMsgList []*sdkws.MsgData) { isStorage := func(msg *sdkws.MsgData) bool { - options2 := utils.Options(msg.Options) + options2 := msgprocessor.Options(msg.Options) if options2.IsHistory() { return true } else { @@ -183,28 +184,28 @@ func (och *OnlineHistoryRedisConsumerHandler) getPushStorageMsgList( } } for _, v := range totalMsgs { - options := utils.Options(v.message.Options) + options := msgprocessor.Options(v.message.Options) if !options.IsNotNotification() { // clone msg from notificationMsg if options.IsSendMsg() { msg := proto.Clone(v.message).(*sdkws.MsgData) // 消息 if v.message.Options != nil { - msg.Options = utils.NewMsgOptions() + msg.Options = msgprocessor.NewMsgOptions() } if options.IsOfflinePush() { - v.message.Options = utils.WithOptions( - utils.Options(v.message.Options), - utils.WithOfflinePush(false), + v.message.Options = msgprocessor.WithOptions( + v.message.Options, + msgprocessor.WithOfflinePush(false), ) - msg.Options = utils.WithOptions(utils.Options(msg.Options), utils.WithOfflinePush(true)) + msg.Options = msgprocessor.WithOptions(msg.Options, msgprocessor.WithOfflinePush(true)) } if options.IsUnreadCount() { - v.message.Options = utils.WithOptions( - utils.Options(v.message.Options), - utils.WithUnreadCount(false), + v.message.Options = msgprocessor.WithOptions( + v.message.Options, + msgprocessor.WithUnreadCount(false), ) - msg.Options = utils.WithOptions(utils.Options(msg.Options), utils.WithUnreadCount(true)) + msg.Options = msgprocessor.WithOptions(msg.Options, msgprocessor.WithUnreadCount(true)) } storageMsgList = append(storageMsgList, msg) } diff --git a/internal/msgtransfer/online_msg_to_mongo_handler.go b/internal/msgtransfer/online_msg_to_mongo_handler.go index 9ba4cb7b9..4a8b5e63e 100644 --- a/internal/msgtransfer/online_msg_to_mongo_handler.go +++ b/internal/msgtransfer/online_msg_to_mongo_handler.go @@ -20,10 +20,10 @@ import ( "github.com/Shopify/sarama" "google.golang.org/protobuf/proto" + "github.com/OpenIMSDK/Open-IM-Server/pkg/common/config" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/controller" kfk "github.com/OpenIMSDK/Open-IM-Server/pkg/common/kafka" pbMsg "github.com/OpenIMSDK/protocol/msg" - "github.com/OpenIMSDK/tools/config" "github.com/OpenIMSDK/tools/log" ) diff --git a/internal/msgtransfer/persistent_msg_handler.go b/internal/msgtransfer/persistent_msg_handler.go index 7256a3442..b67e07cc0 100644 --- a/internal/msgtransfer/persistent_msg_handler.go +++ b/internal/msgtransfer/persistent_msg_handler.go @@ -17,11 +17,11 @@ package msgtransfer import ( "context" + "github.com/OpenIMSDK/Open-IM-Server/pkg/common/config" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/controller" kfk "github.com/OpenIMSDK/Open-IM-Server/pkg/common/kafka" + "github.com/OpenIMSDK/protocol/constant" pbMsg "github.com/OpenIMSDK/protocol/msg" - "github.com/OpenIMSDK/tools/config" - "github.com/OpenIMSDK/tools/constant" "github.com/OpenIMSDK/tools/log" "github.com/OpenIMSDK/tools/utils" diff --git a/internal/push/callback.go b/internal/push/callback.go index bbc392a6e..d5e678301 100644 --- a/internal/push/callback.go +++ b/internal/push/callback.go @@ -18,10 +18,10 @@ import ( "context" "github.com/OpenIMSDK/Open-IM-Server/pkg/callbackstruct" + "github.com/OpenIMSDK/Open-IM-Server/pkg/common/config" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/http" + "github.com/OpenIMSDK/protocol/constant" "github.com/OpenIMSDK/protocol/sdkws" - "github.com/OpenIMSDK/tools/config" - "github.com/OpenIMSDK/tools/constant" "github.com/OpenIMSDK/tools/errs" "github.com/OpenIMSDK/tools/mcontext" "github.com/OpenIMSDK/tools/utils" diff --git a/internal/push/offlinepush/fcm/push.go b/internal/push/offlinepush/fcm/push.go index 8f29f0258..cea90f865 100644 --- a/internal/push/offlinepush/fcm/push.go +++ b/internal/push/offlinepush/fcm/push.go @@ -25,9 +25,9 @@ import ( "google.golang.org/api/option" "github.com/OpenIMSDK/Open-IM-Server/internal/push/offlinepush" + "github.com/OpenIMSDK/Open-IM-Server/pkg/common/config" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/cache" - "github.com/OpenIMSDK/tools/config" - "github.com/OpenIMSDK/tools/constant" + "github.com/OpenIMSDK/protocol/constant" ) const SinglePushCountLimit = 400 diff --git a/internal/push/offlinepush/getui/body.go b/internal/push/offlinepush/getui/body.go index 43fcc84cc..915c6f603 100644 --- a/internal/push/offlinepush/getui/body.go +++ b/internal/push/offlinepush/getui/body.go @@ -17,7 +17,7 @@ package getui import ( "fmt" - "github.com/OpenIMSDK/tools/config" + "github.com/OpenIMSDK/Open-IM-Server/pkg/common/config" ) type Resp struct { diff --git a/internal/push/offlinepush/getui/push.go b/internal/push/offlinepush/getui/push.go index b440ef71b..a2f887a41 100644 --- a/internal/push/offlinepush/getui/push.go +++ b/internal/push/offlinepush/getui/push.go @@ -26,9 +26,9 @@ import ( "github.com/go-redis/redis" "github.com/OpenIMSDK/Open-IM-Server/internal/push/offlinepush" + "github.com/OpenIMSDK/Open-IM-Server/pkg/common/config" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/cache" http2 "github.com/OpenIMSDK/Open-IM-Server/pkg/common/http" - "github.com/OpenIMSDK/tools/config" "github.com/OpenIMSDK/tools/errs" "github.com/OpenIMSDK/tools/log" "github.com/OpenIMSDK/tools/mcontext" diff --git a/internal/push/offlinepush/jpush/body/notification.go b/internal/push/offlinepush/jpush/body/notification.go index 85581cb1f..cec725784 100644 --- a/internal/push/offlinepush/jpush/body/notification.go +++ b/internal/push/offlinepush/jpush/body/notification.go @@ -15,7 +15,7 @@ package body import ( - "github.com/OpenIMSDK/tools/config" + "github.com/OpenIMSDK/Open-IM-Server/pkg/common/config" ) type Notification struct { diff --git a/internal/push/offlinepush/jpush/body/platform.go b/internal/push/offlinepush/jpush/body/platform.go index c779c8bdc..9de2b8711 100644 --- a/internal/push/offlinepush/jpush/body/platform.go +++ b/internal/push/offlinepush/jpush/body/platform.go @@ -17,7 +17,7 @@ package body import ( "errors" - "github.com/OpenIMSDK/tools/constant" + "github.com/OpenIMSDK/protocol/constant" ) const ( diff --git a/internal/push/offlinepush/jpush/push.go b/internal/push/offlinepush/jpush/push.go index d661daee9..64933db50 100644 --- a/internal/push/offlinepush/jpush/push.go +++ b/internal/push/offlinepush/jpush/push.go @@ -21,8 +21,8 @@ import ( "github.com/OpenIMSDK/Open-IM-Server/internal/push/offlinepush" "github.com/OpenIMSDK/Open-IM-Server/internal/push/offlinepush/jpush/body" + "github.com/OpenIMSDK/Open-IM-Server/pkg/common/config" http2 "github.com/OpenIMSDK/Open-IM-Server/pkg/common/http" - "github.com/OpenIMSDK/tools/config" ) type JPush struct{} diff --git a/internal/push/push_handler.go b/internal/push/push_handler.go index f0a67faac..8e307c360 100644 --- a/internal/push/push_handler.go +++ b/internal/push/push_handler.go @@ -20,11 +20,11 @@ import ( "github.com/Shopify/sarama" "google.golang.org/protobuf/proto" + "github.com/OpenIMSDK/Open-IM-Server/pkg/common/config" kfk "github.com/OpenIMSDK/Open-IM-Server/pkg/common/kafka" + "github.com/OpenIMSDK/protocol/constant" pbChat "github.com/OpenIMSDK/protocol/msg" pbPush "github.com/OpenIMSDK/protocol/push" - "github.com/OpenIMSDK/tools/config" - "github.com/OpenIMSDK/tools/constant" "github.com/OpenIMSDK/tools/log" "github.com/OpenIMSDK/tools/utils" ) diff --git a/internal/push/push_rpc_server.go b/internal/push/push_rpc_server.go index dfcf07469..965f890a5 100644 --- a/internal/push/push_rpc_server.go +++ b/internal/push/push_rpc_server.go @@ -24,8 +24,8 @@ import ( "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/controller" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/localcache" "github.com/OpenIMSDK/Open-IM-Server/pkg/rpcclient" + "github.com/OpenIMSDK/protocol/constant" pbPush "github.com/OpenIMSDK/protocol/push" - "github.com/OpenIMSDK/tools/constant" "github.com/OpenIMSDK/tools/discoveryregistry" "github.com/OpenIMSDK/tools/log" ) diff --git a/internal/push/push_to_client.go b/internal/push/push_to_client.go index de6b78782..b787268d0 100644 --- a/internal/push/push_to_client.go +++ b/internal/push/push_to_client.go @@ -18,20 +18,21 @@ import ( "context" "encoding/json" "errors" + "github.com/OpenIMSDK/Open-IM-Server/pkg/msgprocessor" "github.com/OpenIMSDK/Open-IM-Server/internal/push/offlinepush" "github.com/OpenIMSDK/Open-IM-Server/internal/push/offlinepush/fcm" "github.com/OpenIMSDK/Open-IM-Server/internal/push/offlinepush/getui" "github.com/OpenIMSDK/Open-IM-Server/internal/push/offlinepush/jpush" + "github.com/OpenIMSDK/Open-IM-Server/pkg/common/config" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/cache" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/controller" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/localcache" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/prome" "github.com/OpenIMSDK/Open-IM-Server/pkg/rpcclient" + "github.com/OpenIMSDK/protocol/constant" "github.com/OpenIMSDK/protocol/msggateway" "github.com/OpenIMSDK/protocol/sdkws" - "github.com/OpenIMSDK/tools/config" - "github.com/OpenIMSDK/tools/constant" "github.com/OpenIMSDK/tools/discoveryregistry" "github.com/OpenIMSDK/tools/log" "github.com/OpenIMSDK/tools/mcontext" @@ -82,7 +83,7 @@ func NewOfflinePusher(cache cache.MsgModel) offlinepush.OfflinePusher { } func (p *Pusher) DeleteMemberAndSetConversationSeq(ctx context.Context, groupID string, userIDs []string) error { - conevrsationID := utils.GetConversationIDBySessionType(constant.SuperGroupChatType, groupID) + conevrsationID := msgprocessor.GetConversationIDBySessionType(constant.SuperGroupChatType, groupID) maxSeq, err := p.msgRpcClient.GetConversationMaxSeq(ctx, conevrsationID) if err != nil { return err @@ -170,7 +171,7 @@ func (p *Pusher) Push2SuperGroup(ctx context.Context, groupID string, msg *sdkws }(groupID, kickedUsers) pushToUserIDs = append(pushToUserIDs, kickedUsers...) case constant.GroupDismissedNotification: - if utils.IsNotification(utils.GetConversationIDByMsg(msg)) { // 消息先到,通知后到 + if msgprocessor.IsNotification(msgprocessor.GetConversationIDByMsg(msg)) { // 消息先到,通知后到 var tips sdkws.GroupDismissedTips if p.UnmarshalNotificationElem(msg.Content, &tips) != nil { return err diff --git a/internal/push/tools.go b/internal/push/tools.go index ea8d160b1..2135c901e 100644 --- a/internal/push/tools.go +++ b/internal/push/tools.go @@ -1,8 +1,8 @@ package push import ( + "github.com/OpenIMSDK/protocol/constant" "github.com/OpenIMSDK/protocol/sdkws" - "github.com/OpenIMSDK/tools/constant" "google.golang.org/protobuf/proto" ) diff --git a/internal/rpc/auth/auth.go b/internal/rpc/auth/auth.go index 48e4e5922..1abfc9771 100644 --- a/internal/rpc/auth/auth.go +++ b/internal/rpc/auth/auth.go @@ -16,16 +16,17 @@ package auth import ( "context" + "github.com/OpenIMSDK/Open-IM-Server/pkg/authverify" "google.golang.org/grpc" + "github.com/OpenIMSDK/Open-IM-Server/pkg/common/config" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/cache" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/controller" "github.com/OpenIMSDK/Open-IM-Server/pkg/rpcclient" pbAuth "github.com/OpenIMSDK/protocol/auth" + "github.com/OpenIMSDK/protocol/constant" "github.com/OpenIMSDK/protocol/msggateway" - "github.com/OpenIMSDK/tools/config" - "github.com/OpenIMSDK/tools/constant" "github.com/OpenIMSDK/tools/discoveryregistry" "github.com/OpenIMSDK/tools/errs" "github.com/OpenIMSDK/tools/log" @@ -76,7 +77,7 @@ func (s *authServer) UserToken(ctx context.Context, req *pbAuth.UserTokenReq) (* } func (s *authServer) parseToken(ctx context.Context, tokensString string) (claims *tokenverify.Claims, err error) { - claims, err = tokenverify.GetClaimFromToken(tokensString) + claims, err = tokenverify.GetClaimFromToken(tokensString, authverify.Secret()) if err != nil { return nil, utils.Wrap(err, "") } @@ -116,7 +117,7 @@ func (s *authServer) ParseToken( } func (s *authServer) ForceLogout(ctx context.Context, req *pbAuth.ForceLogoutReq) (*pbAuth.ForceLogoutResp, error) { - if err := tokenverify.CheckAdmin(ctx); err != nil { + if err := authverify.CheckAdmin(ctx); err != nil { return nil, err } if err := s.forceKickOff(ctx, req.UserID, req.PlatformID, mcontext.GetOperationID(ctx)); err != nil { diff --git a/internal/rpc/conversation/conversaion.go b/internal/rpc/conversation/conversaion.go index e27756749..753a45722 100644 --- a/internal/rpc/conversation/conversaion.go +++ b/internal/rpc/conversation/conversaion.go @@ -16,6 +16,7 @@ package conversation import ( "context" + "github.com/OpenIMSDK/Open-IM-Server/pkg/msgprocessor" "google.golang.org/grpc" @@ -26,8 +27,8 @@ import ( tableRelation "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/table/relation" "github.com/OpenIMSDK/Open-IM-Server/pkg/rpcclient" "github.com/OpenIMSDK/Open-IM-Server/pkg/rpcclient/notification" + "github.com/OpenIMSDK/protocol/constant" pbConversation "github.com/OpenIMSDK/protocol/conversation" - "github.com/OpenIMSDK/tools/constant" "github.com/OpenIMSDK/tools/discoveryregistry" "github.com/OpenIMSDK/tools/errs" "github.com/OpenIMSDK/tools/log" @@ -197,7 +198,7 @@ func (c *conversationServer) GetRecvMsgNotNotifyUserIDs(ctx context.Context, req // create conversation without notification for msg redis transfer. func (c *conversationServer) CreateSingleChatConversations(ctx context.Context, req *pbConversation.CreateSingleChatConversationsReq) (*pbConversation.CreateSingleChatConversationsResp, error) { var conversation tableRelation.ConversationModel - conversation.ConversationID = utils.GetConversationIDBySessionType(constant.SingleChatType, req.RecvID, req.SendID) + conversation.ConversationID = msgprocessor.GetConversationIDBySessionType(constant.SingleChatType, req.RecvID, req.SendID) conversation.ConversationType = constant.SingleChatType conversation.OwnerUserID = req.SendID conversation.UserID = req.RecvID diff --git a/internal/rpc/friend/black.go b/internal/rpc/friend/black.go index 6f7ed58dd..9df5abb33 100644 --- a/internal/rpc/friend/black.go +++ b/internal/rpc/friend/black.go @@ -16,13 +16,13 @@ package friend import ( "context" + "github.com/OpenIMSDK/Open-IM-Server/pkg/authverify" "time" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/convert" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/table/relation" pbFriend "github.com/OpenIMSDK/protocol/friend" "github.com/OpenIMSDK/tools/mcontext" - "github.com/OpenIMSDK/tools/tokenverify" ) func (s *friendServer) GetPaginationBlacks( @@ -76,7 +76,7 @@ func (s *friendServer) RemoveBlack( } func (s *friendServer) AddBlack(ctx context.Context, req *pbFriend.AddBlackReq) (*pbFriend.AddBlackResp, error) { - if err := tokenverify.CheckAccessV3(ctx, req.OwnerUserID); err != nil { + if err := authverify.CheckAccessV3(ctx, req.OwnerUserID); err != nil { return nil, err } _, err := s.userRpcClient.GetUsersInfo(ctx, []string{req.OwnerUserID, req.BlackUserID}) diff --git a/internal/rpc/friend/callback.go b/internal/rpc/friend/callback.go index d3a793a6f..bd7716090 100644 --- a/internal/rpc/friend/callback.go +++ b/internal/rpc/friend/callback.go @@ -18,10 +18,10 @@ import ( "context" cbapi "github.com/OpenIMSDK/Open-IM-Server/pkg/callbackstruct" + "github.com/OpenIMSDK/Open-IM-Server/pkg/common/config" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/http" + "github.com/OpenIMSDK/protocol/constant" pbfriend "github.com/OpenIMSDK/protocol/friend" - "github.com/OpenIMSDK/tools/config" - "github.com/OpenIMSDK/tools/constant" "github.com/OpenIMSDK/tools/errs" "github.com/OpenIMSDK/tools/mcontext" ) diff --git a/internal/rpc/friend/friend.go b/internal/rpc/friend/friend.go index 5792fdb38..9ef38ef3c 100644 --- a/internal/rpc/friend/friend.go +++ b/internal/rpc/friend/friend.go @@ -16,6 +16,7 @@ package friend import ( "context" + "github.com/OpenIMSDK/Open-IM-Server/pkg/authverify" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/convert" "github.com/OpenIMSDK/Open-IM-Server/pkg/rpcclient" @@ -28,11 +29,10 @@ import ( "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/relation" tablerelation "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/table/relation" "github.com/OpenIMSDK/Open-IM-Server/pkg/rpcclient/notification" + "github.com/OpenIMSDK/protocol/constant" pbfriend "github.com/OpenIMSDK/protocol/friend" - "github.com/OpenIMSDK/tools/constant" registry "github.com/OpenIMSDK/tools/discoveryregistry" "github.com/OpenIMSDK/tools/errs" - "github.com/OpenIMSDK/tools/tokenverify" "github.com/OpenIMSDK/tools/tx" "github.com/OpenIMSDK/tools/utils" ) @@ -95,7 +95,7 @@ func (s *friendServer) ApplyToAddFriend( ) (resp *pbfriend.ApplyToAddFriendResp, err error) { defer log.ZInfo(ctx, utils.GetFuncName()+" Return") resp = &pbfriend.ApplyToAddFriendResp{} - if err := tokenverify.CheckAccessV3(ctx, req.FromUserID); err != nil { + if err := authverify.CheckAccessV3(ctx, req.FromUserID); err != nil { return nil, err } if req.ToUserID == req.FromUserID { @@ -127,7 +127,7 @@ func (s *friendServer) ImportFriends( req *pbfriend.ImportFriendReq, ) (resp *pbfriend.ImportFriendResp, err error) { defer log.ZInfo(ctx, utils.GetFuncName()+" Return") - if err := tokenverify.CheckAdmin(ctx); err != nil { + if err := authverify.CheckAdmin(ctx); err != nil { return nil, err } if _, err := s.userRpcClient.GetUsersInfo(ctx, append([]string{req.OwnerUserID}, req.FriendUserIDs...)); err != nil { @@ -154,7 +154,7 @@ func (s *friendServer) RespondFriendApply( ) (resp *pbfriend.RespondFriendApplyResp, err error) { defer log.ZInfo(ctx, utils.GetFuncName()+" Return") resp = &pbfriend.RespondFriendApplyResp{} - if err := tokenverify.CheckAccessV3(ctx, req.ToUserID); err != nil { + if err := authverify.CheckAccessV3(ctx, req.ToUserID); err != nil { return nil, err } diff --git a/internal/rpc/group/callback.go b/internal/rpc/group/callback.go index 2f85a6674..72661d16b 100644 --- a/internal/rpc/group/callback.go +++ b/internal/rpc/group/callback.go @@ -20,12 +20,12 @@ import ( "github.com/OpenIMSDK/Open-IM-Server/pkg/apistruct" "github.com/OpenIMSDK/Open-IM-Server/pkg/callbackstruct" + "github.com/OpenIMSDK/Open-IM-Server/pkg/common/config" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/table/relation" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/http" + "github.com/OpenIMSDK/protocol/constant" "github.com/OpenIMSDK/protocol/group" "github.com/OpenIMSDK/protocol/wrapperspb" - "github.com/OpenIMSDK/tools/config" - "github.com/OpenIMSDK/tools/constant" "github.com/OpenIMSDK/tools/errs" "github.com/OpenIMSDK/tools/mcontext" "github.com/OpenIMSDK/tools/utils" diff --git a/internal/rpc/group/group.go b/internal/rpc/group/group.go index 4c041e13a..bcadc61a3 100644 --- a/internal/rpc/group/group.go +++ b/internal/rpc/group/group.go @@ -17,6 +17,8 @@ package group import ( "context" "fmt" + "github.com/OpenIMSDK/Open-IM-Server/pkg/authverify" + "github.com/OpenIMSDK/Open-IM-Server/pkg/msgprocessor" "math/big" "math/rand" "strconv" @@ -39,14 +41,13 @@ import ( "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/relation" relationTb "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/table/relation" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/unrelation" + "github.com/OpenIMSDK/protocol/constant" pbGroup "github.com/OpenIMSDK/protocol/group" "github.com/OpenIMSDK/protocol/sdkws" - "github.com/OpenIMSDK/tools/constant" "github.com/OpenIMSDK/tools/discoveryregistry" "github.com/OpenIMSDK/tools/errs" "github.com/OpenIMSDK/tools/log" "github.com/OpenIMSDK/tools/mcontext" - "github.com/OpenIMSDK/tools/tokenverify" "github.com/OpenIMSDK/tools/utils" ) @@ -100,7 +101,7 @@ func (s *groupServer) GetGroupUsersReqApplicationList(ctx context.Context, req * } func (s *groupServer) CheckGroupAdmin(ctx context.Context, groupID string) error { - if !tokenverify.IsAppManagerUid(ctx) { + if !authverify.IsAppManagerUid(ctx) { groupMember, err := s.GroupDatabase.TakeGroupMember(ctx, groupID, mcontext.GetOpUserID(ctx)) if err != nil { return err @@ -162,7 +163,7 @@ func (s *groupServer) CreateGroup(ctx context.Context, req *pbGroup.CreateGroupR if req.OwnerUserID == "" { return nil, errs.ErrArgs.Wrap("no group owner") } - if err := tokenverify.CheckAccessV3(ctx, req.OwnerUserID); err != nil { + if err := authverify.CheckAccessV3(ctx, req.OwnerUserID); err != nil { return nil, err } userIDs := append(append(req.MemberUserIDs, req.AdminUserIDs...), req.OwnerUserID) @@ -257,7 +258,7 @@ func (s *groupServer) CreateGroup(ctx context.Context, req *pbGroup.CreateGroupR func (s *groupServer) GetJoinedGroupList(ctx context.Context, req *pbGroup.GetJoinedGroupListReq) (*pbGroup.GetJoinedGroupListResp, error) { resp := &pbGroup.GetJoinedGroupListResp{} - if err := tokenverify.CheckAccessV3(ctx, req.FromUserID); err != nil { + if err := authverify.CheckAccessV3(ctx, req.FromUserID); err != nil { return nil, err } var pageNumber, showNumber int32 @@ -325,7 +326,7 @@ func (s *groupServer) InviteUserToGroup(ctx context.Context, req *pbGroup.Invite } var groupMember *relationTb.GroupMemberModel var opUserID string - if !tokenverify.IsAppManagerUid(ctx) { + if !authverify.IsAppManagerUid(ctx) { opUserID = mcontext.GetOpUserID(ctx) groupMembers, err := s.FindGroupMember(ctx, []string{req.GroupID}, []string{opUserID}, nil) if err != nil { @@ -337,7 +338,7 @@ func (s *groupServer) InviteUserToGroup(ctx context.Context, req *pbGroup.Invite groupMember = groupMembers[0] } if group.NeedVerification == constant.AllNeedVerification { - if !tokenverify.IsAppManagerUid(ctx) { + if !authverify.IsAppManagerUid(ctx) { if !(groupMember.RoleLevel == constant.GroupOwner || groupMember.RoleLevel == constant.GroupAdmin) { var requests []*relationTb.GroupRequestModel for _, userID := range req.InvitedUserIDs { @@ -480,7 +481,7 @@ func (s *groupServer) KickGroupMember(ctx context.Context, req *pbGroup.KickGrou for i, member := range members { memberMap[member.UserID] = members[i] } - isAppManagerUid := tokenverify.IsAppManagerUid(ctx) + isAppManagerUid := authverify.IsAppManagerUid(ctx) opMember := memberMap[opUserID] for _, userID := range req.KickedUserIDs { member, ok := memberMap[userID] @@ -670,7 +671,7 @@ func (s *groupServer) GroupApplicationResponse(ctx context.Context, req *pbGroup if !utils.Contain(req.HandleResult, constant.GroupResponseAgree, constant.GroupResponseRefuse) { return nil, errs.ErrArgs.Wrap("HandleResult unknown") } - if !tokenverify.IsAppManagerUid(ctx) { + if !authverify.IsAppManagerUid(ctx) { groupMember, err := s.GroupDatabase.TakeGroupMember(ctx, req.GroupID, mcontext.GetOpUserID(ctx)) if err != nil { return nil, err @@ -829,7 +830,7 @@ func (s *groupServer) QuitGroup(ctx context.Context, req *pbGroup.QuitGroupReq) } func (s *groupServer) deleteMemberAndSetConversationSeq(ctx context.Context, groupID string, userIDs []string) error { - conevrsationID := utils.GetConversationIDBySessionType(constant.SuperGroupChatType, groupID) + conevrsationID := msgprocessor.GetConversationIDBySessionType(constant.SuperGroupChatType, groupID) maxSeq, err := s.msgRpcClient.GetConversationMaxSeq(ctx, conevrsationID) if err != nil { return err @@ -839,7 +840,7 @@ func (s *groupServer) deleteMemberAndSetConversationSeq(ctx context.Context, gro func (s *groupServer) SetGroupInfo(ctx context.Context, req *pbGroup.SetGroupInfoReq) (*pbGroup.SetGroupInfoResp, error) { var opMember *relationTb.GroupMemberModel - if !tokenverify.IsAppManagerUid(ctx) { + if !authverify.IsAppManagerUid(ctx) { var err error opMember, err = s.TakeGroupMember(ctx, req.GroupInfoForSet.GroupID, mcontext.GetOpUserID(ctx)) if err != nil { @@ -889,7 +890,7 @@ func (s *groupServer) SetGroupInfo(ctx context.Context, req *pbGroup.SetGroupInf go func() { nctx := mcontext.NewCtx("@@@" + mcontext.GetOperationID(ctx)) conversation := &pbConversation.ConversationReq{ - ConversationID: utils.GetConversationIDBySessionType(constant.SuperGroupChatType, req.GroupInfoForSet.GroupID), + ConversationID: msgprocessor.GetConversationIDBySessionType(constant.SuperGroupChatType, req.GroupInfoForSet.GroupID), ConversationType: constant.SuperGroupChatType, GroupID: req.GroupInfoForSet.GroupID, } @@ -948,7 +949,7 @@ func (s *groupServer) TransferGroupOwner(ctx context.Context, req *pbGroup.Trans if newOwner == nil { return nil, errs.ErrArgs.Wrap("NewOwnerUser not in group " + req.NewOwnerUserID) } - if !tokenverify.IsAppManagerUid(ctx) { + if !authverify.IsAppManagerUid(ctx) { if !(mcontext.GetOpUserID(ctx) == oldOwner.UserID && oldOwner.RoleLevel == constant.GroupOwner) { return nil, errs.ErrNoPermission.Wrap("no permission transfer group owner") } @@ -1080,7 +1081,7 @@ func (s *groupServer) DismissGroup(ctx context.Context, req *pbGroup.DismissGrou if err != nil { return nil, err } - if !tokenverify.IsAppManagerUid(ctx) { + if !authverify.IsAppManagerUid(ctx) { if owner.UserID != mcontext.GetOpUserID(ctx) { return nil, errs.ErrNoPermission.Wrap("not group owner") } @@ -1131,7 +1132,7 @@ func (s *groupServer) MuteGroupMember(ctx context.Context, req *pbGroup.MuteGrou if err != nil { return nil, err } - if !tokenverify.IsAppManagerUid(ctx) { + if !authverify.IsAppManagerUid(ctx) { opMember, err := s.TakeGroupMember(ctx, req.GroupID, mcontext.GetOpUserID(ctx)) if err != nil { return nil, err @@ -1179,7 +1180,7 @@ func (s *groupServer) CancelMuteGroupMember(ctx context.Context, req *pbGroup.Ca if err != nil { return nil, err } - if !tokenverify.IsAppManagerUid(ctx) { + if !authverify.IsAppManagerUid(ctx) { opMember, err := s.TakeGroupMember(ctx, req.GroupID, mcontext.GetOpUserID(ctx)) if err != nil { return nil, err @@ -1263,7 +1264,7 @@ func (s *groupServer) SetGroupMemberInfo(ctx context.Context, req *pbGroup.SetGr memberMap := utils.SliceToMap(members, func(e *relationTb.GroupMemberModel) [2]string { return [...]string{e.GroupID, e.UserID} }) - if !tokenverify.IsAppManagerUid(ctx) { + if !authverify.IsAppManagerUid(ctx) { opUserID := mcontext.GetOpUserID(ctx) for _, member := range req.Members { if member.RoleLevel != nil { diff --git a/internal/rpc/group/super_group.go b/internal/rpc/group/super_group.go index bdd810ba9..070e154bc 100644 --- a/internal/rpc/group/super_group.go +++ b/internal/rpc/group/super_group.go @@ -22,9 +22,9 @@ import ( "github.com/OpenIMSDK/Open-IM-Server/pkg/common/convert" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/table/relation" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/table/unrelation" + "github.com/OpenIMSDK/protocol/constant" pbGroup "github.com/OpenIMSDK/protocol/group" sdkws "github.com/OpenIMSDK/protocol/sdkws" - "github.com/OpenIMSDK/tools/constant" "github.com/OpenIMSDK/tools/errs" "github.com/OpenIMSDK/tools/utils" ) diff --git a/internal/rpc/msg/as_read.go b/internal/rpc/msg/as_read.go index c2f07bd8e..d17b2b43a 100644 --- a/internal/rpc/msg/as_read.go +++ b/internal/rpc/msg/as_read.go @@ -19,9 +19,9 @@ import ( "github.com/redis/go-redis/v9" + "github.com/OpenIMSDK/protocol/constant" "github.com/OpenIMSDK/protocol/msg" "github.com/OpenIMSDK/protocol/sdkws" - "github.com/OpenIMSDK/tools/constant" "github.com/OpenIMSDK/tools/errs" "github.com/OpenIMSDK/tools/log" ) diff --git a/internal/rpc/msg/callback.go b/internal/rpc/msg/callback.go index 47bd1f0f1..5ed6a5f09 100644 --- a/internal/rpc/msg/callback.go +++ b/internal/rpc/msg/callback.go @@ -20,10 +20,10 @@ import ( "google.golang.org/protobuf/proto" cbapi "github.com/OpenIMSDK/Open-IM-Server/pkg/callbackstruct" + "github.com/OpenIMSDK/Open-IM-Server/pkg/common/config" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/http" + "github.com/OpenIMSDK/protocol/constant" pbChat "github.com/OpenIMSDK/protocol/msg" - "github.com/OpenIMSDK/tools/config" - "github.com/OpenIMSDK/tools/constant" "github.com/OpenIMSDK/tools/errs" "github.com/OpenIMSDK/tools/log" "github.com/OpenIMSDK/tools/mcontext" diff --git a/internal/rpc/msg/delete.go b/internal/rpc/msg/delete.go index 8c20a5bc3..cdee8bdb5 100644 --- a/internal/rpc/msg/delete.go +++ b/internal/rpc/msg/delete.go @@ -16,13 +16,13 @@ package msg import ( "context" + "github.com/OpenIMSDK/Open-IM-Server/pkg/authverify" + "github.com/OpenIMSDK/protocol/constant" "github.com/OpenIMSDK/protocol/conversation" "github.com/OpenIMSDK/protocol/msg" "github.com/OpenIMSDK/protocol/sdkws" - "github.com/OpenIMSDK/tools/constant" "github.com/OpenIMSDK/tools/log" - "github.com/OpenIMSDK/tools/tokenverify" "github.com/OpenIMSDK/tools/utils" ) @@ -45,7 +45,7 @@ func (m *msgServer) ClearConversationsMsg( ctx context.Context, req *msg.ClearConversationsMsgReq, ) (*msg.ClearConversationsMsgResp, error) { - if err := tokenverify.CheckAccessV3(ctx, req.UserID); err != nil { + if err := authverify.CheckAccessV3(ctx, req.UserID); err != nil { return nil, err } if err := m.clearConversation(ctx, req.ConversationIDs, req.UserID, req.DeleteSyncOpt); err != nil { @@ -58,7 +58,7 @@ func (m *msgServer) UserClearAllMsg( ctx context.Context, req *msg.UserClearAllMsgReq, ) (*msg.UserClearAllMsgResp, error) { - if err := tokenverify.CheckAccessV3(ctx, req.UserID); err != nil { + if err := authverify.CheckAccessV3(ctx, req.UserID); err != nil { return nil, err } conversationIDs, err := m.ConversationLocalCache.GetConversationIDs(ctx, req.UserID) @@ -73,7 +73,7 @@ func (m *msgServer) UserClearAllMsg( } func (m *msgServer) DeleteMsgs(ctx context.Context, req *msg.DeleteMsgsReq) (*msg.DeleteMsgsResp, error) { - if err := tokenverify.CheckAccessV3(ctx, req.UserID); err != nil { + if err := authverify.CheckAccessV3(ctx, req.UserID); err != nil { return nil, err } isSyncSelf, isSyncOther := m.validateDeleteSyncOpt(req.DeleteSyncOpt) @@ -121,7 +121,7 @@ func (m *msgServer) DeleteMsgPhysical( ctx context.Context, req *msg.DeleteMsgPhysicalReq, ) (*msg.DeleteMsgPhysicalResp, error) { - if err := tokenverify.CheckAdmin(ctx); err != nil { + if err := authverify.CheckAdmin(ctx); err != nil { return nil, err } remainTime := utils.GetCurrentTimestampBySecond() - req.Timestamp diff --git a/internal/rpc/msg/message_interceptor.go b/internal/rpc/msg/message_interceptor.go index 915a04ab1..3c8bf965d 100644 --- a/internal/rpc/msg/message_interceptor.go +++ b/internal/rpc/msg/message_interceptor.go @@ -17,10 +17,10 @@ package msg import ( "context" + "github.com/OpenIMSDK/Open-IM-Server/pkg/common/config" + "github.com/OpenIMSDK/protocol/constant" "github.com/OpenIMSDK/protocol/msg" "github.com/OpenIMSDK/protocol/sdkws" - "github.com/OpenIMSDK/tools/config" - "github.com/OpenIMSDK/tools/constant" "github.com/OpenIMSDK/tools/errs" ) diff --git a/internal/rpc/msg/msg_status.go b/internal/rpc/msg/msg_status.go index bd89d61f4..68d6d6d4e 100644 --- a/internal/rpc/msg/msg_status.go +++ b/internal/rpc/msg/msg_status.go @@ -17,8 +17,8 @@ package msg import ( "context" + "github.com/OpenIMSDK/protocol/constant" pbMsg "github.com/OpenIMSDK/protocol/msg" - "github.com/OpenIMSDK/tools/constant" "github.com/OpenIMSDK/tools/mcontext" ) diff --git a/internal/rpc/msg/revoke.go b/internal/rpc/msg/revoke.go index 5651e79e0..18066c1a2 100644 --- a/internal/rpc/msg/revoke.go +++ b/internal/rpc/msg/revoke.go @@ -17,15 +17,15 @@ package msg import ( "context" "encoding/json" + "github.com/OpenIMSDK/Open-IM-Server/pkg/authverify" "time" unRelationTb "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/table/unrelation" + "github.com/OpenIMSDK/protocol/constant" "github.com/OpenIMSDK/protocol/msg" "github.com/OpenIMSDK/protocol/sdkws" - "github.com/OpenIMSDK/tools/constant" "github.com/OpenIMSDK/tools/errs" "github.com/OpenIMSDK/tools/log" - "github.com/OpenIMSDK/tools/tokenverify" "github.com/OpenIMSDK/tools/utils" ) @@ -40,7 +40,7 @@ func (m *msgServer) RevokeMsg(ctx context.Context, req *msg.RevokeMsgReq) (*msg. if req.Seq < 0 { return nil, errs.ErrArgs.Wrap("seq is invalid") } - if err := tokenverify.CheckAccessV3(ctx, req.UserID); err != nil { + if err := authverify.CheckAccessV3(ctx, req.UserID); err != nil { return nil, err } user, err := m.User.GetUserInfo(ctx, req.UserID) @@ -60,10 +60,10 @@ func (m *msgServer) RevokeMsg(ctx context.Context, req *msg.RevokeMsgReq) (*msg. data, _ := json.Marshal(msgs[0]) log.ZInfo(ctx, "GetMsgBySeqs", "conversationID", req.ConversationID, "seq", req.Seq, "msg", string(data)) var role int32 - if !tokenverify.IsAppManagerUid(ctx) { + if !authverify.IsAppManagerUid(ctx) { switch msgs[0].SessionType { case constant.SingleChatType: - if err := tokenverify.CheckAccessV3(ctx, msgs[0].SendID); err != nil { + if err := authverify.CheckAccessV3(ctx, msgs[0].SendID); err != nil { return nil, err } role = user.AppMangerLevel diff --git a/internal/rpc/msg/send.go b/internal/rpc/msg/send.go index 2c5df6408..8ec54e7d8 100644 --- a/internal/rpc/msg/send.go +++ b/internal/rpc/msg/send.go @@ -16,13 +16,14 @@ package msg import ( "context" + "github.com/OpenIMSDK/Open-IM-Server/pkg/msgprocessor" promePkg "github.com/OpenIMSDK/Open-IM-Server/pkg/common/prome" + "github.com/OpenIMSDK/protocol/constant" pbConversation "github.com/OpenIMSDK/protocol/conversation" pbMsg "github.com/OpenIMSDK/protocol/msg" "github.com/OpenIMSDK/protocol/sdkws" "github.com/OpenIMSDK/protocol/wrapperspb" - "github.com/OpenIMSDK/tools/constant" "github.com/OpenIMSDK/tools/errs" "github.com/OpenIMSDK/tools/log" "github.com/OpenIMSDK/tools/mcontext" @@ -90,7 +91,7 @@ func (m *msgServer) setConversationAtInfo(nctx context.Context, msg *sdkws.MsgDa ctx := mcontext.NewCtx("@@@" + mcontext.GetOperationID(nctx)) var atUserID []string conversation := &pbConversation.ConversationReq{ - ConversationID: utils.GetConversationIDByMsg(msg), + ConversationID: msgprocessor.GetConversationIDByMsg(msg), ConversationType: msg.SessionType, GroupID: msg.GroupID, } @@ -148,8 +149,8 @@ func (m *msgServer) sendMsgSingleChat(ctx context.Context, req *pbMsg.SendMsgReq if err := m.messageVerification(ctx, req); err != nil { return nil, err } - var isSend bool = true - isNotification := utils.IsNotificationByMsg(req.MsgData) + var isSend = true + isNotification := msgprocessor.IsNotificationByMsg(req.MsgData) if !isNotification { isSend, err = m.modifyMessageByUserMessageReceiveOpt( ctx, diff --git a/internal/rpc/msg/server.go b/internal/rpc/msg/server.go index 542f59d4b..fe795e0eb 100644 --- a/internal/rpc/msg/server.go +++ b/internal/rpc/msg/server.go @@ -25,9 +25,9 @@ import ( "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/unrelation" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/prome" "github.com/OpenIMSDK/Open-IM-Server/pkg/rpcclient" + "github.com/OpenIMSDK/protocol/constant" "github.com/OpenIMSDK/protocol/conversation" "github.com/OpenIMSDK/protocol/msg" - "github.com/OpenIMSDK/tools/constant" "github.com/OpenIMSDK/tools/discoveryregistry" ) diff --git a/internal/rpc/msg/sync_msg.go b/internal/rpc/msg/sync_msg.go index edcb4ff89..e91138d6c 100644 --- a/internal/rpc/msg/sync_msg.go +++ b/internal/rpc/msg/sync_msg.go @@ -16,13 +16,14 @@ package msg import ( "context" + "github.com/OpenIMSDK/Open-IM-Server/pkg/authverify" + "github.com/OpenIMSDK/Open-IM-Server/pkg/msgprocessor" + "github.com/OpenIMSDK/protocol/constant" "github.com/OpenIMSDK/protocol/msg" - "github.com/OpenIMSDK/tools/constant" "github.com/OpenIMSDK/protocol/sdkws" "github.com/OpenIMSDK/tools/log" - "github.com/OpenIMSDK/tools/tokenverify" "github.com/OpenIMSDK/tools/utils" ) @@ -34,7 +35,7 @@ func (m *msgServer) PullMessageBySeqs( resp.Msgs = make(map[string]*sdkws.PullMsgs) resp.NotificationMsgs = make(map[string]*sdkws.PullMsgs) for _, seq := range req.SeqRanges { - if !utils.IsNotification(seq.ConversationID) { + if !msgprocessor.IsNotification(seq.ConversationID) { conversation, err := m.Conversation.GetConversation(ctx, req.UserID, seq.ConversationID) if err != nil { log.ZError(ctx, "GetConversation error", err, "conversationID", seq.ConversationID) @@ -85,7 +86,7 @@ func (m *msgServer) PullMessageBySeqs( } func (m *msgServer) GetMaxSeq(ctx context.Context, req *sdkws.GetMaxSeqReq) (*sdkws.GetMaxSeqResp, error) { - if err := tokenverify.CheckAccessV3(ctx, req.UserID); err != nil { + if err := authverify.CheckAccessV3(ctx, req.UserID); err != nil { return nil, err } conversationIDs, err := m.ConversationLocalCache.GetConversationIDs(ctx, req.UserID) diff --git a/internal/rpc/msg/utils.go b/internal/rpc/msg/utils.go index 48f7b03f3..1579bcbef 100644 --- a/internal/rpc/msg/utils.go +++ b/internal/rpc/msg/utils.go @@ -18,9 +18,9 @@ import ( "github.com/redis/go-redis/v9" "gorm.io/gorm" + "github.com/OpenIMSDK/Open-IM-Server/pkg/common/config" + "github.com/OpenIMSDK/protocol/constant" "github.com/OpenIMSDK/protocol/sdkws" - "github.com/OpenIMSDK/tools/config" - "github.com/OpenIMSDK/tools/constant" "github.com/OpenIMSDK/tools/utils" ) diff --git a/internal/rpc/msg/verify.go b/internal/rpc/msg/verify.go index 32c05ec82..c588d6cf7 100644 --- a/internal/rpc/msg/verify.go +++ b/internal/rpc/msg/verify.go @@ -20,10 +20,10 @@ import ( "strconv" "time" + "github.com/OpenIMSDK/Open-IM-Server/pkg/common/config" + "github.com/OpenIMSDK/protocol/constant" "github.com/OpenIMSDK/protocol/msg" "github.com/OpenIMSDK/protocol/sdkws" - "github.com/OpenIMSDK/tools/config" - "github.com/OpenIMSDK/tools/constant" "github.com/OpenIMSDK/tools/errs" "github.com/OpenIMSDK/tools/utils" ) diff --git a/internal/rpc/third/third.go b/internal/rpc/third/third.go index 5db6c39e4..555e9371c 100644 --- a/internal/rpc/third/third.go +++ b/internal/rpc/third/third.go @@ -27,13 +27,13 @@ import ( "google.golang.org/grpc" + "github.com/OpenIMSDK/Open-IM-Server/pkg/common/config" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/cache" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/controller" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/relation" relationTb "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/table/relation" "github.com/OpenIMSDK/Open-IM-Server/pkg/rpcclient" "github.com/OpenIMSDK/protocol/third" - "github.com/OpenIMSDK/tools/config" "github.com/OpenIMSDK/tools/discoveryregistry" ) diff --git a/internal/rpc/third/tool.go b/internal/rpc/third/tool.go index 5a7d1697b..3034de674 100644 --- a/internal/rpc/third/tool.go +++ b/internal/rpc/third/tool.go @@ -18,13 +18,13 @@ import ( "context" "errors" "fmt" + "github.com/OpenIMSDK/Open-IM-Server/pkg/authverify" "strings" "unicode/utf8" "github.com/OpenIMSDK/protocol/third" "github.com/OpenIMSDK/tools/errs" "github.com/OpenIMSDK/tools/mcontext" - "github.com/OpenIMSDK/tools/tokenverify" ) func toPbMapArray(m map[string][]string) []*third.KeyValues { @@ -52,7 +52,7 @@ func checkUploadName(ctx context.Context, name string) error { if opUserID == "" { return errs.ErrNoPermission.Wrap("opUserID is empty") } - if !tokenverify.IsManagerUserID(opUserID) { + if !authverify.IsManagerUserID(opUserID) { if !strings.HasPrefix(name, opUserID+"/") { return errs.ErrNoPermission.Wrap(fmt.Sprintf("name must start with `%s/`", opUserID)) } diff --git a/internal/rpc/user/user.go b/internal/rpc/user/user.go index 65e977274..f95e66c0d 100644 --- a/internal/rpc/user/user.go +++ b/internal/rpc/user/user.go @@ -17,11 +17,13 @@ package user import ( "context" "errors" + "github.com/OpenIMSDK/Open-IM-Server/pkg/authverify" "strings" "time" "github.com/OpenIMSDK/tools/log" + "github.com/OpenIMSDK/Open-IM-Server/pkg/common/config" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/convert" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/cache" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/controller" @@ -29,13 +31,11 @@ import ( tablerelation "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/table/relation" "github.com/OpenIMSDK/Open-IM-Server/pkg/rpcclient" "github.com/OpenIMSDK/Open-IM-Server/pkg/rpcclient/notification" + "github.com/OpenIMSDK/protocol/constant" "github.com/OpenIMSDK/protocol/sdkws" pbuser "github.com/OpenIMSDK/protocol/user" - "github.com/OpenIMSDK/tools/config" - "github.com/OpenIMSDK/tools/constant" registry "github.com/OpenIMSDK/tools/discoveryregistry" "github.com/OpenIMSDK/tools/errs" - "github.com/OpenIMSDK/tools/tokenverify" "github.com/OpenIMSDK/tools/tx" "google.golang.org/grpc" @@ -50,6 +50,11 @@ type userServer struct { RegisterCenter registry.SvcDiscoveryRegistry } +func (s *userServer) SubscribeOrCancelUsersStatus(ctx context.Context, req *pbuser.SubscribeOrCancelUsersStatusReq) (*pbuser.SubscribeOrCancelUsersStatusResp, error) { + //TODO implement me + panic("implement me") +} + func Start(client registry.SvcDiscoveryRegistry, server *grpc.Server) error { db, err := relation.NewGormDB() if err != nil { @@ -99,7 +104,7 @@ func (s *userServer) GetDesignateUsers(ctx context.Context, req *pbuser.GetDesig func (s *userServer) UpdateUserInfo(ctx context.Context, req *pbuser.UpdateUserInfoReq) (resp *pbuser.UpdateUserInfoResp, err error) { resp = &pbuser.UpdateUserInfoResp{} - err = tokenverify.CheckAccessV3(ctx, req.UserInfo.UserID) + err = authverify.CheckAccessV3(ctx, req.UserInfo.UserID) if err != nil { return nil, err } @@ -141,7 +146,7 @@ func (s *userServer) AccountCheck(ctx context.Context, req *pbuser.AccountCheckR if utils.Duplicate(req.CheckUserIDs) { return nil, errs.ErrArgs.Wrap("userID repeated") } - err = tokenverify.CheckAdmin(ctx) + err = authverify.CheckAdmin(ctx) if err != nil { return nil, err } diff --git a/internal/tools/cron_task.go b/internal/tools/cron_task.go index 354682f8e..a7333a5d4 100644 --- a/internal/tools/cron_task.go +++ b/internal/tools/cron_task.go @@ -21,7 +21,7 @@ import ( "github.com/robfig/cron/v3" - "github.com/OpenIMSDK/tools/config" + "github.com/OpenIMSDK/Open-IM-Server/pkg/common/config" "github.com/OpenIMSDK/tools/log" ) diff --git a/internal/tools/msg.go b/internal/tools/msg.go index 8e67bc350..972877516 100644 --- a/internal/tools/msg.go +++ b/internal/tools/msg.go @@ -24,13 +24,13 @@ import ( "google.golang.org/grpc" "google.golang.org/grpc/credentials/insecure" + "github.com/OpenIMSDK/Open-IM-Server/pkg/common/config" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/cache" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/controller" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/relation" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/unrelation" "github.com/OpenIMSDK/Open-IM-Server/pkg/rpcclient" "github.com/OpenIMSDK/Open-IM-Server/pkg/rpcclient/notification" - "github.com/OpenIMSDK/tools/config" "github.com/OpenIMSDK/tools/discoveryregistry/zookeeper" "github.com/OpenIMSDK/tools/errs" "github.com/OpenIMSDK/tools/log" diff --git a/internal/tools/msg_test.go b/internal/tools/msg_test.go deleted file mode 100644 index f4ce4d054..000000000 --- a/internal/tools/msg_test.go +++ /dev/null @@ -1,355 +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. - -package tools - -import ( - "context" - "strconv" - - "go.mongodb.org/mongo-driver/bson" - - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/cache" - "github.com/OpenIMSDK/tools/constant" - "github.com/OpenIMSDK/tools/mcontext" - "github.com/OpenIMSDK/tools/utils" - - unRelationTb "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/table/unrelation" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/unrelation" - - "testing" - "time" -) - -func GenMsgDoc(startSeq, stopSeq, delSeq, index int64, conversationID string) *unRelationTb.MsgDocModel { - msgDoc := &unRelationTb.MsgDocModel{DocID: conversationID + strconv.Itoa(int(index))} - for i := 0; i < 5000; i++ { - msgDoc.Msg = append(msgDoc.Msg, &unRelationTb.MsgInfoModel{}) - } - for i := startSeq; i <= stopSeq; i++ { - msg := &unRelationTb.MsgDataModel{ - SendID: "sendID1", - RecvID: "recvID1", - GroupID: "", - ClientMsgID: "xxx", - ServerMsgID: "xxx", - SenderPlatformID: 1, - SenderNickname: "testNickName", - SenderFaceURL: "testFaceURL", - SessionType: 1, - MsgFrom: 100, - ContentType: 101, - Content: "testContent", - Seq: i, - CreateTime: time.Now().Unix(), - Status: 1, - } - if i <= delSeq { - msg.SendTime = 10000 - } else { - msg.SendTime = utils.GetCurrentTimestampByMill() - } - msgDoc.Msg[i-1] = &unRelationTb.MsgInfoModel{Msg: msg} - } - return msgDoc -} - -func TestDeleteMongoMsgAndResetRedisSeq(t *testing.T) { - operationID := "test" - rdb, err := cache.NewRedis() - if err != nil { - return - } - mgo, err := unrelation.NewMongo() - if err != nil { - return - } - cacheModel := cache.NewMsgCacheModel(rdb) - mongoClient := mgo.GetDatabase().Collection(unRelationTb.MsgDocModel{}.TableName()) - ctx := context.Background() - ctx = mcontext.SetOperationID(ctx, operationID) - - testUID1 := "test_del_id1" - var conversationID string - conversationID = utils.GetConversationIDBySessionType(constant.SuperGroupChatType, testUID1) - _, err = mongoClient.DeleteOne(ctx, bson.M{"doc_id": conversationID + ":" + strconv.Itoa(0)}) - if err != nil { - t.Error("DeleteOne failed") - return - } - - err = cacheModel.SetMaxSeq(ctx, conversationID, 600) - if err != nil { - t.Error("SetUserMaxSeq failed") - } - msgDoc := GenMsgDoc(1, 600, 200, 0, conversationID) - if _, err := mongoClient.InsertOne(ctx, msgDoc); err != nil { - t.Error("InsertOne failed", conversationID) - } - - msgTools, err := InitMsgTool() - if err != nil { - t.Error("init failed") - return - } - msgTools.ClearConversationsMsg(ctx, []string{conversationID}) - minSeqMongo, maxSeqMongo, minSeqCache, maxSeqCache, err := msgTools.msgDatabase.GetConversationMinMaxSeqInMongoAndCache( - ctx, - conversationID, - ) - if err != nil { - t.Error("GetSuperGroupMinMaxSeqInMongoAndCache failed") - return - } - if maxSeqCache != maxSeqMongo { - t.Error("checkMaxSeqWithMongo failed", conversationID) - } - if minSeqMongo != minSeqCache { - t.Error("minSeqMongo != minSeqCache", minSeqMongo, minSeqCache) - } - if minSeqCache != 201 { - t.Error("test1 is not the same", "minSeq:", minSeqCache, "targetSeq", 201) - } - - /////// uid2 - - testUID2 := "test_del_id2" - conversationID = utils.GetConversationIDBySessionType(constant.SuperGroupChatType, testUID2) - - _, err = mongoClient.DeleteOne(ctx, bson.M{"uid": conversationID + ":" + strconv.Itoa(0)}) - if err != nil { - t.Error("delete failed") - } - _, err = mongoClient.DeleteOne(ctx, bson.M{"uid": conversationID + ":" + strconv.Itoa(1)}) - if err != nil { - t.Error("delete failed") - } - - err = cacheModel.SetMaxSeq(ctx, conversationID, 7000) - if err != nil { - t.Error("SetUserMaxSeq failed") - } - msgDoc = GenMsgDoc(1, 4999, 5000, 0, conversationID) - msgDoc2 := GenMsgDoc(5000, 7000, 6000, 1, conversationID) - if _, err := mongoClient.InsertOne(ctx, msgDoc); err != nil { - t.Error("InsertOne failed", testUID1) - } - if _, err := mongoClient.InsertOne(ctx, msgDoc2); err != nil { - t.Error("InsertOne failed", testUID1) - } - - msgTools.ClearConversationsMsg(ctx, []string{conversationID}) - minSeqMongo, maxSeqMongo, minSeqCache, maxSeqCache, err = msgTools.msgDatabase.GetConversationMinMaxSeqInMongoAndCache( - ctx, - conversationID, - ) - if err != nil { - t.Error("GetSuperGroupMinMaxSeqInMongoAndCache failed") - return - } - if maxSeqCache != maxSeqMongo { - t.Error("checkMaxSeqWithMongo failed", conversationID) - } - if minSeqMongo != minSeqCache { - t.Error("minSeqMongo != minSeqCache", minSeqMongo, minSeqCache) - } - if minSeqCache != 6001 { - t.Error("test1 is not the same", "minSeq:", minSeqCache, "targetSeq", 201) - } - - /////// uid3 - testUID3 := "test_del_id3" - conversationID = utils.GetConversationIDBySessionType(constant.SuperGroupChatType, testUID3) - _, err = mongoClient.DeleteOne(ctx, bson.M{"uid": conversationID + ":" + strconv.Itoa(0)}) - if err != nil { - t.Error("delete failed") - } - err = cacheModel.SetMaxSeq(ctx, conversationID, 4999) - if err != nil { - t.Error("SetUserMaxSeq failed") - } - msgDoc = GenMsgDoc(1, 4999, 5000, 0, conversationID) - if _, err := mongoClient.InsertOne(ctx, msgDoc); err != nil { - t.Error("InsertOne failed", conversationID) - } - - msgTools.ClearConversationsMsg(ctx, []string{conversationID}) - minSeqMongo, maxSeqMongo, minSeqCache, maxSeqCache, err = msgTools.msgDatabase.GetConversationMinMaxSeqInMongoAndCache( - ctx, - conversationID, - ) - if err != nil { - t.Error("GetSuperGroupMinMaxSeqInMongoAndCache failed") - return - } - if maxSeqCache != maxSeqMongo { - t.Error("checkMaxSeqWithMongo failed", conversationID) - } - if minSeqMongo != minSeqCache { - t.Error("minSeqMongo != minSeqCache", minSeqMongo, minSeqCache) - } - if minSeqCache != 5000 { - t.Error("test1 is not the same", "minSeq:", minSeqCache, "targetSeq", 201) - } - - //// uid4 - testUID4 := "test_del_id4" - conversationID = utils.GetConversationIDBySessionType(constant.SuperGroupChatType, testUID4) - _, err = mongoClient.DeleteOne(ctx, bson.M{"uid": conversationID + ":" + strconv.Itoa(0)}) - if err != nil { - t.Error("delete failed") - } - _, err = mongoClient.DeleteOne(ctx, bson.M{"uid": conversationID + ":" + strconv.Itoa(1)}) - if err != nil { - t.Error("delete failed") - } - _, err = mongoClient.DeleteOne(ctx, bson.M{"uid": conversationID + ":" + strconv.Itoa(2)}) - if err != nil { - t.Error("delete failed") - } - - err = cacheModel.SetMaxSeq(ctx, conversationID, 12000) - msgDoc = GenMsgDoc(1, 4999, 5000, 0, conversationID) - msgDoc2 = GenMsgDoc(5000, 9999, 10000, 1, conversationID) - msgDoc3 := GenMsgDoc(10000, 12000, 11000, 2, conversationID) - if _, err := mongoClient.InsertOne(ctx, msgDoc); err != nil { - t.Error("InsertOne failed", conversationID) - } - if _, err := mongoClient.InsertOne(ctx, msgDoc2); err != nil { - t.Error("InsertOne failed", conversationID) - } - if _, err := mongoClient.InsertOne(ctx, msgDoc3); err != nil { - t.Error("InsertOne failed", conversationID) - } - - msgTools.ClearConversationsMsg(ctx, []string{conversationID}) - if err != nil { - t.Error("GetSuperGroupMinMaxSeqInMongoAndCache failed") - return - } - minSeqMongo, maxSeqMongo, minSeqCache, maxSeqCache, err = msgTools.msgDatabase.GetConversationMinMaxSeqInMongoAndCache( - ctx, - conversationID, - ) - if err != nil { - t.Error("GetSuperGroupMinMaxSeqInMongoAndCache failed") - return - } - if maxSeqCache != maxSeqMongo { - t.Error("checkMaxSeqWithMongo failed", conversationID) - } - if minSeqMongo != minSeqCache { - t.Error("minSeqMongo != minSeqCache", minSeqMongo, minSeqCache) - } - if minSeqCache != 5000 { - t.Error("test1 is not the same", "minSeq:", minSeqCache) - } - - testUID5 := "test_del_id5" - conversationID = utils.GetConversationIDBySessionType(constant.SuperGroupChatType, testUID5) - - _, err = mongoClient.DeleteOne(ctx, bson.M{"uid": conversationID + ":" + strconv.Itoa(0)}) - if err != nil { - t.Error("delete failed") - } - _, err = mongoClient.DeleteOne(ctx, bson.M{"uid": conversationID + ":" + strconv.Itoa(1)}) - if err != nil { - t.Error("delete failed") - } - err = cacheModel.SetMaxSeq(ctx, conversationID, 9999) - msgDoc = GenMsgDoc(1, 4999, 5000, 0, conversationID) - msgDoc2 = GenMsgDoc(5000, 9999, 10000, 1, conversationID) - if _, err := mongoClient.InsertOne(ctx, msgDoc); err != nil { - t.Error("InsertOne failed", conversationID) - } - if _, err := mongoClient.InsertOne(ctx, msgDoc2); err != nil { - t.Error("InsertOne failed", conversationID) - } - - msgTools.ClearConversationsMsg(ctx, []string{conversationID}) - if err != nil { - t.Error("GetSuperGroupMinMaxSeqInMongoAndCache failed") - return - } - minSeqMongo, maxSeqMongo, minSeqCache, maxSeqCache, err = msgTools.msgDatabase.GetConversationMinMaxSeqInMongoAndCache( - ctx, - conversationID, - ) - if err != nil { - t.Error("GetSuperGroupMinMaxSeqInMongoAndCache failed") - return - } - if maxSeqCache != maxSeqMongo { - t.Error("checkMaxSeqWithMongo failed", conversationID) - } - if minSeqMongo != minSeqCache { - t.Error("minSeqMongo != minSeqCache", minSeqMongo, minSeqCache) - } - if minSeqCache != 10000 { - t.Error("test1 is not the same", "minSeq:", minSeqCache) - } - - testUID6 := "test_del_id6" - conversationID = utils.GetConversationIDBySessionType(constant.SuperGroupChatType, testUID6) - - _, err = mongoClient.DeleteOne(ctx, bson.M{"uid": conversationID + ":" + strconv.Itoa(0)}) - if err != nil { - t.Error("delete failed") - } - _, err = mongoClient.DeleteOne(ctx, bson.M{"uid": conversationID + ":" + strconv.Itoa(1)}) - if err != nil { - t.Error("delete failed") - } - _, err = mongoClient.DeleteOne(ctx, bson.M{"uid": conversationID + ":" + strconv.Itoa(2)}) - if err != nil { - t.Error("delete failed") - } - _, err = mongoClient.DeleteOne(ctx, bson.M{"uid": conversationID + ":" + strconv.Itoa(3)}) - if err != nil { - t.Error("delete failed") - } - msgDoc = GenMsgDoc(1, 4999, 5000, 0, conversationID) - msgDoc2 = GenMsgDoc(5000, 9999, 10000, 1, conversationID) - msgDoc3 = GenMsgDoc(10000, 14999, 13000, 2, conversationID) - msgDoc4 := GenMsgDoc(15000, 19999, 0, 3, conversationID) - if _, err := mongoClient.InsertOne(ctx, msgDoc); err != nil { - t.Error("InsertOne failed", testUID4) - } - if _, err := mongoClient.InsertOne(ctx, msgDoc2); err != nil { - t.Error("InsertOne failed", testUID4) - } - if _, err := mongoClient.InsertOne(ctx, msgDoc3); err != nil { - t.Error("InsertOne failed", testUID4) - } - if _, err := mongoClient.InsertOne(ctx, msgDoc4); err != nil { - t.Error("InsertOne failed", testUID4) - } - minSeqMongo, maxSeqMongo, minSeqCache, maxSeqCache, err = msgTools.msgDatabase.GetConversationMinMaxSeqInMongoAndCache( - ctx, - conversationID, - ) - if err != nil { - t.Error("GetSuperGroupMinMaxSeqInMongoAndCache failed") - return - } - if maxSeqCache != maxSeqMongo { - t.Error("checkMaxSeqWithMongo failed", conversationID) - } - if minSeqMongo != minSeqCache { - t.Error("minSeqMongo != minSeqCache", minSeqMongo, minSeqCache) - } - if minSeqCache != 13001 { - t.Error("test1 is not the same", "minSeq:", minSeqCache) - } -} diff --git a/pkg/authverify/token.go b/pkg/authverify/token.go new file mode 100644 index 000000000..0d26b6b04 --- /dev/null +++ b/pkg/authverify/token.go @@ -0,0 +1,62 @@ +package authverify + +import ( + "context" + "fmt" + "github.com/OpenIMSDK/Open-IM-Server/pkg/common/config" + "github.com/OpenIMSDK/tools/errs" + "github.com/OpenIMSDK/tools/mcontext" + "github.com/OpenIMSDK/tools/tokenverify" + "github.com/OpenIMSDK/tools/utils" + "github.com/golang-jwt/jwt/v4" +) + +func Secret() jwt.Keyfunc { + return func(token *jwt.Token) (interface{}, error) { + return []byte(config.Config.Secret), nil + } +} + +func CheckAccessV3(ctx context.Context, ownerUserID string) (err error) { + opUserID := mcontext.GetOpUserID(ctx) + if utils.IsContain(opUserID, config.Config.Manager.UserID) { + return nil + } + if opUserID == ownerUserID { + return nil + } + return errs.ErrNoPermission.Wrap(utils.GetSelfFuncName()) +} + +func IsAppManagerUid(ctx context.Context) bool { + return utils.IsContain(mcontext.GetOpUserID(ctx), config.Config.Manager.UserID) +} + +func CheckAdmin(ctx context.Context) error { + if utils.IsContain(mcontext.GetOpUserID(ctx), config.Config.Manager.UserID) { + return nil + } + return errs.ErrNoPermission.Wrap(fmt.Sprintf("user %s is not admin userID", mcontext.GetOpUserID(ctx))) +} + +func ParseRedisInterfaceToken(redisToken interface{}) (*tokenverify.Claims, error) { + return tokenverify.GetClaimFromToken(string(redisToken.([]uint8)), Secret()) +} + +func IsManagerUserID(opUserID string) bool { + return utils.IsContain(opUserID, config.Config.Manager.UserID) +} + +func WsVerifyToken(token, userID string, platformID int) error { + claim, err := tokenverify.GetClaimFromToken(token, Secret()) + if err != nil { + return err + } + if claim.UserID != userID { + return errs.ErrTokenInvalid.Wrap(fmt.Sprintf("token uid %s != userID %s", claim.UserID, userID)) + } + if claim.PlatformID != platformID { + return errs.ErrTokenInvalid.Wrap(fmt.Sprintf("token platform %d != %d", claim.PlatformID, platformID)) + } + return nil +} diff --git a/pkg/common/cmd/msg_gateway.go b/pkg/common/cmd/msg_gateway.go index f7b7a03ea..aae63351d 100644 --- a/pkg/common/cmd/msg_gateway.go +++ b/pkg/common/cmd/msg_gateway.go @@ -19,7 +19,7 @@ import ( //"github.com/OpenIMSDK/Open-IM-Server/internal/msggateway". "github.com/spf13/cobra" - "github.com/OpenIMSDK/tools/constant" + "github.com/OpenIMSDK/protocol/constant" ) type MsgGatewayCmd struct { diff --git a/pkg/common/cmd/root.go b/pkg/common/cmd/root.go index 718d9bf7b..39865b9f8 100644 --- a/pkg/common/cmd/root.go +++ b/pkg/common/cmd/root.go @@ -20,8 +20,8 @@ import ( "github.com/spf13/cobra" - "github.com/OpenIMSDK/tools/config" - "github.com/OpenIMSDK/tools/constant" + "github.com/OpenIMSDK/Open-IM-Server/pkg/common/config" + "github.com/OpenIMSDK/protocol/constant" "github.com/OpenIMSDK/tools/log" ) @@ -65,7 +65,7 @@ func NewRootCmd(name string, opts ...func(*CmdOpts)) (rootCmd *RootCmd) { if cmdOpts.loggerPrefixName == "" { cmdOpts.loggerPrefixName = "OpenIM.log.all" } - if err := log.InitFromConfig(cmdOpts.loggerPrefixName, name, config.Config.Log.RemainLogLevel, config.Config.Log.IsStdout, config.Config.Log.IsJson, config.Config.Log.StorageLocation, config.Config.Log.RemainRotationCount); err != nil { + if err := log.InitFromConfig(cmdOpts.loggerPrefixName, name, config.Config.Log.RemainLogLevel, config.Config.Log.IsStdout, config.Config.Log.IsJson, config.Config.Log.StorageLocation, config.Config.Log.RemainRotationCount, config.Config.Log.RotationTime); err != nil { panic(err) } return nil diff --git a/pkg/common/cmd/rpc.go b/pkg/common/cmd/rpc.go index a2fbea34c..9a00353be 100644 --- a/pkg/common/cmd/rpc.go +++ b/pkg/common/cmd/rpc.go @@ -20,8 +20,8 @@ import ( "github.com/spf13/cobra" "google.golang.org/grpc" + "github.com/OpenIMSDK/Open-IM-Server/pkg/common/startrpc" "github.com/OpenIMSDK/tools/discoveryregistry" - "github.com/OpenIMSDK/tools/startrpc" ) type RpcCmd struct { diff --git a/pkg/common/config/config.go b/pkg/common/config/config.go new file mode 100644 index 000000000..1e0bbba16 --- /dev/null +++ b/pkg/common/config/config.go @@ -0,0 +1,333 @@ +// 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. + +package config + +import ( + "bytes" + "github.com/OpenIMSDK/tools/discoveryregistry" + "gopkg.in/yaml.v3" +) + +var Config configStruct + +const ConfKey = "conf" + +type CallBackConfig struct { + Enable bool `yaml:"enable"` + CallbackTimeOut int `yaml:"timeout"` + CallbackFailedContinue *bool `yaml:"failedContinue"` +} + +type NotificationConf struct { + IsSendMsg bool `yaml:"isSendMsg"` + ReliabilityLevel int `yaml:"reliabilityLevel"` // 1 online 2 persistent + UnreadCount bool `yaml:"unreadCount"` + OfflinePush POfflinePush `yaml:"offlinePush"` +} + +type POfflinePush struct { + Enable bool `yaml:"enable"` + Title string `yaml:"title"` + Desc string `yaml:"desc"` + Ext string `yaml:"ext"` +} + +type configStruct struct { + Zookeeper struct { + Schema string `yaml:"schema"` + ZkAddr []string `yaml:"address"` + Username string `yaml:"username"` + Password string `yaml:"password"` + } `yaml:"zookeeper"` + + Mysql struct { + Address []string `yaml:"address"` + Username string `yaml:"username"` + Password string `yaml:"password"` + Database string `yaml:"database"` + MaxOpenConn int `yaml:"maxOpenConn"` + MaxIdleConn int `yaml:"maxIdleConn"` + MaxLifeTime int `yaml:"maxLifeTime"` + LogLevel int `yaml:"logLevel"` + SlowThreshold int `yaml:"slowThreshold"` + } `yaml:"mysql"` + + Mongo struct { + Uri string `yaml:"uri"` + Address []string `yaml:"address"` + Database string `yaml:"database"` + Username string `yaml:"username"` + Password string `yaml:"password"` + MaxPoolSize int `yaml:"maxPoolSize"` + } `yaml:"mongo"` + + Redis struct { + Address []string `yaml:"address"` + Username string `yaml:"username"` + Password string `yaml:"password"` + } `yaml:"redis"` + + Kafka struct { + Username string `yaml:"username"` + Password string `yaml:"password"` + Addr []string `yaml:"addr"` + LatestMsgToRedis struct { + Topic string `yaml:"topic"` + } `yaml:"latestMsgToRedis"` + MsgToMongo struct { + Topic string `yaml:"topic"` + } `yaml:"offlineMsgToMongo"` + MsgToPush struct { + Topic string `yaml:"topic"` + } `yaml:"msgToPush"` + ConsumerGroupID struct { + MsgToRedis string `yaml:"msgToRedis"` + MsgToMongo string `yaml:"msgToMongo"` + MsgToMySql string `yaml:"msgToMySql"` + MsgToPush string `yaml:"msgToPush"` + } `yaml:"consumerGroupID"` + } `yaml:"kafka"` + + Rpc struct { + RegisterIP string `yaml:"registerIP"` + ListenIP string `yaml:"listenIP"` + } `yaml:"rpc"` + + Api struct { + OpenImApiPort []int `yaml:"openImApiPort"` + ListenIP string `yaml:"listenIP"` + } `yaml:"api"` + + Object struct { + Enable string `yaml:"enable"` + ApiURL string `yaml:"apiURL"` + Minio struct { + Bucket string `yaml:"bucket"` + Endpoint string `yaml:"endpoint"` + AccessKeyID string `yaml:"accessKeyID"` + SecretAccessKey string `yaml:"secretAccessKey"` + SessionToken string `yaml:"sessionToken"` + } `yaml:"minio"` + Cos struct { + BucketURL string `yaml:"bucketURL"` + SecretID string `yaml:"secretID"` + SecretKey string `yaml:"secretKey"` + SessionToken string `yaml:"sessionToken"` + } `yaml:"cos"` + Oss struct { + Endpoint string `yaml:"endpoint"` + Bucket string `yaml:"bucket"` + BucketURL string `yaml:"bucketURL"` + AccessKeyID string `yaml:"accessKeyID"` + AccessKeySecret string `yaml:"accessKeySecret"` + SessionToken string `yaml:"sessionToken"` + } `yaml:"oss"` + } `yaml:"object"` + + RpcPort struct { + OpenImUserPort []int `yaml:"openImUserPort"` + OpenImFriendPort []int `yaml:"openImFriendPort"` + OpenImMessagePort []int `yaml:"openImMessagePort"` + OpenImMessageGatewayPort []int `yaml:"openImMessageGatewayPort"` + OpenImGroupPort []int `yaml:"openImGroupPort"` + OpenImAuthPort []int `yaml:"openImAuthPort"` + OpenImPushPort []int `yaml:"openImPushPort"` + OpenImConversationPort []int `yaml:"openImConversationPort"` + OpenImRtcPort []int `yaml:"openImRtcPort"` + OpenImThirdPort []int `yaml:"openImThirdPort"` + } `yaml:"rpcPort"` + + RpcRegisterName struct { + OpenImUserName string `yaml:"openImUserName"` + OpenImFriendName string `yaml:"openImFriendName"` + OpenImMsgName string `yaml:"openImMsgName"` + OpenImPushName string `yaml:"openImPushName"` + OpenImMessageGatewayName string `yaml:"openImMessageGatewayName"` + OpenImGroupName string `yaml:"openImGroupName"` + OpenImAuthName string `yaml:"openImAuthName"` + OpenImConversationName string `yaml:"openImConversationName"` + OpenImThirdName string `yaml:"openImThirdName"` + } `yaml:"rpcRegisterName"` + + Log struct { + StorageLocation string `yaml:"storageLocation"` + RotationTime uint `yaml:"rotationTime"` + RemainRotationCount uint `yaml:"remainRotationCount"` + RemainLogLevel int `yaml:"remainLogLevel"` + IsStdout bool `yaml:"isStdout"` + IsJson bool `yaml:"isJson"` + WithStack bool `yaml:"withStack"` + } `yaml:"log"` + + LongConnSvr struct { + OpenImWsPort []int `yaml:"openImWsPort"` + WebsocketMaxConnNum int `yaml:"websocketMaxConnNum"` + WebsocketMaxMsgLen int `yaml:"websocketMaxMsgLen"` + WebsocketTimeout int `yaml:"websocketTimeout"` + } `yaml:"longConnSvr"` + + Push struct { + Enable string `yaml:"enable"` + GeTui struct { + PushUrl string `yaml:"pushUrl"` + AppKey string `yaml:"appKey"` + Intent string `yaml:"intent"` + MasterSecret string `yaml:"masterSecret"` + ChannelID string `yaml:"channelID"` + ChannelName string `yaml:"channelName"` + } `yaml:"geTui"` + Fcm struct { + ServiceAccount string `yaml:"serviceAccount"` + } `yaml:"fcm"` + Jpns struct { + AppKey string `yaml:"appKey"` + MasterSecret string `yaml:"masterSecret"` + PushUrl string `yaml:"pushUrl"` + PushIntent string `yaml:"pushIntent"` + } `yaml:"jpns"` + } + Manager struct { + UserID []string `yaml:"userID"` + Nickname []string `yaml:"nickname"` + } `yaml:"manager"` + + MultiLoginPolicy int `yaml:"multiLoginPolicy"` + ChatPersistenceMysql bool `yaml:"chatPersistenceMysql"` + MsgCacheTimeout int `yaml:"msgCacheTimeout"` + GroupMessageHasReadReceiptEnable bool `yaml:"groupMessageHasReadReceiptEnable"` + SingleMessageHasReadReceiptEnable bool `yaml:"singleMessageHasReadReceiptEnable"` + RetainChatRecords int `yaml:"retainChatRecords"` + ChatRecordsClearTime string `yaml:"chatRecordsClearTime"` + MsgDestructTime string `yaml:"msgDestructTime"` + Secret string `yaml:"secret"` + TokenPolicy struct { + Expire int64 `yaml:"expire"` + } `yaml:"tokenPolicy"` + MessageVerify struct { + FriendVerify *bool `yaml:"friendVerify"` + } `yaml:"messageVerify"` + + IOSPush struct { + PushSound string `yaml:"pushSound"` + BadgeCount bool `yaml:"badgeCount"` + Production bool `yaml:"production"` + } `yaml:"iosPush"` + Callback struct { + CallbackUrl string `yaml:"url"` + CallbackBeforeSendSingleMsg CallBackConfig `yaml:"beforeSendSingleMsg"` + CallbackAfterSendSingleMsg CallBackConfig `yaml:"afterSendSingleMsg"` + CallbackBeforeSendGroupMsg CallBackConfig `yaml:"beforeSendGroupMsg"` + CallbackAfterSendGroupMsg CallBackConfig `yaml:"afterSendGroupMsg"` + CallbackMsgModify CallBackConfig `yaml:"msgModify"` + CallbackUserOnline CallBackConfig `yaml:"userOnline"` + CallbackUserOffline CallBackConfig `yaml:"userOffline"` + CallbackUserKickOff CallBackConfig `yaml:"userKickOff"` + CallbackOfflinePush CallBackConfig `yaml:"offlinePush"` + CallbackOnlinePush CallBackConfig `yaml:"onlinePush"` + CallbackBeforeSuperGroupOnlinePush CallBackConfig `yaml:"superGroupOnlinePush"` + CallbackBeforeAddFriend CallBackConfig `yaml:"beforeAddFriend"` + CallbackBeforeCreateGroup CallBackConfig `yaml:"beforeCreateGroup"` + CallbackBeforeMemberJoinGroup CallBackConfig `yaml:"beforeMemberJoinGroup"` + CallbackBeforeSetGroupMemberInfo CallBackConfig `yaml:"beforeSetGroupMemberInfo"` + } `yaml:"callback"` + + Prometheus struct { + Enable bool `yaml:"enable"` + UserPrometheusPort []int `yaml:"userPrometheusPort"` + FriendPrometheusPort []int `yaml:"friendPrometheusPort"` + MessagePrometheusPort []int `yaml:"messagePrometheusPort"` + MessageGatewayPrometheusPort []int `yaml:"messageGatewayPrometheusPort"` + GroupPrometheusPort []int `yaml:"groupPrometheusPort"` + AuthPrometheusPort []int `yaml:"authPrometheusPort"` + PushPrometheusPort []int `yaml:"pushPrometheusPort"` + ConversationPrometheusPort []int `yaml:"conversationPrometheusPort"` + RtcPrometheusPort []int `yaml:"rtcPrometheusPort"` + MessageTransferPrometheusPort []int `yaml:"messageTransferPrometheusPort"` + ThirdPrometheusPort []int `yaml:"thirdPrometheusPort"` + } `yaml:"prometheus"` + Notification notification `yaml:"notification"` +} + +type notification struct { + GroupCreated NotificationConf `yaml:"groupCreated"` + GroupInfoSet NotificationConf `yaml:"groupInfoSet"` + JoinGroupApplication NotificationConf `yaml:"joinGroupApplication"` + MemberQuit NotificationConf `yaml:"memberQuit"` + GroupApplicationAccepted NotificationConf `yaml:"groupApplicationAccepted"` + GroupApplicationRejected NotificationConf `yaml:"groupApplicationRejected"` + GroupOwnerTransferred NotificationConf `yaml:"groupOwnerTransferred"` + MemberKicked NotificationConf `yaml:"memberKicked"` + MemberInvited NotificationConf `yaml:"memberInvited"` + MemberEnter NotificationConf `yaml:"memberEnter"` + GroupDismissed NotificationConf `yaml:"groupDismissed"` + GroupMuted NotificationConf `yaml:"groupMuted"` + GroupCancelMuted NotificationConf `yaml:"groupCancelMuted"` + GroupMemberMuted NotificationConf `yaml:"groupMemberMuted"` + GroupMemberCancelMuted NotificationConf `yaml:"groupMemberCancelMuted"` + GroupMemberInfoSet NotificationConf `yaml:"groupMemberInfoSet"` + GroupMemberSetToAdmin NotificationConf `yaml:"groupMemberSetToAdmin"` + GroupMemberSetToOrdinary NotificationConf `yaml:"groupMemberSetToOrdinaryUser"` + GroupInfoSetAnnouncement NotificationConf `yaml:"groupInfoSetAnnouncement"` + GroupInfoSetName NotificationConf `yaml:"groupInfoSetName"` + ////////////////////////user/////////////////////// + UserInfoUpdated NotificationConf `yaml:"userInfoUpdated"` + //////////////////////friend/////////////////////// + FriendApplicationAdded NotificationConf `yaml:"friendApplicationAdded"` + FriendApplicationApproved NotificationConf `yaml:"friendApplicationApproved"` + FriendApplicationRejected NotificationConf `yaml:"friendApplicationRejected"` + FriendAdded NotificationConf `yaml:"friendAdded"` + FriendDeleted NotificationConf `yaml:"friendDeleted"` + FriendRemarkSet NotificationConf `yaml:"friendRemarkSet"` + BlackAdded NotificationConf `yaml:"blackAdded"` + BlackDeleted NotificationConf `yaml:"blackDeleted"` + FriendInfoUpdated NotificationConf `yaml:"friendInfoUpdated"` + //////////////////////conversation/////////////////////// + ConversationChanged NotificationConf `yaml:"conversationChanged"` + ConversationSetPrivate NotificationConf `yaml:"conversationSetPrivate"` +} + +func (c *configStruct) GetServiceNames() []string { + return []string{ + c.RpcRegisterName.OpenImUserName, + c.RpcRegisterName.OpenImFriendName, + c.RpcRegisterName.OpenImMsgName, + c.RpcRegisterName.OpenImPushName, + c.RpcRegisterName.OpenImMessageGatewayName, + c.RpcRegisterName.OpenImGroupName, + c.RpcRegisterName.OpenImAuthName, + c.RpcRegisterName.OpenImConversationName, + c.RpcRegisterName.OpenImThirdName, + } +} + +func (c *configStruct) RegisterConf2Registry(registry discoveryregistry.SvcDiscoveryRegistry) error { + data, err := yaml.Marshal(c) + if err != nil { + return err + } + return registry.RegisterConf2Registry(ConfKey, data) +} + +func (c *configStruct) GetConfFromRegistry(registry discoveryregistry.SvcDiscoveryRegistry) ([]byte, error) { + return registry.GetConfFromRegistry(ConfKey) +} + +func (c *configStruct) EncodeConfig() []byte { + buf := bytes.NewBuffer(nil) + if err := yaml.NewEncoder(buf).Encode(c); err != nil { + panic(err) + } + return buf.Bytes() +} diff --git a/pkg/common/config/parse.go b/pkg/common/config/parse.go index f31df39d2..e3fd99b9f 100644 --- a/pkg/common/config/parse.go +++ b/pkg/common/config/parse.go @@ -17,23 +17,18 @@ package config import ( _ "embed" "fmt" - "github.com/OpenIMSDK/tools/config" + "github.com/OpenIMSDK/Open-IM-Server/pkg/msgprocessor" "os" "path/filepath" "runtime" "gopkg.in/yaml.v3" - "github.com/OpenIMSDK/tools/constant" - "github.com/OpenIMSDK/tools/utils" + "github.com/OpenIMSDK/protocol/constant" ) //go:embed version -var version string - -func init() { - config.Version = version -} +var Version string var ( _, b, _, _ = runtime.Caller(0) @@ -47,20 +42,20 @@ const ( DefaultFolderPath = "../config/" ) -func GetOptionsByNotification(cfg config.NotificationConf) utils.Options { - opts := utils.NewOptions() +func GetOptionsByNotification(cfg NotificationConf) msgprocessor.Options { + opts := msgprocessor.NewOptions() if cfg.UnreadCount { - opts = utils.WithOptions(opts, utils.WithUnreadCount(true)) + opts = msgprocessor.WithOptions(opts, msgprocessor.WithUnreadCount(true)) } if cfg.OfflinePush.Enable { - opts = utils.WithOptions(opts, utils.WithOfflinePush(true)) + opts = msgprocessor.WithOptions(opts, msgprocessor.WithOfflinePush(true)) } switch cfg.ReliabilityLevel { case constant.UnreliableNotification: case constant.ReliableNotificationNoMsg: - opts = utils.WithOptions(opts, utils.WithHistory(true), utils.WithPersistent()) + opts = msgprocessor.WithOptions(opts, msgprocessor.WithHistory(true), msgprocessor.WithPersistent()) } - opts = utils.WithOptions(opts, utils.WithSendMsg(cfg.IsSendMsg)) + opts = msgprocessor.WithOptions(opts, msgprocessor.WithSendMsg(cfg.IsSendMsg)) return opts } @@ -92,11 +87,11 @@ func initConfig(config interface{}, configName, configFolderPath string) error { } func InitConfig(configFolderPath string) error { - err := initConfig(&config.Config, FileName, configFolderPath) + err := initConfig(&Config, FileName, configFolderPath) if err != nil { return err } - err = initConfig(&config.Config.Notification, NotificationFileName, configFolderPath) + err = initConfig(&Config.Notification, NotificationFileName, configFolderPath) if err != nil { return err } diff --git a/pkg/common/db/cache/init_redis.go b/pkg/common/db/cache/init_redis.go index 307e40327..69bc0d484 100644 --- a/pkg/common/db/cache/init_redis.go +++ b/pkg/common/db/cache/init_redis.go @@ -22,7 +22,7 @@ import ( "github.com/redis/go-redis/v9" - "github.com/OpenIMSDK/tools/config" + "github.com/OpenIMSDK/Open-IM-Server/pkg/common/config" "github.com/OpenIMSDK/tools/errs" "github.com/OpenIMSDK/tools/mw/specialerror" ) diff --git a/pkg/common/db/cache/msg.go b/pkg/common/db/cache/msg.go index 66f3cacee..953396fbe 100644 --- a/pkg/common/db/cache/msg.go +++ b/pkg/common/db/cache/msg.go @@ -16,6 +16,7 @@ package cache import ( "context" + "github.com/OpenIMSDK/Open-IM-Server/pkg/msgprocessor" "strconv" "time" @@ -25,10 +26,10 @@ import ( "github.com/gogo/protobuf/jsonpb" + "github.com/OpenIMSDK/Open-IM-Server/pkg/common/config" unRelationTb "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/table/unrelation" + "github.com/OpenIMSDK/protocol/constant" "github.com/OpenIMSDK/protocol/sdkws" - "github.com/OpenIMSDK/tools/config" - "github.com/OpenIMSDK/tools/constant" "github.com/OpenIMSDK/tools/log" "github.com/OpenIMSDK/tools/utils" @@ -374,7 +375,7 @@ func (c *msgCache) GetMessagesBySeq( failedSeqs = append(failedSeqs, seqs[i]) } else { msg := sdkws.MsgData{} - err = utils.String2Pb(cmd.Val(), &msg) + err = msgprocessor.String2Pb(cmd.Val(), &msg) if err == nil { if msg.Status != constant.MsgDeleted { seqMsgs = append(seqMsgs, &msg) @@ -394,7 +395,7 @@ func (c *msgCache) SetMessageToCache(ctx context.Context, conversationID string, var failedMsgs []*sdkws.MsgData for _, msg := range msgs { key := c.getMessageCacheKey(conversationID, msg.Seq) - s, err := utils.Pb2String(msg) + s, err := msgprocessor.Pb2String(msg) if err != nil { return 0, errs.Wrap(err) } @@ -535,7 +536,7 @@ func (c *msgCache) DelMsgFromCache(ctx context.Context, userID string, seqs []in return err } msg.Status = constant.MsgDeleted - s, err := utils.Pb2String(&msg) + s, err := msgprocessor.Pb2String(&msg) if err != nil { return errs.Wrap(err) } diff --git a/pkg/common/db/controller/auth.go b/pkg/common/db/controller/auth.go index 491a1394b..d864e078b 100644 --- a/pkg/common/db/controller/auth.go +++ b/pkg/common/db/controller/auth.go @@ -16,11 +16,12 @@ package controller import ( "context" + "github.com/OpenIMSDK/Open-IM-Server/pkg/authverify" "github.com/golang-jwt/jwt/v4" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/cache" - "github.com/OpenIMSDK/tools/constant" + "github.com/OpenIMSDK/protocol/constant" "github.com/OpenIMSDK/tools/tokenverify" "github.com/OpenIMSDK/tools/utils" ) @@ -60,7 +61,7 @@ func (a *authDatabase) CreateToken(ctx context.Context, userID string, platformI } var deleteTokenKey []string for k, v := range tokens { - _, err = tokenverify.GetClaimFromToken(k) + _, err = tokenverify.GetClaimFromToken(k, authverify.Secret()) if err != nil || v != constant.NormalToken { deleteTokenKey = append(deleteTokenKey, k) } diff --git a/pkg/common/db/controller/conversation.go b/pkg/common/db/controller/conversation.go index 0f3403084..2829f963e 100644 --- a/pkg/common/db/controller/conversation.go +++ b/pkg/common/db/controller/conversation.go @@ -16,11 +16,12 @@ package controller import ( "context" + "github.com/OpenIMSDK/Open-IM-Server/pkg/msgprocessor" "time" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/cache" relationTb "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/table/relation" - "github.com/OpenIMSDK/tools/constant" + "github.com/OpenIMSDK/protocol/constant" "github.com/OpenIMSDK/tools/log" "github.com/OpenIMSDK/tools/tx" "github.com/OpenIMSDK/tools/utils" @@ -236,7 +237,7 @@ func (c *conversationDatabase) FindRecvMsgNotNotifyUserIDs(ctx context.Context, func (c *conversationDatabase) CreateGroupChatConversation(ctx context.Context, groupID string, userIDs []string) error { cache := c.cache.NewCache() - conversationID := utils.GetConversationIDBySessionType(constant.SuperGroupChatType, groupID) + conversationID := msgprocessor.GetConversationIDBySessionType(constant.SuperGroupChatType, groupID) if err := c.tx.Transaction(func(tx any) error { existConversationUserIDs, err := c.conversationDB.FindUserID(ctx, userIDs, []string{conversationID}) if err != nil { diff --git a/pkg/common/db/controller/friend.go b/pkg/common/db/controller/friend.go index 3c8d61a40..c44c1662e 100644 --- a/pkg/common/db/controller/friend.go +++ b/pkg/common/db/controller/friend.go @@ -22,7 +22,7 @@ import ( "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/cache" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/table/relation" - "github.com/OpenIMSDK/tools/constant" + "github.com/OpenIMSDK/protocol/constant" "github.com/OpenIMSDK/tools/errs" "github.com/OpenIMSDK/tools/mcontext" "github.com/OpenIMSDK/tools/tx" diff --git a/pkg/common/db/controller/group.go b/pkg/common/db/controller/group.go index ad0b4e548..af97d87ca 100644 --- a/pkg/common/db/controller/group.go +++ b/pkg/common/db/controller/group.go @@ -29,7 +29,7 @@ import ( relationTb "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/table/relation" unRelationTb "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/table/unrelation" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/unrelation" - "github.com/OpenIMSDK/tools/constant" + "github.com/OpenIMSDK/protocol/constant" "github.com/OpenIMSDK/tools/tx" "github.com/OpenIMSDK/tools/utils" ) diff --git a/pkg/common/db/controller/msg.go b/pkg/common/db/controller/msg.go index 555828c22..7c03eb8b6 100644 --- a/pkg/common/db/controller/msg.go +++ b/pkg/common/db/controller/msg.go @@ -21,13 +21,13 @@ import ( "github.com/redis/go-redis/v9" + "github.com/OpenIMSDK/Open-IM-Server/pkg/common/config" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/convert" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/cache" unRelationTb "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/table/unrelation" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/unrelation" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/kafka" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/prome" - "github.com/OpenIMSDK/tools/config" "github.com/OpenIMSDK/tools/errs" "github.com/OpenIMSDK/tools/log" diff --git a/pkg/common/db/controller/msg_test.go b/pkg/common/db/controller/msg_test.go index e322e6218..73226fa1b 100644 --- a/pkg/common/db/controller/msg_test.go +++ b/pkg/common/db/controller/msg_test.go @@ -27,9 +27,9 @@ import ( "go.mongodb.org/mongo-driver/bson" + "github.com/OpenIMSDK/Open-IM-Server/pkg/common/config" unRelationTb "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/table/unrelation" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/unrelation" - "github.com/OpenIMSDK/tools/config" ) func Test_BatchInsertChat2DB(t *testing.T) { @@ -203,7 +203,7 @@ func Test_Revoke(t *testing.T) { } func Test_FindBySeq(t *testing.T) { - if err := log.InitFromConfig("", "", 6, true, false, "", 2); err != nil { + if err := log.InitFromConfig("", "", 6, true, false, "", 2, 1); err != nil { t.Fatal(err) } db := GetDB() diff --git a/pkg/common/db/relation/chat_log_model.go b/pkg/common/db/relation/chat_log_model.go index 056295e15..76ed9be62 100644 --- a/pkg/common/db/relation/chat_log_model.go +++ b/pkg/common/db/relation/chat_log_model.go @@ -21,9 +21,9 @@ import ( "gorm.io/gorm" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/table/relation" + "github.com/OpenIMSDK/protocol/constant" pbMsg "github.com/OpenIMSDK/protocol/msg" sdkws "github.com/OpenIMSDK/protocol/sdkws" - "github.com/OpenIMSDK/tools/constant" "github.com/OpenIMSDK/tools/utils" ) diff --git a/pkg/common/db/relation/conversation_model.go b/pkg/common/db/relation/conversation_model.go index 716d2cbe4..0efca79aa 100644 --- a/pkg/common/db/relation/conversation_model.go +++ b/pkg/common/db/relation/conversation_model.go @@ -20,7 +20,7 @@ import ( "gorm.io/gorm" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/table/relation" - "github.com/OpenIMSDK/tools/constant" + "github.com/OpenIMSDK/protocol/constant" "github.com/OpenIMSDK/tools/utils" ) diff --git a/pkg/common/db/relation/group_member_model.go b/pkg/common/db/relation/group_member_model.go index 7c2ded83f..da6a58398 100644 --- a/pkg/common/db/relation/group_member_model.go +++ b/pkg/common/db/relation/group_member_model.go @@ -20,7 +20,7 @@ import ( "gorm.io/gorm" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/table/relation" - "github.com/OpenIMSDK/tools/constant" + "github.com/OpenIMSDK/protocol/constant" "github.com/OpenIMSDK/tools/ormutil" "github.com/OpenIMSDK/tools/utils" ) diff --git a/pkg/common/db/relation/group_model.go b/pkg/common/db/relation/group_model.go index c95d51861..697427e04 100644 --- a/pkg/common/db/relation/group_model.go +++ b/pkg/common/db/relation/group_model.go @@ -18,7 +18,7 @@ import ( "context" "time" - "github.com/OpenIMSDK/tools/constant" + "github.com/OpenIMSDK/protocol/constant" "gorm.io/gorm" diff --git a/pkg/common/db/relation/mysql_init.go b/pkg/common/db/relation/mysql_init.go index 29873cc89..9b8188ac4 100644 --- a/pkg/common/db/relation/mysql_init.go +++ b/pkg/common/db/relation/mysql_init.go @@ -21,7 +21,7 @@ import ( mysqlDriver "github.com/go-sql-driver/mysql" "gorm.io/driver/mysql" - "github.com/OpenIMSDK/tools/config" + "github.com/OpenIMSDK/Open-IM-Server/pkg/common/config" "github.com/OpenIMSDK/tools/errs" "github.com/OpenIMSDK/tools/log" "github.com/OpenIMSDK/tools/mw/specialerror" diff --git a/pkg/common/db/s3/cos/cos.go b/pkg/common/db/s3/cos/cos.go index 29d74ceb4..cfdaaa5e4 100644 --- a/pkg/common/db/s3/cos/cos.go +++ b/pkg/common/db/s3/cos/cos.go @@ -26,8 +26,8 @@ import ( "github.com/tencentyun/cos-go-sdk-v5" + "github.com/OpenIMSDK/Open-IM-Server/pkg/common/config" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/s3" - "github.com/OpenIMSDK/tools/config" ) const ( diff --git a/pkg/common/db/s3/minio/minio.go b/pkg/common/db/s3/minio/minio.go index d5ac7de40..bb6e6ce24 100644 --- a/pkg/common/db/s3/minio/minio.go +++ b/pkg/common/db/s3/minio/minio.go @@ -29,8 +29,8 @@ import ( "github.com/minio/minio-go/v7/pkg/credentials" "github.com/minio/minio-go/v7/pkg/signer" + "github.com/OpenIMSDK/Open-IM-Server/pkg/common/config" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/s3" - "github.com/OpenIMSDK/tools/config" ) const ( diff --git a/pkg/common/db/s3/oss/oss.go b/pkg/common/db/s3/oss/oss.go index ee4d19464..774150389 100644 --- a/pkg/common/db/s3/oss/oss.go +++ b/pkg/common/db/s3/oss/oss.go @@ -26,8 +26,8 @@ import ( "github.com/aliyun/aliyun-oss-go-sdk/oss" + "github.com/OpenIMSDK/Open-IM-Server/pkg/common/config" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/s3" - "github.com/OpenIMSDK/tools/config" ) const ( diff --git a/pkg/common/db/unrelation/mongo.go b/pkg/common/db/unrelation/mongo.go index 44077a838..b580f4dbd 100644 --- a/pkg/common/db/unrelation/mongo.go +++ b/pkg/common/db/unrelation/mongo.go @@ -24,8 +24,8 @@ import ( "go.mongodb.org/mongo-driver/mongo" "go.mongodb.org/mongo-driver/mongo/options" + "github.com/OpenIMSDK/Open-IM-Server/pkg/common/config" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/table/unrelation" - "github.com/OpenIMSDK/tools/config" "github.com/OpenIMSDK/tools/errs" "github.com/OpenIMSDK/tools/mw/specialerror" "github.com/OpenIMSDK/tools/utils" diff --git a/pkg/common/db/unrelation/msg.go b/pkg/common/db/unrelation/msg.go index 2f4a166e9..27f7cf5ce 100644 --- a/pkg/common/db/unrelation/msg.go +++ b/pkg/common/db/unrelation/msg.go @@ -23,7 +23,7 @@ import ( "github.com/OpenIMSDK/protocol/msg" - "github.com/OpenIMSDK/tools/constant" + "github.com/OpenIMSDK/protocol/constant" "go.mongodb.org/mongo-driver/bson" "go.mongodb.org/mongo-driver/bson/primitive" diff --git a/pkg/common/http/http_client.go b/pkg/common/http/http_client.go index 46d5f23c3..a646f774e 100644 --- a/pkg/common/http/http_client.go +++ b/pkg/common/http/http_client.go @@ -25,8 +25,8 @@ import ( "time" "github.com/OpenIMSDK/Open-IM-Server/pkg/callbackstruct" - "github.com/OpenIMSDK/tools/config" - "github.com/OpenIMSDK/tools/constant" + "github.com/OpenIMSDK/Open-IM-Server/pkg/common/config" + "github.com/OpenIMSDK/protocol/constant" "github.com/OpenIMSDK/tools/errs" "github.com/OpenIMSDK/tools/log" ) diff --git a/pkg/common/kafka/consumer.go b/pkg/common/kafka/consumer.go index e04abe944..67bc3977b 100644 --- a/pkg/common/kafka/consumer.go +++ b/pkg/common/kafka/consumer.go @@ -17,7 +17,7 @@ package kafka import ( "sync" - "github.com/OpenIMSDK/tools/config" + "github.com/OpenIMSDK/Open-IM-Server/pkg/common/config" "github.com/Shopify/sarama" ) diff --git a/pkg/common/kafka/producer.go b/pkg/common/kafka/producer.go index 8eeaa6825..754f2166d 100644 --- a/pkg/common/kafka/producer.go +++ b/pkg/common/kafka/producer.go @@ -19,8 +19,8 @@ import ( "errors" "time" - "github.com/OpenIMSDK/tools/config" - "github.com/OpenIMSDK/tools/constant" + "github.com/OpenIMSDK/Open-IM-Server/pkg/common/config" + "github.com/OpenIMSDK/protocol/constant" log "github.com/OpenIMSDK/tools/log" "github.com/OpenIMSDK/tools/mcontext" "github.com/OpenIMSDK/tools/utils" diff --git a/pkg/common/prome/prometheus.go b/pkg/common/prome/prometheus.go index 26efb9dae..d66b1df70 100644 --- a/pkg/common/prome/prometheus.go +++ b/pkg/common/prome/prometheus.go @@ -19,7 +19,7 @@ import ( "net/http" "strconv" - "github.com/OpenIMSDK/tools/config" + "github.com/OpenIMSDK/Open-IM-Server/pkg/common/config" "github.com/gin-gonic/gin" "github.com/prometheus/client_golang/prometheus" diff --git a/pkg/common/startrpc/start.go b/pkg/common/startrpc/start.go new file mode 100644 index 000000000..d78aa1ff4 --- /dev/null +++ b/pkg/common/startrpc/start.go @@ -0,0 +1,112 @@ +// 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. + +package startrpc + +import ( + "fmt" + "github.com/OpenIMSDK/Open-IM-Server/pkg/common/config" + "net" + "strconv" + "time" + + grpcPrometheus "github.com/grpc-ecosystem/go-grpc-prometheus" + "google.golang.org/grpc" + "google.golang.org/grpc/credentials/insecure" + + "github.com/OpenIMSDK/tools/discoveryregistry" + "github.com/OpenIMSDK/tools/discoveryregistry/zookeeper" + "github.com/OpenIMSDK/tools/log" + "github.com/OpenIMSDK/tools/mw" + "github.com/OpenIMSDK/tools/network" + "github.com/OpenIMSDK/tools/prome" + "github.com/OpenIMSDK/tools/utils" +) + +func Start( + rpcPort int, + rpcRegisterName string, + prometheusPort int, + rpcFn func(client discoveryregistry.SvcDiscoveryRegistry, server *grpc.Server) error, + options ...grpc.ServerOption, +) error { + fmt.Println( + "start", + rpcRegisterName, + "server, port: ", + rpcPort, + "prometheusPort:", + prometheusPort, + ", OpenIM version: ", + config.Version, + ) + listener, err := net.Listen( + "tcp", + net.JoinHostPort(network.GetListenIP(config.Config.Rpc.ListenIP), strconv.Itoa(rpcPort)), + ) + if err != nil { + return err + } + defer listener.Close() + zkClient, err := zookeeper.NewClient(config.Config.Zookeeper.ZkAddr, config.Config.Zookeeper.Schema, + zookeeper.WithFreq(time.Hour), zookeeper.WithUserNameAndPassword( + config.Config.Zookeeper.Username, + config.Config.Zookeeper.Password, + ), zookeeper.WithRoundRobin(), zookeeper.WithTimeout(10), zookeeper.WithLogger(log.NewZkLogger())) + if err != nil { + return utils.Wrap1(err) + } + defer zkClient.CloseZK() + zkClient.AddOption(mw.GrpcClient(), grpc.WithTransportCredentials(insecure.NewCredentials())) + registerIP, err := network.GetRpcRegisterIP(config.Config.Rpc.RegisterIP) + if err != nil { + return err + } + // ctx 中间件 + if config.Config.Prometheus.Enable { + prome.NewGrpcRequestCounter() + prome.NewGrpcRequestFailedCounter() + prome.NewGrpcRequestSuccessCounter() + unaryInterceptor := mw.InterceptChain(grpcPrometheus.UnaryServerInterceptor, mw.RpcServerInterceptor) + options = append(options, []grpc.ServerOption{ + grpc.StreamInterceptor(grpcPrometheus.StreamServerInterceptor), + grpc.UnaryInterceptor(unaryInterceptor), + }...) + } else { + options = append(options, mw.GrpcServer()) + } + srv := grpc.NewServer(options...) + defer srv.GracefulStop() + err = rpcFn(zkClient, srv) + if err != nil { + return utils.Wrap1(err) + } + err = zkClient.Register( + rpcRegisterName, + registerIP, + rpcPort, + grpc.WithTransportCredentials(insecure.NewCredentials()), + ) + if err != nil { + return utils.Wrap1(err) + } + go func() { + if config.Config.Prometheus.Enable && prometheusPort != 0 { + if err := prome.StartPrometheusSrv(prometheusPort); err != nil { + panic(err.Error()) + } + } + }() + return utils.Wrap1(srv.Serve(listener)) +} diff --git a/pkg/msgprocessor/conversation.go b/pkg/msgprocessor/conversation.go new file mode 100644 index 000000000..b24794af8 --- /dev/null +++ b/pkg/msgprocessor/conversation.go @@ -0,0 +1,158 @@ +package msgprocessor + +import ( + "github.com/OpenIMSDK/protocol/constant" + "github.com/OpenIMSDK/protocol/sdkws" + "google.golang.org/protobuf/proto" + "sort" + "strings" +) + +func GetNotificationConversationID(msg *sdkws.MsgData) string { + switch msg.SessionType { + case constant.SingleChatType: + l := []string{msg.SendID, msg.RecvID} + sort.Strings(l) + return "n_" + strings.Join(l, "_") + case constant.GroupChatType: + return "n_" + msg.GroupID + case constant.SuperGroupChatType: + return "n_" + msg.GroupID + case constant.NotificationChatType: + return "n_" + msg.SendID + "_" + msg.RecvID + } + return "" +} + +func GetChatConversationIDByMsg(msg *sdkws.MsgData) string { + switch msg.SessionType { + case constant.SingleChatType: + l := []string{msg.SendID, msg.RecvID} + sort.Strings(l) + return "si_" + strings.Join(l, "_") + case constant.GroupChatType: + return "g_" + msg.GroupID + case constant.SuperGroupChatType: + return "sg_" + msg.GroupID + case constant.NotificationChatType: + return "sn_" + msg.SendID + "_" + msg.RecvID + } + return "" +} + +func GenConversationUniqueKey(msg *sdkws.MsgData) string { + switch msg.SessionType { + case constant.SingleChatType, constant.NotificationChatType: + l := []string{msg.SendID, msg.RecvID} + sort.Strings(l) + return strings.Join(l, "_") + case constant.SuperGroupChatType: + return msg.GroupID + } + return "" +} + +func GetConversationIDByMsg(msg *sdkws.MsgData) string { + options := Options(msg.Options) + switch msg.SessionType { + case constant.SingleChatType: + l := []string{msg.SendID, msg.RecvID} + sort.Strings(l) + if !options.IsNotNotification() { + return "n_" + strings.Join(l, "_") + } + return "si_" + strings.Join(l, "_") // single chat + case constant.GroupChatType: + if !options.IsNotNotification() { + return "n_" + msg.GroupID // group chat + } + return "g_" + msg.GroupID // group chat + case constant.SuperGroupChatType: + if !options.IsNotNotification() { + return "n_" + msg.GroupID // super group chat + } + return "sg_" + msg.GroupID // super group chat + case constant.NotificationChatType: + if !options.IsNotNotification() { + return "n_" + msg.SendID + "_" + msg.RecvID // super group chat + } + return "sn_" + msg.SendID + "_" + msg.RecvID // server notification chat + } + return "" +} + +func GetConversationIDBySessionType(sessionType int, ids ...string) string { + sort.Strings(ids) + if len(ids) > 2 || len(ids) < 1 { + return "" + } + switch sessionType { + case constant.SingleChatType: + return "si_" + strings.Join(ids, "_") // single chat + case constant.GroupChatType: + return "g_" + ids[0] // group chat + case constant.SuperGroupChatType: + return "sg_" + ids[0] // super group chat + case constant.NotificationChatType: + return "sn_" + ids[0] // server notification chat + } + return "" +} + +func IsNotification(conversationID string) bool { + return strings.HasPrefix(conversationID, "n_") +} + +func IsNotificationByMsg(msg *sdkws.MsgData) bool { + return !Options(msg.Options).IsNotNotification() +} + +func ParseConversationID(msg *sdkws.MsgData) (isNotification bool, conversationID string) { + options := Options(msg.Options) + switch msg.SessionType { + case constant.SingleChatType: + l := []string{msg.SendID, msg.RecvID} + sort.Strings(l) + if !options.IsNotNotification() { + return true, "n_" + strings.Join(l, "_") + } + return false, "si_" + strings.Join(l, "_") // single chat + case constant.SuperGroupChatType: + if !options.IsNotNotification() { + return true, "n_" + msg.GroupID // super group chat + } + return false, "sg_" + msg.GroupID // super group chat + case constant.NotificationChatType: + if !options.IsNotNotification() { + return true, "n_" + msg.SendID + "_" + msg.RecvID // super group chat + } + return false, "sn_" + msg.SendID + "_" + msg.RecvID // server notification chat + } + return false, "" +} + +type MsgBySeq []*sdkws.MsgData + +func (s MsgBySeq) Len() int { + return len(s) +} + +func (s MsgBySeq) Less(i, j int) bool { + return s[i].Seq < s[j].Seq +} + +func (s MsgBySeq) Swap(i, j int) { + s[i], s[j] = s[j], s[i] +} + +func Pb2String(pb proto.Message) (string, error) { + s, err := proto.Marshal(pb) + if err != nil { + return "", err + } + return string(s), nil +} + +func String2Pb(s string, pb proto.Message) error { + return proto.Unmarshal([]byte(s), pb) +} diff --git a/pkg/msgprocessor/options.go b/pkg/msgprocessor/options.go new file mode 100644 index 000000000..920a6a2ea --- /dev/null +++ b/pkg/msgprocessor/options.go @@ -0,0 +1,181 @@ +// 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. + +package msgprocessor + +import "github.com/OpenIMSDK/protocol/constant" + +type Options map[string]bool +type OptionsOpt func(Options) + +func NewOptions(opts ...OptionsOpt) Options { + options := make(map[string]bool, 11) + options[constant.IsNotNotification] = false + options[constant.IsSendMsg] = false + options[constant.IsHistory] = false + options[constant.IsPersistent] = false + options[constant.IsOfflinePush] = false + options[constant.IsUnreadCount] = false + options[constant.IsConversationUpdate] = false + options[constant.IsSenderSync] = false + options[constant.IsNotPrivate] = false + options[constant.IsSenderConversationUpdate] = false + options[constant.IsSenderNotificationPush] = false + options[constant.IsReactionFromCache] = false + for _, opt := range opts { + opt(options) + } + return options +} + +func NewMsgOptions() Options { + options := make(map[string]bool, 11) + options[constant.IsOfflinePush] = false + return make(map[string]bool) +} + +func WithOptions(options Options, opts ...OptionsOpt) Options { + for _, opt := range opts { + opt(options) + } + return options +} + +func WithNotNotification(b bool) OptionsOpt { + return func(options Options) { + options[constant.IsNotNotification] = b + } +} + +func WithSendMsg(b bool) OptionsOpt { + return func(options Options) { + options[constant.IsSendMsg] = b + } +} + +func WithHistory(b bool) OptionsOpt { + return func(options Options) { + options[constant.IsHistory] = b + } +} + +func WithPersistent() OptionsOpt { + return func(options Options) { + options[constant.IsPersistent] = true + } +} + +func WithOfflinePush(b bool) OptionsOpt { + return func(options Options) { + options[constant.IsOfflinePush] = b + } +} + +func WithUnreadCount(b bool) OptionsOpt { + return func(options Options) { + options[constant.IsUnreadCount] = b + } +} + +func WithConversationUpdate() OptionsOpt { + return func(options Options) { + options[constant.IsConversationUpdate] = true + } +} + +func WithSenderSync() OptionsOpt { + return func(options Options) { + options[constant.IsSenderSync] = true + } +} + +func WithNotPrivate() OptionsOpt { + return func(options Options) { + options[constant.IsNotPrivate] = true + } +} + +func WithSenderConversationUpdate() OptionsOpt { + return func(options Options) { + options[constant.IsSenderConversationUpdate] = true + } +} + +func WithSenderNotificationPush() OptionsOpt { + return func(options Options) { + options[constant.IsSenderNotificationPush] = true + } +} + +func WithReactionFromCache() OptionsOpt { + return func(options Options) { + options[constant.IsReactionFromCache] = true + } +} + +func (o Options) Is(notification string) bool { + v, ok := o[notification] + if !ok || v { + return true + } + return false +} + +func (o Options) IsNotNotification() bool { + return o.Is(constant.IsNotNotification) +} + +func (o Options) IsSendMsg() bool { + return o.Is(constant.IsSendMsg) +} + +func (o Options) IsHistory() bool { + return o.Is(constant.IsHistory) +} + +func (o Options) IsPersistent() bool { + return o.Is(constant.IsPersistent) +} + +func (o Options) IsOfflinePush() bool { + return o.Is(constant.IsOfflinePush) +} + +func (o Options) IsUnreadCount() bool { + return o.Is(constant.IsUnreadCount) +} + +func (o Options) IsConversationUpdate() bool { + return o.Is(constant.IsConversationUpdate) +} + +func (o Options) IsSenderSync() bool { + return o.Is(constant.IsSenderSync) +} + +func (o Options) IsNotPrivate() bool { + return o.Is(constant.IsNotPrivate) +} + +func (o Options) IsSenderConversationUpdate() bool { + return o.Is(constant.IsSenderConversationUpdate) +} + +func (o Options) IsSenderNotificationPush() bool { + return o.Is(constant.IsSenderNotificationPush) +} + +func (o Options) IsReactionFromCache() bool { + return o.Is(constant.IsReactionFromCache) +} diff --git a/pkg/rpcclient/auth.go b/pkg/rpcclient/auth.go index 9d667f1ad..cbf1324e0 100644 --- a/pkg/rpcclient/auth.go +++ b/pkg/rpcclient/auth.go @@ -19,8 +19,8 @@ import ( "google.golang.org/grpc" + "github.com/OpenIMSDK/Open-IM-Server/pkg/common/config" "github.com/OpenIMSDK/protocol/auth" - "github.com/OpenIMSDK/tools/config" "github.com/OpenIMSDK/tools/discoveryregistry" ) diff --git a/pkg/rpcclient/conversation.go b/pkg/rpcclient/conversation.go index d4116e9f9..2b7d2c392 100644 --- a/pkg/rpcclient/conversation.go +++ b/pkg/rpcclient/conversation.go @@ -20,8 +20,8 @@ import ( "google.golang.org/grpc" + "github.com/OpenIMSDK/Open-IM-Server/pkg/common/config" pbConversation "github.com/OpenIMSDK/protocol/conversation" - "github.com/OpenIMSDK/tools/config" "github.com/OpenIMSDK/tools/discoveryregistry" "github.com/OpenIMSDK/tools/errs" ) diff --git a/pkg/rpcclient/friend.go b/pkg/rpcclient/friend.go index c27f4ef3f..f1aaaa319 100644 --- a/pkg/rpcclient/friend.go +++ b/pkg/rpcclient/friend.go @@ -19,9 +19,9 @@ import ( "google.golang.org/grpc" + "github.com/OpenIMSDK/Open-IM-Server/pkg/common/config" "github.com/OpenIMSDK/protocol/friend" sdkws "github.com/OpenIMSDK/protocol/sdkws" - "github.com/OpenIMSDK/tools/config" "github.com/OpenIMSDK/tools/discoveryregistry" ) diff --git a/pkg/rpcclient/group.go b/pkg/rpcclient/group.go index ce624a085..57dcd0fa5 100644 --- a/pkg/rpcclient/group.go +++ b/pkg/rpcclient/group.go @@ -20,10 +20,10 @@ import ( "google.golang.org/grpc" + "github.com/OpenIMSDK/Open-IM-Server/pkg/common/config" + "github.com/OpenIMSDK/protocol/constant" "github.com/OpenIMSDK/protocol/group" "github.com/OpenIMSDK/protocol/sdkws" - "github.com/OpenIMSDK/tools/config" - "github.com/OpenIMSDK/tools/constant" "github.com/OpenIMSDK/tools/discoveryregistry" "github.com/OpenIMSDK/tools/errs" "github.com/OpenIMSDK/tools/utils" diff --git a/pkg/rpcclient/msg.go b/pkg/rpcclient/msg.go index bfc7bf73f..8e9416af9 100644 --- a/pkg/rpcclient/msg.go +++ b/pkg/rpcclient/msg.go @@ -21,10 +21,10 @@ import ( "google.golang.org/grpc" "google.golang.org/protobuf/proto" + "github.com/OpenIMSDK/Open-IM-Server/pkg/common/config" + "github.com/OpenIMSDK/protocol/constant" "github.com/OpenIMSDK/protocol/msg" "github.com/OpenIMSDK/protocol/sdkws" - "github.com/OpenIMSDK/tools/config" - "github.com/OpenIMSDK/tools/constant" "github.com/OpenIMSDK/tools/discoveryregistry" "github.com/OpenIMSDK/tools/log" "github.com/OpenIMSDK/tools/utils" diff --git a/pkg/rpcclient/notification/conevrsation.go b/pkg/rpcclient/notification/conevrsation.go index ac40eb887..9c8066d00 100644 --- a/pkg/rpcclient/notification/conevrsation.go +++ b/pkg/rpcclient/notification/conevrsation.go @@ -18,8 +18,8 @@ import ( "context" "github.com/OpenIMSDK/Open-IM-Server/pkg/rpcclient" + "github.com/OpenIMSDK/protocol/constant" "github.com/OpenIMSDK/protocol/sdkws" - "github.com/OpenIMSDK/tools/constant" ) type ConversationNotificationSender struct { diff --git a/pkg/rpcclient/notification/friend.go b/pkg/rpcclient/notification/friend.go index 05c2b1e6f..ddce86c8c 100644 --- a/pkg/rpcclient/notification/friend.go +++ b/pkg/rpcclient/notification/friend.go @@ -23,9 +23,9 @@ import ( "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/controller" relationTb "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/table/relation" "github.com/OpenIMSDK/Open-IM-Server/pkg/rpcclient" + "github.com/OpenIMSDK/protocol/constant" pbFriend "github.com/OpenIMSDK/protocol/friend" "github.com/OpenIMSDK/protocol/sdkws" - "github.com/OpenIMSDK/tools/constant" ) type FriendNotificationSender struct { diff --git a/pkg/rpcclient/notification/group.go b/pkg/rpcclient/notification/group.go index e70bf38e1..fdf77500f 100644 --- a/pkg/rpcclient/notification/group.go +++ b/pkg/rpcclient/notification/group.go @@ -21,9 +21,9 @@ import ( "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/controller" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/table/relation" "github.com/OpenIMSDK/Open-IM-Server/pkg/rpcclient" + "github.com/OpenIMSDK/protocol/constant" pbGroup "github.com/OpenIMSDK/protocol/group" "github.com/OpenIMSDK/protocol/sdkws" - "github.com/OpenIMSDK/tools/constant" "github.com/OpenIMSDK/tools/errs" "github.com/OpenIMSDK/tools/log" "github.com/OpenIMSDK/tools/mcontext" diff --git a/pkg/rpcclient/notification/msg.go b/pkg/rpcclient/notification/msg.go index f9cf68bcb..ba5aef684 100644 --- a/pkg/rpcclient/notification/msg.go +++ b/pkg/rpcclient/notification/msg.go @@ -18,8 +18,8 @@ import ( "context" "github.com/OpenIMSDK/Open-IM-Server/pkg/rpcclient" + "github.com/OpenIMSDK/protocol/constant" "github.com/OpenIMSDK/protocol/sdkws" - "github.com/OpenIMSDK/tools/constant" ) type MsgNotificationSender struct { diff --git a/pkg/rpcclient/push.go b/pkg/rpcclient/push.go index a4b122a29..4401221c3 100644 --- a/pkg/rpcclient/push.go +++ b/pkg/rpcclient/push.go @@ -19,8 +19,8 @@ import ( "google.golang.org/grpc" + "github.com/OpenIMSDK/Open-IM-Server/pkg/common/config" "github.com/OpenIMSDK/protocol/push" - "github.com/OpenIMSDK/tools/config" "github.com/OpenIMSDK/tools/discoveryregistry" ) diff --git a/pkg/rpcclient/third.go b/pkg/rpcclient/third.go index 9822f48fa..c01ab4d0c 100644 --- a/pkg/rpcclient/third.go +++ b/pkg/rpcclient/third.go @@ -23,8 +23,8 @@ import ( "google.golang.org/grpc" + "github.com/OpenIMSDK/Open-IM-Server/pkg/common/config" "github.com/OpenIMSDK/protocol/third" - "github.com/OpenIMSDK/tools/config" "github.com/OpenIMSDK/tools/discoveryregistry" ) diff --git a/pkg/rpcclient/user.go b/pkg/rpcclient/user.go index 7e5079f8c..1ce4fd53c 100644 --- a/pkg/rpcclient/user.go +++ b/pkg/rpcclient/user.go @@ -16,16 +16,16 @@ package rpcclient import ( "context" + "github.com/OpenIMSDK/Open-IM-Server/pkg/authverify" "strings" "google.golang.org/grpc" + "github.com/OpenIMSDK/Open-IM-Server/pkg/common/config" "github.com/OpenIMSDK/protocol/sdkws" "github.com/OpenIMSDK/protocol/user" - "github.com/OpenIMSDK/tools/config" "github.com/OpenIMSDK/tools/discoveryregistry" "github.com/OpenIMSDK/tools/errs" - "github.com/OpenIMSDK/tools/tokenverify" "github.com/OpenIMSDK/tools/utils" ) @@ -144,7 +144,7 @@ func (u *UserRpcClient) Access(ctx context.Context, ownerUserID string) error { if err != nil { return err } - return tokenverify.CheckAccessV3(ctx, ownerUserID) + return authverify.CheckAccessV3(ctx, ownerUserID) } func (u *UserRpcClient) GetAllUserIDs(ctx context.Context, pageNumber, showNumber int32) ([]string, error) { From 8a77306de7aa319a8030cdb8f41f4baad72da187 Mon Sep 17 00:00:00 2001 From: Xinwei Xiong <3293172751@qq.com> Date: Thu, 27 Jul 2023 12:31:06 +0800 Subject: [PATCH 13/61] feat: add openim log (#679) * feat: add openim log Signed-off-by: Xinwei Xiong(cubxxw-openim) <3293172751nss@gmail.com> * feat: add openim install scripts Signed-off-by: Xinwei Xiong(cubxxw-openim) <3293172751nss@gmail.com> * fix: config env command Signed-off-by: Xinwei Xiong(cubxxw-openim) <3293172751nss@gmail.com> * fix: config env command Signed-off-by: Xinwei Xiong(cubxxw-openim) <3293172751nss@gmail.com> --------- Signed-off-by: Xinwei Xiong(cubxxw-openim) <3293172751nss@gmail.com> --- .goreleaser.yaml | 37 +-- Makefile | 10 + config/config.yaml | 20 +- install.sh | 560 ++++++++++++++++++++++++++++++++ scripts/advertise.sh | 122 +++++++ scripts/make-rules/copyright.mk | 6 + scripts/make-rules/golang.mk | 6 + scripts/style_info.sh | 2 + 8 files changed, 733 insertions(+), 30 deletions(-) create mode 100755 install.sh create mode 100755 scripts/advertise.sh diff --git a/.goreleaser.yaml b/.goreleaser.yaml index cbb9ba483..996a53745 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -343,11 +343,11 @@ dockers: use: buildx build_flag_templates: - "--pull" - - "--label=io.artifacthub.package.readme-url=https://raw.githubusercontent.com/goreleaser/goreleaser/main/README.md" - - "--label=io.artifacthub.package.logo-url=https://goreleaser.com/static/avatar.png" - - '--label=io.artifacthub.package.maintainers=[{"name":"Carlos Alexandro Becker","email":"carlos@carlosbecker.dev"}]' - - "--label=io.artifacthub.package.license=MIT" - - "--label=org.opencontainers.image.description=Deliver Go binaries as fast and easily as possible" + - "--label=io.artifacthub.package.readme-url=https://raw.githubusercontent.com/OpenIMSDK/Open-IM-Server/main/README.md" + - "--label=io.artifacthub.package.logo-url=hhttps://github.com/OpenIMSDK/Open-IM-Server/blob/main/assets/logo/openim-logo-green.png" + - '--label=io.artifacthub.package.maintainers=[{"name":"Xinwei Xiong","email":"3293172751nss@gmail.com"}]' + - "--label=io.artifacthub.package.license=Apace-2.0" + - "--label=org.opencontainers.image.description=OpenIM Open source top instant messaging system" - "--label=org.opencontainers.image.created={{.Date}}" - "--label=org.opencontainers.image.name={{.ProjectName}}" - "--label=org.opencontainers.image.revision={{.FullCommit}}" @@ -363,11 +363,11 @@ dockers: use: buildx build_flag_templates: - "--pull" - - "--label=io.artifacthub.package.readme-url=https://raw.githubusercontent.com/goreleaser/goreleaser/main/README.md" - - "--label=io.artifacthub.package.logo-url=https://goreleaser.com/static/avatar.png" - - '--label=io.artifacthub.package.maintainers=[{"name":"Carlos Alexandro Becker","email":"carlos@carlosbecker.dev"}]' - - "--label=io.artifacthub.package.license=MIT" - - "--label=org.opencontainers.image.description=Deliver Go binaries as fast and easily as possible" + - "--label=io.artifacthub.package.readme-url=https://raw.githubusercontent.com/OpenIMSDK/Open-IM-Server/main/README.md" + - "--label=io.artifacthub.package.logo-url=hhttps://github.com/OpenIMSDK/Open-IM-Server/blob/main/assets/logo/openim-logo-green.png" + - '--label=io.artifacthub.package.maintainers=[{"name":"Xinwei Xiong","email":"3293172751nss@gmail.com"}]' + - "--label=io.artifacthub.package.license=Apace-2.0" + - "--label=org.opencontainers.image.description=OpenIM Open source top instant messaging system" - "--label=org.opencontainers.image.created={{.Date}}" - "--label=org.opencontainers.image.name={{.ProjectName}}" - "--label=org.opencontainers.image.revision={{.FullCommit}}" @@ -505,19 +505,16 @@ release:

- ## Contact Us + ## Get Involved with OpenIM! - We value close connections with our users, developers, and contributors here at OpenIMSDK. With a large community and maintainer team, we're always here to help and support you. Whether you're looking to join our community or have any questions or suggestions, we welcome you to get in touch with us. + **Here are some ways to get involved with the OpenIM community:** - Our most recommended way to get in touch is through [Slack](https://join.slack.com/t/openimsdk/shared_invite/zt-1tmoj26uf-_FDy3dowVHBiGvLk9e5Xkg). Even if you're in China, Slack is usually not blocked by firewalls, making it an easy way to connect with us. Our Slack community is the ideal place to discuss and share ideas and suggestions with other users and developers of OpenIMSDK. You can ask technical questions, seek help, or share your experiences with other users of OpenIMSDK. + 📢 **Slack Channel**: Join our Slack channels for discussions, communication, and support. Click [here](https://join.slack.com/t/openimsdk/shared_invite/zt-1tmoj26uf-_FDy3dowVHBiGvLk9e5Xkg) to join the Open-IM-Server Slack team channel. - In [OpenIM community is recruiting new members! discussion](https://github.com/orgs/OpenIMSDK/discussions/426) please leave your information, convenient we will better developers around the small gift to send to your hands. + 📧 **Gmail Contact**: If you have any questions, suggestions, or feedback for our open-source projects, please feel free to [contact us via email](https://mail.google.com/mail/?view=cm&fs=1&tf=1&to=winxu81@gmail.com). - In addition to Slack, we also offer the following ways to get in touch: + 📖 **Blog**: Stay up-to-date with OpenIM-Server projects and trends by reading our [blog](https://doc.rentsoft.cn/). We share the latest developments, tech trends, and other interesting information related to OpenIM. - + : We also have Slack channels for you to communicate and discuss. To join, visit https://slack.com/ and join our [👀 Open-IM-Server slack](https://join.slack.com/t/openimsdk/shared_invite/zt-1tmoj26uf-_FDy3dowVHBiGvLk9e5Xkg) team channel. - + : Get in touch with us on [Gmail](winxu81@gmail.com). If you have any questions or issues that need resolving, or any suggestions and feedback for our open source projects, please feel free to contact us via email. - + : Read our [blog](https://doc.rentsoft.cn/). Our blog is a great place to stay up-to-date with Open-IM-Server projects and trends. On the blog, we share our latest developments, tech trends, and other interesting information. - + : Add [Wechat](https://github.com/OpenIMSDK/OpenIM-Docs/blob/main/docs/images/WechatIMG20.jpeg) and indicate that you are a user or developer of Open-IM-Server. We will process your request as soon as possible. + 📱 **WeChat**: Add us on WeChat (QR Code) and indicate that you are a user or developer of Open-IM-Server. We'll process your request as soon as possible. - Whether you're looking to join our community or have any questions or suggestions, we welcome you to get in touch with us. + Remember, your contributions play a vital role in making OpenIM successful, and we look forward to your active participation in our community! 🙌 \ No newline at end of file diff --git a/Makefile b/Makefile index 74e183543..de6570dd9 100644 --- a/Makefile +++ b/Makefile @@ -68,6 +68,11 @@ multiarch: install: @$(MAKE) go.install +## check: Check OpenIM deployment ✨ +.PHONY: check +check: + @$(MAKE) go.check + ## tidy: tidy go.mod ✨ .PHONY: tidy tidy: @@ -176,6 +181,11 @@ verify-copyright: add-copyright: @$(MAKE) copyright.add +## advertise: Project introduction, become a contributor ✨ +.PHONY: advertise +advertise: + @$(MAKE) copyright.advertise + ## release: release the project ✨ .PHONY: release release: release.verify release.ensure-tag diff --git a/config/config.yaml b/config/config.yaml index 1c01031dc..3f43a7a69 100644 --- a/config/config.yaml +++ b/config/config.yaml @@ -24,8 +24,8 @@ zookeeper: mysql: address: [ 127.0.0.1:13306 ] #目前仅支持单机 - username: root #用户名 - password: openIM123 #密码 + username: root + password: openIM123 database: openIM_v3 #不建议修改 maxOpenConn: 1000 #最大连接数 maxIdleConn: 100 #最大空闲连接数 @@ -37,14 +37,14 @@ mongo: uri: #不为空则直接使用该值 address: [ 127.0.0.1:37017 ] #单机时为mongo地址,使用分片集群时,为mongos地址 database: openIM_v3 #mongo db 默认即可 - username: root #用户名 - password: openIM123 #密码 + username: root + password: openIM123 maxPoolSize: 100 redis: address: [ 127.0.0.1:16379 ] # username: #only redis version 6.0+ need username - password: openIM123 #密码 + password: openIM123 kafka: username: #用户名 @@ -77,9 +77,9 @@ object: apiURL: "http://127.0.0.1:10002/object/" #地址需要app能访问到 minio: bucket: "openim" #不建议修改 - endpoint: "http://127.0.0.1:10005" #minio对外服务的ip和端口,app要能访问此ip和端口 - accessKeyID: "root" #ID - secretAccessKey: "openIM123" #秘钥 + endpoint: http://127.0.0.1:10005 #地址需要app能够访问 + accessKeyID: root + secretAccessKey: openIM123 sessionToken: "" #token cos: #tencent cos bucketURL: "https://temp-1252357374.cos.ap-chengdu.myqcloud.com" @@ -167,7 +167,7 @@ retainChatRecords: 365 #mongo保存离线消息 chatRecordsClearTime: "0 2 * * 3" #每周三凌晨2点清理mongo中的过期(超过retainChatRecords时间)消息,这个删除是为了清理满足上个配置retainChatRecords的过期消息,不会发送通知,仅仅作为清理磁盘使用 msgDestructTime: "0 2 * * *" #消息自动删除时间,每天凌晨2点删除过期消息,这个删除是为了删除保留时间超过超过会话字段msg_destruct_time(秒)的消息。 -secret: tuoyun #秘钥,获取token时校验 +secret: openIM123 tokenPolicy: expire: 90 #过期时间(天) @@ -257,4 +257,4 @@ prometheus: #prometheus每个服务的端口数量需要和rpcPort保持对应 conversationPrometheusPort: [ 20230 ] rtcPrometheusPort: [ 21300 ] thirdPrometheusPort: [ 21301 ] - messageTransferPrometheusPort: [ 21400, 21401, 21402, 21403 ] #端口数量需要和script/path_info.sh中的msg_transfer_service_num保持一致 + messageTransferPrometheusPort: [ 21400, 21401, 21402, 21403 ] #端口数量需要和script/path_info.sh中的msg_transfer_service_num保持一致 \ No newline at end of file diff --git a/install.sh b/install.sh new file mode 100755 index 000000000..0c3a3945e --- /dev/null +++ b/install.sh @@ -0,0 +1,560 @@ +#!/bin/bash +# 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. +# +# https://gist.github.com/cubxxw/28f997f2c9aff408630b072f010c1d64 +# + +set -e +set -o pipefail + + +############### OpenIM Github ############### +# ... rest of the script ... + +# TODO +# You can configure this script in three ways. +# 1. First, set the variables in this column with more comments. +# 2. The second is to pass an environment variable via a flag such as --help. +# 3. The third way is to set the variable externally, or pass it in as an environment variable + +# Default configuration for OpenIM Repo +# The OpenIM Repo settings can be customized according to your needs. + +# OpenIM Repo owner, by default it's set to "OpenIMSDK". If you're using a different owner, replace accordingly. +OWNER="OpenIMSDK" + +# The repository name, by default it's "Open-IM-Server". If you're using a different repository, replace accordingly. +REPO="Open-IM-Server" + +# Version of Go you want to use, make sure it is compatible with your OpenIM-Server requirements. +# Default is 1.18, if you want to use a different version, replace accordingly. +GO_VERSION="1.18" + +# Default HTTP_PORT is 80. If you want to use a different port, uncomment and replace the value. +# HTTP_PORT=80 + +# CPU core number for concurrent execution. By default it's determined automatically. +# Uncomment the next line if you want to set it manually. +# CPU=$(grep -c ^processor /proc/cpuinfo) + +# By default, the script uses the latest tag from OpenIM-Server releases. +# If you want to use a specific tag, uncomment and replace "v3.0.0" with the desired tag. +# LATEST_TAG=v3.0.0 + +# Default OpenIM install directory is /tmp. If you want to use a different directory, uncomment and replace "/test". +# DOWNLOAD_OPENIM_DIR="/test" + +# GitHub proxy settings. If you are using a proxy, uncomment and replace the empty field with your proxy URL. +PROXY= + +# If you have a GitHub token, replace the empty field with your token. +GITHUB_TOKEN= + +# Default user is "root". If you need to modify it, uncomment and replace accordingly. +# USER=root + +# Default password for redis, mysql, mongo, as well as accessSecret in config/config.yaml. +# Remember, it should be a combination of 8 or more numbers and letters. If you want to set a different password, uncomment and replace "openIM123". +# PASSWORD=openIM123 + +# Default endpoint for minio's external service IP and port. If you want to use a different endpoint, uncomment and replace. +# ENDPOINT=http://127.0.0.1:10005 + +# Default API_URL, replace if necessary. +# API_URL=http://127.0.0.1:10002/object/ + +# Default data directory. If you want to specify a different directory, uncomment and replace "./". +# DATA_DIR=./ + +############### OpenIM Functions ############### +# Install horizon of the script +# +# Pre-requisites: +# - git +# - make +# - jq +# - docker +# - docker-compose +# - go +# + +# Check if the script is run as root +function check_isroot() { + if [ "$EUID" -ne 0 ]; then + fatal "Please run the script as root or use sudo." + fi +} + +# check if the current directory is a OpenIM git repository +function check_git_repo() { + if git rev-parse --is-inside-work-tree >/dev/null 2>&1; then + # Inside a git repository + for remote in $(git remote); do + repo_url=$(git remote get-url $remote) + if [[ $repo_url == "https://github.com/OpenIMSDK/Open-IM-Server.git" || \ + $repo_url == "https://github.com/OpenIMSDK/Open-IM-Server" || \ + $repo_url == "git@github.com:OpenIMSDK/Open-IM-Server.git" ]]; then + # If it's OpenIMSDK repository + info "Current directory is OpenIMSDK git repository." + info "Executing installation directly." + install_openim + exit 0 + fi + debug "Remote: $remote, URL: $repo_url" + done + # If it's not OpenIMSDK repository + debug "Current directory is not OpenIMSDK git repository." + fi + info "Current directory is not a git repository." +} + +# Function to update and install necessary tools +function install_tools() { + info "Checking and installing necessary tools, about git, make, jq, docker, docker-compose." + local tools=("git" "make" "jq" "docker" "docker-compose") + local install_cmd update_cmd os + + if grep -qEi "debian|buntu|mint" /etc/os-release; then + os="Ubuntu" + install_cmd="sudo apt install -y" + update_cmd="sudo apt update" + elif grep -qEi "fedora|rhel" /etc/os-release; then + os="CentOS" + install_cmd="sudo yum install -y" + update_cmd="sudo yum update" + else + fatal "Unsupported OS, please use Ubuntu or CentOS." + fi + + debug "Detected OS: $os" + info "Updating system package repositories..." + $update_cmd + + for tool in "${tools[@]}"; do + if ! command -v $tool &> /dev/null; then + warn "$tool is not installed. Installing now..." + $install_cmd $tool + success "$tool has been installed successfully." + else + info "$tool is already installed." + fi + done +} + +# Function to check if Docker and Docker Compose are installed +function check_docker() { + if ! command -v docker &> /dev/null; then + fatal "Docker is not installed. Please install Docker first." + fi + if ! command -v docker-compose &> /dev/null; then + fatal "Docker Compose is not installed. Please install Docker Compose first." + fi +} + +# Function to download and install Go if it's not already installed +function install_go() { + command -v go >/dev/null 2>&1 + # Determines if GO_VERSION is defined + if [ -z "$GO_VERSION" ]; then + GO_VERSION="1.18" + fi + + if [[ $? -ne 0 ]]; then + warn "Go is not installed. Installing now..." + curl -LO "https://golang.org/dl/go${GO_VERSION}.linux-amd64.tar.gz" + if [ $? -ne 0 ]; then + fatal "Download failed! Please check your network connectivity." + fi + sudo tar -C /usr/local -xzf "go${GO_VERSION}.linux-amd64.tar.gz" + echo "export PATH=$PATH:/usr/local/go/bin" >> ~/.bashrc + source ~/.bashrc + success "Go has been installed successfully." + else + info "Go is already installed." + fi +} + +function download_source_code() { + + # If LATEST_TAG was not defined outside the function, get it here example: v3.0.1-beta.1 + if [ -z "$LATEST_TAG" ]; then + LATEST_TAG=$(curl -s "https://api.github.com/repos/$OWNER/$REPO/tags" | jq -r '.[0].name') + fi + + # If LATEST_TAG is still empty, set a default value + local DEFAULT_TAG="v3.0.0" + + LATEST_TAG="${LATEST_TAG:-$DEFAULT_TAG}" + + debug "DEFAULT_TAG: $DEFAULT_TAG" + info "Use OpenIM Version LATEST_TAG: $LATEST_TAG" + + # If MODIFIED_TAG was not defined outside the function, modify it here,example: 3.0.1-beta.1 + if [ -z "$MODIFIED_TAG" ]; then + MODIFIED_TAG=$(echo $LATEST_TAG | sed 's/v//') + fi + + # If MODIFIED_TAG is still empty, set a default value + local DEFAULT_MODIFIED_TAG="${DEFAULT_TAG#v}" + MODIFIED_TAG="${MODIFIED_TAG:-$DEFAULT_MODIFIED_TAG}" + + debug "MODIFIED_TAG: $MODIFIED_TAG" + + # Construct the tarball URL + TARBALL_URL="${PROXY}https://github.com/$OWNER/$REPO/archive/refs/tags/$LATEST_TAG.tar.gz" + + info "Downloaded OpenIM TARBALL_URL: $TARBALL_URL" + + info "Starting the OpenIM automated one-click deployment script." + + # Set the download and extract directory to /tmp + if [ -z "$DOWNLOAD_OPENIM_DIR" ]; then + DOWNLOAD_OPENIM_DIR="/tmp" + fi + + # Check if /tmp directory exists + if [ ! -d "$DOWNLOAD_OPENIM_DIR" ]; then + warn "$DOWNLOAD_OPENIM_DIR does not exist. Creating it..." + mkdir -p "$DOWNLOAD_OPENIM_DIR" + fi + + info "Downloading OpenIM source code from $TARBALL_URL to $DOWNLOAD_OPENIM_DIR" + + curl -L -o "${DOWNLOAD_OPENIM_DIR}/${MODIFIED_TAG}.tar.gz" $TARBALL_URL + + tar -xzvf "${DOWNLOAD_OPENIM_DIR}/${MODIFIED_TAG}.tar.gz" -C "$DOWNLOAD_OPENIM_DIR" + cd "$DOWNLOAD_OPENIM_DIR/$REPO-$MODIFIED_TAG" + git init && git add . && git commit -m "init" --no-verify + + success "Source code downloaded and extracted to $REPO-$MODIFIED_TAG" +} + +function set_openim_env() { + warn "This command can only be executed once. It will modify the component passwords in docker-compose based on the PASSWORD variable in .env, and modify the component passwords in config/config.yaml. If the password in .env changes, you need to first execute docker-compose down; rm components -rf and then execute this command." + # Set default values for user input + # If the USER environment variable is not set, it defaults to 'root' + if [ -z "$USER" ]; then + USER="root" + debug "USER is not set. Defaulting to 'root'." + fi + + # If the PASSWORD environment variable is not set, it defaults to 'openIM123' + # This password applies to redis, mysql, mongo, as well as accessSecret in config/config.yaml + if [ -z "$PASSWORD" ]; then + PASSWORD="openIM123" + debug "PASSWORD is not set. Defaulting to 'openIM123'." + fi + + # If the ENDPOINT environment variable is not set, it defaults to 'http://127.0.0.1:10005' + # This is minio's external service IP and port, or it could be a domain like storage.xx.xx + # The app must be able to access this IP and port or domain + if [ -z "$ENDPOINT" ]; then + ENDPOINT="http://127.0.0.1:10005" + debug "ENDPOINT is not set. Defaulting to 'http://127.0.0.1:10005'." + fi + + # If the API_URL environment variable is not set, it defaults to 'http://127.0.0.1:10002/object/' + # The app must be able to access this IP and port or domain + if [ -z "$API_URL" ]; then + API_URL="http://127.0.0.1:10002/object/" + debug "API_URL is not set. Defaulting to 'http://127.0.0.1:10002/object/'." + fi + + # If the DATA_DIR environment variable is not set, it defaults to the current directory './' + # This can be set to a directory with large disk space + if [ -z "$DATA_DIR" ]; then + DATA_DIR="./" + debug "DATA_DIR is not set. Defaulting to './'." + fi +} + +function install_openim() { + info "Installing OpenIM" + make -j${CPU} install V=1 + + info "Checking installation" + make check + + success "OpenIM installation completed successfully. Happy chatting!" +} + +############### OpenIM Help ############### + +# Function to display help message +function cmd_help() { + openim_color + color_echo ${BRIGHT_GREEN_PREFIX} "Usage: $0 [options]" + color_echo ${BRIGHT_GREEN_PREFIX} "Options:" + echo + color_echo ${BLUE_PREFIX} "-i, --install ${CYAN_PREFIX}Execute the installation logic of the script${COLOR_SUFFIX}" + color_echo ${BLUE_PREFIX} "-u, --user ${CYAN_PREFIX}set user (default: root)${COLOR_SUFFIX}" + color_echo ${BLUE_PREFIX} "-p, --password ${CYAN_PREFIX}set password (default: openIM123)${COLOR_SUFFIX}" + color_echo ${BLUE_PREFIX} "-e, --endpoint ${CYAN_PREFIX}set endpoint (default: http://127.0.0.1:10005)${COLOR_SUFFIX}" + color_echo ${BLUE_PREFIX} "-a, --api ${CYAN_PREFIX}set API URL (default: http://127.0.0.1:10002/object/)${COLOR_SUFFIX}" + color_echo ${BLUE_PREFIX} "-d, --directory ${CYAN_PREFIX}set directory for large disk space (default: ./)${COLOR_SUFFIX}" + color_echo ${BLUE_PREFIX} "-h, --help ${CYAN_PREFIX}display this help message and exit${COLOR_SUFFIX}" + color_echo ${BLUE_PREFIX} "-cn, --china ${CYAN_PREFIX}set to use the Chinese domestic proxy${COLOR_SUFFIX}" + color_echo ${BLUE_PREFIX} "-t, --tag ${CYAN_PREFIX}specify the tag (default option, set to latest if not specified)${COLOR_SUFFIX}" + color_echo ${BLUE_PREFIX} "-r, --release ${CYAN_PREFIX}specify the release branch (cannot be used with the tag option)${COLOR_SUFFIX}" + color_echo ${BLUE_PREFIX} "-g, --go-version ${CYAN_PREFIX}set the Go language version (default: GO_VERSION=\"1.18\")${COLOR_SUFFIX}" + color_echo ${BLUE_PREFIX} "-i, --install-dir ${CYAN_PREFIX}set the OpenIM installation directory (default: /tmp)${COLOR_SUFFIX}" + color_echo ${BLUE_PREFIX} "-gt, --github-token ${CYAN_PREFIX}set the GITHUB_TOKEN (default: not set)${COLOR_SUFFIX}" + color_echo ${BLUE_PREFIX} "--cpu ${CYAN_PREFIX}set the number of concurrent processes${COLOR_SUFFIX}" + echo + color_echo ${RED_PREFIX} "Note: Only one of the -t/--tag or -r/--release options can be used at a time.${COLOR_SUFFIX}" + color_echo ${RED_PREFIX} "If both are used or none of them are used, the -t/--tag option will be prioritized.${COLOR_SUFFIX}" + echo + exit 1 +} + +function parseinput() { + # set default values + # USER=root + # PASSWORD=openIM123 + # ENDPOINT=http://127.0.0.1:10005 + # API=http://127.0.0.1:10002/object/ + # DIRECTORY=./ + # CHINA=false + # TAG=latest + # RELEASE="" + # GO_VERSION=1.18 + # INSTALL_DIR=/tmp + # GITHUB_TOKEN="" + # CPU=$(nproc) + + if [ $# -eq 0 ]; then + cmd_help + exit 1 + fi + + while [ $# -gt 0 ]; do + case $1 in + -h|--help) + cmd_help + exit + ;; + -u|--user) + shift + USER=$1 + ;; + -p|--password) + shift + PASSWORD=$1 + ;; + -e|--endpoint) + shift + ENDPOINT=$1 + ;; + -a|--api) + shift + API=$1 + ;; + -d|--directory) + shift + DIRECTORY=$1 + ;; + -cn|--china) + CHINA=true + ;; + -t|--tag) + shift + TAG=$1 + ;; + -r|--release) + shift + RELEASE=$1 + ;; + -g|--go-version) + shift + GO_VERSION=$1 + ;; + -i|--install-dir) + shift + INSTALL_DIR=$1 + ;; + -gt|--github-token) + shift + GITHUB_TOKEN=$1 + ;; + --cpu) + shift + CPU=$1 + ;; + -i|--install) + openim_main + exit + ;; + *) + echo "Unknown option: $1" + cmd_help + exit 1 + ;; + esac + shift + done +} + +############### OpenIM LOGO ############### +# Set text color to cyan for header and URL +print_with_delay() { + text="$1" + delay="$2" + + for i in $(seq 0 $((${#text}-1))); do + printf "${text:$i:1}" + sleep $delay + done + printf "\n" +} + +print_progress() { + total="$1" + delay="$2" + + printf "[" + for i in $(seq 1 $total); do + printf "#" + sleep $delay + done + printf "]\n" +} + +# Function for colored echo +color_echo() { + COLOR=$1 + shift + echo -e "${COLOR}===> $* ${COLOR_SUFFIX}" +} + +# Color definitions +function openim_color() { + COLOR_SUFFIX="\033[0m" # End all colors and special effects + + BLACK_PREFIX="\033[30m" # Black prefix + RED_PREFIX="\033[31m" # Red prefix + GREEN_PREFIX="\033[32m" # Green prefix + YELLOW_PREFIX="\033[33m" # Yellow prefix + BLUE_PREFIX="\033[34m" # Blue prefix + SKY_BLUE_PREFIX="\033[36m" # Sky blue prefix + WHITE_PREFIX="\033[37m" # White prefix + BOLD_PREFIX="\033[1m" # Bold prefix + UNDERLINE_PREFIX="\033[4m" # Underline prefix + ITALIC_PREFIX="\033[3m" # Italic prefix + BRIGHT_GREEN_PREFIX='\033[1;32m' # Bright green prefix + + CYAN_PREFIX="\033[0;36m" # Cyan prefix +} + +# --- helper functions for logs --- +info() +{ + echo -e "[${GREEN_PREFIX}INFO${COLOR_SUFFIX}] " "$@" +} +warn() +{ + echo -e "[${YELLOW_PREFIX}WARN${COLOR_SUFFIX}] " "$@" >&2 +} +fatal() +{ + echo -e "[${RED_PREFIX}ERROR${COLOR_SUFFIX}] " "$@" >&2 + exit 1 +} +debug() +{ + echo -e "[${BLUE_PREFIX}DEBUG${COLOR_SUFFIX}]===> " "$@" +} +success() +{ + echo -e "${BRIGHT_GREEN_PREFIX}=== [SUCCESS] ===${COLOR_SUFFIX}\n=> " "$@" +} + +function openim_logo() { + # Set text color to cyan for header and URL + echo -e "\033[0;36m" + + # Display fancy ASCII Art logo + # look http://patorjk.com/software/taag/#p=display&h=1&v=1&f=Doh&t=OpenIM + print_with_delay ' + + + OOOOOOOOO IIIIIIIIIIMMMMMMMM MMMMMMMM + OO:::::::::OO I::::::::IM:::::::M M:::::::M + OO:::::::::::::OO I::::::::IM::::::::M M::::::::M +O:::::::OOO:::::::O II::::::IIM:::::::::M M:::::::::M +O::::::O O::::::Oppppp ppppppppp eeeeeeeeeeee nnnn nnnnnnnn I::::I M::::::::::M M::::::::::M +O:::::O O:::::Op::::ppp:::::::::p ee::::::::::::ee n:::nn::::::::nn I::::I M:::::::::::M M:::::::::::M +O:::::O O:::::Op:::::::::::::::::p e::::::eeeee:::::een::::::::::::::nn I::::I M:::::::M::::M M::::M:::::::M +O:::::O O:::::Opp::::::ppppp::::::pe::::::e e:::::enn:::::::::::::::n I::::I M::::::M M::::M M::::M M::::::M +O:::::O O:::::O p:::::p p:::::pe:::::::eeeee::::::e n:::::nnnn:::::n I::::I M::::::M M::::M::::M M::::::M +O:::::O O:::::O p:::::p p:::::pe:::::::::::::::::e n::::n n::::n I::::I M::::::M M:::::::M M::::::M +O:::::O O:::::O p:::::p p:::::pe::::::eeeeeeeeeee n::::n n::::n I::::I M::::::M M:::::M M::::::M +O::::::O O::::::O p:::::p p::::::pe:::::::e n::::n n::::n I::::I M::::::M MMMMM M::::::M +O:::::::OOO:::::::O p:::::ppppp:::::::pe::::::::e n::::n n::::nII::::::IIM::::::M M::::::M + OO:::::::::::::OO p::::::::::::::::p e::::::::eeeeeeee n::::n n::::nI::::::::IM::::::M M::::::M + OO:::::::::OO p::::::::::::::pp ee:::::::::::::e n::::n n::::nI::::::::IM::::::M M::::::M + OOOOOOOOO p::::::pppppppp eeeeeeeeeeeeee nnnnnn nnnnnnIIIIIIIIIIMMMMMMMM MMMMMMMM + p:::::p + p:::::p + p:::::::p + p:::::::p + p:::::::p + ppppppppp + + ' 0.0001 + + # Display product URL + print_with_delay "Discover more and contribute at: https://github.com/OpenIMSDK/Open-IM-Server" 0.01 + + # Reset text color back to normal + echo -e "\033[0m" + + # Set text color to green for product description + echo -e "\033[1;32m" + + print_with_delay "Open-IM-Server: Reinventing Instant Messaging" 0.01 + print_progress 50 0.02 + + print_with_delay "Open-IM-Server is not just a product; it's a revolution. It's about bringing the power of seamless, real-time messaging to your fingertips. And it's about joining a global community of developers, dedicated to pushing the boundaries of what's possible." 0.01 + + print_progress 50 0.02 + + # Reset text color back to normal + echo -e "\033[0m" + + # Set text color to yellow for the Slack link + echo -e "\033[1;33m" + + print_with_delay "Join our developer community on Slack: https://join.slack.com/t/openimsdk/shared_invite/zt-1tmoj26uf-_FDy3dowVHBiGvLk9e5Xkg" 0.01 + + # Reset text color back to normal + echo -e "\033[0m" +} + +# Main function to run the script +function openim_main() { + check_git_repo + check_isroot + openim_color + install_tools + check_docker + install_go + download_source_code + set_openim_env + install_openim + openim_logo + +} + +parseinput "$@" \ No newline at end of file diff --git a/scripts/advertise.sh b/scripts/advertise.sh new file mode 100755 index 000000000..c1cd63f56 --- /dev/null +++ b/scripts/advertise.sh @@ -0,0 +1,122 @@ +#!/bin/bash + +set -e +set -o pipefail + +trap 'echo "Script interrupted."; exit 1' INT + +# Function for colored echo +function color_echo() { + COLOR=$1 + shift + echo -e "${COLOR}===> $* ${COLOR_SUFFIX}" +} + +# Color definitions +function openim_color() { + COLOR_SUFFIX="\033[0m" # End all colors and special effects + + BLACK_PREFIX="\033[30m" # Black prefix + RED_PREFIX="\033[31m" # Red prefix + GREEN_PREFIX="\033[32m" # Green prefix + YELLOW_PREFIX="\033[33m" # Yellow prefix + BLUE_PREFIX="\033[34m" # Blue prefix + SKY_BLUE_PREFIX="\033[36m" # Sky blue prefix + WHITE_PREFIX="\033[37m" # White prefix + BOLD_PREFIX="\033[1m" # Bold prefix + UNDERLINE_PREFIX="\033[4m" # Underline prefix + ITALIC_PREFIX="\033[3m" # Italic prefix + + CYAN_PREFIX="\033[0;36m" # Cyan prefix +} + +function print_with_delay() { + text="$1" + delay="$2" + color="$3" + + for i in $(seq 0 $((${#text}-1))); do + printf "${color}${text:$i:1}${COLOR_SUFFIX}" + sleep $delay + done + printf "\n" +} + +function print_progress() { + total="$1" + delay="$2" + color="$3" + + printf "${color}[" + for i in $(seq 1 $total); do + printf "#" + sleep $delay + done + printf "]${COLOR_SUFFIX}\n" +} +function openim_logo() { + # Set text color to cyan for header and URL + echo -e "\033[0;36m" + + # Display fancy ASCII Art logo + # look http://patorjk.com/software/taag/#p=display&h=1&v=1&f=Doh&t=OpenIM + print_with_delay ' + + + OOOOOOOOO IIIIIIIIIIMMMMMMMM MMMMMMMM + OO:::::::::OO I::::::::IM:::::::M M:::::::M + OO:::::::::::::OO I::::::::IM::::::::M M::::::::M +O:::::::OOO:::::::O II::::::IIM:::::::::M M:::::::::M +O::::::O O::::::Oppppp ppppppppp eeeeeeeeeeee nnnn nnnnnnnn I::::I M::::::::::M M::::::::::M +O:::::O O:::::Op::::ppp:::::::::p ee::::::::::::ee n:::nn::::::::nn I::::I M:::::::::::M M:::::::::::M +O:::::O O:::::Op:::::::::::::::::p e::::::eeeee:::::een::::::::::::::nn I::::I M:::::::M::::M M::::M:::::::M +O:::::O O:::::Opp::::::ppppp::::::pe::::::e e:::::enn:::::::::::::::n I::::I M::::::M M::::M M::::M M::::::M +O:::::O O:::::O p:::::p p:::::pe:::::::eeeee::::::e n:::::nnnn:::::n I::::I M::::::M M::::M::::M M::::::M +O:::::O O:::::O p:::::p p:::::pe:::::::::::::::::e n::::n n::::n I::::I M::::::M M:::::::M M::::::M +O:::::O O:::::O p:::::p p:::::pe::::::eeeeeeeeeee n::::n n::::n I::::I M::::::M M:::::M M::::::M +O::::::O O::::::O p:::::p p::::::pe:::::::e n::::n n::::n I::::I M::::::M MMMMM M::::::M +O:::::::OOO:::::::O p:::::ppppp:::::::pe::::::::e n::::n n::::nII::::::IIM::::::M M::::::M + OO:::::::::::::OO p::::::::::::::::p e::::::::eeeeeeee n::::n n::::nI::::::::IM::::::M M::::::M + OO:::::::::OO p::::::::::::::pp ee:::::::::::::e n::::n n::::nI::::::::IM::::::M M::::::M + OOOOOOOOO p::::::pppppppp eeeeeeeeeeeeee nnnnnn nnnnnnIIIIIIIIIIMMMMMMMM MMMMMMMM + p:::::p + p:::::p + p:::::::p + p:::::::p + p:::::::p + ppppppppp + + ' 0.0001 + + # Display product URL + print_with_delay "Discover more and contribute at: https://github.com/OpenIMSDK/Open-IM-Server" 0.01 + + # Reset text color back to normal + echo -e "\033[0m" + + # Set text color to green for product description + echo -e "\033[1;32m" + + print_with_delay "Open-IM-Server: Reinventing Instant Messaging" 0.01 + print_progress 50 0.02 + + print_with_delay "Open-IM-Server is not just a product; it's a revolution. It's about bringing the power of seamless, real-time messaging to your fingertips. And it's about joining a global community of developers, dedicated to pushing the boundaries of what's possible." 0.01 + + print_progress 50 0.02 + + # Reset text color back to normal + echo -e "\033[0m" + + # Set text color to yellow for the Slack link + echo -e "\033[1;33m" + + print_with_delay "Join our developer community on Slack: https://join.slack.com/t/openimsdk/shared_invite/zt-1tmoj26uf-_FDy3dowVHBiGvLk9e5Xkg" 0.01 + + # Reset text color back to normal + echo -e "\033[0m" +} + +function main() { + openim_logo +} +main "$@" diff --git a/scripts/make-rules/copyright.mk b/scripts/make-rules/copyright.mk index 319e46945..2b7a04082 100644 --- a/scripts/make-rules/copyright.mk +++ b/scripts/make-rules/copyright.mk @@ -51,6 +51,12 @@ copyright.add: tools.verify.addlicense # -y string # copyright year(s) (default "2023") +## copyright.advertise: Advertise the license of the project +.PHONY: copyright.advertise +copyright.advertise: + @chmod +x $(ROOT_DIR)/scripts/advertise.sh + @$(ROOT_DIR)/scripts/advertise.sh + ## copyright.help: Show copyright help .PHONY: copyright.help copyright.help: scripts/make-rules/copyright.mk diff --git a/scripts/make-rules/golang.mk b/scripts/make-rules/golang.mk index 282649d7e..00e0fee47 100644 --- a/scripts/make-rules/golang.mk +++ b/scripts/make-rules/golang.mk @@ -137,6 +137,12 @@ go.install: @echo "===========> Installing deployment openim" @$(ROOT_DIR)/scripts/install_im_server.sh +## go.check: Check OpenIM deployment +.PHONY: go.check +go.check: + @echo "===========> Checking OpenIM deployment" + @$(ROOT_DIR)/scripts/check_all.sh + ## go.multiarch: Build multi-arch binaries .PHONY: go.build.multiarch go.build.multiarch: go.build.verify $(foreach p,$(PLATFORMS),$(addprefix go.build., $(addprefix $(p)., $(BINS)))) diff --git a/scripts/style_info.sh b/scripts/style_info.sh index 3c747dd0c..b56eceeff 100755 --- a/scripts/style_info.sh +++ b/scripts/style_info.sh @@ -28,6 +28,8 @@ BOLD_PREFIX="\033[1m" # Bold prefix UNDERLINE_PREFIX="\033[4m" # Underline prefix ITALIC_PREFIX="\033[3m" # Italic prefix +CYAN_PREFIX="033[0;36m" # Cyan prefix + BACKGROUND_BLACK="\033[40m" # Black background BACKGROUND_RED="\033[41m" # Red background BACKGROUND_GREEN="\033[42m" # Green background From 8a4be458041a4604cadfac788952d17961292c0a Mon Sep 17 00:00:00 2001 From: withchao <48119764+withchao@users.noreply.github.com> Date: Thu, 27 Jul 2023 12:31:27 +0800 Subject: [PATCH 14/61] fix: sql injection risk (#678) Signed-off-by: withchao <993506633@qq.com> --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 7acda0e12..e4bc8edc6 100644 --- a/go.mod +++ b/go.mod @@ -38,7 +38,7 @@ require github.com/google/uuid v1.3.0 require ( github.com/OpenIMSDK/protocol v0.0.1 - github.com/OpenIMSDK/tools v0.0.4 + github.com/OpenIMSDK/tools v0.0.5 github.com/aliyun/aliyun-oss-go-sdk v2.2.7+incompatible github.com/go-redis/redis v6.15.9+incompatible github.com/go-sql-driver/mysql v1.6.0 diff --git a/go.sum b/go.sum index 28b2c5c32..0089e1924 100644 --- a/go.sum +++ b/go.sum @@ -18,8 +18,8 @@ firebase.google.com/go v3.13.0+incompatible/go.mod h1:xlah6XbEyW6tbfSklcfe5FHJIw github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/OpenIMSDK/protocol v0.0.1 h1:Q6J1jCU00dfqmguxw2XI+IGcVfBAkb5Tz8LgvyeNkk0= github.com/OpenIMSDK/protocol v0.0.1/go.mod h1:F25dFrwrIx3lkNoiuf6FkCfxuwf8L4Z8UIsdTHP/r0Y= -github.com/OpenIMSDK/tools v0.0.4 h1:aSC5FWO/0ccxuLHs+E1Eeyj+XWL/2CzLy1XGmQgpaU4= -github.com/OpenIMSDK/tools v0.0.4/go.mod h1:eg+q4A34Qmu73xkY0mt37FHGMCMfC6CtmOnm0kFEGFI= +github.com/OpenIMSDK/tools v0.0.5 h1:yBVHJ3EpIDcp8VFKPjuGr6MQvFa3t4JByZ+vmeC06/Q= +github.com/OpenIMSDK/tools v0.0.5/go.mod h1:eg+q4A34Qmu73xkY0mt37FHGMCMfC6CtmOnm0kFEGFI= github.com/QcloudApi/qcloud_sign_golang v0.0.0-20141224014652-e4130a326409/go.mod h1:1pk82RBxDY/JZnPQrtqHlUFfCctgdorsd9M06fMynOM= github.com/Shopify/sarama v1.29.0 h1:ARid8o8oieau9XrHI55f/L3EoRAhm9px6sonbD7yuUE= github.com/Shopify/sarama v1.29.0/go.mod h1:2QpgD79wpdAESqNQMxNc0KYMkycd4slxGdV3TWSVqrU= From 0bc8b9259e942bf378c68150dfe5a9bc7f5e190f Mon Sep 17 00:00:00 2001 From: WangchuXiao Date: Thu, 27 Jul 2023 12:32:08 +0800 Subject: [PATCH 15/61] new feat: sync designated model data (#668) * new feature: add batch send msg * new feature: add batch send msg * new feature: add batch send msg * new feature: add batch send msg * new feature: add batch send msg * new feature: add batch send msg * fix bug: multiple gateway kick user * fix bug: multiple gateway kick user * fix bug: multiple gateway kick user * fix bug: multiple gateway kick user * fix bug: multiple gateway kick user * MsgDestructTime * fix bug: msg destruct sql * fix bug: msg destruct * fix bug: msg destruct * fix bug: msg destruct sql * fix bug: msg destruct sql * fix bug: msg destruct sql * fix bug: msg destruct sql * debug: print stack * debug: print stack * debug: print stack * fix bug: msg destruct sql Signed-off-by: wangchuxiao * fix bug: msg notification self 2 self push twice * fix bug: heartbeat get self notification * fix bug: init grpc conn in one process * fix bug: grpc conn Signed-off-by: wangchuxiao * fix bug: zk client recreate node when reconn * fix bug: set friend mark args error * fix bug: rpc client intercepter called twice Signed-off-by: wangchuxiao * cicd: robot automated Change Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * test: document msg num set 100 * new feat: sync designated model * new feat: sync designated model * new feat: sync designated model * new feat: sync designated model * new feat: sync designated model * new feat: sync designated model * new feat: sync designated model * merge code * merge code --------- Signed-off-by: wangchuxiao Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: wangchuxiao-dev --- internal/api/friend.go | 8 ++++ internal/api/group.go | 4 ++ internal/api/route.go | 3 ++ internal/rpc/conversation/conversaion.go | 6 +-- internal/rpc/friend/friend.go | 19 +++++--- internal/rpc/group/group.go | 48 +++++++++++++++++-- internal/rpc/user/user.go | 12 ++--- pkg/apistruct/manage.go | 2 +- pkg/common/db/controller/friend.go | 5 ++ pkg/common/db/controller/group.go | 5 ++ .../db/relation/friend_request_model.go | 11 +++++ pkg/common/db/relation/group_request_model.go | 5 ++ .../db/table/relation/friend_request.go | 2 +- pkg/common/db/table/relation/group_request.go | 1 + pkg/rpcclient/notification/conevrsation.go | 19 ++++---- 15 files changed, 118 insertions(+), 32 deletions(-) diff --git a/internal/api/friend.go b/internal/api/friend.go index 7af614fa4..f64a99ef3 100644 --- a/internal/api/friend.go +++ b/internal/api/friend.go @@ -44,6 +44,10 @@ func (o *FriendApi) GetFriendApplyList(c *gin.Context) { a2r.Call(friend.FriendClient.GetPaginationFriendsApplyTo, o.Client, c) } +func (o *FriendApi) GetDesignatedFriendsApply(c *gin.Context) { + a2r.Call(friend.FriendClient.GetDesignatedFriendsApply, o.Client, c) +} + func (o *FriendApi) GetSelfApplyList(c *gin.Context) { a2r.Call(friend.FriendClient.GetPaginationFriendsApplyFrom, o.Client, c) } @@ -52,6 +56,10 @@ func (o *FriendApi) GetFriendList(c *gin.Context) { a2r.Call(friend.FriendClient.GetPaginationFriends, o.Client, c) } +func (o *FriendApi) GetDesignatedFriends(c *gin.Context) { + a2r.Call(friend.FriendClient.GetDesignatedFriends, o.Client, c) +} + func (o *FriendApi) SetFriendRemark(c *gin.Context) { a2r.Call(friend.FriendClient.SetFriendRemark, o.Client, c) } diff --git a/internal/api/group.go b/internal/api/group.go index 2603bb858..ab397a8ac 100644 --- a/internal/api/group.go +++ b/internal/api/group.go @@ -60,6 +60,10 @@ func (o *GroupApi) GetUserReqGroupApplicationList(c *gin.Context) { a2r.Call(group.GroupClient.GetUserReqApplicationList, o.Client, c) } +func (o *GroupApi) GetGroupUsersReqApplicationList(c *gin.Context) { + a2r.Call(group.GroupClient.GetGroupUsersReqApplicationList, o.Client, c) +} + func (o *GroupApi) GetGroupsInfo(c *gin.Context) { a2r.Call(group.GroupClient.GetGroupsInfo, o.Client, c) } diff --git a/internal/api/route.go b/internal/api/route.go index 262283019..4a4f92cc0 100644 --- a/internal/api/route.go +++ b/internal/api/route.go @@ -86,8 +86,10 @@ func NewGinRouter(discov discoveryregistry.SvcDiscoveryRegistry, rdb redis.Unive f := NewFriendApi(*friendRpc) friendRouterGroup.POST("/delete_friend", f.DeleteFriend) friendRouterGroup.POST("/get_friend_apply_list", f.GetFriendApplyList) + friendRouterGroup.POST("/get_designated_friend_apply", f.GetDesignatedFriendsApply) friendRouterGroup.POST("/get_self_friend_apply_list", f.GetSelfApplyList) friendRouterGroup.POST("/get_friend_list", f.GetFriendList) + friendRouterGroup.POST("/get_designated_friends", f.GetDesignatedFriends) friendRouterGroup.POST("/add_friend", f.ApplyToAddFriend) friendRouterGroup.POST("/add_friend_response", f.RespondFriendApply) friendRouterGroup.POST("/set_friend_remark", f.SetFriendRemark) @@ -108,6 +110,7 @@ func NewGinRouter(discov discoveryregistry.SvcDiscoveryRegistry, rdb redis.Unive groupRouterGroup.POST("/transfer_group", g.TransferGroupOwner) groupRouterGroup.POST("/get_recv_group_applicationList", g.GetRecvGroupApplicationList) groupRouterGroup.POST("/get_user_req_group_applicationList", g.GetUserReqGroupApplicationList) + groupRouterGroup.POST("/get_group_users_req_application_list", g.GetGroupUsersReqApplicationList) groupRouterGroup.POST("/get_groups_info", g.GetGroupsInfo) groupRouterGroup.POST("/kick_group", g.KickGroupMember) groupRouterGroup.POST("/get_group_members_info", g.GetGroupMembersInfo) diff --git a/internal/rpc/conversation/conversaion.go b/internal/rpc/conversation/conversaion.go index 753a45722..6030bfa55 100644 --- a/internal/rpc/conversation/conversaion.go +++ b/internal/rpc/conversation/conversaion.go @@ -107,7 +107,7 @@ func (c *conversationServer) SetConversation(ctx context.Context, req *pbConvers if err != nil { return nil, err } - _ = c.conversationNotificationSender.ConversationChangeNotification(ctx, req.Conversation.OwnerUserID) + _ = c.conversationNotificationSender.ConversationChangeNotification(ctx, req.Conversation.OwnerUserID, []string{req.Conversation.ConversationID}) resp := &pbConversation.SetConversationResp{} return resp, nil } @@ -170,7 +170,7 @@ func (c *conversationServer) SetConversations(ctx context.Context, req *pbConver return nil, err } for _, userID := range req.UserIDs { - c.conversationNotificationSender.ConversationSetPrivateNotification(ctx, userID, req.Conversation.UserID, req.Conversation.IsPrivateChat.Value) + c.conversationNotificationSender.ConversationSetPrivateNotification(ctx, userID, req.Conversation.UserID, req.Conversation.IsPrivateChat.Value, req.Conversation.ConversationID) } } if req.Conversation.BurnDuration != nil { @@ -181,7 +181,7 @@ func (c *conversationServer) SetConversations(ctx context.Context, req *pbConver return nil, err } for _, v := range req.UserIDs { - c.conversationNotificationSender.ConversationChangeNotification(ctx, v) + c.conversationNotificationSender.ConversationChangeNotification(ctx, v, []string{req.Conversation.ConversationID}) } return &pbConversation.SetConversationsResp{}, nil } diff --git a/internal/rpc/friend/friend.go b/internal/rpc/friend/friend.go index 9ef38ef3c..7f3be3439 100644 --- a/internal/rpc/friend/friend.go +++ b/internal/rpc/friend/friend.go @@ -83,11 +83,6 @@ func Start(client registry.SvcDiscoveryRegistry, server *grpc.Server) error { return nil } -func (s *friendServer) GetDesignatedFriendsApply(ctx context.Context, req *pbfriend.GetDesignatedFriendsApplyReq) (*pbfriend.GetDesignatedFriendsApplyResp, error) { - //TODO implement me - panic("implement me") -} - // ok. func (s *friendServer) ApplyToAddFriend( ctx context.Context, @@ -245,6 +240,19 @@ func (s *friendServer) GetDesignatedFriends( return resp, nil } +func (s *friendServer) GetDesignatedFriendsApply(ctx context.Context, req *pbfriend.GetDesignatedFriendsApplyReq) (resp *pbfriend.GetDesignatedFriendsApplyResp, err error) { + friendRequests, err := s.friendDatabase.FindBothFriendRequests(ctx, req.FromUserID, req.ToUserID) + if err != nil { + return nil, err + } + resp = &pbfriend.GetDesignatedFriendsApplyResp{} + resp.FriendRequests, err = convert.FriendRequestDB2Pb(ctx, friendRequests, s.userRpcClient.GetUsersInfoMap) + if err != nil { + return nil, err + } + return resp, nil +} + // ok 获取接收到的好友申请(即别人主动申请的). func (s *friendServer) GetPaginationFriendsApplyTo( ctx context.Context, @@ -303,7 +311,6 @@ func (s *friendServer) IsFriend( return resp, nil } -// ok. func (s *friendServer) GetPaginationFriends( ctx context.Context, req *pbfriend.GetPaginationFriendsReq, diff --git a/internal/rpc/group/group.go b/internal/rpc/group/group.go index bcadc61a3..4ce3d4216 100644 --- a/internal/rpc/group/group.go +++ b/internal/rpc/group/group.go @@ -95,11 +95,6 @@ type groupServer struct { msgRpcClient rpcclient.MessageRpcClient } -func (s *groupServer) GetGroupUsersReqApplicationList(ctx context.Context, req *pbGroup.GetGroupUsersReqApplicationListReq) (*pbGroup.GetGroupUsersReqApplicationListResp, error) { - //TODO implement me - panic("implement me") -} - func (s *groupServer) CheckGroupAdmin(ctx context.Context, groupID string) error { if !authverify.IsAppManagerUid(ctx) { groupMember, err := s.GroupDatabase.TakeGroupMember(ctx, groupID, mcontext.GetOpUserID(ctx)) @@ -1445,3 +1440,46 @@ func (s *groupServer) GetGroupMemberRoleLevel(ctx context.Context, req *pbGroup. }) return resp, nil } + +func (s *groupServer) GetGroupUsersReqApplicationList(ctx context.Context, req *pbGroup.GetGroupUsersReqApplicationListReq) (*pbGroup.GetGroupUsersReqApplicationListResp, error) { + resp := &pbGroup.GetGroupUsersReqApplicationListResp{} + total, requests, err := s.GroupDatabase.FindGroupRequests(ctx, req.GroupID, req.UserIDs) + if err != nil { + return nil, err + } + if len(requests) == 0 { + return resp, nil + } + groupIDs := utils.Distinct(utils.Slice(requests, func(e *relationTb.GroupRequestModel) string { + return e.GroupID + })) + groups, err := s.GroupDatabase.FindGroup(ctx, groupIDs) + if err != nil { + return nil, err + } + groupMap := utils.SliceToMap(groups, func(e *relationTb.GroupModel) string { + return e.GroupID + }) + if ids := utils.Single(groupIDs, utils.Keys(groupMap)); len(ids) > 0 { + return nil, errs.ErrGroupIDNotFound.Wrap(strings.Join(ids, ",")) + } + owners, err := s.FindGroupMember(ctx, groupIDs, nil, []int32{constant.GroupOwner}) + if err != nil { + return nil, err + } + ownerMap := utils.SliceToMap(owners, func(e *relationTb.GroupMemberModel) string { + return e.GroupID + }) + if ids := utils.Single(groupIDs, utils.Keys(ownerMap)); len(ids) > 0 { + return nil, errs.ErrData.Wrap("group no owner", strings.Join(ids, ",")) + } + groupMemberNum, err := s.GroupDatabase.MapGroupMemberNum(ctx, groupIDs) + if err != nil { + return nil, err + } + resp.GroupRequests = utils.Slice(requests, func(e *relationTb.GroupRequestModel) *sdkws.GroupRequest { + return convert.Db2PbGroupRequest(e, nil, convert.Db2PbGroupInfo(groupMap[e.GroupID], ownerMap[e.GroupID].UserID, uint32(groupMemberNum[e.GroupID]))) + }) + resp.Total = total + return resp, nil +} diff --git a/internal/rpc/user/user.go b/internal/rpc/user/user.go index f95e66c0d..fb6518a7e 100644 --- a/internal/rpc/user/user.go +++ b/internal/rpc/user/user.go @@ -17,10 +17,11 @@ package user import ( "context" "errors" - "github.com/OpenIMSDK/Open-IM-Server/pkg/authverify" "strings" "time" + "github.com/OpenIMSDK/Open-IM-Server/pkg/authverify" + "github.com/OpenIMSDK/tools/log" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/config" @@ -50,11 +51,6 @@ type userServer struct { RegisterCenter registry.SvcDiscoveryRegistry } -func (s *userServer) SubscribeOrCancelUsersStatus(ctx context.Context, req *pbuser.SubscribeOrCancelUsersStatusReq) (*pbuser.SubscribeOrCancelUsersStatusResp, error) { - //TODO implement me - panic("implement me") -} - func Start(client registry.SvcDiscoveryRegistry, server *grpc.Server) error { db, err := relation.NewGormDB() if err != nil { @@ -246,3 +242,7 @@ func (s *userServer) GetAllUserID(ctx context.Context, req *pbuser.GetAllUserIDR } return &pbuser.GetAllUserIDResp{UserIDs: userIDs}, nil } + +func (s *userServer) SubscribeOrCancelUsersStatus(ctx context.Context, req *pbuser.SubscribeOrCancelUsersStatusReq) (resp *pbuser.SubscribeOrCancelUsersStatusResp, err error) { + panic("implement me") +} diff --git a/pkg/apistruct/manage.go b/pkg/apistruct/manage.go index 3a2945b37..eef38e403 100644 --- a/pkg/apistruct/manage.go +++ b/pkg/apistruct/manage.go @@ -33,7 +33,7 @@ type SendMsg struct { } type SendMsgReq struct { - RecvID string `json:"recvID" binding:"required_if" message:"recvID is required if sessionType is SingleChatType or NotificationChatType"` + RecvID string `json:"recvID" binding:"required_if" message:"recvID is required if sessionType is SingleChatType or NotificationChatType"` SendMsg } diff --git a/pkg/common/db/controller/friend.go b/pkg/common/db/controller/friend.go index c44c1662e..cab838bb4 100644 --- a/pkg/common/db/controller/friend.go +++ b/pkg/common/db/controller/friend.go @@ -75,6 +75,7 @@ type FriendDatabase interface { friendUserIDs []string, ) (friends []*relation.FriendModel, err error) FindFriendUserIDs(ctx context.Context, ownerUserID string) (friendUserIDs []string, err error) + FindBothFriendRequests(ctx context.Context, fromUserID, toUserID string) (friends []*relation.FriendRequestModel, err error) } type friendDatabase struct { @@ -363,3 +364,7 @@ func (f *friendDatabase) FindFriendUserIDs( ) (friendUserIDs []string, err error) { return f.cache.GetFriendIDs(ctx, ownerUserID) } + +func (f *friendDatabase) FindBothFriendRequests(ctx context.Context, fromUserID, toUserID string) (friends []*relation.FriendRequestModel, err error) { + return f.friendRequest.FindBothFriendRequests(ctx, fromUserID, toUserID) +} diff --git a/pkg/common/db/controller/group.go b/pkg/common/db/controller/group.go index af97d87ca..e2b5f90b3 100644 --- a/pkg/common/db/controller/group.go +++ b/pkg/common/db/controller/group.go @@ -110,6 +110,7 @@ type GroupDatabase interface { // GroupRequest CreateGroupRequest(ctx context.Context, requests []*relationTb.GroupRequestModel) error TakeGroupRequest(ctx context.Context, groupID string, userID string) (*relationTb.GroupRequestModel, error) + FindGroupRequests(ctx context.Context, groupID string, userIDs []string) (int64, []*relationTb.GroupRequestModel, error) PageGroupRequestUser( ctx context.Context, userID string, @@ -576,3 +577,7 @@ func (g *groupDatabase) CountTotal(ctx context.Context, before *time.Time) (coun func (g *groupDatabase) CountRangeEverydayTotal(ctx context.Context, start time.Time, end time.Time) (map[string]int64, error) { return g.groupDB.CountRangeEverydayTotal(ctx, start, end) } + +func (g *groupDatabase) FindGroupRequests(ctx context.Context, groupID string, userIDs []string) (int64, []*relationTb.GroupRequestModel, error) { + return g.groupRequestDB.FindGroupRequests(ctx, groupID, userIDs) +} diff --git a/pkg/common/db/relation/friend_request_model.go b/pkg/common/db/relation/friend_request_model.go index 9f5cbbfee..d17cc680b 100644 --- a/pkg/common/db/relation/friend_request_model.go +++ b/pkg/common/db/relation/friend_request_model.go @@ -147,3 +147,14 @@ func (f *FriendRequestGorm) FindFromUserID( ) return } + +func (f *FriendRequestGorm) FindBothFriendRequests(ctx context.Context, fromUserID, toUserID string) (friends []*relation.FriendRequestModel, err error) { + err = utils.Wrap( + f.db(ctx). + Where("(from_user_id = ? AND to_user_id = ?) OR (from_user_id = ? AND to_user_id = ?)", fromUserID, toUserID, toUserID, fromUserID). + Find(&friends). + Error, + "", + ) + return +} diff --git a/pkg/common/db/relation/group_request_model.go b/pkg/common/db/relation/group_request_model.go index a38f1f782..7c0497aaf 100644 --- a/pkg/common/db/relation/group_request_model.go +++ b/pkg/common/db/relation/group_request_model.go @@ -110,3 +110,8 @@ func (g *GroupRequestGorm) PageGroup( showNumber, ) } + +func (g *GroupRequestGorm) FindGroupRequests(ctx context.Context, groupID string, userIDs []string) (total int64, groupRequests []*relation.GroupRequestModel, err error) { + err = g.DB.WithContext(ctx).Where("group_id = ? and user_id in ?", groupID, userIDs).Find(&groupRequests).Error + return int64(len(groupRequests)), groupRequests, utils.Wrap(err, utils.GetSelfFuncName()) +} diff --git a/pkg/common/db/table/relation/friend_request.go b/pkg/common/db/table/relation/friend_request.go index 794f33aaf..51ea0ef6e 100644 --- a/pkg/common/db/table/relation/friend_request.go +++ b/pkg/common/db/table/relation/friend_request.go @@ -61,6 +61,6 @@ type FriendRequestModelInterface interface { fromUserID string, pageNumber, showNumber int32, ) (friendRequests []*FriendRequestModel, total int64, err error) - + FindBothFriendRequests(ctx context.Context, fromUserID, toUserID string) (friends []*FriendRequestModel, err error) NewTx(tx any) FriendRequestModelInterface } diff --git a/pkg/common/db/table/relation/group_request.go b/pkg/common/db/table/relation/group_request.go index ba68bcd7b..063b83938 100644 --- a/pkg/common/db/table/relation/group_request.go +++ b/pkg/common/db/table/relation/group_request.go @@ -47,6 +47,7 @@ type GroupRequestModelInterface interface { Delete(ctx context.Context, groupID string, userID string) (err error) UpdateHandler(ctx context.Context, groupID string, userID string, handledMsg string, handleResult int32) (err error) Take(ctx context.Context, groupID string, userID string) (groupRequest *GroupRequestModel, err error) + FindGroupRequests(ctx context.Context, groupID string, userIDs []string) (int64, []*GroupRequestModel, error) Page( ctx context.Context, userID string, diff --git a/pkg/rpcclient/notification/conevrsation.go b/pkg/rpcclient/notification/conevrsation.go index 9c8066d00..a5f57c570 100644 --- a/pkg/rpcclient/notification/conevrsation.go +++ b/pkg/rpcclient/notification/conevrsation.go @@ -31,23 +31,22 @@ func NewConversationNotificationSender(msgRpcClient *rpcclient.MessageRpcClient) } // SetPrivate调用. -func (c *ConversationNotificationSender) ConversationSetPrivateNotification( - ctx context.Context, - sendID, recvID string, - isPrivateChat bool, -) error { +func (c *ConversationNotificationSender) ConversationSetPrivateNotification(ctx context.Context, sendID, recvID string, + isPrivateChat bool, conversationID string) error { tips := &sdkws.ConversationSetPrivateTips{ - RecvID: recvID, - SendID: sendID, - IsPrivate: isPrivateChat, + RecvID: recvID, + SendID: sendID, + IsPrivate: isPrivateChat, + ConversationID: conversationID, } return c.Notification(ctx, sendID, recvID, constant.ConversationPrivateChatNotification, tips) } // 会话改变. -func (c *ConversationNotificationSender) ConversationChangeNotification(ctx context.Context, userID string) error { +func (c *ConversationNotificationSender) ConversationChangeNotification(ctx context.Context, userID string, conversationIDs []string) error { tips := &sdkws.ConversationUpdateTips{ - UserID: userID, + UserID: userID, + ConversationIDList: conversationIDs, } return c.Notification(ctx, userID, userID, constant.ConversationChangeNotification, tips) } From a86d24cfd105874417a215cfb6bc15b7dc0e644d Mon Sep 17 00:00:00 2001 From: Xinwei Xiong <3293172751@qq.com> Date: Thu, 27 Jul 2023 14:38:46 +0800 Subject: [PATCH 16/61] feat: config env optimize (#680) Signed-off-by: Xinwei Xiong(cubxxw-openim) <3293172751nss@gmail.com> --- .env | 6 +- config/config.yaml | 282 +++++++++++++++++++++++++++++++-------------- install.sh | 8 +- 3 files changed, 205 insertions(+), 91 deletions(-) diff --git a/.env b/.env index e7971a07a..910d864b8 100644 --- a/.env +++ b/.env @@ -1,5 +1,5 @@ USER=root PASSWORD=openIM123 -MINIO_ENDPOINT=http://116.30.3.80:10005 -API_URL=http://116.30.3.80:10002/object/ -DATA_DIR=./ +MINIO_ENDPOINT=http://113.99.98.99:10005 +API_URL=http://113.99.98.99:10002/object/ +DATA_DIR=./ \ No newline at end of file diff --git a/config/config.yaml b/config/config.yaml index 3f43a7a69..74c864fc3 100644 --- a/config/config.yaml +++ b/config/config.yaml @@ -12,81 +12,133 @@ # See the License for the specific language governing permissions and # limitations under the License. -#OpenIM config - - -#---------------Infrastructure configuration---------------------# +# ----------------------------------------------------------------- +# Infrastructural configurations, please modify based on your setup +# ----------------------------------------------------------------- + +###################### Zookeeper ###################### +# Zookeeper configuration +# It's not recommended to modify the schema +# +# Zookeeper address +# Zookeeper username +# Zookeeper password zookeeper: - schema: openim #不建议修改 - address: [ 127.0.0.1:2181 ] # - username: #用户名 - password: #密码 - + schema: openim + address: [ 127.0.0.1:2181 ] + username: + password: + +###################### Mysql ###################### +# MySQL configuration +# Currently, only single machine setup is supported +# +# Maximum number of open connections +# Maximum number of idle connections +# Maximum lifetime in seconds a connection can be reused +# Log level: 1=slient, 2=error, 3=warn, 4=info +# Slow query threshold in milliseconds mysql: - address: [ 127.0.0.1:13306 ] #目前仅支持单机 + address: [ 127.0.0.1:13306 ] username: root password: openIM123 - database: openIM_v3 #不建议修改 - maxOpenConn: 1000 #最大连接数 - maxIdleConn: 100 #最大空闲连接数 - maxLifeTime: 60 #连接可以重复使用的最长时间(秒) - logLevel: 4 #日志级别 1=slient 2=error 3=warn 4=info - slowThreshold: 500 #慢语句阈值 (毫秒) - + database: openIM_v3 + maxOpenConn: 1000 + maxIdleConn: 100 + maxLifeTime: 60 + logLevel: 4 + slowThreshold: 500 + +###################### Mongo ###################### +# MongoDB configuration +# If uri is not empty, it will be used directly +# +# MongoDB address for standalone setup, Mongos address for sharded cluster setup +# Default MongoDB database name +# Maximum connection pool size mongo: - uri: #不为空则直接使用该值 - address: [ 127.0.0.1:37017 ] #单机时为mongo地址,使用分片集群时,为mongos地址 - database: openIM_v3 #mongo db 默认即可 + uri: + address: [ 127.0.0.1:37017 ] + database: openIM_v3 username: root password: openIM123 - maxPoolSize: 100 + maxPoolSize: 100 +###################### Redis ###################### +# Redis configuration +# +# Username is required only for Redis version 6.0+ redis: - address: [ 127.0.0.1:16379 ] # - username: #only redis version 6.0+ need username + address: [ 127.0.0.1:16379 ] + username: password: openIM123 +###################### Kafka ###################### +# Kafka configuration +# +# Kafka username +# Kafka password +# It's not recommended to modify this topic name +# Consumer group ID, it's not recommended to modify kafka: - username: #用户名 - password: #密码 - addr: [ 127.0.0.1:9092 ] # + username: + password: + addr: [ 127.0.0.1:9092 ] latestMsgToRedis: - topic: "latestMsgToRedis" #不建议修改 + topic: "latestMsgToRedis" offlineMsgToMongo: - topic: "offlineMsgToMongoMysql" #不建议修改 + topic: "offlineMsgToMongoMysql" msgToPush: - topic: "msgToPush" #不建议修改 - consumerGroupID: #消费者组,不建议修改 - msgToRedis: redis # - msgToMongo: mongo # - msgToMySql: mysql # - msgToPush: push # - - + topic: "msgToPush" + consumerGroupID: + msgToRedis: redis + msgToMongo: mongo + msgToMySql: mysql + msgToPush: push + +###################### RPC ###################### +# RPC configuration +# +# IP address to register with zookeeper when starting RPC, the IP and corresponding rpcPort should be accessible by api/gateway +# Default listen IP is 0.0.0.0 rpc: - registerIP: #作为rpc启动时,注册到zookeeper的IP,api/gateway能访问到此ip和对应的rpcPort中的端口 - listenIP: #默认为0.0.0.0 - + registerIP: + listenIP: 0.0.0.0 +###################### API ###################### +# API configuration +# +# API service port +# Default listen IP is 0.0.0.0 api: - openImApiPort: [ 10002 ] #api服务端口 - listenIP: #默认为0.0.0.0 + openImApiPort: [ 10002 ] + listenIP: 0.0.0.0 +###################### Gateway ###################### +# Object storage configuration +# +# Use minio for object storage +# API URL should be accessible by the app +# It's not recommended to modify the bucket name +# Endpoint should be accessible by the app +# Session token +# Configuration for Tencent COS +# Configuration for Aliyun OSS object: - enable: "minio" #使用minio - apiURL: "http://127.0.0.1:10002/object/" #地址需要app能访问到 + enable: "minio" + apiURL: "http://127.0.0.1:10002/object/" minio: - bucket: "openim" #不建议修改 - endpoint: http://127.0.0.1:10005 #地址需要app能够访问 + bucket: "openim" + endpoint: http://127.0.0.1:10005 accessKeyID: root secretAccessKey: openIM123 - sessionToken: "" #token - cos: #tencent cos + sessionToken: "" + cos: bucketURL: "https://temp-1252357374.cos.ap-chengdu.myqcloud.com" secretID: "" secretKey: "" sessionToken: "" - oss: #ali oss + oss: endpoint: "https://oss-cn-chengdu.aliyuncs.com" bucket: "demo-9999999" bucketURL: "https://demo-9999999.oss-cn-chengdu.aliyuncs.com" @@ -94,7 +146,11 @@ object: accessKeySecret: "" sessionToken: "" -rpcPort: #rpc服务端口,不建议修改,端口由脚本读取后传入程序,如启动多个程序,只需要填入多个端口,用逗号隔开,如 [10110, 10111] +# RPC service ports +# These ports are passed into the program by the script and are not recommended to modify +# For launching multiple programs, just fill in multiple ports separated by commas +# For example, [10110, 10111] +rpcPort: openImUserPort: [ 10110 ] openImFriendPort: [ 10120 ] openImMessagePort: [ 10130 ] @@ -105,7 +161,8 @@ rpcPort: #rpc服务端口,不建议修改,端口由脚本读取后传入程 openImConversationPort: [ 10180 ] openImThirdPort: [ 10190 ] -rpcRegisterName: #rpc注册服务名,不建议修改 +# RPC service names for registration, it's not recommended to modify these +rpcRegisterName: openImUserName: User openImFriendName: Friend openImMsgName: Msg @@ -116,78 +173,132 @@ rpcRegisterName: #rpc注册服务名,不建议修改 openImConversationName: Conversation openImThirdName: Third +# Log configuration +# +# Storage directory +# Log rotation time +# Maximum number of logs to retain +# Log level, 6 means all levels +# Whether to output to stdout +# Whether to output in json format +# Whether to include stack trace in logs log: - storageLocation: ../../../../../logs/ #存放目录 - rotationTime: 24 #日志旋转时间 - remainRotationCount: 2 #日志数量 - remainLogLevel: 6 #日志级别 6表示全都打印, - isStdout: false - isJson: false + storageLocation: ../../../../../logs/ + rotationTime: 24 + remainRotationCount: 2 + remainLogLevel: 6 + isStdout: false + isJson: false withStack: false +# Long connection server configuration +# +# Websocket port for msg_gateway +# Maximum number of websocket connections +# Maximum length of websocket request package +# Websocket connection handshake timeout longConnSvr: - openImWsPort: [ 10001 ] #msg_gateway的websocket端口 - websocketMaxConnNum: 100000 #websocket最大连接数 - websocketMaxMsgLen: 4096 #websocket请求包最大长度 - websocketTimeout: 10 #websocket连接握手超时时间 + openImWsPort: [ 10001 ] + websocketMaxConnNum: 100000 + websocketMaxMsgLen: 4096 + websocketTimeout: 10 +# Push notification service configuration +# +# Use GeTui for push notifications +# GeTui offline push configuration +# FCM offline push configuration +# Account file, place it in the config directory +# JPush configuration, modify these after applying in JPush backend push: enable: getui - geTui: #个推离线推送 + geTui: pushUrl: "https://restapi.getui.com/v2/$appId" masterSecret: "" appKey: "" intent: "" channelID: "" channelName: "" - fcm: #fcm离线推送 - serviceAccount: "x.json" #帐号文件,并放在 config目录下 - jpns: #极光推送 在极光后台申请后,修改以下四项 + fcm: + serviceAccount: "x.json" + jpns: appKey: masterSecret: pushUrl: pushIntent: +# App manager configuration +# +# Built-in app manager user IDs +# Built-in app manager nicknames manager: - userID: [ "openIM123456","openIM654321","openIMAdmin" ] #内置的app管理员userID - nickname: [ "system1","system2", "system3" ] #内置的app管理员nickname + userID: [ "openIM123456","openIM654321","openIMAdmin" ] + nickname: [ "system1","system2", "system3" ] +# Multi-platform login policy +# For each platform(Android, iOS, Windows, Mac, web), only one can be online at a time +multiLoginPolicy: 1 +# Whether to store messages in MySQL, messages in MySQL are only used for management background +chatPersistenceMysql: true +# Message cache timeout in seconds, it's not recommended to modify +msgCacheTimeout: 86400 -multiLoginPolicy: 1 #多平台登录:Android、iOS、Windows、Mac、web 每种平台只能有一个在线 +# Whether to enable read receipts for group chat +groupMessageHasReadReceiptEnable: true +# Whether to enable read receipts for single chat +singleMessageHasReadReceiptEnable: true -chatPersistenceMysql: true #消息是否存入mysql,mysql中的消息仅用于管理后台使用 -msgCacheTimeout: 86400 #信消息缓存时间秒,不建议修改 -groupMessageHasReadReceiptEnable: true #群聊已读是否开启 -singleMessageHasReadReceiptEnable: true #单聊已读是否开启 +# MongoDB offline message retention period in days +retainChatRecords: 365 -retainChatRecords: 365 #mongo保存离线消息时间(天) -chatRecordsClearTime: "0 2 * * 3" #每周三凌晨2点清理mongo中的过期(超过retainChatRecords时间)消息,这个删除是为了清理满足上个配置retainChatRecords的过期消息,不会发送通知,仅仅作为清理磁盘使用 -msgDestructTime: "0 2 * * *" #消息自动删除时间,每天凌晨2点删除过期消息,这个删除是为了删除保留时间超过超过会话字段msg_destruct_time(秒)的消息。 +# Schedule to clear expired messages(older than retainChatRecords days) in MongoDB every Wednesday at 2am +# This deletion is just for cleaning up disk usage according to previous configuration retainChatRecords, no notification will be sent +chatRecordsClearTime: "0 2 * * 3" +# Schedule to auto delete messages every day at 2am +# This deletion is for messages that have been retained for more than msg_destruct_time (seconds) in the conversation field +msgDestructTime: "0 2 * * *" + +# Secret key secret: openIM123 +# Token policy +# +# Token expiration period in days tokenPolicy: - expire: 90 #过期时间(天) + expire: 90 +# Message verification policy +# +# Whether to verify friendship when sending messages messageVerify: - friendVerify: false #发送消息时是否验证好友关系 + friendVerify: false -#ios系统推送声音以及标记计数 +# iOS push notification configuration +# +# iOS push notification sound +# Whether to count badge +# Whether it's production environment iosPush: pushSound: "xxx" badgeCount: true production: false +# Callback configuration +# +# Callback URL +# Whether to enable this callback event +# Timeout in seconds +# Whether to continue execution if callback fails callback: - # 回调callback url: beforeSendSingleMsg: - enable: false #是否启用此回调事件 - timeout: 5 #超时时间(秒) - failedContinue: true #如回调失败是否继续往后执行 + enable: false + timeout: 5 + failedContinue: true afterSendSingleMsg: enable: false timeout: 5 @@ -244,8 +355,11 @@ callback: timeout: 5 failedContinue: true - -prometheus: #prometheus每个服务的端口数量需要和rpcPort保持对应 +###################### Prometheus ###################### +# Prometheus configuration +# The number of Prometheus ports per service needs to correspond to rpcPort +# The number of ports needs to be consistent with msg_transfer_service_num in script/path_info.sh +prometheus: enable: false userPrometheusPort: [ 20110 ] friendPrometheusPort: [ 20120 ] @@ -257,4 +371,4 @@ prometheus: #prometheus每个服务的端口数量需要和rpcPort保持对应 conversationPrometheusPort: [ 20230 ] rtcPrometheusPort: [ 21300 ] thirdPrometheusPort: [ 21301 ] - messageTransferPrometheusPort: [ 21400, 21401, 21402, 21403 ] #端口数量需要和script/path_info.sh中的msg_transfer_service_num保持一致 \ No newline at end of file + messageTransferPrometheusPort: [ 21400, 21401, 21402, 21403 ] \ No newline at end of file diff --git a/install.sh b/install.sh index 0c3a3945e..f9b9b7ec4 100755 --- a/install.sh +++ b/install.sh @@ -308,9 +308,9 @@ function cmd_help() { color_echo ${BLUE_PREFIX} "-cn, --china ${CYAN_PREFIX}set to use the Chinese domestic proxy${COLOR_SUFFIX}" color_echo ${BLUE_PREFIX} "-t, --tag ${CYAN_PREFIX}specify the tag (default option, set to latest if not specified)${COLOR_SUFFIX}" color_echo ${BLUE_PREFIX} "-r, --release ${CYAN_PREFIX}specify the release branch (cannot be used with the tag option)${COLOR_SUFFIX}" - color_echo ${BLUE_PREFIX} "-g, --go-version ${CYAN_PREFIX}set the Go language version (default: GO_VERSION=\"1.18\")${COLOR_SUFFIX}" - color_echo ${BLUE_PREFIX} "-i, --install-dir ${CYAN_PREFIX}set the OpenIM installation directory (default: /tmp)${COLOR_SUFFIX}" color_echo ${BLUE_PREFIX} "-gt, --github-token ${CYAN_PREFIX}set the GITHUB_TOKEN (default: not set)${COLOR_SUFFIX}" + color_echo ${BLUE_PREFIX} "-g, --go-version ${CYAN_PREFIX}set the Go language version (default: GO_VERSION=\"1.18\")${COLOR_SUFFIX}" + color_echo ${BLUE_PREFIX} "--install-dir ${CYAN_PREFIX}set the OpenIM installation directory (default: /tmp)${COLOR_SUFFIX}" color_echo ${BLUE_PREFIX} "--cpu ${CYAN_PREFIX}set the number of concurrent processes${COLOR_SUFFIX}" echo color_echo ${RED_PREFIX} "Note: Only one of the -t/--tag or -r/--release options can be used at a time.${COLOR_SUFFIX}" @@ -380,7 +380,7 @@ function parseinput() { shift GO_VERSION=$1 ;; - -i|--install-dir) + --install-dir) shift INSTALL_DIR=$1 ;; @@ -435,7 +435,7 @@ print_progress() { color_echo() { COLOR=$1 shift - echo -e "${COLOR}===> $* ${COLOR_SUFFIX}" + echo -e "${COLOR} $* ${COLOR_SUFFIX}" } # Color definitions From 68e521d198a6292514766548c32aa6b416a9a4ea Mon Sep 17 00:00:00 2001 From: Xinwei Xiong <3293172751@qq.com> Date: Thu, 27 Jul 2023 15:00:33 +0800 Subject: [PATCH 17/61] feat: config env optimize (#683) * feat: config env optimize Signed-off-by: Xinwei Xiong(cubxxw-openim) <3293172751nss@gmail.com> * docs: add readme docs Signed-off-by: Xinwei Xiong(cubxxw-openim) <3293172751nss@gmail.com> --------- Signed-off-by: Xinwei Xiong(cubxxw-openim) <3293172751nss@gmail.com> --- config/config.yaml | 2 +- scripts/README.md | 70 +++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 70 insertions(+), 2 deletions(-) diff --git a/config/config.yaml b/config/config.yaml index 74c864fc3..6bf3cf06e 100644 --- a/config/config.yaml +++ b/config/config.yaml @@ -142,7 +142,7 @@ object: endpoint: "https://oss-cn-chengdu.aliyuncs.com" bucket: "demo-9999999" bucketURL: "https://demo-9999999.oss-cn-chengdu.aliyuncs.com" - accessKeyID: "" + accessKeyID: root accessKeySecret: "" sessionToken: "" diff --git a/scripts/README.md b/scripts/README.md index 04bda00ae..da21596d6 100644 --- a/scripts/README.md +++ b/scripts/README.md @@ -1,4 +1,72 @@ -# `/scripts` +# OpenIM Scripts Directory Structure + +This document outlines the directory structure for scripts in the OpenIM Server project. These scripts play a critical role in various areas like building, deploying, running and managing the services of OpenIM. + +```bash +scripts/ +├── LICENSE # License related files +│ ├── LICENSE # The license file +│ └── LICENSE_TEMPLATES # Template for license file +├── README.md # Readme file for scripts directory +├── advertise.sh # Script for advertisement services +├── batch_start_all.sh # Script to start all services in batch +├── build.cmd # Windows build command script +├── build_all_service.sh # Script to build all services +├── build_push_k8s_images.sh # Script to build and push images for Kubernetes +├── check_all.sh # Script to check status of all services +├── common.sh # Contains common functions used by other scripts +├── coverage.awk # AWK script for coverage report generation +├── coverage.sh # Script for generating coverage reports +├── docker_check_service.sh # Docker specific service check script +├── docker_start_all.sh # Script to start all services in a docker environment +├── ensure_tag.sh # Script to ensure proper tagging of docker images +├── enterprise # Scripts specific to enterprise version +│ ├── check_all.sh # Check status of all enterprise services +│ ├── function.sh # Functions specific to enterprise version +│ └── path_info.cfg # Path information configuration for enterprise version +├── env_check.sh # Script to check the environment +├── function.sh # Contains functions used by other scripts +├── githooks # Git hook scripts +│ ├── commit-msg # Script to validate commit message +│ ├── pre-commit # Script to run before each commit +│ └── pre-push # Script to run before each push +├── init_pwd.sh # Script to initialize password +├── install_im_compose.sh # Script to install IM with Docker Compose +├── install_im_server.sh # Script to install IM server +├── lib # Library scripts +│ ├── color.sh # Script for console color manipulation +│ ├── golang.sh # Script for golang related utility functions +│ ├── init.sh # Script for initialization tasks +│ ├── logging.sh # Script for logging related utility functions +│ ├── release.sh # Script for release related utility functions +│ ├── util.sh # Script for generic utility functions +│ └── version.sh # Script for versioning related tasks +├── make-rules # Makefile rules +│ ├── common.mk # Common Make rules +│ ├── copyright.mk # Copyright related Make rules +│ ├── dependencies.mk # Dependencies related Make rules +│ ├── gen.mk # Make rules for code generation +│ ├── golang.mk # Golang specific Make rules +│ ├── image.mk # Make rules for image building +│ ├── release.mk # Make rules for release process +│ ├── swagger.mk # Make rules for swagger documentation +│ └── tools.mk # Make rules for tools and utilities +├── mongo-init.sh # Script to initialize MongoDB +├── msg_gateway_start.sh # Script to start message gateway service +├── msg_transfer_start.sh # Script to start message transfer service +├── path_info.sh # Script containing path information +├── push_start.sh # Script to start push service +├── release.sh # Script to perform release process +├── start_all.sh # Script to start all services +├── start_cron.sh # Script to start cron jobs +├── start_rpc_service.sh # Script to start RPC service +├── stop_all.sh # Script to stop all services +└── style_info.sh # Script containing style related information +``` + +The purpose of having a structured scripts directory like this is to make the operations of OpenIM Server clear and easy to manage. Each script has its own responsibility, making it easier to maintain and update. It's also helpful for newcomers who can easily understand what each part of the system is doing by just looking at this directory structure. + +Each directory and script in the structure should be understood as a part of a larger whole. All scripts work together to ensure the smooth operation and maintenance of the OpenIM Server. ## Supported platforms From df710495333b6ce8e6783a551bccba4273269c09 Mon Sep 17 00:00:00 2001 From: WangchuXiao Date: Thu, 27 Jul 2023 15:04:50 +0800 Subject: [PATCH 18/61] fix bug: delete friend and repeat add friend not effect (#682) * new feature: add batch send msg * new feature: add batch send msg * new feature: add batch send msg * new feature: add batch send msg * new feature: add batch send msg * new feature: add batch send msg * fix bug: multiple gateway kick user * fix bug: multiple gateway kick user * fix bug: multiple gateway kick user * fix bug: multiple gateway kick user * fix bug: multiple gateway kick user * MsgDestructTime * fix bug: msg destruct sql * fix bug: msg destruct * fix bug: msg destruct * fix bug: msg destruct sql * fix bug: msg destruct sql * fix bug: msg destruct sql * fix bug: msg destruct sql * debug: print stack * debug: print stack * debug: print stack * fix bug: msg destruct sql Signed-off-by: wangchuxiao * fix bug: msg notification self 2 self push twice * fix bug: heartbeat get self notification * fix bug: init grpc conn in one process * fix bug: grpc conn Signed-off-by: wangchuxiao * fix bug: zk client recreate node when reconn * fix bug: set friend mark args error * fix bug: rpc client intercepter called twice Signed-off-by: wangchuxiao * cicd: robot automated Change Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * test: document msg num set 100 * new feat: sync designated model * new feat: sync designated model * new feat: sync designated model * new feat: sync designated model * new feat: sync designated model * new feat: sync designated model * new feat: sync designated model * merge code * merge code * fix bug: repeat add friend not effect --------- Signed-off-by: wangchuxiao Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: wangchuxiao-dev --- pkg/common/db/controller/friend.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkg/common/db/controller/friend.go b/pkg/common/db/controller/friend.go index cab838bb4..0f9315c20 100644 --- a/pkg/common/db/controller/friend.go +++ b/pkg/common/db/controller/friend.go @@ -24,6 +24,7 @@ import ( "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/table/relation" "github.com/OpenIMSDK/protocol/constant" "github.com/OpenIMSDK/tools/errs" + "github.com/OpenIMSDK/tools/log" "github.com/OpenIMSDK/tools/mcontext" "github.com/OpenIMSDK/tools/tx" "github.com/OpenIMSDK/tools/utils" @@ -222,6 +223,7 @@ func (f *friendDatabase) AgreeFriendRequest( friendRequest *relation.FriendRequestModel, ) (err error) { return f.tx.Transaction(func(tx any) error { + defer log.ZDebug(ctx, "return line") now := time.Now() fr, err := f.friendRequest.NewTx(tx).Take(ctx, friendRequest.FromUserID, friendRequest.ToUserID) if err != nil { @@ -247,7 +249,7 @@ func (f *friendDatabase) AgreeFriendRequest( if err != nil { return err } - } else if errs.Unwrap(err) != gorm.ErrRecordNotFound { + } else if err != nil && errs.Unwrap(err) != gorm.ErrRecordNotFound { return err } From 0b9ac4bd873049ab6cbe73b66dfdef137a13c7f4 Mon Sep 17 00:00:00 2001 From: Xinwei Xiong <3293172751@qq.com> Date: Thu, 27 Jul 2023 16:44:02 +0800 Subject: [PATCH 19/61] Feat/develop test (#687) * docs: add readme docs Signed-off-by: Xinwei Xiong(cubxxw-openim) <3293172751nss@gmail.com> * feat: add script yaml Signed-off-by: Xinwei Xiong(cubxxw-openim) <3293172751nss@gmail.com> * feat: add script yaml Signed-off-by: Xinwei Xiong(cubxxw-openim) <3293172751nss@gmail.com> * feat: add test Signed-off-by: Xinwei Xiong(cubxxw-openim) <3293172751nss@gmail.com> * Update config.yaml * Update config.yaml --------- Signed-off-by: Xinwei Xiong(cubxxw-openim) <3293172751nss@gmail.com> --- .github/workflows/build-docker-image.yml | 38 +++++-- .github/workflows/deploy.yml | 86 ++++++++-------- .goreleaser.yaml | 120 +++++++++++------------ config/config.yaml | 6 +- 4 files changed, 139 insertions(+), 111 deletions(-) diff --git a/.github/workflows/build-docker-image.yml b/.github/workflows/build-docker-image.yml index ff58d8d8f..ef2659724 100644 --- a/.github/workflows/build-docker-image.yml +++ b/.github/workflows/build-docker-image.yml @@ -29,30 +29,31 @@ jobs: - name: Check out the repo uses: actions/checkout@v3 +# docker.io/openim/openim-server:latest - name: Log in to Docker Hub - uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9 + uses: docker/login-action@v2 with: username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_PASSWORD }} - name: Extract metadata (tags, labels) for Docker id: meta - uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38 + uses: docker/metadata-action@v4.6.0 with: images: openim/openim-server tags: latest - name: Build and push Docker image - uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc + uses: docker/build-push-action@v4 with: context: . push: true tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} - +# registry.cn-hangzhou.aliyuncs.com/openimsdk/openim-server:latest - name: Log in to AliYun Docker Hub - uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9 + uses: docker/login-action@v2 with: registry: registry.cn-hangzhou.aliyuncs.com username: ${{ secrets.ALIREGISTRY_USERNAME }} @@ -60,19 +61,42 @@ jobs: - name: Extract metadata (tags, labels) for Docker id: meta2 - uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38 + uses: docker/metadata-action@v4.6.0 with: images: registry.cn-hangzhou.aliyuncs.com/openimsdk/openim-server tags: latest - name: Build and push Docker image - uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc + uses: docker/build-push-action@v4 with: context: . push: true tags: ${{ steps.meta2.outputs.tags }} labels: ${{ steps.meta2.outputs.labels }} +# ghcr.io/openim/openim-server:latest + - name: Log in to GitHub Container Registry + uses: docker/login-action@v2 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Extract metadata (tags, labels) for Docker + id: meta3 + uses: docker/metadata-action@v4.6.0 + with: + images: openim/openim-server + tags: latest + + - name: Build and push Docker image + uses: docker/build-push-action@v4 + with: + context: . + push: true + tags: ${{ steps.meta3.outputs.tags }} + labels: ${{ steps.meta3.outputs.labels }} + # name: OpenIM Build Docker Images # on: # push: diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index ef50743a1..2d7798916 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -12,48 +12,52 @@ # See the License for the specific language governing permissions and # limitations under the License. -name: deploy for dev +name: OpenIM Deploy for dev on: - push: - branches: - - 'devops' # Only for the dev branch - paths: - - '.github/workflows/*' - # - '__test__/**' # dev No immediate testing is required - - 'src/**' - - 'Dockerfile' - - 'docker-compose.yml' - - 'bin/*' + push: + branches: + - 'devops' # Only for the dev branch + paths: + - '.github/workflows/*' + # - '__test__/**' # dev No immediate testing is required + - 'src/**' + - 'Dockerfile' + - 'docker-compose.yml' + - 'bin/*' -jobs: - deploy-dev: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v2 - - name: set ssh key # Temporarily set up ssh key - run: | - mkdir -p ~/.ssh/ - # secrets.WFP_ID_RSA set in GitHub - echo "${{secrets.WFP_ID_RSA}}" > ~/.ssh/id_rsa - chmod 600 ~/.ssh/id_rsa - ssh-keyscan "182.92.xxx.xxx" >> ~/.ssh/known_hosts - - name: deploy # Deployment - run: | - ssh work@182.92.xxx.xxx " - # 【Attention】Log in with the 'work' account, manually create /home/work/imooc-lego directory - # Then git clone https://username:password@github.com/imooc-lego/biz-editor-server.git -b dev (private repository, use GitHub username and password) - # Remember to delete origin to avoid exposing GitHub password +env: + SERVER_PRIVATE_KEY: ${{ secrets.SERVER_PRIVATE_KEY }} # server private key + SERVER_HOST: ${{ secrets.SERVER_HOST }} # server ip address + USER_NAME: ${{ secrets.USER_NAME }} # server username + cache-name: note - cd /home/work/imooc-lego/biz-editor-server; - git remote add origin https://openimbot:${{secrets.WFP_PASSWORD}}@github.com/OpenIMSDK/open-im-server.git; - git checkout dev; - git pull origin dev; # Download the latest code again - git remote remove origin; # Remove origin to avoid exposing GitHub password - # Start docker - docker-compose build editor-server; # Same as the service name in docker-compose.yml - docker-compose up -d; - " - - name: delete ssh key # Delete ssh key - run: rm -rf ~/.ssh/id_rsa +jobs: + deploy-dev: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: set ssh key # Temporarily set up ssh key + run: | + mkdir -p ~/.ssh/ + # secrets.WFP_ID_RSA set in GitHub + echo "${{secrets.WFP_ID_RSA}}" > ~/.ssh/id_rsa + chmod 600 ~/.ssh/id_rsa + ssh-keyscan "182.92.xxx.xxx" >> ~/.ssh/known_hosts + - name: deploy # Deployment + run: | + ssh work@182.92.xxx.xxx " + # 【Attention】Log in with the 'work' account, manually create /home/work/imooc-lego directory + # Then git clone https://username:password@github.com/imooc-lego/biz-editor-server.git -b dev (private repository, use GitHub username and password) + # Remember to delete origin to avoid exposing GitHub password + cd /home/work/imooc-lego/biz-editor-server; + git remote add origin https://openimbot:${{secrets.WFP_PASSWORD}}@github.com/OpenIMSDK/open-im-server.git; + git checkout dev; + git pull origin dev; # Download the latest code again + git remote remove origin; # Remove origin to avoid exposing GitHub password + # Start docker + docker-compose build editor-server; # Same as the service name in docker-compose.yml + docker-compose up -d; + " + - name: delete ssh key # Delete ssh key + run: rm -rf ~/.ssh/id_rsa \ No newline at end of file diff --git a/.goreleaser.yaml b/.goreleaser.yaml index 996a53745..e9eb44c94 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -335,66 +335,66 @@ changelog: - title: Other work order: 9999 -dockers: - - image_templates: - - "openimsdk/open-im-server:{{ .Tag }}-amd64" - - "ghcr.io/goreleaser/goreleaser:{{ .Tag }}-amd64" - dockerfile: Dockerfile - use: buildx - build_flag_templates: - - "--pull" - - "--label=io.artifacthub.package.readme-url=https://raw.githubusercontent.com/OpenIMSDK/Open-IM-Server/main/README.md" - - "--label=io.artifacthub.package.logo-url=hhttps://github.com/OpenIMSDK/Open-IM-Server/blob/main/assets/logo/openim-logo-green.png" - - '--label=io.artifacthub.package.maintainers=[{"name":"Xinwei Xiong","email":"3293172751nss@gmail.com"}]' - - "--label=io.artifacthub.package.license=Apace-2.0" - - "--label=org.opencontainers.image.description=OpenIM Open source top instant messaging system" - - "--label=org.opencontainers.image.created={{.Date}}" - - "--label=org.opencontainers.image.name={{.ProjectName}}" - - "--label=org.opencontainers.image.revision={{.FullCommit}}" - - "--label=org.opencontainers.image.version={{.Version}}" - - "--label=org.opencontainers.image.source={{.GitURL}}" - - "--platform=linux/amd64" - extra_files: - - scripts/entrypoint.sh - - image_templates: - - "goreleaser/goreleaser:{{ .Tag }}-arm64" - - "ghcr.io/goreleaser/goreleaser:{{ .Tag }}-arm64" - dockerfile: Dockerfile - use: buildx - build_flag_templates: - - "--pull" - - "--label=io.artifacthub.package.readme-url=https://raw.githubusercontent.com/OpenIMSDK/Open-IM-Server/main/README.md" - - "--label=io.artifacthub.package.logo-url=hhttps://github.com/OpenIMSDK/Open-IM-Server/blob/main/assets/logo/openim-logo-green.png" - - '--label=io.artifacthub.package.maintainers=[{"name":"Xinwei Xiong","email":"3293172751nss@gmail.com"}]' - - "--label=io.artifacthub.package.license=Apace-2.0" - - "--label=org.opencontainers.image.description=OpenIM Open source top instant messaging system" - - "--label=org.opencontainers.image.created={{.Date}}" - - "--label=org.opencontainers.image.name={{.ProjectName}}" - - "--label=org.opencontainers.image.revision={{.FullCommit}}" - - "--label=org.opencontainers.image.version={{.Version}}" - - "--label=org.opencontainers.image.source={{.GitURL}}" - - "--platform=linux/arm64" - goarch: arm64 - extra_files: - - scripts/entrypoint.sh - -docker_manifests: - - name_template: "goreleaser/goreleaser:{{ .Tag }}" - image_templates: - - "goreleaser/goreleaser:{{ .Tag }}-amd64" - - "goreleaser/goreleaser:{{ .Tag }}-arm64" - - name_template: "ghcr.io/goreleaser/goreleaser:{{ .Tag }}" - image_templates: - - "ghcr.io/goreleaser/goreleaser:{{ .Tag }}-amd64" - - "ghcr.io/goreleaser/goreleaser:{{ .Tag }}-arm64" - - name_template: "goreleaser/goreleaser:latest" - image_templates: - - "goreleaser/goreleaser:{{ .Tag }}-amd64" - - "goreleaser/goreleaser:{{ .Tag }}-arm64" - - name_template: "ghcr.io/goreleaser/goreleaser:latest" - image_templates: - - "ghcr.io/goreleaser/goreleaser:{{ .Tag }}-amd64" - - "ghcr.io/goreleaser/goreleaser:{{ .Tag }}-arm64" +# dockers: +# - image_templates: +# - "openimsdk/open-im-server:{{ .Tag }}-amd64" +# - "ghcr.io/goreleaser/goreleaser:{{ .Tag }}-amd64" +# dockerfile: Dockerfile +# use: buildx +# build_flag_templates: +# - "--pull" +# - "--label=io.artifacthub.package.readme-url=https://raw.githubusercontent.com/OpenIMSDK/Open-IM-Server/main/README.md" +# - "--label=io.artifacthub.package.logo-url=hhttps://github.com/OpenIMSDK/Open-IM-Server/blob/main/assets/logo/openim-logo-green.png" +# - '--label=io.artifacthub.package.maintainers=[{"name":"Xinwei Xiong","email":"3293172751nss@gmail.com"}]' +# - "--label=io.artifacthub.package.license=Apace-2.0" +# - "--label=org.opencontainers.image.description=OpenIM Open source top instant messaging system" +# - "--label=org.opencontainers.image.created={{.Date}}" +# - "--label=org.opencontainers.image.name={{.ProjectName}}" +# - "--label=org.opencontainers.image.revision={{.FullCommit}}" +# - "--label=org.opencontainers.image.version={{.Version}}" +# - "--label=org.opencontainers.image.source={{.GitURL}}" +# - "--platform=linux/amd64" +# extra_files: +# - scripts/entrypoint.sh +# - image_templates: +# - "goreleaser/goreleaser:{{ .Tag }}-arm64" +# - "ghcr.io/goreleaser/goreleaser:{{ .Tag }}-arm64" +# dockerfile: Dockerfile +# use: buildx +# build_flag_templates: +# - "--pull" +# - "--label=io.artifacthub.package.readme-url=https://raw.githubusercontent.com/OpenIMSDK/Open-IM-Server/main/README.md" +# - "--label=io.artifacthub.package.logo-url=hhttps://github.com/OpenIMSDK/Open-IM-Server/blob/main/assets/logo/openim-logo-green.png" +# - '--label=io.artifacthub.package.maintainers=[{"name":"Xinwei Xiong","email":"3293172751nss@gmail.com"}]' +# - "--label=io.artifacthub.package.license=Apace-2.0" +# - "--label=org.opencontainers.image.description=OpenIM Open source top instant messaging system" +# - "--label=org.opencontainers.image.created={{.Date}}" +# - "--label=org.opencontainers.image.name={{.ProjectName}}" +# - "--label=org.opencontainers.image.revision={{.FullCommit}}" +# - "--label=org.opencontainers.image.version={{.Version}}" +# - "--label=org.opencontainers.image.source={{.GitURL}}" +# - "--platform=linux/arm64" +# goarch: arm64 +# extra_files: +# - scripts/entrypoint.sh + +# docker_manifests: +# - name_template: "goreleaser/goreleaser:{{ .Tag }}" +# image_templates: +# - "goreleaser/goreleaser:{{ .Tag }}-amd64" +# - "goreleaser/goreleaser:{{ .Tag }}-arm64" +# - name_template: "ghcr.io/goreleaser/goreleaser:{{ .Tag }}" +# image_templates: +# - "ghcr.io/goreleaser/goreleaser:{{ .Tag }}-amd64" +# - "ghcr.io/goreleaser/goreleaser:{{ .Tag }}-arm64" +# - name_template: "goreleaser/goreleaser:latest" +# image_templates: +# - "goreleaser/goreleaser:{{ .Tag }}-amd64" +# - "goreleaser/goreleaser:{{ .Tag }}-arm64" +# - name_template: "ghcr.io/goreleaser/goreleaser:latest" +# image_templates: +# - "ghcr.io/goreleaser/goreleaser:{{ .Tag }}-amd64" +# - "ghcr.io/goreleaser/goreleaser:{{ .Tag }}-arm64" nfpms: - id: packages diff --git a/config/config.yaml b/config/config.yaml index 6bf3cf06e..348aa2e93 100644 --- a/config/config.yaml +++ b/config/config.yaml @@ -126,10 +126,10 @@ api: # Configuration for Aliyun OSS object: enable: "minio" - apiURL: "http://127.0.0.1:10002/object/" + apiURL: http://127.0.0.1:10002/object/ minio: bucket: "openim" - endpoint: http://127.0.0.1:10005 + endpoint: http://127.0.0.1:10005 accessKeyID: root secretAccessKey: openIM123 sessionToken: "" @@ -371,4 +371,4 @@ prometheus: conversationPrometheusPort: [ 20230 ] rtcPrometheusPort: [ 21300 ] thirdPrometheusPort: [ 21301 ] - messageTransferPrometheusPort: [ 21400, 21401, 21402, 21403 ] \ No newline at end of file + messageTransferPrometheusPort: [ 21400, 21401, 21402, 21403 ] From 4d816978ec8f03eb7d6652599ebd5a72d35ed06e Mon Sep 17 00:00:00 2001 From: pluto <83957921+plutoyty@users.noreply.github.com> Date: Thu, 27 Jul 2023 19:46:44 +0800 Subject: [PATCH 20/61] Resolving code conflicts after project directory changes and Add user subscription to the operation from rpc to db layer (#684) * Resolving code conflicts after project directory changes and Add subscribe and unsubscribe mongodb operations * Organize and update module dependencies --- go.mod | 2 +- go.sum | 4 +- internal/api/route.go | 3 + internal/api/user.go | 18 +++- internal/rpc/user/user.go | 33 +++++- internal/tools/msg.go | 2 + pkg/common/db/controller/user.go | 89 +++++++++++----- pkg/common/db/table/unrelation/user.go | 42 ++++++++ pkg/common/db/unrelation/user.go | 141 +++++++++++++++++++++++++ 9 files changed, 295 insertions(+), 39 deletions(-) create mode 100644 pkg/common/db/table/unrelation/user.go create mode 100644 pkg/common/db/unrelation/user.go diff --git a/go.mod b/go.mod index e4bc8edc6..c18eabd08 100644 --- a/go.mod +++ b/go.mod @@ -37,7 +37,7 @@ require ( require github.com/google/uuid v1.3.0 require ( - github.com/OpenIMSDK/protocol v0.0.1 + github.com/OpenIMSDK/protocol v0.0.2 github.com/OpenIMSDK/tools v0.0.5 github.com/aliyun/aliyun-oss-go-sdk v2.2.7+incompatible github.com/go-redis/redis v6.15.9+incompatible diff --git a/go.sum b/go.sum index 0089e1924..a93a1687a 100644 --- a/go.sum +++ b/go.sum @@ -16,8 +16,8 @@ cloud.google.com/go/storage v1.28.1/go.mod h1:Qnisd4CqDdo6BGs2AD5LLnEsmSQ80wQ5og firebase.google.com/go v3.13.0+incompatible h1:3TdYC3DDi6aHn20qoRkxwGqNgdjtblwVAyRLQwGn/+4= firebase.google.com/go v3.13.0+incompatible/go.mod h1:xlah6XbEyW6tbfSklcfe5FHJIwjt8toICdV5Wh9ptHs= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/OpenIMSDK/protocol v0.0.1 h1:Q6J1jCU00dfqmguxw2XI+IGcVfBAkb5Tz8LgvyeNkk0= -github.com/OpenIMSDK/protocol v0.0.1/go.mod h1:F25dFrwrIx3lkNoiuf6FkCfxuwf8L4Z8UIsdTHP/r0Y= +github.com/OpenIMSDK/protocol v0.0.2 h1:O53/WiqLCHF9aWPLI32GPF82hn7suM8PkhrtL89Klrw= +github.com/OpenIMSDK/protocol v0.0.2/go.mod h1:F25dFrwrIx3lkNoiuf6FkCfxuwf8L4Z8UIsdTHP/r0Y= github.com/OpenIMSDK/tools v0.0.5 h1:yBVHJ3EpIDcp8VFKPjuGr6MQvFa3t4JByZ+vmeC06/Q= github.com/OpenIMSDK/tools v0.0.5/go.mod h1:eg+q4A34Qmu73xkY0mt37FHGMCMfC6CtmOnm0kFEGFI= github.com/QcloudApi/qcloud_sign_golang v0.0.0-20141224014652-e4130a326409/go.mod h1:1pk82RBxDY/JZnPQrtqHlUFfCctgdorsd9M06fMynOM= diff --git a/internal/api/route.go b/internal/api/route.go index 4a4f92cc0..0f46f0f0c 100644 --- a/internal/api/route.go +++ b/internal/api/route.go @@ -79,6 +79,9 @@ func NewGinRouter(discov discoveryregistry.SvcDiscoveryRegistry, rdb redis.Unive userRouterGroup.POST("/get_users", ParseToken, u.GetUsers) userRouterGroup.POST("/get_users_online_status", ParseToken, u.GetUsersOnlineStatus) userRouterGroup.POST("/get_users_online_token_detail", ParseToken, u.GetUsersOnlineTokenDetail) + userRouterGroup.POST("/subscribe_users_status", ParseToken, u.UnSubscriberStatus) + userRouterGroup.POST("/unsubscribe_users_status", ParseToken, u.UnSubscriberStatus) + } // friend routing group friendRouterGroup := r.Group("/friend", ParseToken) diff --git a/internal/api/user.go b/internal/api/user.go index 8595b3501..108ccac69 100644 --- a/internal/api/user.go +++ b/internal/api/user.go @@ -62,6 +62,7 @@ func (u *UserApi) GetUsers(c *gin.Context) { a2r.Call(user.UserClient.GetPaginationUsers, u.Client, c) } +// GetUsersOnlineStatus Get user online status. func (u *UserApi) GetUsersOnlineStatus(c *gin.Context) { var req msggateway.GetUsersOnlineStatusReq if err := c.BindJSON(&req); err != nil { @@ -95,13 +96,13 @@ func (u *UserApi) GetUsersOnlineStatus(c *gin.Context) { wsResult = append(wsResult, reply.SuccessResult...) } } - // 遍历 api 请求体中的 userIDs + // Traversing the userIDs in the api request body for _, v1 := range req.UserIDs { flag = false res := new(msggateway.GetUsersOnlineStatusResp_SuccessResult) - // 遍历从各个网关中获取的在线结果 + // Iterate through the online results fetched from various gateways for _, v2 := range wsResult { - // 如果匹配上说明在线,反之 + // If matches the above description on the line, and vice versa if v2.UserID == v1 { flag = true res.UserID = v1 @@ -123,6 +124,7 @@ func (u *UserApi) UserRegisterCount(c *gin.Context) { a2r.Call(user.UserClient.UserRegisterCount, u.Client, c) } +// GetUsersOnlineTokenDetail Get user online token details. func (u *UserApi) GetUsersOnlineTokenDetail(c *gin.Context) { var wsResult []*msggateway.GetUsersOnlineStatusResp_SuccessResult var respResult []*msggateway.SingleDetail @@ -182,3 +184,13 @@ func (u *UserApi) GetUsersOnlineTokenDetail(c *gin.Context) { apiresp.GinSuccess(c, respResult) } + +// SubscriberStatus Presence status of subscribed users. +func (u *UserApi) SubscriberStatus(c *gin.Context) { + a2r.Call(user.UserClient.SubscribeOrCancelUsersStatus, u.Client, c) +} + +// UnSubscriberStatus Unsubscribe a user's presence. +func (u *UserApi) UnSubscriberStatus(c *gin.Context) { + a2r.Call(user.UserClient.SubscribeOrCancelUsersStatus, u.Client, c) +} diff --git a/internal/rpc/user/user.go b/internal/rpc/user/user.go index fb6518a7e..576492566 100644 --- a/internal/rpc/user/user.go +++ b/internal/rpc/user/user.go @@ -17,12 +17,11 @@ package user import ( "context" "errors" - "strings" - "time" - "github.com/OpenIMSDK/Open-IM-Server/pkg/authverify" - + "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/unrelation" "github.com/OpenIMSDK/tools/log" + "strings" + "time" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/config" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/convert" @@ -60,6 +59,10 @@ func Start(client registry.SvcDiscoveryRegistry, server *grpc.Server) error { if err != nil { return err } + mongo, err := unrelation.NewMongo() + if err != nil { + return err + } if err := db.AutoMigrate(&tablerelation.UserModel{}); err != nil { return err } @@ -72,7 +75,8 @@ func Start(client registry.SvcDiscoveryRegistry, server *grpc.Server) error { } userDB := relation.NewUserGorm(db) cache := cache.NewUserCacheRedis(rdb, userDB, cache.GetDefaultOpt()) - database := controller.NewUserDatabase(userDB, cache, tx.NewGorm(db)) + userMongoDB := unrelation.NewUserMongoDriver(mongo.GetDatabase()) + database := controller.NewUserDatabase(userDB, cache, tx.NewGorm(db), userMongoDB) friendRpcClient := rpcclient.NewFriendRpcClient(client) msgRpcClient := rpcclient.NewMessageRpcClient(client) u := &userServer{ @@ -235,6 +239,7 @@ func (s *userServer) GetGlobalRecvMessageOpt(ctx context.Context, req *pbuser.Ge return &pbuser.GetGlobalRecvMessageOptResp{GlobalRecvMsgOpt: user[0].GlobalRecvMsgOpt}, nil } +// GetAllUserID Get user account by page. func (s *userServer) GetAllUserID(ctx context.Context, req *pbuser.GetAllUserIDReq) (resp *pbuser.GetAllUserIDResp, err error) { userIDs, err := s.UserDatabase.GetAllUserID(ctx, req.Pagination.PageNumber, req.Pagination.ShowNumber) if err != nil { @@ -243,6 +248,24 @@ func (s *userServer) GetAllUserID(ctx context.Context, req *pbuser.GetAllUserIDR return &pbuser.GetAllUserIDResp{UserIDs: userIDs}, nil } +// SubscribeOrCancelUsersStatus Subscribe online or cancel online users. func (s *userServer) SubscribeOrCancelUsersStatus(ctx context.Context, req *pbuser.SubscribeOrCancelUsersStatusReq) (resp *pbuser.SubscribeOrCancelUsersStatusResp, err error) { + err = s.UserDatabase.SubscribeOrCancelUsersStatus(ctx, req.UserID, req.UserIDs, req.Genre) + if err != nil { + return nil, err + } + //var status map[string][]string + //TODO 获取用户在线列表,返回订阅的用户的在线列表 + + return &pbuser.SubscribeOrCancelUsersStatusResp{}, nil +} + +func (s *userServer) GetUserStatus(ctx context.Context, req *pbuser.GetUserStatusReq) (resp *pbuser.GetUserStatusResp, err error) { + //TODO implement me + panic("implement me") +} + +func (s *userServer) SetUserStatus(ctx context.Context, req *pbuser.SetUserStatusReq) (resp *pbuser.SetUserStatusResp, err error) { + //TODO implement me panic("implement me") } diff --git a/internal/tools/msg.go b/internal/tools/msg.go index 972877516..d13f4597a 100644 --- a/internal/tools/msg.go +++ b/internal/tools/msg.go @@ -82,10 +82,12 @@ func InitMsgTool() (*MsgTool, error) { discov.AddOption(mw.GrpcClient(), grpc.WithTransportCredentials(insecure.NewCredentials())) userDB := relation.NewUserGorm(db) msgDatabase := controller.InitCommonMsgDatabase(rdb, mongo.GetDatabase()) + userMongoDB := unrelation.NewUserMongoDriver(mongo.GetDatabase()) userDatabase := controller.NewUserDatabase( userDB, cache.NewUserCacheRedis(rdb, relation.NewUserGorm(db), cache.GetDefaultOpt()), tx.NewGorm(db), + userMongoDB, ) groupDatabase := controller.InitGroupDatabase(db, rdb, mongo.GetDatabase()) conversationDatabase := controller.NewConversationDatabase( diff --git a/pkg/common/db/controller/user.go b/pkg/common/db/controller/user.go index 4f9383b09..83942ce22 100644 --- a/pkg/common/db/controller/user.go +++ b/pkg/common/db/controller/user.go @@ -16,6 +16,8 @@ package controller import ( "context" + unRelationTb "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/table/unrelation" + "github.com/OpenIMSDK/protocol/constant" "time" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/cache" @@ -26,38 +28,45 @@ import ( ) type UserDatabase interface { - // 获取指定用户的信息 如有userID未找到 也返回错误 + // FindWithError Get the information of the specified user. If the userID is not found, it will also return an error FindWithError(ctx context.Context, userIDs []string) (users []*relation.UserModel, err error) - // 获取指定用户的信息 如有userID未找到 不返回错误 + // Find Get the information of the specified user If the userID is not found, no error will be returned Find(ctx context.Context, userIDs []string) (users []*relation.UserModel, err error) - // 插入多条 外部保证userID 不重复 且在db中不存在 + // Create Insert multiple external guarantees that the userID is not repeated and does not exist in the db Create(ctx context.Context, users []*relation.UserModel) (err error) - // 更新(非零值) 外部保证userID存在 + // Update update (non-zero value) external guarantee userID exists Update(ctx context.Context, user *relation.UserModel) (err error) - // 更新(零值) 外部保证userID存在 + // UpdateByMap update (zero value) external guarantee userID exists UpdateByMap(ctx context.Context, userID string, args map[string]interface{}) (err error) - // 如果没找到,不返回错误 + // Page If not found, no error is returned Page(ctx context.Context, pageNumber, showNumber int32) (users []*relation.UserModel, count int64, err error) - // 只要有一个存在就为true + // IsExist true as long as one exists IsExist(ctx context.Context, userIDs []string) (exist bool, err error) - // 获取所有用户ID + // GetAllUserID Get all user IDs GetAllUserID(ctx context.Context, pageNumber, showNumber int32) ([]string, error) - // 函数内部先查询db中是否存在,存在则什么都不做;不存在则插入 + // InitOnce Inside the function, first query whether it exists in the db, if it exists, do nothing; if it does not exist, insert it InitOnce(ctx context.Context, users []*relation.UserModel) (err error) - // 获取用户总数 + // CountTotal Get the total number of users CountTotal(ctx context.Context, before *time.Time) (int64, error) - // 获取范围内用户增量 + // CountRangeEverydayTotal Get the user increment in the range CountRangeEverydayTotal(ctx context.Context, start time.Time, end time.Time) (map[string]int64, error) + //SubscribeOrCancelUsersStatus Subscribe or unsubscribe a user's presence status + SubscribeOrCancelUsersStatus(ctx context.Context, userID string, userIDs []string, genre int32) error + // GetAllSubscribeList Get a list of all subscriptions + GetAllSubscribeList(ctx context.Context, userID string) ([]string, error) + // GetSubscribedList Get all subscribed lists + GetSubscribedList(ctx context.Context, userID string) ([]string, error) } type userDatabase struct { - userDB relation.UserModelInterface - cache cache.UserCache - tx tx.Tx + userDB relation.UserModelInterface + cache cache.UserCache + tx tx.Tx + mongoDB unRelationTb.UserModelInterface } -func NewUserDatabase(userDB relation.UserModelInterface, cache cache.UserCache, tx tx.Tx) UserDatabase { - return &userDatabase{userDB: userDB, cache: cache, tx: tx} +func NewUserDatabase(userDB relation.UserModelInterface, cache cache.UserCache, tx tx.Tx, mongoDB unRelationTb.UserModelInterface) UserDatabase { + return &userDatabase{userDB: userDB, cache: cache, tx: tx, mongoDB: mongoDB} } func (u *userDatabase) InitOnce(ctx context.Context, users []*relation.UserModel) (err error) { @@ -75,7 +84,7 @@ func (u *userDatabase) InitOnce(ctx context.Context, users []*relation.UserModel return nil } -// 获取指定用户的信息 如有userID未找到 也返回错误. +// FindWithError Get the information of the specified user and return an error if the userID is not found. func (u *userDatabase) FindWithError(ctx context.Context, userIDs []string) (users []*relation.UserModel, err error) { users, err = u.cache.GetUsersInfo(ctx, userIDs) if err != nil { @@ -87,13 +96,13 @@ func (u *userDatabase) FindWithError(ctx context.Context, userIDs []string) (use return } -// 获取指定用户的信息 如有userID未找到 不返回错误. +// Find Get the information of the specified user. If the userID is not found, no error will be returned. func (u *userDatabase) Find(ctx context.Context, userIDs []string) (users []*relation.UserModel, err error) { users, err = u.cache.GetUsersInfo(ctx, userIDs) return } -// 插入多条 外部保证userID 不重复 且在db中不存在. +// Create Insert multiple external guarantees that the userID is not repeated and does not exist in the db. func (u *userDatabase) Create(ctx context.Context, users []*relation.UserModel) (err error) { if err := u.tx.Transaction(func(tx any) error { err = u.userDB.Create(ctx, users) @@ -111,7 +120,7 @@ func (u *userDatabase) Create(ctx context.Context, users []*relation.UserModel) return u.cache.DelUsersInfo(userIDs...).ExecDel(ctx) } -// 更新(非零值) 外部保证userID存在. +// Update (non-zero value) externally guarantees that userID exists. func (u *userDatabase) Update(ctx context.Context, user *relation.UserModel) (err error) { if err := u.userDB.Update(ctx, user); err != nil { return err @@ -119,7 +128,7 @@ func (u *userDatabase) Update(ctx context.Context, user *relation.UserModel) (er return u.cache.DelUsersInfo(user.UserID).ExecDel(ctx) } -// 更新(零值) 外部保证userID存在. +// UpdateByMap update (zero value) externally guarantees that userID exists. func (u *userDatabase) UpdateByMap(ctx context.Context, userID string, args map[string]interface{}) (err error) { if err := u.userDB.UpdateByMap(ctx, userID, args); err != nil { return err @@ -127,7 +136,7 @@ func (u *userDatabase) UpdateByMap(ctx context.Context, userID string, args map[ return u.cache.DelUsersInfo(userID).ExecDel(ctx) } -// 获取,如果没找到,不返回错误. +// Page Gets, returns no error if not found. func (u *userDatabase) Page( ctx context.Context, pageNumber, showNumber int32, @@ -135,7 +144,7 @@ func (u *userDatabase) Page( return u.userDB.Page(ctx, pageNumber, showNumber) } -// userIDs是否存在 只要有一个存在就为true. +// IsExist Does userIDs exist? As long as there is one, it will be true. func (u *userDatabase) IsExist(ctx context.Context, userIDs []string) (exist bool, err error) { users, err := u.userDB.Find(ctx, userIDs) if err != nil { @@ -147,18 +156,42 @@ func (u *userDatabase) IsExist(ctx context.Context, userIDs []string) (exist boo return false, nil } +// GetAllUserID Get all user IDs func (u *userDatabase) GetAllUserID(ctx context.Context, pageNumber, showNumber int32) (userIDs []string, err error) { return u.userDB.GetAllUserID(ctx, pageNumber, showNumber) } +// CountTotal Get the total number of users func (u *userDatabase) CountTotal(ctx context.Context, before *time.Time) (count int64, err error) { return u.userDB.CountTotal(ctx, before) } -func (u *userDatabase) CountRangeEverydayTotal( - ctx context.Context, - start time.Time, - end time.Time, -) (map[string]int64, error) { +// CountRangeEverydayTotal Get the user increment in the range +func (u *userDatabase) CountRangeEverydayTotal(ctx context.Context, start time.Time, end time.Time) (map[string]int64, error) { return u.userDB.CountRangeEverydayTotal(ctx, start, end) } + +//SubscribeOrCancelUsersStatus Subscribe or unsubscribe a user's presence status +func (u *userDatabase) SubscribeOrCancelUsersStatus(ctx context.Context, userID string, userIDs []string, genre int32) error { + var err error + if genre == constant.SubscriberUser { + err = u.mongoDB.AddSubscriptionList(ctx, userID, userIDs) + } else if genre == constant.Unsubscribe { + err = u.mongoDB.UnsubscriptionList(ctx, userID, userIDs) + } + return err +} + +// GetAllSubscribeList Get a list of all subscriptions. +func (u *userDatabase) GetAllSubscribeList(ctx context.Context, userID string) ([]string, error) { + + //TODO 获取所有订阅 + return nil, nil +} + +// GetSubscribedList Get all subscribed lists +func (u *userDatabase) GetSubscribedList(ctx context.Context, userID string) ([]string, error) { + + //TODO 获取所有被订阅 + return nil, nil +} diff --git a/pkg/common/db/table/unrelation/user.go b/pkg/common/db/table/unrelation/user.go new file mode 100644 index 000000000..d264da467 --- /dev/null +++ b/pkg/common/db/table/unrelation/user.go @@ -0,0 +1,42 @@ +// 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. + +package unrelation + +import "context" + +// SubscribeUser collection constant. +const ( + SubscribeUser = "subscribe_user" +) + +// UserModel collection structure. +type UserModel struct { + UserID string `bson:"user_id" json:"userID"` + UserIDList []string `bson:"user_id_list" json:"userIDList"` +} + +func (UserModel) TableName() string { + return SubscribeUser +} + +// UserModelInterface Operation interface of user mongodb. +type UserModelInterface interface { + // AddSubscriptionList Subscriber's handling of thresholds. + AddSubscriptionList(ctx context.Context, userID string, userIDList []string) error + // UnsubscriptionList Handling of unsubscribe. + UnsubscriptionList(ctx context.Context, userID string, userIDList []string) error + // RemoveSubscribedListFromUser Among the unsubscribed users, delete the user from the subscribed list. + RemoveSubscribedListFromUser(ctx context.Context, userID string, userIDList []string) error +} diff --git a/pkg/common/db/unrelation/user.go b/pkg/common/db/unrelation/user.go new file mode 100644 index 000000000..feec8aa21 --- /dev/null +++ b/pkg/common/db/unrelation/user.go @@ -0,0 +1,141 @@ +// 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. + +package unrelation + +import ( + "context" + "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/table/unrelation" + "github.com/OpenIMSDK/tools/utils" + "go.mongodb.org/mongo-driver/bson" + "go.mongodb.org/mongo-driver/mongo" + "go.mongodb.org/mongo-driver/mongo/options" + "log" +) + +// prefixes and suffixes. +const ( + SubscriptionPrefix = "subscription_prefix" + SubscribedPrefix = "subscribed_prefix" +) + +// MaximumSubscription Maximum number of subscriptions. +const ( + MaximumSubscription = 3000 +) + +func NewUserMongoDriver(database *mongo.Database) unrelation.UserModelInterface { + return &UserMongoDriver{ + userCollection: database.Collection(unrelation.SubscribeUser), + } +} + +type UserMongoDriver struct { + userCollection *mongo.Collection +} + +// AddSubscriptionList Subscriber's handling of thresholds. +func (u *UserMongoDriver) AddSubscriptionList(ctx context.Context, userID string, userIDList []string) error { + // Check the number of lists in the key. + filter := bson.M{SubscriptionPrefix + userID: bson.M{"$size": 1}} + result, err := u.userCollection.Find(context.Background(), filter) + if err != nil { + return err + } + var newUserIDList []string + for result.Next(context.Background()) { + err := result.Decode(&newUserIDList) + if err != nil { + log.Fatal(err) + } + } + // If the threshold is exceeded, pop out the previous MaximumSubscription - len(userIDList) and insert it. + if len(newUserIDList)+len(userIDList) > MaximumSubscription { + newUserIDList = newUserIDList[MaximumSubscription-len(userIDList):] + _, err := u.userCollection.UpdateOne( + ctx, + bson.M{"user_id": SubscriptionPrefix + userID}, + bson.M{"$set": bson.M{"user_id_list": newUserIDList}}, + ) + if err != nil { + return err + } + //for i := 1; i <= MaximumSubscription-len(userIDList); i++ { + // _, err := u.userCollection.UpdateOne( + // ctx, + // bson.M{"user_id": SubscriptionPrefix + userID}, + // bson.M{SubscriptionPrefix + userID: bson.M{"$pop": -1}}, + // ) + // if err != nil { + // return err + // } + //} + } + upsert := true + opts := &options.UpdateOptions{ + Upsert: &upsert, + } + _, err = u.userCollection.UpdateOne( + ctx, + bson.M{"user_id": SubscriptionPrefix + userID}, + bson.M{"$addToSet": bson.M{"user_id_list": bson.M{"$each": userIDList}}}, + opts, + ) + if err != nil { + return err + } + for _, user := range userIDList { + _, err = u.userCollection.UpdateOne( + ctx, + bson.M{"user_id": SubscribedPrefix + user}, + bson.M{"$addToSet": bson.M{"user_id_list": userID}}, + opts, + ) + if err != nil { + return utils.Wrap(err, "transaction failed") + } + } + return nil +} + +// UnsubscriptionList Handling of unsubscribe. +func (u *UserMongoDriver) UnsubscriptionList(ctx context.Context, userID string, userIDList []string) error { + _, err := u.userCollection.UpdateOne( + ctx, + bson.M{"user_id": SubscriptionPrefix + userID}, + bson.M{"$pull": bson.M{"user_id_list": bson.M{"$in": userIDList}}}, + ) + if err != nil { + return err + } + err = u.RemoveSubscribedListFromUser(ctx, userID, userIDList) + if err != nil { + return err + } + return nil +} + +// RemoveSubscribedListFromUser Among the unsubscribed users, delete the user from the subscribed list. +func (u *UserMongoDriver) RemoveSubscribedListFromUser(ctx context.Context, userID string, userIDList []string) error { + var newUserIDList []string + for _, value := range userIDList { + newUserIDList = append(newUserIDList, SubscribedPrefix+value) + } + _, err := u.userCollection.UpdateOne( + ctx, + bson.M{"user_id": bson.M{"$in": newUserIDList}}, + bson.M{"$pull": bson.M{"user_id_list": userID}}, + ) + return utils.Wrap(err, "") +} From e7040d3b26b3e77a55ae5121614171eea3e81841 Mon Sep 17 00:00:00 2001 From: Xinwei Xiong <3293172751@qq.com> Date: Fri, 28 Jul 2023 14:37:39 +0800 Subject: [PATCH 23/61] docs: add readme docs (#691) * docs: add readme docs Signed-off-by: Xinwei Xiong(cubxxw-openim) <3293172751nss@gmail.com> * feat: add script yaml Signed-off-by: Xinwei Xiong(cubxxw-openim) <3293172751nss@gmail.com> * feat: add script yaml Signed-off-by: Xinwei Xiong(cubxxw-openim) <3293172751nss@gmail.com> * feat: add test Signed-off-by: Xinwei Xiong(cubxxw-openim) <3293172751nss@gmail.com> * feat: add test Signed-off-by: Xinwei Xiong(cubxxw-openim) <3293172751nss@gmail.com> * fix bug: reject group req bug * feat: add go relase Signed-off-by: Xinwei Xiong(cubxxw-openim) <3293172751nss@gmail.com> * feat: add test Signed-off-by: Xinwei Xiong(cubxxw-openim) <3293172751nss@gmail.com> * feat: add test Signed-off-by: Xinwei Xiong(cubxxw-openim) <3293172751nss@gmail.com> * fix: config env command Signed-off-by: Xinwei Xiong(cubxxw-openim) <3293172751nss@gmail.com> --------- Signed-off-by: Xinwei Xiong(cubxxw-openim) <3293172751nss@gmail.com> Co-authored-by: wangchuxiao --- .github/workflows/build-docker-image.yml | 88 ++++++++---------------- .github/workflows/deploy.yml | 72 ++++++++++--------- .goreleaser.yaml | 3 + Dockerfile | 3 +- docs/conversions/images.md | 69 +++++++++++++++++++ docs/conversions/version.md | 6 +- internal/rpc/group/group.go | 11 +-- 7 files changed, 153 insertions(+), 99 deletions(-) create mode 100644 docs/conversions/images.md diff --git a/.github/workflows/build-docker-image.yml b/.github/workflows/build-docker-image.yml index ef2659724..3dd64c930 100644 --- a/.github/workflows/build-docker-image.yml +++ b/.github/workflows/build-docker-image.yml @@ -18,6 +18,7 @@ on: push: branches: - main + - release-* tags: - v* workflow_dispatch: @@ -29,29 +30,38 @@ jobs: - name: Check out the repo uses: actions/checkout@v3 -# docker.io/openim/openim-server:latest - - name: Log in to Docker Hub - uses: docker/login-action@v2 - with: - username: ${{ secrets.DOCKER_USERNAME }} - password: ${{ secrets.DOCKER_PASSWORD }} + - name: Build OpenIM Server + run: | + sudo make build +# docker.io/openim/openim-server:latest - name: Extract metadata (tags, labels) for Docker id: meta uses: docker/metadata-action@v4.6.0 with: images: openim/openim-server - tags: latest + + - name: Log in to Docker Hub + uses: docker/login-action@v2 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} - name: Build and push Docker image uses: docker/build-push-action@v4 with: context: . - push: true + push: ${{ github.event_name != 'pull_request' }} tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} # registry.cn-hangzhou.aliyuncs.com/openimsdk/openim-server:latest + - name: Extract metadata (tags, labels) for Docker + id: meta2 + uses: docker/metadata-action@v4.6.0 + with: + images: registry.cn-hangzhou.aliyuncs.com/openimsdk/openim-server + - name: Log in to AliYun Docker Hub uses: docker/login-action@v2 with: @@ -59,22 +69,21 @@ jobs: username: ${{ secrets.ALIREGISTRY_USERNAME }} password: ${{ secrets.ALIREGISTRY_TOKEN }} - - name: Extract metadata (tags, labels) for Docker - id: meta2 - uses: docker/metadata-action@v4.6.0 - with: - images: registry.cn-hangzhou.aliyuncs.com/openimsdk/openim-server - tags: latest - - name: Build and push Docker image uses: docker/build-push-action@v4 with: context: . - push: true + push: ${{ github.event_name != 'pull_request' }} tags: ${{ steps.meta2.outputs.tags }} labels: ${{ steps.meta2.outputs.labels }} -# ghcr.io/openim/openim-server:latest +# ghcr.io/openimsdk/openim-server:latest + - name: Extract metadata (tags, labels) for Docker + id: meta3 + uses: docker/metadata-action@v4.6.0 + with: + images: ghcr.io/openimsdk/openim-server + - name: Log in to GitHub Container Registry uses: docker/login-action@v2 with: @@ -82,53 +91,10 @@ jobs: username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} - - name: Extract metadata (tags, labels) for Docker - id: meta3 - uses: docker/metadata-action@v4.6.0 - with: - images: openim/openim-server - tags: latest - - name: Build and push Docker image uses: docker/build-push-action@v4 with: context: . - push: true + push: ${{ github.event_name != 'pull_request' }} tags: ${{ steps.meta3.outputs.tags }} labels: ${{ steps.meta3.outputs.labels }} - -# name: OpenIM Build Docker Images -# on: -# push: -# tags: -# - v* -# jobs: -# build: -# runs-on: ubuntu-latest -# strategy: -# matrix: -# bin: -# - openim-server -# steps: -# - name: Checkout -# uses: actions/checkout@v3 -# - name: Setup Docker Buildx -# uses: docker/setup-buildx-action@v2 -# - name: Login to GitHub Container Registry -# uses: docker/login-action@v2 -# with: -# registry: ghcr.io -# username: ${{ github.repository_owner }} -# password: ${{ secrets.GITHUB_TOKEN }} -# - name: Docker metadata -# id: metadata -# uses: docker/metadata-action@v4 -# with: -# images: ghcr.io/${{ github.repository_owner }}/openim-${{ matrix.bin }} -# - name: Build and release Docker images -# uses: docker/build-push-action@v3 -# with: -# platforms: linux/386,linux/amd64,linux/arm64/v8 -# target: ${{ matrix.bin }} -# tags: ${{ steps.metadata.outputs.tags }} -# push: true \ No newline at end of file diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 2d7798916..ea28440e9 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -18,6 +18,7 @@ on: push: branches: - 'devops' # Only for the dev branch + - 'main' paths: - '.github/workflows/*' # - '__test__/**' # dev No immediate testing is required @@ -26,38 +27,47 @@ on: - 'docker-compose.yml' - 'bin/*' -env: - SERVER_PRIVATE_KEY: ${{ secrets.SERVER_PRIVATE_KEY }} # server private key - SERVER_HOST: ${{ secrets.SERVER_HOST }} # server ip address - USER_NAME: ${{ secrets.USER_NAME }} # server username - cache-name: note - jobs: deploy-dev: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - name: set ssh key # Temporarily set up ssh key - run: | - mkdir -p ~/.ssh/ - # secrets.WFP_ID_RSA set in GitHub - echo "${{secrets.WFP_ID_RSA}}" > ~/.ssh/id_rsa - chmod 600 ~/.ssh/id_rsa - ssh-keyscan "182.92.xxx.xxx" >> ~/.ssh/known_hosts - - name: deploy # Deployment - run: | - ssh work@182.92.xxx.xxx " - # 【Attention】Log in with the 'work' account, manually create /home/work/imooc-lego directory - # Then git clone https://username:password@github.com/imooc-lego/biz-editor-server.git -b dev (private repository, use GitHub username and password) - # Remember to delete origin to avoid exposing GitHub password - cd /home/work/imooc-lego/biz-editor-server; - git remote add origin https://openimbot:${{secrets.WFP_PASSWORD}}@github.com/OpenIMSDK/open-im-server.git; - git checkout dev; - git pull origin dev; # Download the latest code again - git remote remove origin; # Remove origin to avoid exposing GitHub password - # Start docker - docker-compose build editor-server; # Same as the service name in docker-compose.yml - docker-compose up -d; - " - - name: delete ssh key # Delete ssh key - run: rm -rf ~/.ssh/id_rsa \ No newline at end of file + - uses: actions/checkout@v3 + - name: executing remote ssh commands using password + uses: appleboy/ssh-action@v1.0.0 + env: + OWNER: ${{ github.repository_owner }} + REPO: ${{ github.event.repository.name }} + with: + host: "${{ secrets.SG_M1_HOST }}, ${{ secrets.SG_N1_HOST }}, ${{ secrets.SG_N2_HOST}}" + username: ${{ secrets.SG_USERNAME }} + password: ${{ secrets.SG_PASSWORD }} + port: ${{ secrets.SG_PORT }} + envs: OWNER,REPO + script_stop: true + script: | + mkdir -p /test/openim + cd /test/openim + pwd;ls -al + echo "OWNER: $OWNER" + echo "REPO: $REPO" + git clone -b develop https://github.com/${OWNER}/${REPO}.git; cd ${REPO} + docker compose up -d + + + # - name: deploy # Deployment + # run: | + # ssh work@182.92.xxx.xxx " + # # 【Attention】Log in with the 'work' account, manually create /home/work/imooc-lego directory + # # Then git clone https://username:password@github.com/imooc-lego/biz-editor-server.git -b dev (private repository, use GitHub username and password) + # # Remember to delete origin to avoid exposing GitHub password + # cd /home/work/imooc-lego/biz-editor-server; + # git remote add origin https://openimbot:${{secrets.WFP_PASSWORD}}@github.com/OpenIMSDK/open-im-server.git; + # git checkout dev; + # git pull origin dev; # Download the latest code again + # git remote remove origin; # Remove origin to avoid exposing GitHub password + # # Start docker + # docker-compose build editor-server; # Same as the service name in docker-compose.yml + # docker-compose up -d; + # " + # - name: delete ssh key # Delete ssh key + # run: rm -rf ~/.ssh/id_rsa \ No newline at end of file diff --git a/.goreleaser.yaml b/.goreleaser.yaml index e9eb44c94..fc7c0cd01 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -480,6 +480,9 @@ checksum: release: footer: | + + ## Welcome to the {{ .Tag }} release of [chat](https://github.com/OpenIMSDK/chat)!🎉🎉! + **Full Changelog**: https://github.com/OpenIMSDK/Open-IM-Server/compare/{{ .PreviousTag }}...{{ .Tag }} ## Helping out diff --git a/Dockerfile b/Dockerfile index 33c4651c9..290aa02c6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -22,7 +22,8 @@ RUN /bin/sh -c "make build" # Production Stage FROM alpine -RUN apk --no-cache add tzdata +RUN apk --no-cache add tzdata; \ + apt --no-cache add ca-certificates # Set directory to map logs, config files, scripts, and SDK VOLUME ["/Open-IM-Server/logs", "/Open-IM-Server/config", "/Open-IM-Server/scripts", "/Open-IM-Server/db/sdk"] diff --git a/docs/conversions/images.md b/docs/conversions/images.md new file mode 100644 index 000000000..ae85a5bab --- /dev/null +++ b/docs/conversions/images.md @@ -0,0 +1,69 @@ +# OpenIM Image Management Strategy and Pulling Guide + +OpenIM is an efficient, stable, and scalable instant messaging framework that provides convenient deployment methods through Docker images. OpenIM manages multiple image sources, hosted respectively on GitHub (ghcr), Alibaba Cloud, and Docker Hub. This document is aimed at detailing the image management strategy of OpenIM and providing the steps for pulling these images. + +## Image Management Strategy + +OpenIM's versions correspond to GitHub's tag versions. Each time we release a new version and tag it on GitHub, an automated process is triggered that pushes the new Docker image version to the following three platforms: + +1. **GitHub (ghcr.io):** We use GitHub Container Registry (ghcr.io) to host OpenIM's Docker images. This allows us to better integrate with the GitHub source code repository, providing better version control and continuous integration/deployment (CI/CD) features. You can view all GitHub images [here](https://github.com/orgs/OpenIMSDK/packages). +2. **Alibaba Cloud (registry.cn-hangzhou.aliyuncs.com):** For users in Mainland China, we also host OpenIM's Docker images on Alibaba Cloud to provide faster pull speeds. You can view all Alibaba Cloud images on this [page](https://cr.console.aliyun.com/cn-hangzhou/instances/repositories) of Alibaba Cloud Image Service (note that you need to log in to your Alibaba Cloud account first). +3. **Docker Hub (docker.io):** Docker Hub is the most commonly used Docker image hosting platform, and we also host OpenIM's images there to facilitate developers worldwide. You can view all Docker Hub images on the [OpenIM's Docker Hub page](https://hub.docker.com/r/openim). + +## Methods and Steps for Pulling Images + +When pulling OpenIM's Docker images, you can choose the most suitable source based on your geographic location and network conditions. Here are the steps to pull OpenIM images from each source: + +1. First, make sure Docker is installed on your machine. If not, you can refer to the [Docker official documentation](https://docs.docker.com/get-docker/) for installation. + +2. Open the terminal and run the following commands to pull the images: + + For OpenIM Server: + + - Pull from GitHub: + + ``` + bashCopy code + docker pull ghcr.io/openimsdk/openim-server:latest + ``` + + - Pull from Alibaba Cloud: + + ``` + bashCopy code + docker pull registry.cn-hangzhou.aliyuncs.com/openimsdk/openim-server:latest + ``` + + - Pull from Docker Hub: + + ``` + bashCopy code + docker pull docker.io/openim/openim-server:latest + ``` + + For OpenIM Chat: + + - Pull from GitHub: + + ``` + bashCopy code + docker pull ghcr.io/openimsdk/openim-chat:latest + ``` + + - Pull from Alibaba Cloud: + + ``` + bashCopy code + docker pull registry.cn-hangzhou.aliyuncs.com/openimsdk/openim-chat:latest + ``` + + - Pull from Docker Hub: + + ``` + bashCopy code + docker pull docker.io/openim/openim-chat:latest + ``` + +3. Run the `docker images` command to confirm that the image has been successfully pulled. + +This concludes OpenIM's image management strategy and the steps for pulling images. If you have any questions, please feel free to ask. \ No newline at end of file diff --git a/docs/conversions/version.md b/docs/conversions/version.md index a421dd549..bf1062b77 100644 --- a/docs/conversions/version.md +++ b/docs/conversions/version.md @@ -54,4 +54,8 @@ git merge release-v3.1 git push origin main ``` -Remember, communication with your team is key throughout this process, keeping everyone up-to-date with the changes being made. \ No newline at end of file +Remember, communication with your team is key throughout this process, keeping everyone up-to-date with the changes being made. + + +## Docker images version management + diff --git a/internal/rpc/group/group.go b/internal/rpc/group/group.go index 4ce3d4216..65beae37e 100644 --- a/internal/rpc/group/group.go +++ b/internal/rpc/group/group.go @@ -17,14 +17,15 @@ package group import ( "context" "fmt" - "github.com/OpenIMSDK/Open-IM-Server/pkg/authverify" - "github.com/OpenIMSDK/Open-IM-Server/pkg/msgprocessor" "math/big" "math/rand" "strconv" "strings" "time" + "github.com/OpenIMSDK/Open-IM-Server/pkg/authverify" + "github.com/OpenIMSDK/Open-IM-Server/pkg/msgprocessor" + pbConversation "github.com/OpenIMSDK/protocol/conversation" "github.com/OpenIMSDK/protocol/wrapperspb" @@ -718,11 +719,11 @@ func (s *groupServer) GroupApplicationResponse(ctx context.Context, req *pbGroup if err := s.GroupDatabase.HandlerGroupRequest(ctx, req.GroupID, req.FromUserID, req.HandledMsg, req.HandleResult, member); err != nil { return nil, err } - if err := s.conversationRpcClient.GroupChatFirstCreateConversation(ctx, req.GroupID, []string{req.FromUserID}); err != nil { - return nil, err - } switch req.HandleResult { case constant.GroupResponseAgree: + if err := s.conversationRpcClient.GroupChatFirstCreateConversation(ctx, req.GroupID, []string{req.FromUserID}); err != nil { + return nil, err + } s.Notification.GroupApplicationAcceptedNotification(ctx, req) case constant.GroupResponseRefuse: s.Notification.GroupApplicationRejectedNotification(ctx, req) From 8979b9dce19df9c58cdde4beed461aae7f7e9c73 Mon Sep 17 00:00:00 2001 From: Xinwei Xiong <3293172751@qq.com> Date: Fri, 28 Jul 2023 15:09:04 +0800 Subject: [PATCH 24/61] fix: docker file fix (#692) Signed-off-by: Xinwei Xiong(cubxxw-openim) <3293172751nss@gmail.com> --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 290aa02c6..8a230a431 100644 --- a/Dockerfile +++ b/Dockerfile @@ -22,8 +22,8 @@ RUN /bin/sh -c "make build" # Production Stage FROM alpine -RUN apk --no-cache add tzdata; \ - apt --no-cache add ca-certificates +RUN echo "https://mirrors.aliyun.com/alpine/v3.4/main" > /etc/apk/repositories && \ + apk --no-cache add tzdata ca-certificates # Set directory to map logs, config files, scripts, and SDK VOLUME ["/Open-IM-Server/logs", "/Open-IM-Server/config", "/Open-IM-Server/scripts", "/Open-IM-Server/db/sdk"] From e24b0e21149ebd316d3ee5ad9baf1ea5d09e4468 Mon Sep 17 00:00:00 2001 From: pluto <83957921+plutoyty@users.noreply.github.com> Date: Fri, 28 Jul 2023 17:54:29 +0800 Subject: [PATCH 25/61] Get user online status (#693) * Resolving code conflicts after project directory changes and Add subscribe and unsubscribe mongodb operations * Organize and update module dependencies * Get user online status * Get user online status * Get user online status --- internal/api/route.go | 1 + internal/api/user.go | 4 ++ internal/rpc/user/user.go | 15 ++++-- pkg/common/db/cache/user.go | 85 ++++++++++++++++++++++++++++++-- pkg/common/db/controller/user.go | 16 ++++++ 5 files changed, 114 insertions(+), 7 deletions(-) diff --git a/internal/api/route.go b/internal/api/route.go index 0f46f0f0c..1926b55f1 100644 --- a/internal/api/route.go +++ b/internal/api/route.go @@ -81,6 +81,7 @@ func NewGinRouter(discov discoveryregistry.SvcDiscoveryRegistry, rdb redis.Unive userRouterGroup.POST("/get_users_online_token_detail", ParseToken, u.GetUsersOnlineTokenDetail) userRouterGroup.POST("/subscribe_users_status", ParseToken, u.UnSubscriberStatus) userRouterGroup.POST("/unsubscribe_users_status", ParseToken, u.UnSubscriberStatus) + userRouterGroup.POST("/get_users_status", ParseToken, u.GetUserStatus) } // friend routing group diff --git a/internal/api/user.go b/internal/api/user.go index 108ccac69..3eb136b3d 100644 --- a/internal/api/user.go +++ b/internal/api/user.go @@ -194,3 +194,7 @@ func (u *UserApi) SubscriberStatus(c *gin.Context) { func (u *UserApi) UnSubscriberStatus(c *gin.Context) { a2r.Call(user.UserClient.SubscribeOrCancelUsersStatus, u.Client, c) } + +func (u *UserApi) GetUserStatus(c *gin.Context) { + a2r.Call(user.UserClient.GetUserStatus, u.Client, c) +} diff --git a/internal/rpc/user/user.go b/internal/rpc/user/user.go index 576492566..53598db0b 100644 --- a/internal/rpc/user/user.go +++ b/internal/rpc/user/user.go @@ -261,11 +261,18 @@ func (s *userServer) SubscribeOrCancelUsersStatus(ctx context.Context, req *pbus } func (s *userServer) GetUserStatus(ctx context.Context, req *pbuser.GetUserStatusReq) (resp *pbuser.GetUserStatusResp, err error) { - //TODO implement me - panic("implement me") + //TODO 是否加一个参数校验-判断req.userID的数量,每一个获取加一个限制,一次请求限制500? + onlineStatusList, err := s.UserDatabase.GetUserStatus(ctx, req.UserIDs) + if err != nil { + return nil, err + } + return &pbuser.GetUserStatusResp{StatusList: onlineStatusList}, nil } func (s *userServer) SetUserStatus(ctx context.Context, req *pbuser.SetUserStatusReq) (resp *pbuser.SetUserStatusResp, err error) { - //TODO implement me - panic("implement me") + err = s.UserDatabase.SetUserStatus(ctx, req.StatusList) + if err != nil { + return nil, err + } + return &pbuser.SetUserStatusResp{}, nil } diff --git a/pkg/common/db/cache/user.go b/pkg/common/db/cache/user.go index 455bc9ebe..5c76af22f 100644 --- a/pkg/common/db/cache/user.go +++ b/pkg/common/db/cache/user.go @@ -16,6 +16,9 @@ package cache import ( "context" + "encoding/json" + "github.com/OpenIMSDK/protocol/user" + "strconv" "time" "github.com/dtm-labs/rockscache" @@ -25,9 +28,12 @@ import ( ) const ( - userExpireTime = time.Second * 60 * 60 * 12 - userInfoKey = "USER_INFO:" - userGlobalRecvMsgOptKey = "USER_GLOBAL_RECV_MSG_OPT_KEY:" + userExpireTime = time.Second * 60 * 60 * 12 + userInfoKey = "USER_INFO:" + userGlobalRecvMsgOptKey = "USER_GLOBAL_RECV_MSG_OPT_KEY:" + olineStatusKey = "ONLINE_STATUS:" + userOlineStatusExpireTime = time.Second * 60 * 60 * 24 + statusMod = 500 ) type UserCache interface { @@ -38,10 +44,13 @@ type UserCache interface { DelUsersInfo(userIDs ...string) UserCache GetUserGlobalRecvMsgOpt(ctx context.Context, userID string) (opt int, err error) DelUsersGlobalRecvMsgOpt(userIDs ...string) UserCache + GetUserStatus(ctx context.Context, userIDs []string) ([]*user.OnlineStatus, error) + SetUserStatus(ctx context.Context, list []*user.OnlineStatus) error } type UserCacheRedis struct { metaCache + rdb redis.UniversalClient userDB relationTb.UserModelInterface expireTime time.Duration rcClient *rockscache.Client @@ -54,6 +63,7 @@ func NewUserCacheRedis( ) UserCache { rcClient := rockscache.NewClient(rdb, options) return &UserCacheRedis{ + rdb: rdb, metaCache: NewMetaCacheRedis(rcClient), userDB: userDB, expireTime: userExpireTime, @@ -63,6 +73,7 @@ func NewUserCacheRedis( func (u *UserCacheRedis) NewCache() UserCache { return &UserCacheRedis{ + rdb: u.rdb, metaCache: NewMetaCacheRedis(u.rcClient, u.metaCache.GetPreDelKeys()...), userDB: u.userDB, expireTime: u.expireTime, @@ -145,3 +156,71 @@ func (u *UserCacheRedis) DelUsersGlobalRecvMsgOpt(userIDs ...string) UserCache { cache.AddKeys(keys...) return cache } + +func (u *UserCacheRedis) getOnlineStatusKey(userID string) string { + return olineStatusKey + userID +} + +// GetUserStatus get user status +func (u *UserCacheRedis) GetUserStatus(ctx context.Context, userIDs []string) ([]*user.OnlineStatus, error) { + var res []*user.OnlineStatus + for _, userID := range userIDs { + UserIDNum, err := strconv.Atoi(userID) + if err != nil { + return nil, err + } + var modKey = strconv.Itoa(UserIDNum % statusMod) + var onlineStatus user.OnlineStatus + key := olineStatusKey + modKey + result, err := u.rdb.HGet(ctx, key, userID).Result() + if err != nil { + if err == redis.Nil { + // key or field does not exist + res = append(res, &user.OnlineStatus{ + UserID: userID, + Status: 0, + PlatformID: -1, + }) + continue + } else { + return nil, err + } + } + err = json.Unmarshal([]byte(result), &onlineStatus) + if err != nil { + return nil, err + } + onlineStatus.UserID = userID + res = append(res, &onlineStatus) + } + return res, nil +} + +// SetUserStatus Set the user status and save it in redis +func (u *UserCacheRedis) SetUserStatus(ctx context.Context, list []*user.OnlineStatus) error { + for _, status := range list { + var isNewKey int64 + UserIDNum, err := strconv.Atoi(status.UserID) + if err != nil { + return err + } + var modKey = strconv.Itoa(UserIDNum % statusMod) + key := olineStatusKey + modKey + jsonData, err := json.Marshal(status) + if err != nil { + return err + } + isNewKey, err = u.rdb.Exists(ctx, key).Result() + if err != nil { + return err + } + _, err = u.rdb.HSet(ctx, key, status.UserID, string(jsonData)).Result() + if err != nil { + return err + } + if isNewKey > 0 { + u.rdb.Expire(ctx, key, userOlineStatusExpireTime) + } + } + return nil +} diff --git a/pkg/common/db/controller/user.go b/pkg/common/db/controller/user.go index 83942ce22..5b303ebd7 100644 --- a/pkg/common/db/controller/user.go +++ b/pkg/common/db/controller/user.go @@ -18,6 +18,7 @@ import ( "context" unRelationTb "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/table/unrelation" "github.com/OpenIMSDK/protocol/constant" + "github.com/OpenIMSDK/protocol/user" "time" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/cache" @@ -56,6 +57,10 @@ type UserDatabase interface { GetAllSubscribeList(ctx context.Context, userID string) ([]string, error) // GetSubscribedList Get all subscribed lists GetSubscribedList(ctx context.Context, userID string) ([]string, error) + // GetUserStatus Get the online status of the user + GetUserStatus(ctx context.Context, userIDs []string) ([]*user.OnlineStatus, error) + // SetUserStatus Set the user status and store the user status in redis + SetUserStatus(ctx context.Context, list []*user.OnlineStatus) error } type userDatabase struct { @@ -195,3 +200,14 @@ func (u *userDatabase) GetSubscribedList(ctx context.Context, userID string) ([] //TODO 获取所有被订阅 return nil, nil } + +// GetUserStatus get user status +func (u *userDatabase) GetUserStatus(ctx context.Context, userIDs []string) ([]*user.OnlineStatus, error) { + onlineStatusList, err := u.cache.GetUserStatus(ctx, userIDs) + return onlineStatusList, err +} + +// SetUserStatus Set the user status and save it in redis +func (u *userDatabase) SetUserStatus(ctx context.Context, list []*user.OnlineStatus) error { + return u.cache.SetUserStatus(ctx, list) +} From 788b381508fbf65f3fd0bc3342d28b628716abfe Mon Sep 17 00:00:00 2001 From: WangchuXiao Date: Fri, 28 Jul 2023 21:43:29 +0800 Subject: [PATCH 26/61] fix bug: When the previously applied group has a disbanded group, applying to add the group again will fail (#698) * docs: add readme docs Signed-off-by: Xinwei Xiong(cubxxw-openim) <3293172751nss@gmail.com> * feat: add script yaml Signed-off-by: Xinwei Xiong(cubxxw-openim) <3293172751nss@gmail.com> * feat: add script yaml Signed-off-by: Xinwei Xiong(cubxxw-openim) <3293172751nss@gmail.com> * feat: add test Signed-off-by: Xinwei Xiong(cubxxw-openim) <3293172751nss@gmail.com> * feat: add test Signed-off-by: Xinwei Xiong(cubxxw-openim) <3293172751nss@gmail.com> * fix bug: reject group req bug * feat: add go relase Signed-off-by: Xinwei Xiong(cubxxw-openim) <3293172751nss@gmail.com> * fix bug: join group failed * fix bug: join group failed --------- Signed-off-by: Xinwei Xiong(cubxxw-openim) <3293172751nss@gmail.com> Co-authored-by: Xinwei Xiong(cubxxw-openim) <3293172751nss@gmail.com> --- internal/rpc/group/group.go | 2 +- pkg/common/db/controller/group.go | 5 +++++ pkg/common/db/relation/group_model.go | 4 ++++ pkg/common/db/table/relation/group.go | 1 + 4 files changed, 11 insertions(+), 1 deletion(-) diff --git a/internal/rpc/group/group.go b/internal/rpc/group/group.go index 65beae37e..a7680dfaa 100644 --- a/internal/rpc/group/group.go +++ b/internal/rpc/group/group.go @@ -1040,7 +1040,7 @@ func (s *groupServer) GetUserReqApplicationList(ctx context.Context, req *pbGrou groupIDs := utils.Distinct(utils.Slice(requests, func(e *relationTb.GroupRequestModel) string { return e.GroupID })) - groups, err := s.GroupDatabase.FindGroup(ctx, groupIDs) + groups, err := s.GroupDatabase.FindNotDismissedGroup(ctx, groupIDs) if err != nil { return nil, err } diff --git a/pkg/common/db/controller/group.go b/pkg/common/db/controller/group.go index e2b5f90b3..ba4ae18df 100644 --- a/pkg/common/db/controller/group.go +++ b/pkg/common/db/controller/group.go @@ -39,6 +39,7 @@ type GroupDatabase interface { CreateGroup(ctx context.Context, groups []*relationTb.GroupModel, groupMembers []*relationTb.GroupMemberModel) error TakeGroup(ctx context.Context, groupID string) (group *relationTb.GroupModel, err error) FindGroup(ctx context.Context, groupIDs []string) (groups []*relationTb.GroupModel, err error) + FindNotDismissedGroup(ctx context.Context, groupIDs []string) (groups []*relationTb.GroupModel, err error) SearchGroup( ctx context.Context, keyword string, @@ -581,3 +582,7 @@ func (g *groupDatabase) CountRangeEverydayTotal(ctx context.Context, start time. func (g *groupDatabase) FindGroupRequests(ctx context.Context, groupID string, userIDs []string) (int64, []*relationTb.GroupRequestModel, error) { return g.groupRequestDB.FindGroupRequests(ctx, groupID, userIDs) } + +func (g *groupDatabase) FindNotDismissedGroup(ctx context.Context, groupIDs []string) (groups []*relationTb.GroupModel, err error) { + return g.groupDB.FindNotDismissedGroup(ctx, groupIDs) +} diff --git a/pkg/common/db/relation/group_model.go b/pkg/common/db/relation/group_model.go index 697427e04..853f5dccd 100644 --- a/pkg/common/db/relation/group_model.go +++ b/pkg/common/db/relation/group_model.go @@ -99,3 +99,7 @@ func (g *GroupGorm) CountRangeEverydayTotal(ctx context.Context, start time.Time } return v, nil } + +func (g *GroupGorm) FindNotDismissedGroup(ctx context.Context, groupIDs []string) (groups []*relation.GroupModel, err error) { + return groups, utils.Wrap(g.DB.Where("group_id in (?) and status != ?", groupIDs, constant.GroupStatusDismissed).Find(&groups).Error, "") +} diff --git a/pkg/common/db/table/relation/group.go b/pkg/common/db/table/relation/group.go index 2bafb53ec..6759e0d35 100644 --- a/pkg/common/db/table/relation/group.go +++ b/pkg/common/db/table/relation/group.go @@ -51,6 +51,7 @@ type GroupModelInterface interface { UpdateMap(ctx context.Context, groupID string, args map[string]interface{}) (err error) UpdateStatus(ctx context.Context, groupID string, status int32) (err error) Find(ctx context.Context, groupIDs []string) (groups []*GroupModel, err error) + FindNotDismissedGroup(ctx context.Context, groupIDs []string) (groups []*GroupModel, err error) Take(ctx context.Context, groupID string) (group *GroupModel, err error) Search( ctx context.Context, From a5eb4dd499181146fbe0509a2a6d3d8887d25d12 Mon Sep 17 00:00:00 2001 From: Xinwei Xiong <3293172751@qq.com> Date: Fri, 28 Jul 2023 22:49:55 +0800 Subject: [PATCH 27/61] fix: docker images (#701) Signed-off-by: Xinwei Xiong(cubxxw-openim) <3293172751nss@gmail.com> --- .env | 4 ++-- Dockerfile | 4 ++-- docker-compose.yaml | 4 ++-- scripts/make-rules/golang.mk | 10 +++++----- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/.env b/.env index 910d864b8..412b75076 100644 --- a/.env +++ b/.env @@ -1,5 +1,5 @@ USER=root PASSWORD=openIM123 -MINIO_ENDPOINT=http://113.99.98.99:10005 -API_URL=http://113.99.98.99:10002/object/ +MINIO_ENDPOINT=http://127.0.0.1:10005 +API_URL=http://127.0.0.1:10002/object/ DATA_DIR=./ \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index 8a230a431..85afdf98b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -23,7 +23,7 @@ RUN /bin/sh -c "make build" FROM alpine RUN echo "https://mirrors.aliyun.com/alpine/v3.4/main" > /etc/apk/repositories && \ - apk --no-cache add tzdata ca-certificates + apk --no-cache add tzdata ca-certificates bash # Set directory to map logs, config files, scripts, and SDK VOLUME ["/Open-IM-Server/logs", "/Open-IM-Server/config", "/Open-IM-Server/scripts", "/Open-IM-Server/db/sdk"] @@ -34,4 +34,4 @@ COPY --from=builder /Open-IM-Server/_output/bin/platforms/linux/amd64 /Open-IM-S WORKDIR /Open-IM-Server/scripts -CMD ["docker_start_all.sh"] \ No newline at end of file +CMD ["./docker_start_all.sh"] \ No newline at end of file diff --git a/docker-compose.yaml b/docker-compose.yaml index cd80dbf19..d5565ca52 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -100,7 +100,7 @@ services: openim_server: - image: ghcr.io/openimsdk/openim-server:v3.0 + image: ghcr.io/openimsdk/openim-server:v3.1.0 container_name: openim-server volumes: - ./logs:/Open-IM-Server/logs @@ -124,7 +124,7 @@ services: max-file: "2" openim_chat: - image: ghcr.io/openimsdk/openim-chat:v1.0.0 + image: ghcr.io/openimsdk/openim-chat:v1.1.0 container_name: openim_chat restart: always depends_on: diff --git a/scripts/make-rules/golang.mk b/scripts/make-rules/golang.mk index 00e0fee47..aebf70e68 100644 --- a/scripts/make-rules/golang.mk +++ b/scripts/make-rules/golang.mk @@ -131,11 +131,11 @@ go.build.%: $(BIN_DIR)/platforms/$(OS)/$(ARCH)/$(COMMAND)$(GO_OUT_EXT) $(ROOT_DIR)/cmd/$(COMMAND)/main.go; \ fi -## go.install: Install deployment openim -.PHONY: go.install -go.install: - @echo "===========> Installing deployment openim" - @$(ROOT_DIR)/scripts/install_im_server.sh +# ## go.install: Install deployment openim +# .PHONY: go.install +# go.install: +# @echo "===========> Installing deployment openim" +# @$(ROOT_DIR)/scripts/install_im_server.sh ## go.check: Check OpenIM deployment .PHONY: go.check From f894a4546e54562a8bc823d3791b7a5edff10ebe Mon Sep 17 00:00:00 2001 From: Gordon <46924906+FGadvancer@users.noreply.github.com> Date: Sat, 29 Jul 2023 12:15:12 +0800 Subject: [PATCH 28/61] fix: get userid function call rpc and message gateway add status change callback (#699) * fix: to start im or chat, ZooKeeper must be started first. * fix: msg gateway start output err info Signed-off-by: Gordon <1432970085@qq.com> * fix: msg gateway start output err info Signed-off-by: Gordon <1432970085@qq.com> * chore: package path changes Signed-off-by: withchao <993506633@qq.com> * fix: go mod update Signed-off-by: Gordon <1432970085@qq.com> * fix: token update Signed-off-by: Gordon <1432970085@qq.com> * chore: package path changes Signed-off-by: withchao <993506633@qq.com> * chore: package path changes Signed-off-by: withchao <993506633@qq.com> * fix: token update Signed-off-by: Gordon <1432970085@qq.com> * fix: token update Signed-off-by: Gordon <1432970085@qq.com> * fix: token update Signed-off-by: Gordon <1432970085@qq.com> * fix: token update Signed-off-by: Gordon <1432970085@qq.com> * fix: token update Signed-off-by: Gordon <1432970085@qq.com> * fix: token update Signed-off-by: Gordon <1432970085@qq.com> * fix: get all userID Signed-off-by: Gordon <46924906+FGadvancer@users.noreply.github.com> * fix: msggateway add online status call Signed-off-by: Gordon <46924906+FGadvancer@users.noreply.github.com> --------- Signed-off-by: Gordon <1432970085@qq.com> Signed-off-by: withchao <993506633@qq.com> Signed-off-by: Gordon <46924906+FGadvancer@users.noreply.github.com> Co-authored-by: withchao <993506633@qq.com> --- go.mod | 2 +- go.sum | 4 ++-- internal/api/user.go | 2 +- internal/msggateway/n_ws_server.go | 35 +++++++++++++++++++++++------- pkg/rpcclient/user.go | 4 ++++ 5 files changed, 35 insertions(+), 12 deletions(-) diff --git a/go.mod b/go.mod index c18eabd08..c7a2b8309 100644 --- a/go.mod +++ b/go.mod @@ -37,7 +37,7 @@ require ( require github.com/google/uuid v1.3.0 require ( - github.com/OpenIMSDK/protocol v0.0.2 + github.com/OpenIMSDK/protocol v0.0.3 github.com/OpenIMSDK/tools v0.0.5 github.com/aliyun/aliyun-oss-go-sdk v2.2.7+incompatible github.com/go-redis/redis v6.15.9+incompatible diff --git a/go.sum b/go.sum index a93a1687a..2ad7b17ff 100644 --- a/go.sum +++ b/go.sum @@ -16,8 +16,8 @@ cloud.google.com/go/storage v1.28.1/go.mod h1:Qnisd4CqDdo6BGs2AD5LLnEsmSQ80wQ5og firebase.google.com/go v3.13.0+incompatible h1:3TdYC3DDi6aHn20qoRkxwGqNgdjtblwVAyRLQwGn/+4= firebase.google.com/go v3.13.0+incompatible/go.mod h1:xlah6XbEyW6tbfSklcfe5FHJIwjt8toICdV5Wh9ptHs= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/OpenIMSDK/protocol v0.0.2 h1:O53/WiqLCHF9aWPLI32GPF82hn7suM8PkhrtL89Klrw= -github.com/OpenIMSDK/protocol v0.0.2/go.mod h1:F25dFrwrIx3lkNoiuf6FkCfxuwf8L4Z8UIsdTHP/r0Y= +github.com/OpenIMSDK/protocol v0.0.3 h1:CFQtmnyW+1dYKVFaVaHcJ6oYuMiMdNfU2gC1xz3K/9I= +github.com/OpenIMSDK/protocol v0.0.3/go.mod h1:F25dFrwrIx3lkNoiuf6FkCfxuwf8L4Z8UIsdTHP/r0Y= github.com/OpenIMSDK/tools v0.0.5 h1:yBVHJ3EpIDcp8VFKPjuGr6MQvFa3t4JByZ+vmeC06/Q= github.com/OpenIMSDK/tools v0.0.5/go.mod h1:eg+q4A34Qmu73xkY0mt37FHGMCMfC6CtmOnm0kFEGFI= github.com/QcloudApi/qcloud_sign_golang v0.0.0-20141224014652-e4130a326409/go.mod h1:1pk82RBxDY/JZnPQrtqHlUFfCctgdorsd9M06fMynOM= diff --git a/internal/api/user.go b/internal/api/user.go index 3eb136b3d..41f6fd4c9 100644 --- a/internal/api/user.go +++ b/internal/api/user.go @@ -51,7 +51,7 @@ func (u *UserApi) GetUsersPublicInfo(c *gin.Context) { } func (u *UserApi) GetAllUsersID(c *gin.Context) { - a2r.Call(user.UserClient.GetDesignateUsers, u.Client, c) + a2r.Call(user.UserClient.GetAllUserID, u.Client, c) } func (u *UserApi) AccountCheck(c *gin.Context) { diff --git a/internal/msggateway/n_ws_server.go b/internal/msggateway/n_ws_server.go index c324f8a22..67c8132ca 100644 --- a/internal/msggateway/n_ws_server.go +++ b/internal/msggateway/n_ws_server.go @@ -18,6 +18,7 @@ import ( "context" "errors" "github.com/OpenIMSDK/Open-IM-Server/pkg/authverify" + "github.com/OpenIMSDK/Open-IM-Server/pkg/rpcclient" "net/http" "strconv" "sync" @@ -74,6 +75,7 @@ type WsServer struct { hubServer *Server validate *validator.Validate cache cache.MsgModel + userClient *rpcclient.UserRpcClient Compressor Encoder MessageHandler @@ -86,6 +88,28 @@ type kickHandler struct { func (ws *WsServer) SetDiscoveryRegistry(client discoveryregistry.SvcDiscoveryRegistry) { ws.MessageHandler = NewGrpcHandler(ws.validate, client) + u := rpcclient.NewUserRpcClient(client) + ws.userClient = &u +} +func (ws *WsServer) SetUserOnlineStatus(ctx context.Context, client *Client, status int32) { + err := ws.userClient.SetUserStatus(ctx, client.UserID, status, client.PlatformID) + if err != nil { + log.ZWarn(ctx, "SetUserStatus err", err) + } + switch status { + case constant.Online: + err := CallbackUserOnline(ctx, client.UserID, client.PlatformID, client.IsBackground, client.ctx.GetConnID()) + if err != nil { + log.ZWarn(ctx, "CallbackUserOnline err", err) + } + case constant.Offline: + err := CallbackUserOffline(ctx, client.UserID, client.PlatformID, client.ctx.GetConnID()) + if err != nil { + log.ZWarn(ctx, "CallbackUserOffline err", err) + } + + } + } func (ws *WsServer) SetCacheHandler(cache cache.MsgModel) { @@ -186,6 +210,7 @@ func (ws *WsServer) registerClient(client *Client) { atomic.AddInt64(&ws.onlineUserConnNum, 1) } } + ws.SetUserOnlineStatus(client.ctx, client, constant.Online) log.ZInfo( client.ctx, "user online", @@ -292,14 +317,8 @@ func (ws *WsServer) unregisterClient(client *Client) { atomic.AddInt64(&ws.onlineUserNum, -1) } atomic.AddInt64(&ws.onlineUserConnNum, -1) - log.ZInfo( - client.ctx, - "user offline", - "close reason", - client.closedErr, - "online user Num", - ws.onlineUserNum, - "online user conn Num", + ws.SetUserOnlineStatus(client.ctx, client, constant.Offline) + log.ZInfo(client.ctx, "user offline", "close reason", client.closedErr, "online user Num", ws.onlineUserNum, "online user conn Num", ws.onlineUserConnNum, ) } diff --git a/pkg/rpcclient/user.go b/pkg/rpcclient/user.go index 1ce4fd53c..6ca60dc75 100644 --- a/pkg/rpcclient/user.go +++ b/pkg/rpcclient/user.go @@ -154,3 +154,7 @@ func (u *UserRpcClient) GetAllUserIDs(ctx context.Context, pageNumber, showNumbe } return resp.UserIDs, nil } +func (u *UserRpcClient) SetUserStatus(ctx context.Context, userID string, status int32, platformID int) error { + _, err := u.Client.SetUserStatus(ctx, &user.SetUserStatusReq{StatusList: []*user.OnlineStatus{{UserID: userID, Status: status, PlatformID: int32(platformID)}}}) + return err +} From 1ec33afe3f3549c2ee329f74a7ea147910edf002 Mon Sep 17 00:00:00 2001 From: Xinwei Xiong <3293172751@qq.com> Date: Sat, 29 Jul 2023 14:07:59 +0800 Subject: [PATCH 29/61] Update version.md (#703) --- docs/conversions/version.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/docs/conversions/version.md b/docs/conversions/version.md index bf1062b77..8c6caf5ec 100644 --- a/docs/conversions/version.md +++ b/docs/conversions/version.md @@ -14,6 +14,10 @@ In the OpenIM repository, the versioning adheres to the `MAJOR.MINOR.PATCH` form ## Milestones and Branching ++ [OpenIM Milestones](https://github.com/OpenIMSDK/Open-IM-Server/milestones) ++ [OpenIM Tags](https://github.com/OpenIMSDK/Open-IM-Server/tags) ++ [OpenIM Branches](https://github.com/OpenIMSDK/Open-IM-Server/branches) + When a significant milestone like v3.1.0 is achieved, a new branch `release-v3.1` is created. This branch contains all the code pertaining to this stable release. All bug fixes and features intended for the next version, v3.2.0, are merged into this branch. The release of `PATCH` versions (Z in `X.Y.Z`) are driven by bug fixes, and these can be rolled out depending on the bug's priority or over a scheduled time. On the other hand, `MINOR` versions (Y in `X.Y.Z`) are released based on the project's roadmap, milestone completion, or on a scheduled timeline. Importantly, the API of minor versions is always backward-compatible. @@ -59,3 +63,4 @@ Remember, communication with your team is key throughout this process, keeping e ## Docker images version management ++ [OpenIM Docker Images Administration](https://github.com/OpenIMSDK/Open-IM-Server/blob/main/docs/conversions/images.md) From 2166c71c1fdcf2cb8fccf5e547d7d7d92888831b Mon Sep 17 00:00:00 2001 From: Xinwei Xiong <3293172751@qq.com> Date: Sat, 29 Jul 2023 19:20:09 +0800 Subject: [PATCH 30/61] Update version.md (#704) --- docs/conversions/version.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/docs/conversions/version.md b/docs/conversions/version.md index 8c6caf5ec..06e34543b 100644 --- a/docs/conversions/version.md +++ b/docs/conversions/version.md @@ -2,6 +2,26 @@ Our project, OpenIM, follows the [Semantic Versioning 2.0.0](https://semver.org/lang/zh-CN/) standards. +OpenIM, the open source project, employs a comprehensive version management system to ensure the reliability and traceability of our software. Our version management consists of three main components: the `main` branch, the `release` branch, and `tag` management. + +## Main Branch + +The `main` branch is where all the latest code resides. It's the hub of activity, embodying all the cutting-edge features that are currently being developed or updated. However, since it's subject to frequent changes and updates, it may not always represent the most stable version of the software. Access the `main` branch [here](https://github.com/openimsdk/openim-server/tree/main). + +## Release Branch + +On the other hand, we have the `release` branch. For instance, in the context of version 3.1, we maintain a `release-v3.1` branch. Unlike the `main` branch, the release branch is designed to be a continuously stable and updated version of the software. This provides a reliable option for users who prefer stability over the latest, but potentially unstable, features. Access the `release-v3.1` branch [here](https://github.com/openimsdk/openim-server/tree/release-v3.1). + +## Tag Management + +Finally, there's `tag` management. Despite having both `main` and `release` branches, `tag` serves a crucial role. Tags are immutable, i.e., they remain unchanged once created. Therefore, if you need a specific version of the software, you can use the corresponding tag. Check out the available tags [here](https://github.com/openimsdk/openim-server/tags). + +Moreover, our Docker image versions are closely tied with these three components. For instance, a tag might correspond to the Docker image `ghcr.io/openimsdk/openim-server:v3.1.0`, a release would be `ghcr.io/openimsdk/openim-server:release-v3.0`, and the main branch might be represented as `ghcr.io/openimsdk/openim-server:main` or `ghcr.io/openimsdk/openim-server:latest`. + +To find out more, or to contribute to our project, please visit our GitHub repository at [OpenIM Server](https://github.com/openimsdk/openim-server). + +We believe that this approach offers a balanced blend of innovation and stability, enabling us to provide the best possible software to our users. + ## OpenIM version OpenIM manages two primary branches: `main` and `release`. The project uses Semantic Versioning 2.0.0 to tag different versions of the software, each indicating a significant milestone in the software's development. From 80d888f88684da87a6456d530e516e541e917630 Mon Sep 17 00:00:00 2001 From: Xinwei Xiong <3293172751@qq.com> Date: Sat, 29 Jul 2023 21:04:14 +0800 Subject: [PATCH 31/61] docs: update create CODE_OF_CONDUCT.md (#705) --- CODE_OF_CONDUCT.md | 128 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 128 insertions(+) create mode 100644 CODE_OF_CONDUCT.md diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md new file mode 100644 index 000000000..c5e93d7b5 --- /dev/null +++ b/CODE_OF_CONDUCT.md @@ -0,0 +1,128 @@ +# Contributor Covenant Code of Conduct + +## Our Pledge + +We as members, contributors, and leaders pledge to make participation in our +community a harassment-free experience for everyone, regardless of age, body +size, visible or invisible disability, ethnicity, sex characteristics, gender +identity and expression, level of experience, education, socio-economic status, +nationality, personal appearance, race, religion, or sexual identity +and orientation. + +We pledge to act and interact in ways that contribute to an open, welcoming, +diverse, inclusive, and healthy community. + +## Our Standards + +Examples of behavior that contributes to a positive environment for our +community include: + +* Demonstrating empathy and kindness toward other people +* Being respectful of differing opinions, viewpoints, and experiences +* Giving and gracefully accepting constructive feedback +* Accepting responsibility and apologizing to those affected by our mistakes, + and learning from the experience +* Focusing on what is best not just for us as individuals, but for the + overall community + +Examples of unacceptable behavior include: + +* The use of sexualized language or imagery, and sexual attention or + advances of any kind +* Trolling, insulting or derogatory comments, and personal or political attacks +* Public or private harassment +* Publishing others' private information, such as a physical or email + address, without their explicit permission +* Other conduct which could reasonably be considered inappropriate in a + professional setting + +## Enforcement Responsibilities + +Community leaders are responsible for clarifying and enforcing our standards of +acceptable behavior and will take appropriate and fair corrective action in +response to any behavior that they deem inappropriate, threatening, offensive, +or harmful. + +Community leaders have the right and responsibility to remove, edit, or reject +comments, commits, code, wiki edits, issues, and other contributions that are +not aligned to this Code of Conduct, and will communicate reasons for moderation +decisions when appropriate. + +## Scope + +This Code of Conduct applies within all community spaces, and also applies when +an individual is officially representing the community in public spaces. +Examples of representing our community include using an official e-mail address, +posting via an official social media account, or acting as an appointed +representative at an online or offline event. + +## Enforcement + +Instances of abusive, harassing, or otherwise unacceptable behavior may be +reported to the community leaders responsible for enforcement at +3293172751nss@gmail.com. +All complaints will be reviewed and investigated promptly and fairly. + +All community leaders are obligated to respect the privacy and security of the +reporter of any incident. + +## Enforcement Guidelines + +Community leaders will follow these Community Impact Guidelines in determining +the consequences for any action they deem in violation of this Code of Conduct: + +### 1. Correction + +**Community Impact**: Use of inappropriate language or other behavior deemed +unprofessional or unwelcome in the community. + +**Consequence**: A private, written warning from community leaders, providing +clarity around the nature of the violation and an explanation of why the +behavior was inappropriate. A public apology may be requested. + +### 2. Warning + +**Community Impact**: A violation through a single incident or series +of actions. + +**Consequence**: A warning with consequences for continued behavior. No +interaction with the people involved, including unsolicited interaction with +those enforcing the Code of Conduct, for a specified period of time. This +includes avoiding interactions in community spaces as well as external channels +like social media. Violating these terms may lead to a temporary or +permanent ban. + +### 3. Temporary Ban + +**Community Impact**: A serious violation of community standards, including +sustained inappropriate behavior. + +**Consequence**: A temporary ban from any sort of interaction or public +communication with the community for a specified period of time. No public or +private interaction with the people involved, including unsolicited interaction +with those enforcing the Code of Conduct, is allowed during this period. +Violating these terms may lead to a permanent ban. + +### 4. Permanent Ban + +**Community Impact**: Demonstrating a pattern of violation of community +standards, including sustained inappropriate behavior, harassment of an +individual, or aggression toward or disparagement of classes of individuals. + +**Consequence**: A permanent ban from any sort of public interaction within +the community. + +## Attribution + +This Code of Conduct is adapted from the [Contributor Covenant][homepage], +version 2.0, available at +https://www.contributor-covenant.org/version/2/0/code_of_conduct.html. + +Community Impact Guidelines were inspired by [Mozilla's code of conduct +enforcement ladder](https://github.com/mozilla/diversity). + +[homepage]: https://www.contributor-covenant.org + +For answers to common questions about this code of conduct, see the FAQ at +https://www.contributor-covenant.org/faq. Translations are available at +https://www.contributor-covenant.org/translations. From 6480f9f0b57cfc795ca43457fe0040f04eaa0909 Mon Sep 17 00:00:00 2001 From: Xinwei Xiong <3293172751@qq.com> Date: Sat, 29 Jul 2023 21:26:27 +0800 Subject: [PATCH 32/61] fix: docker images (#706) * fix: docker images Signed-off-by: Xinwei Xiong(cubxxw-openim) <3293172751nss@gmail.com> * fix: chat scripts config Signed-off-by: Xinwei Xiong(cubxxw-openim) <3293172751nss@gmail.com> --------- Signed-off-by: Xinwei Xiong(cubxxw-openim) <3293172751nss@gmail.com> --- .goreleaser.yaml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.goreleaser.yaml b/.goreleaser.yaml index fc7c0cd01..31cdbd085 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -487,10 +487,14 @@ release: ## Helping out - We release logs are recorded on [✨ CHANGELOG](https://github.com/OpenIMSDK/Open-IM-Server/blob/main/CHANGELOG/CHANGELOG.md) + We release logs are recorded on [✨ CHANGELOG](https://github.com/OpenIMSDK/Open-IM-Server/blob/main/CHANGELOG/CHANGELOG.md)--config_folder_path + + For information on versions of OpenIM and how to maintain branches, read [📚this article](https://github.com/OpenIMSDK/Open-IM-Server/blob/main/docs/conversions/version.md) This release is only possible thanks to **all** the support of some **awesome people**! + https://github.com/OpenIMSDK/Open-IM-Server/blob/main/docs/conversions/version.md + **Want to be one of them 😘?** Contributions to this project are welcome! Please see [CONTRIBUTING.md](https://github.com/OpenIMSDK/Open-IM-Server/blob/main/CONTRIBUTING.md) for details. From 6414a0fafd1d32c51d37d843f62eb4ac9fd9b9f5 Mon Sep 17 00:00:00 2001 From: Xinwei Xiong <3293172751@qq.com> Date: Sat, 29 Jul 2023 21:30:47 +0800 Subject: [PATCH 33/61] Update docker-compose.yaml (#707) --- docker-compose.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docker-compose.yaml b/docker-compose.yaml index d5565ca52..394232df3 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -100,7 +100,7 @@ services: openim_server: - image: ghcr.io/openimsdk/openim-server:v3.1.0 + image: ghcr.io/openimsdk/openim-server:latest container_name: openim-server volumes: - ./logs:/Open-IM-Server/logs @@ -124,7 +124,7 @@ services: max-file: "2" openim_chat: - image: ghcr.io/openimsdk/openim-chat:v1.1.0 + image: ghcr.io/openimsdk/openim-chat:latest container_name: openim_chat restart: always depends_on: From cf2145cc325ff5aa57d8a20ea524656468c793e6 Mon Sep 17 00:00:00 2001 From: Xinwei Xiong <3293172751@qq.com> Date: Sat, 29 Jul 2023 21:53:00 +0800 Subject: [PATCH 35/61] Create dependabot.yml (#708) --- .github/dependabot.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 .github/dependabot.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 000000000..f6150ead7 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,11 @@ +# 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" From a74c851295b068e42f9396cedccd2be0e0e4e588 Mon Sep 17 00:00:00 2001 From: Xinwei Xiong <3293172751@qq.com> Date: Sat, 29 Jul 2023 22:00:40 +0800 Subject: [PATCH 36/61] Update golang.mk (#710) --- scripts/make-rules/golang.mk | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/scripts/make-rules/golang.mk b/scripts/make-rules/golang.mk index aebf70e68..dedcdc9fc 100644 --- a/scripts/make-rules/golang.mk +++ b/scripts/make-rules/golang.mk @@ -131,11 +131,11 @@ go.build.%: $(BIN_DIR)/platforms/$(OS)/$(ARCH)/$(COMMAND)$(GO_OUT_EXT) $(ROOT_DIR)/cmd/$(COMMAND)/main.go; \ fi -# ## go.install: Install deployment openim -# .PHONY: go.install -# go.install: -# @echo "===========> Installing deployment openim" -# @$(ROOT_DIR)/scripts/install_im_server.sh +## go.install: Install deployment openim +.PHONY: go.install +go.install: + @echo "===========> Installing deployment openim" + @$(ROOT_DIR)/scripts/install_im_server.sh ## go.check: Check OpenIM deployment .PHONY: go.check @@ -204,4 +204,4 @@ go.clean: ## copyright.help: Show copyright help .PHONY: go.help go.help: scripts/make-rules/golang.mk - $(call smallhelp) \ No newline at end of file + $(call smallhelp) From f13088262eb46e920a3b7317450c8144f1a9f40a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 29 Jul 2023 22:02:46 +0800 Subject: [PATCH 37/61] build(deps): bump github.com/minio/minio-go/v7 from 7.0.59 to 7.0.61 (#711) Bumps [github.com/minio/minio-go/v7](https://github.com/minio/minio-go) from 7.0.59 to 7.0.61. - [Release notes](https://github.com/minio/minio-go/releases) - [Commits](https://github.com/minio/minio-go/compare/v7.0.59...v7.0.61) --- updated-dependencies: - dependency-name: github.com/minio/minio-go/v7 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 14 +++++++------- go.sum | 29 ++++++++++++++--------------- 2 files changed, 21 insertions(+), 22 deletions(-) diff --git a/go.mod b/go.mod index c7a2b8309..33e4b5f3c 100644 --- a/go.mod +++ b/go.mod @@ -16,13 +16,13 @@ require ( github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 github.com/jinzhu/copier v0.3.5 github.com/lestrrat-go/file-rotatelogs v2.4.0+incompatible // indirect - github.com/minio/minio-go/v7 v7.0.59 + github.com/minio/minio-go/v7 v7.0.61 github.com/mitchellh/mapstructure v1.5.0 github.com/nfnt/resize v0.0.0-20180221191011-83c6a9932646 // indirect github.com/pkg/errors v0.9.1 // indirect github.com/prometheus/client_golang v1.16.0 github.com/robfig/cron/v3 v3.0.1 - github.com/sirupsen/logrus v1.9.2 // indirect + github.com/sirupsen/logrus v1.9.3 // indirect github.com/stretchr/testify v1.8.3 go.mongodb.org/mongo-driver v1.12.0 golang.org/x/image v0.9.0 // indirect @@ -85,8 +85,8 @@ require ( github.com/jinzhu/inflection v1.0.0 // indirect github.com/jinzhu/now v1.1.5 // indirect github.com/json-iterator/go v1.1.12 // indirect - github.com/klauspost/compress v1.16.5 // indirect - github.com/klauspost/cpuid/v2 v2.2.4 // indirect + github.com/klauspost/compress v1.16.7 // indirect + github.com/klauspost/cpuid/v2 v2.2.5 // indirect github.com/leodido/go-urn v1.2.4 // indirect github.com/lithammer/shortuuid v3.0.0+incompatible // indirect github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect @@ -116,10 +116,10 @@ require ( go.uber.org/atomic v1.7.0 // indirect go.uber.org/multierr v1.6.0 // indirect golang.org/x/arch v0.3.0 // indirect - golang.org/x/net v0.11.0 // indirect + golang.org/x/net v0.12.0 // indirect golang.org/x/oauth2 v0.7.0 // indirect golang.org/x/sync v0.2.0 // indirect - golang.org/x/sys v0.9.0 // indirect + golang.org/x/sys v0.10.0 // indirect golang.org/x/text v0.11.0 // indirect golang.org/x/time v0.1.0 // indirect golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect @@ -136,7 +136,7 @@ require ( github.com/spf13/cobra v1.6.1 github.com/ugorji/go/codec v1.2.11 // indirect go.uber.org/zap v1.24.0 // indirect - golang.org/x/crypto v0.10.0 // indirect + golang.org/x/crypto v0.11.0 // indirect google.golang.org/genproto v0.0.0-20230525234025-438c736192d0 // indirect gopkg.in/ini.v1 v1.67.0 // indirect ) diff --git a/go.sum b/go.sum index 2ad7b17ff..b81723deb 100644 --- a/go.sum +++ b/go.sum @@ -191,12 +191,12 @@ github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/klauspost/compress v1.12.2/go.mod h1:8dP1Hq4DHOhN9w426knH3Rhby4rFm6D8eO+e+Dq5Gzg= github.com/klauspost/compress v1.13.6/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= -github.com/klauspost/compress v1.16.5 h1:IFV2oUNUzZaz+XyusxpLzpzS8Pt5rh0Z16For/djlyI= -github.com/klauspost/compress v1.16.5/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= +github.com/klauspost/compress v1.16.7 h1:2mk3MPGNzKyxErAw8YaohYh69+pa4sIQSC0fPGCFR9I= +github.com/klauspost/compress v1.16.7/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= github.com/klauspost/cpuid/v2 v2.0.1/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= -github.com/klauspost/cpuid/v2 v2.2.4 h1:acbojRNwl3o09bUq+yDCtZFc1aiwaAAxtcn8YkZXnvk= -github.com/klauspost/cpuid/v2 v2.2.4/go.mod h1:RVVoqg1df56z8g3pUjL/3lE5UfnlrJX8tyFgg4nqhuY= +github.com/klauspost/cpuid/v2 v2.2.5 h1:0E5MSMDEoAulmXNFquVs//DdoomxaoTY1kUhbc/qbZg= +github.com/klauspost/cpuid/v2 v2.2.5/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/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= @@ -219,8 +219,8 @@ github.com/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zk github.com/matttproud/golang_protobuf_extensions v1.0.4/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= github.com/minio/md5-simd v1.1.2 h1:Gdi1DZK69+ZVMoNHRXJyNcxrMA4dSxoYHZSQbirFg34= github.com/minio/md5-simd v1.1.2/go.mod h1:MzdKDxYpY2BT9XQFocsiZf/NKVtR7nkE4RoEpN+20RM= -github.com/minio/minio-go/v7 v7.0.59 h1:lxIXwsTIcQkYoEG25rUJbzpmSB/oWeVDmxFo/uWUUsw= -github.com/minio/minio-go/v7 v7.0.59/go.mod h1:NUDy4A4oXPq1l2yK6LTSvCEzAMeIcoz9lcj5dbzSrRE= +github.com/minio/minio-go/v7 v7.0.61 h1:87c+x8J3jxQ5VUGimV9oHdpjsAvy3fhneEBKuoKEVUI= +github.com/minio/minio-go/v7 v7.0.61/go.mod h1:BTu8FcrEw+HidY0zd/0eny43QnVNkXRPXrLXFuQBHXg= github.com/minio/sha256-simd v1.0.1 h1:6kaan5IFmwTNynnKKpDHe6FWHohJOHhCPchzK49dzMM= github.com/minio/sha256-simd v1.0.1/go.mod h1:Pz6AKMiUdngCLpeTL/RJY1M9rUuPMYujV5xJjtbRSN8= github.com/mitchellh/mapstructure v1.4.3/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= @@ -279,8 +279,8 @@ github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDN github.com/rs/xid v1.5.0 h1:mKX4bl4iPYJtEIxp6CYiUuLQ/8DYMoz0PUdtGgMFRVc= github.com/rs/xid v1.5.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= -github.com/sirupsen/logrus v1.9.2 h1:oxx1eChJGI6Uks2ZC4W1zpLlVgqB8ner4EuQwV4Ik1Y= -github.com/sirupsen/logrus v1.9.2/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= +github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= +github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/spf13/cobra v1.6.1 h1:o94oiPyS4KD1mPy2fmcYYHHfCxLqYjJOhGsCHFZtEzA= github.com/spf13/cobra v1.6.1/go.mod h1:IOw/AERYS7UzyrGinqmz6HLUo219MORXGxhbaJUqzrY= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= @@ -341,8 +341,8 @@ golang.org/x/crypto v0.0.0-20201112155050-0c6587e931a9/go.mod h1:LzIPMQfyMNhhGPh golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/crypto v0.10.0 h1:LKqV2xt9+kDzSTfOhx4FrkEBcMrAgHSYgzywV9zcGmM= -golang.org/x/crypto v0.10.0/go.mod h1:o4eNf7Ede1fv+hwOwZsTHl9EsPFO6q6ZvYR8vYfY45I= +golang.org/x/crypto v0.11.0 h1:6Ewdq3tDic1mg5xRO4milcWCfMVQhI4NkqWWvqejpuA= +golang.org/x/crypto v0.11.0/go.mod h1:xgJhtzW8F9jGdVFWZESrid1U1bjeNy4zgy5cRr/CIio= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/image v0.9.0 h1:QrzfX26snvCM20hIhBwuHI/ThTg18b/+kcKdXHvnR+g= golang.org/x/image v0.9.0/go.mod h1:jtrku+n79PfroUbvDdeUWMAI+heR786BofxrbiSF+J0= @@ -372,8 +372,8 @@ golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= -golang.org/x/net v0.11.0 h1:Gi2tvZIJyBtO9SDr1q9h5hEQCp/4L2RQ+ar0qjx2oNU= -golang.org/x/net v0.11.0/go.mod h1:2L/ixqYpgIVXmeoSA/4Lu7BzTG4KIyPIryS4IsOd1oQ= +golang.org/x/net v0.12.0 h1:cfawfvKITfUsFCeJIHJrbSxpeu/E81khclypR0GVT50= +golang.org/x/net v0.12.0/go.mod h1:zEVYFnQC7m/vmpQFELhcD1EWkZlX69l4oqgmer6hfKA= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.7.0 h1:qe6s0zUXlPX80/dITx3440hWZ7GwMwgDDyrSGTPJG/g= golang.org/x/oauth2 v0.7.0/go.mod h1:hPLQkd9LyjfXTiRohC/41GhcFqxisoUQ99sCUOHO9x4= @@ -403,13 +403,12 @@ golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220704084225-05e143d24a9e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.9.0 h1:KS/R3tvhPqvJvwcKfnBHJwwthS11LRhmM5D59eEXa0s= -golang.org/x/sys v0.9.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.10.0 h1:SqMFp9UcQJZa+pmYuAKjd9xq1f0j5rLcDIk0mj4qAsA= +golang.org/x/sys v0.10.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= From 7b0334ff6d62afb14ab4800ba2ac939d71bd397c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 29 Jul 2023 22:08:17 +0800 Subject: [PATCH 38/61] build(deps): bump github.com/go-sql-driver/mysql from 1.6.0 to 1.7.1 (#713) Bumps [github.com/go-sql-driver/mysql](https://github.com/go-sql-driver/mysql) from 1.6.0 to 1.7.1. - [Release notes](https://github.com/go-sql-driver/mysql/releases) - [Changelog](https://github.com/go-sql-driver/mysql/blob/master/CHANGELOG.md) - [Commits](https://github.com/go-sql-driver/mysql/compare/v1.6.0...v1.7.1) --- updated-dependencies: - dependency-name: github.com/go-sql-driver/mysql dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 2 +- go.sum | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/go.mod b/go.mod index 33e4b5f3c..e4c067111 100644 --- a/go.mod +++ b/go.mod @@ -41,7 +41,7 @@ require ( github.com/OpenIMSDK/tools v0.0.5 github.com/aliyun/aliyun-oss-go-sdk v2.2.7+incompatible github.com/go-redis/redis v6.15.9+incompatible - github.com/go-sql-driver/mysql v1.6.0 + github.com/go-sql-driver/mysql v1.7.1 github.com/redis/go-redis/v9 v9.0.5 github.com/tencentyun/cos-go-sdk-v5 v0.7.41 ) diff --git a/go.sum b/go.sum index b81723deb..3cf065090 100644 --- a/go.sum +++ b/go.sum @@ -93,8 +93,9 @@ github.com/go-playground/validator/v10 v10.14.0 h1:vgvQWe3XCz3gIeFDm/HnTIbj6UGmg github.com/go-playground/validator/v10 v10.14.0/go.mod h1:9iXMNT7sEkjXb0I+enO7QXmzG6QCsPWY4zveKFVRSyU= github.com/go-redis/redis v6.15.9+incompatible h1:K0pv1D7EQUjfyoMql+r/jZqCLizCGKFlFgcHWWmHQjg= github.com/go-redis/redis v6.15.9+incompatible/go.mod h1:NAIEuMOZ/fxfXJIrKDQDz8wamY7mA7PouImQ2Jvg6kA= -github.com/go-sql-driver/mysql v1.6.0 h1:BCTh4TKNUYmOmMUcQ3IipzF5prigylS7XXjEkfCHuOE= github.com/go-sql-driver/mysql v1.6.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= +github.com/go-sql-driver/mysql v1.7.1 h1:lUIinVbN1DY0xBg0eMOzmmtGoHwWBbvnWubQUrtU8EI= +github.com/go-sql-driver/mysql v1.7.1/go.mod h1:OXbVy3sEdcQ2Doequ6Z5BW6fXNQTmx+9S1MCJN5yJMI= github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= 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= From 83eb0da902c3c0ff218fd8cac38df5ec30071806 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 29 Jul 2023 22:25:42 +0800 Subject: [PATCH 39/61] build(deps): bump google.golang.org/api from 0.114.0 to 0.134.0 (#714) Bumps [google.golang.org/api](https://github.com/googleapis/google-api-go-client) from 0.114.0 to 0.134.0. - [Release notes](https://github.com/googleapis/google-api-go-client/releases) - [Changelog](https://github.com/googleapis/google-api-go-client/blob/main/CHANGES.md) - [Commits](https://github.com/googleapis/google-api-go-client/compare/v0.114.0...v0.134.0) --- updated-dependencies: - dependency-name: google.golang.org/api dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 33 +++++++++++----------- go.sum | 89 ++++++++++++++++++++++++++++++++++++++-------------------- 2 files changed, 75 insertions(+), 47 deletions(-) diff --git a/go.mod b/go.mod index e4c067111..e94e4bb52 100644 --- a/go.mod +++ b/go.mod @@ -26,7 +26,7 @@ require ( github.com/stretchr/testify v1.8.3 go.mongodb.org/mongo-driver v1.12.0 golang.org/x/image v0.9.0 // indirect - google.golang.org/api v0.114.0 + google.golang.org/api v0.134.0 google.golang.org/grpc v1.56.2 google.golang.org/protobuf v1.31.0 gopkg.in/yaml.v3 v3.0.1 @@ -47,13 +47,13 @@ require ( ) require ( - cloud.google.com/go v0.110.0 // indirect - cloud.google.com/go/compute v1.19.1 // indirect + cloud.google.com/go v0.110.4 // indirect + cloud.google.com/go/compute v1.20.1 // indirect cloud.google.com/go/compute/metadata v0.2.3 // indirect - cloud.google.com/go/firestore v1.9.0 // indirect - cloud.google.com/go/iam v0.13.0 // indirect - cloud.google.com/go/longrunning v0.4.1 // indirect - cloud.google.com/go/storage v1.28.1 // indirect + cloud.google.com/go/firestore v1.11.0 // indirect + cloud.google.com/go/iam v1.1.0 // indirect + cloud.google.com/go/longrunning v0.5.1 // indirect + cloud.google.com/go/storage v1.30.1 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/bytedance/sonic v1.9.1 // indirect github.com/cespare/xxhash/v2 v2.2.0 // indirect @@ -70,11 +70,12 @@ require ( github.com/go-playground/universal-translator v0.18.1 // indirect github.com/go-zookeeper/zk v1.0.3 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect - github.com/golang/snappy v0.0.3 // indirect + github.com/golang/snappy v0.0.4 // indirect github.com/google/go-cmp v0.5.9 // indirect github.com/google/go-querystring v1.1.0 // indirect - github.com/googleapis/enterprise-certificate-proxy v0.2.3 // indirect - github.com/googleapis/gax-go/v2 v2.7.1 // indirect + github.com/google/s2a-go v0.1.4 // indirect + github.com/googleapis/enterprise-certificate-proxy v0.2.5 // indirect + github.com/googleapis/gax-go/v2 v2.12.0 // indirect github.com/hashicorp/go-uuid v1.0.2 // indirect github.com/inconshreveable/mousetrap v1.0.1 // indirect github.com/jcmturner/aescts/v2 v2.0.0 // indirect @@ -117,15 +118,15 @@ require ( go.uber.org/multierr v1.6.0 // indirect golang.org/x/arch v0.3.0 // indirect golang.org/x/net v0.12.0 // indirect - golang.org/x/oauth2 v0.7.0 // indirect - golang.org/x/sync v0.2.0 // indirect + golang.org/x/oauth2 v0.10.0 // indirect + golang.org/x/sync v0.3.0 // indirect golang.org/x/sys v0.10.0 // indirect golang.org/x/text v0.11.0 // indirect - golang.org/x/time v0.1.0 // indirect + golang.org/x/time v0.3.0 // indirect golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect google.golang.org/appengine v1.6.7 // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20230525234020-1aefcd67740a // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20230626202813-9b080da550b3 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20230706204954-ccb25ca9f130 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20230720185612-659f7aaaa771 // indirect ) require ( @@ -137,6 +138,6 @@ require ( github.com/ugorji/go/codec v1.2.11 // indirect go.uber.org/zap v1.24.0 // indirect golang.org/x/crypto v0.11.0 // indirect - google.golang.org/genproto v0.0.0-20230525234025-438c736192d0 // indirect + google.golang.org/genproto v0.0.0-20230706204954-ccb25ca9f130 // indirect gopkg.in/ini.v1 v1.67.0 // indirect ) diff --git a/go.sum b/go.sum index 3cf065090..ae36bd80a 100644 --- a/go.sum +++ b/go.sum @@ -1,18 +1,19 @@ cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go v0.110.0 h1:Zc8gqp3+a9/Eyph2KDmcGaPtbKRIoqq4YTlL4NMD0Ys= -cloud.google.com/go v0.110.0/go.mod h1:SJnCLqQ0FCFGSZMUNUf84MV3Aia54kn7pi8st7tMzaY= -cloud.google.com/go/compute v1.19.1 h1:am86mquDUgjGNWxiGn+5PGLbmgiWXlE/yNWpIpNvuXY= -cloud.google.com/go/compute v1.19.1/go.mod h1:6ylj3a05WF8leseCdIf77NK0g1ey+nj5IKd5/kvShxE= +cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +cloud.google.com/go v0.110.4 h1:1JYyxKMN9hd5dR2MYTPWkGUgcoxVVhg0LKNKEo0qvmk= +cloud.google.com/go v0.110.4/go.mod h1:+EYjdK8e5RME/VY/qLCAtuyALQ9q67dvuum8i+H5xsI= +cloud.google.com/go/compute v1.20.1 h1:6aKEtlUiwEpJzM001l0yFkpXmUVXaN8W+fbkb2AZNbg= +cloud.google.com/go/compute v1.20.1/go.mod h1:4tCnrn48xsqlwSAiLf1HXMQk8CONslYbdiEZc9FEIbM= cloud.google.com/go/compute/metadata v0.2.3 h1:mg4jlk7mCAj6xXp9UJ4fjI9VUI5rubuGBW5aJ7UnBMY= cloud.google.com/go/compute/metadata v0.2.3/go.mod h1:VAV5nSsACxMJvgaAuX6Pk2AawlZn8kiOGuCv6gTkwuA= -cloud.google.com/go/firestore v1.9.0 h1:IBlRyxgGySXu5VuW0RgGFlTtLukSnNkpDiEOMkQkmpA= -cloud.google.com/go/firestore v1.9.0/go.mod h1:HMkjKHNTtRyZNiMzu7YAsLr9K3X2udY2AMwDaMEQiiE= -cloud.google.com/go/iam v0.13.0 h1:+CmB+K0J/33d0zSQ9SlFWUeCCEn5XJA0ZMZ3pHE9u8k= -cloud.google.com/go/iam v0.13.0/go.mod h1:ljOg+rcNfzZ5d6f1nAUJ8ZIxOaZUVoS14bKCtaLZ/D0= -cloud.google.com/go/longrunning v0.4.1 h1:v+yFJOfKC3yZdY6ZUI933pIYdhyhV8S3NpWrXWmg7jM= -cloud.google.com/go/longrunning v0.4.1/go.mod h1:4iWDqhBZ70CvZ6BfETbvam3T8FMvLK+eFj0E6AaRQTo= -cloud.google.com/go/storage v1.28.1 h1:F5QDG5ChchaAVQhINh24U99OWHURqrW8OmQcGKXcbgI= -cloud.google.com/go/storage v1.28.1/go.mod h1:Qnisd4CqDdo6BGs2AD5LLnEsmSQ80wQ5ogcBBKhU86Y= +cloud.google.com/go/firestore v1.11.0 h1:PPgtwcYUOXV2jFe1bV3nda3RCrOa8cvBjTOn2MQVfW8= +cloud.google.com/go/firestore v1.11.0/go.mod h1:b38dKhgzlmNNGTNZZwe7ZRFEuRab1Hay3/DBsIGKKy4= +cloud.google.com/go/iam v1.1.0 h1:67gSqaPukx7O8WLLHMa0PNs3EBGd2eE4d+psbO/CO94= +cloud.google.com/go/iam v1.1.0/go.mod h1:nxdHjaKfCr7fNYx/HJMM8LgiMugmveWlkatear5gVyk= +cloud.google.com/go/longrunning v0.5.1 h1:Fr7TXftcqTudoyRJa113hyaqlGdiBQkp0Gq7tErFDWI= +cloud.google.com/go/longrunning v0.5.1/go.mod h1:spvimkwdz6SPWKEt/XBij79E9fiTkHSQl/fRUUQJYJc= +cloud.google.com/go/storage v1.30.1 h1:uOdMxAs8HExqBlnLtnQyP0YkvbiDpdGShGKtx6U/oNM= +cloud.google.com/go/storage v1.30.1/go.mod h1:NfxhC0UJE1aXSx7CIIbCf7y9HKT7BiccwkR7+P7gN8E= firebase.google.com/go v3.13.0+incompatible h1:3TdYC3DDi6aHn20qoRkxwGqNgdjtblwVAyRLQwGn/+4= firebase.google.com/go v3.13.0+incompatible/go.mod h1:xlah6XbEyW6tbfSklcfe5FHJIwjt8toICdV5Wh9ptHs= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= @@ -27,6 +28,7 @@ github.com/Shopify/toxiproxy v2.1.4+incompatible h1:TKdv8HiTLgE5wdJuEML90aBgNWso github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI= github.com/aliyun/aliyun-oss-go-sdk v2.2.7+incompatible h1:KpbJFXwhVeuxNtBJ74MCGbIoaBok2uZvkD7QXp2+Wis= github.com/aliyun/aliyun-oss-go-sdk v2.2.7+incompatible/go.mod h1:T/Aws4fEfogEE9v+HPhhw+CntffsBHJ8nXQCwKr0/g8= +github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= github.com/benbjohnson/clock v1.1.0 h1:Q92kusRqC1XV2MjkWETPvjJVqKetz1OzxZB7mHJLju8= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= @@ -38,6 +40,7 @@ github.com/bytedance/sonic v1.5.0/go.mod h1:ED5hyg4y6t3/9Ku1R6dU/4KyJ48DZ4jPhfY1 github.com/bytedance/sonic v1.9.1 h1:6iJ6NqdoxCDr6mbY8h18oSO+cShGSMRGCEo7F2h0x8s= github.com/bytedance/sonic v1.9.1/go.mod h1:i736AoUSYt75HyZLoJW9ERYxcy6eaN6h4BZXU064P/U= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= +github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/chenzhuoyu/base64x v0.0.0-20211019084208-fb5309c8db06/go.mod h1:DH46F32mSOjUmXrMHnKwZdA8wcEefY7UVqBKYGjpdQY= @@ -50,6 +53,11 @@ github.com/clbanning/mxj v1.8.4 h1:HuhwZtbyvyOw+3Z1AowPkU87JkJUSv751ELWaiTpj8I= github.com/clbanning/mxj v1.8.4/go.mod h1:BVjHeAH+rl9rs6f+QIpeRl0tfu10SXn1pUSa5PVGJng= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= +github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= +github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI= +github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= @@ -70,6 +78,8 @@ github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFP github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= +github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= +github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/fortytw2/leaktest v1.3.0 h1:u8491cBMTQ8ft8aeV+adlcytMZylmA5nnwwkRZjI8vw= github.com/fortytw2/leaktest v1.3.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g= @@ -80,6 +90,7 @@ github.com/fsnotify/fsnotify v1.4.9 h1:hsms1Qyu0jgnwNXIxa+/V/PDsU6CfLf6CNO8H7IWo github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= github.com/gabriel-vasile/mimetype v1.4.2 h1:w5qFW6JKBz9Y393Y4q372O9A7cUSequkh1Q7OhCmWKU= github.com/gabriel-vasile/mimetype v1.4.2/go.mod h1:zApsH/mKG4w07erKIaJPFiX0Tsq9BFQgN3qGY5GnNgA= +github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= 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= @@ -113,6 +124,7 @@ github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfb github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk= github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= @@ -127,8 +139,9 @@ github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiu 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/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= -github.com/golang/snappy v0.0.3 h1:fHPg5GQYlCeLIPB9BZqMVR5nR9A+IM5zcgeTdjMYmLA= github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +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.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= @@ -146,20 +159,23 @@ github.com/google/go-querystring v1.1.0/go.mod h1:Kcdr2DB4koayq7X8pmAG4sNG59So17 github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/martian/v3 v3.3.2 h1:IqNFLAmvJOgVlpdEBiQbDc2EwKW77amAycfTuWKdfvw= github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/s2a-go v0.1.4 h1:1kZ/sQM3srePvKs3tXAvQzo66XfcReoqFpIpIccE7Oc= +github.com/google/s2a-go v0.1.4/go.mod h1:Ej+mSEMGRnqRzjc7VtF+jdBwYG5fuJfiZ8ELkjEwM0A= github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/googleapis/enterprise-certificate-proxy v0.2.3 h1:yk9/cqRKtT9wXZSsRH9aurXEpJX+U6FLtpYTdC3R06k= -github.com/googleapis/enterprise-certificate-proxy v0.2.3/go.mod h1:AwSRAtLfXpU5Nm3pW+v7rGDHp09LsPtGY9MduiEsR9k= -github.com/googleapis/gax-go/v2 v2.7.1 h1:gF4c0zjUP2H/s/hEGyLA3I0fA2ZWjzYiONAD6cvPr8A= -github.com/googleapis/gax-go/v2 v2.7.1/go.mod h1:4orTrqY6hXxxaUL4LHIPl6lGo8vAE38/qKbhSAKP6QI= +github.com/googleapis/enterprise-certificate-proxy v0.2.5 h1:UR4rDjcgpgEnqpIEvkiqTYKBCKLNmlge2eVjoZfySzM= +github.com/googleapis/enterprise-certificate-proxy v0.2.5/go.mod h1:RxW0N9901Cko1VOCW3SXCpWP+mlIEkk2tP7jnHy9a3w= +github.com/googleapis/gax-go/v2 v2.12.0 h1:A+gCJKdRfqXkr+BIRGtZLibNXf0m1f9E4HG56etFpas= +github.com/googleapis/gax-go/v2 v2.12.0/go.mod h1:y+aIqrI5eb1YGMVJfuV3185Ts/D7qKpsEkdD5+I6QGU= github.com/gorilla/securecookie v1.1.1/go.mod h1:ra0sb63/xPlUeL+yeDciTfxMRAA+MP+HVt/4epWDjd4= github.com/gorilla/sessions v1.2.1/go.mod h1:dk2InVEVJ0sfLlnXv9EAgkf6ecYs/i80K/zI+bUmuGM= github.com/gorilla/websocket v1.4.2 h1:+/TMaTYc4QFitKJxsQ7Yye35DkWvkdLcvGKqM+x0Ufc= github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 h1:Ovs26xHkKqVztRpIrF/92BcuyuQ/YW4NSIpoGtfXNho= github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= +github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= github.com/hashicorp/go-uuid v1.0.2 h1:cfejS+Tpcp13yd5nYHWDI6qVCny6wyX2Mt5SGur2IGE= github.com/hashicorp/go-uuid v1.0.2/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= @@ -276,6 +292,7 @@ github.com/redis/go-redis/v9 v9.0.5 h1:CuQcn5HIEeK7BgElubPP8CGtE0KakrnbBSTLjathl github.com/redis/go-redis/v9 v9.0.5/go.mod h1:WqMKv5vnQbRuZstUwxQI195wHy+t4PuXDOjzMvcuQHk= github.com/robfig/cron/v3 v3.0.1 h1:WdRxkvbJztn8LMz/QEvLN5sBU+xKpSqwwUO1Pjr4qDs= github.com/robfig/cron/v3 v3.0.1/go.mod h1:eQICP3HwyT7UooqI/z+Ov+PtYAWygg1TEWWzGIFLtro= +github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M= github.com/rs/xid v1.5.0 h1:mKX4bl4iPYJtEIxp6CYiUuLQ/8DYMoz0PUdtGgMFRVc= github.com/rs/xid v1.5.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= @@ -325,6 +342,7 @@ go.mongodb.org/mongo-driver v1.12.0 h1:aPx33jmn/rQuJXPQLZQ8NtfPQG8CaqgLThFtqRb0P go.mongodb.org/mongo-driver v1.12.0/go.mod h1:AZkxhPnFJUoH7kZlFkVKucV20K387miPfm7oimrSmK0= go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0= go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= +go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= go.uber.org/atomic v1.7.0 h1:ADUqmZGgLDDfbSL9ZmPxKTybcoEYHgpYfELNoN+7hsw= go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/goleak v1.1.11 h1:wy28qYRKZgnJTxGxvye5/wgWr1EKjmUDGYox5mGlRlI= @@ -341,6 +359,7 @@ golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPh golang.org/x/crypto v0.0.0-20201112155050-0c6587e931a9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/crypto v0.0.0-20220314234659-1baeb1ce4c0b/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.11.0 h1:6Ewdq3tDic1mg5xRO4milcWCfMVQhI4NkqWWvqejpuA= golang.org/x/crypto v0.11.0/go.mod h1:xgJhtzW8F9jGdVFWZESrid1U1bjeNy4zgy5cRr/CIio= @@ -357,6 +376,7 @@ golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= @@ -365,6 +385,7 @@ golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/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-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= @@ -376,8 +397,9 @@ golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/net v0.12.0 h1:cfawfvKITfUsFCeJIHJrbSxpeu/E81khclypR0GVT50= golang.org/x/net v0.12.0/go.mod h1:zEVYFnQC7m/vmpQFELhcD1EWkZlX69l4oqgmer6hfKA= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= -golang.org/x/oauth2 v0.7.0 h1:qe6s0zUXlPX80/dITx3440hWZ7GwMwgDDyrSGTPJG/g= -golang.org/x/oauth2 v0.7.0/go.mod h1:hPLQkd9LyjfXTiRohC/41GhcFqxisoUQ99sCUOHO9x4= +golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.10.0 h1:zHCpF2Khkwy4mMB4bv0U37YtJdTGW8jI0glAApi0Kh8= +golang.org/x/oauth2 v0.10.0/go.mod h1:kTpgurOux7LqtuxjuyZa4Gj2gdezIt/jQtGnNFfypQI= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -386,8 +408,8 @@ golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJ 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.2.0 h1:PUR+T4wwASmuSTYdKjYHI5TD22Wy5ogLU5qZCOLxBrI= -golang.org/x/sync v0.2.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.3.0 h1:ftCYgMx6zT/asHUrPw8BLLscYtGznsLAnjq5RH9P66E= +golang.org/x/sync v0.3.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -422,8 +444,8 @@ golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.11.0 h1:LAntKIrcmeSKERyiOh0XMV39LXS8IE9UL2yP7+f5ij4= golang.org/x/text v0.11.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= -golang.org/x/time v0.1.0 h1:xYY+Bajn2a7VBmTM5GikTmnK8ZuX8YgnQCqZpbBNtmA= -golang.org/x/time v0.1.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.3.0 h1:rg5rLMjNzMS1RkNLzCG38eapWhnYLFYXDXj2gOlr8j4= +golang.org/x/time v0.3.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= @@ -441,26 +463,30 @@ golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 h1:H2TDz8ibqkAF6YGhCdN3jS9O0/s90v0rJh3X/OLHEUk= golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= -google.golang.org/api v0.114.0 h1:1xQPji6cO2E2vLiI+C/XiFAnsn1WV3mjaEwGLhi3grE= -google.golang.org/api v0.114.0/go.mod h1:ifYI2ZsFK6/uGddGfAD5BMxlnkBqCmqHSDUVi45N5Yg= +google.golang.org/api v0.134.0 h1:ktL4Goua+UBgoP1eL1/60LwZJqa1sIzkLmvoR3hR6Gw= +google.golang.org/api v0.134.0/go.mod h1:sjRL3UnjTx5UqNQS9EWr9N8p7xbHpy1k0XGRLCf3Spk= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c= google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= -google.golang.org/genproto v0.0.0-20230525234025-438c736192d0 h1:x1vNwUhVOcsYoKyEGCZBH694SBmmBjA2EfauFVEI2+M= -google.golang.org/genproto v0.0.0-20230525234025-438c736192d0/go.mod h1:9ExIQyXL5hZrHzQceCwuSYwZZ5QZBazOcprJ5rgs3lY= -google.golang.org/genproto/googleapis/api v0.0.0-20230525234020-1aefcd67740a h1:HiYVD+FGJkTo+9zj1gqz0anapsa1JxjiSrN+BJKyUmE= -google.golang.org/genproto/googleapis/api v0.0.0-20230525234020-1aefcd67740a/go.mod h1:ts19tUU+Z0ZShN1y3aPyq2+O3d5FUNNgT6FtOzmrNn8= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230626202813-9b080da550b3 h1:QJuqz7YzNTyKDspkp2lrzqtq4lf2AhUSpXTsGP5SbLw= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230626202813-9b080da550b3/go.mod h1:66JfowdXAEgad5O9NnYcsNPLCPZJD++2L9X0PCMODrA= +google.golang.org/genproto v0.0.0-20230706204954-ccb25ca9f130 h1:Au6te5hbKUV8pIYWHqOUZ1pva5qK/rwbIhoXEUB9Lu8= +google.golang.org/genproto v0.0.0-20230706204954-ccb25ca9f130/go.mod h1:O9kGHb51iE/nOGvQaDUuadVYqovW56s5emA88lQnj6Y= +google.golang.org/genproto/googleapis/api v0.0.0-20230706204954-ccb25ca9f130 h1:XVeBY8d/FaK4848myy41HBqnDwvxeV3zMZhwN1TvAMU= +google.golang.org/genproto/googleapis/api v0.0.0-20230706204954-ccb25ca9f130/go.mod h1:mPBs5jNgx2GuQGvFwUvVKqtn6HsUw9nP64BedgvqEsQ= +google.golang.org/genproto/googleapis/rpc v0.0.0-20230720185612-659f7aaaa771 h1:Z8qdAF9GFsmcUuWQ5KVYIpP3PCKydn/YKORnghIalu4= +google.golang.org/genproto/googleapis/rpc v0.0.0-20230720185612-659f7aaaa771/go.mod h1:TUfxEVdsvPg18p6AslUXFoLdpED4oBnGwyqk3dV1XzM= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= +google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= +google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11+0rQ= google.golang.org/grpc v1.56.2 h1:fVRFRnXvU+x6C4IlHZewvJOVHoOv1TUuQyoRsYnB4bI= google.golang.org/grpc v1.56.2/go.mod h1:I9bI3vqKfayGqPUAwGdOSu7kt6oIJLixfffKrpXqQ9s= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= @@ -485,6 +511,7 @@ gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= From 9b7ff131c5943c2a04f0a6dfe6de98d15a62570a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 29 Jul 2023 22:25:53 +0800 Subject: [PATCH 40/61] build(deps): bump gorm.io/driver/mysql from 1.3.5 to 1.5.1 (#712) Bumps [gorm.io/driver/mysql](https://github.com/go-gorm/mysql) from 1.3.5 to 1.5.1. - [Commits](https://github.com/go-gorm/mysql/compare/v1.3.5...v1.5.1) --- updated-dependencies: - dependency-name: gorm.io/driver/mysql dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 2 +- go.sum | 9 ++++----- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/go.mod b/go.mod index e94e4bb52..81b1209fa 100644 --- a/go.mod +++ b/go.mod @@ -30,7 +30,7 @@ require ( google.golang.org/grpc v1.56.2 google.golang.org/protobuf v1.31.0 gopkg.in/yaml.v3 v3.0.1 - gorm.io/driver/mysql v1.3.5 + gorm.io/driver/mysql v1.5.1 gorm.io/gorm v1.25.2 ) diff --git a/go.sum b/go.sum index ae36bd80a..bba524594 100644 --- a/go.sum +++ b/go.sum @@ -104,7 +104,7 @@ github.com/go-playground/validator/v10 v10.14.0 h1:vgvQWe3XCz3gIeFDm/HnTIbj6UGmg github.com/go-playground/validator/v10 v10.14.0/go.mod h1:9iXMNT7sEkjXb0I+enO7QXmzG6QCsPWY4zveKFVRSyU= github.com/go-redis/redis v6.15.9+incompatible h1:K0pv1D7EQUjfyoMql+r/jZqCLizCGKFlFgcHWWmHQjg= github.com/go-redis/redis v6.15.9+incompatible/go.mod h1:NAIEuMOZ/fxfXJIrKDQDz8wamY7mA7PouImQ2Jvg6kA= -github.com/go-sql-driver/mysql v1.6.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= +github.com/go-sql-driver/mysql v1.7.0/go.mod h1:OXbVy3sEdcQ2Doequ6Z5BW6fXNQTmx+9S1MCJN5yJMI= github.com/go-sql-driver/mysql v1.7.1 h1:lUIinVbN1DY0xBg0eMOzmmtGoHwWBbvnWubQUrtU8EI= github.com/go-sql-driver/mysql v1.7.1/go.mod h1:OXbVy3sEdcQ2Doequ6Z5BW6fXNQTmx+9S1MCJN5yJMI= github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= @@ -198,7 +198,6 @@ github.com/jinzhu/copier v0.3.5 h1:GlvfUwHk62RokgqVNvYsku0TATCF7bAHVwEXoBh3iJg= github.com/jinzhu/copier v0.3.5/go.mod h1:DfbEm0FYsaqBcKcFuvmOZb218JkPGtvSHsKg8S8hyyg= github.com/jinzhu/inflection v1.0.0 h1:K317FqzuhWc8YvSVlFMCCUb36O/S9MCKRDI7QkRKD/E= github.com/jinzhu/inflection v1.0.0/go.mod h1:h+uFLlag+Qp1Va5pdKtLDYj+kHp5pxUVkryuEj+Srlc= -github.com/jinzhu/now v1.1.4/go.mod h1:d3SSVoowX0Lcu0IBviAWJpolVfI5UJVZZ7cO71lE/z8= 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= @@ -520,9 +519,9 @@ gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gorm.io/driver/mysql v1.3.5 h1:iWBTVW/8Ij5AG4e0G/zqzaJblYkBI1VIL1LG2HUGsvY= -gorm.io/driver/mysql v1.3.5/go.mod h1:sSIebwZAVPiT+27jK9HIwvsqOGKx3YMPmrA3mBJR10c= -gorm.io/gorm v1.23.8/go.mod h1:l2lP/RyAtc1ynaTjFksBde/O8v9oOGIApu2/xRitmZk= +gorm.io/driver/mysql v1.5.1 h1:WUEH5VF9obL/lTtzjmML/5e6VfFR/788coz2uaVCAZw= +gorm.io/driver/mysql v1.5.1/go.mod h1:Jo3Xu7mMhCyj8dlrb3WoCaRd1FhsVh+yMXb1jUInf5o= +gorm.io/gorm v1.25.1/go.mod h1:L4uxeKpfBml98NYqVqwAdmV1a2nBtAec/cf3fpucW/k= gorm.io/gorm v1.25.2 h1:gs1o6Vsa+oVKG/a9ElL3XgyGfghFfkKA2SInQaCyMho= gorm.io/gorm v1.25.2/go.mod h1:L4uxeKpfBml98NYqVqwAdmV1a2nBtAec/cf3fpucW/k= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= From 5143f7f30445ef9b0f2a3141ae1089d03cdce0da Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 29 Jul 2023 22:26:44 +0800 Subject: [PATCH 41/61] build(deps): bump github.com/tencentyun/cos-go-sdk-v5 (#715) Bumps [github.com/tencentyun/cos-go-sdk-v5](https://github.com/tencentyun/cos-go-sdk-v5) from 0.7.41 to 0.7.42. - [Release notes](https://github.com/tencentyun/cos-go-sdk-v5/releases) - [Changelog](https://github.com/tencentyun/cos-go-sdk-v5/blob/master/CHANGELOG.md) - [Commits](https://github.com/tencentyun/cos-go-sdk-v5/compare/v0.7.41...v0.7.42) --- updated-dependencies: - dependency-name: github.com/tencentyun/cos-go-sdk-v5 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 2 +- go.sum | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/go.mod b/go.mod index 81b1209fa..e016ff06f 100644 --- a/go.mod +++ b/go.mod @@ -43,7 +43,7 @@ require ( github.com/go-redis/redis v6.15.9+incompatible github.com/go-sql-driver/mysql v1.7.1 github.com/redis/go-redis/v9 v9.0.5 - github.com/tencentyun/cos-go-sdk-v5 v0.7.41 + github.com/tencentyun/cos-go-sdk-v5 v0.7.42 ) require ( diff --git a/go.sum b/go.sum index bba524594..067ef5301 100644 --- a/go.sum +++ b/go.sum @@ -316,10 +316,10 @@ github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/stretchr/testify v1.8.3 h1:RP3t2pwF7cMEbC1dqtB6poj3niw/9gnV4Cjg5oW5gtY= github.com/stretchr/testify v1.8.3/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= -github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.194/go.mod h1:7sCQWVkxcsR38nffDW057DRGk8mUjK1Ing/EFOK8s8Y= -github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/kms v1.0.194/go.mod h1:yrBKWhChnDqNz1xuXdSbWXG56XawEq0G5j1lg4VwBD4= -github.com/tencentyun/cos-go-sdk-v5 v0.7.41 h1:iU0Li/Np78H4SBna0ECQoF3mpgi6ImLXU+doGzPFXGc= -github.com/tencentyun/cos-go-sdk-v5 v0.7.41/go.mod h1:4dCEtLHGh8QPxHEkgq+nFaky7yZxQuYwgSJM87icDaw= +github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.563/go.mod h1:7sCQWVkxcsR38nffDW057DRGk8mUjK1Ing/EFOK8s8Y= +github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/kms v1.0.563/go.mod h1:uom4Nvi9W+Qkom0exYiJ9VWJjXwyxtPYTkKkaLMlfE0= +github.com/tencentyun/cos-go-sdk-v5 v0.7.42 h1:Up1704BJjI5orycXKjpVpvuOInt9GC5pqY4knyE9Uds= +github.com/tencentyun/cos-go-sdk-v5 v0.7.42/go.mod h1:LUFnaqRmGk6pEHOaRmdn2dCZR2j0cSsM5xowWFPTPao= github.com/twitchyliquid64/golang-asm v0.15.1 h1:SU5vSMR7hnwNxj24w34ZyCi/FmDZTkS4MhqMhdFk5YI= github.com/twitchyliquid64/golang-asm v0.15.1/go.mod h1:a1lVb/DtPvCB8fslRZhAngC2+aY1QWCk3Cedj/Gdt08= github.com/ugorji/go/codec v1.2.11 h1:BMaWp1Bb6fHwEtbplGBGJ498wD+LKlNSl25MjdZY4dU= From 66b64d1b3fad3c02f376f7ec2da6fc9e3f28f7b7 Mon Sep 17 00:00:00 2001 From: Xinwei Xiong <3293172751NSS@gmail.com> Date: Mon, 31 Jul 2023 10:08:43 +0800 Subject: [PATCH 42/61] docs: more about docker image install (#718) docs: more about docker image install --- docs/conversions/images.md | 34 +++++++++++++++++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) diff --git a/docs/conversions/images.md b/docs/conversions/images.md index ae85a5bab..f2072dea2 100644 --- a/docs/conversions/images.md +++ b/docs/conversions/images.md @@ -2,6 +2,7 @@ OpenIM is an efficient, stable, and scalable instant messaging framework that provides convenient deployment methods through Docker images. OpenIM manages multiple image sources, hosted respectively on GitHub (ghcr), Alibaba Cloud, and Docker Hub. This document is aimed at detailing the image management strategy of OpenIM and providing the steps for pulling these images. + ## Image Management Strategy OpenIM's versions correspond to GitHub's tag versions. Each time we release a new version and tag it on GitHub, an automated process is triggered that pushes the new Docker image version to the following three platforms: @@ -10,10 +11,41 @@ OpenIM's versions correspond to GitHub's tag versions. Each time we release a ne 2. **Alibaba Cloud (registry.cn-hangzhou.aliyuncs.com):** For users in Mainland China, we also host OpenIM's Docker images on Alibaba Cloud to provide faster pull speeds. You can view all Alibaba Cloud images on this [page](https://cr.console.aliyun.com/cn-hangzhou/instances/repositories) of Alibaba Cloud Image Service (note that you need to log in to your Alibaba Cloud account first). 3. **Docker Hub (docker.io):** Docker Hub is the most commonly used Docker image hosting platform, and we also host OpenIM's images there to facilitate developers worldwide. You can view all Docker Hub images on the [OpenIM's Docker Hub page](https://hub.docker.com/r/openim). + +## OpenIM Image Design and Usage Guide + +OpenIM offers a comprehensive and flexible system of Docker images, available across multiple repositories. We actively maintain these images across different platforms, namely GitHub's ghcr.io, Alibaba Cloud, and Docker Hub. However, we highly recommend ghcr.io for deployment. + +### Available Versions + +We provide multiple versions of our images to meet different project requirements. Here's a quick overview of what you can expect: + +1. `main`: This image corresponds to the latest version of the main branch in OpenIM. It is updated frequently, making it perfect for users who want to stay at the cutting edge of our features. +2. `release-v3.*`: This is the image that corresponds to the latest version of OpenIM's stable release branch. It's ideal for users who prefer a balance between new features and stability. +3. `v3.*.*`: These images are specific to each tag in OpenIM. They are preserved in their original state and are never overwritten. These are the go-to images for users who need a specific, unchanging version of OpenIM. + +### Multi-Architecture Images + +In order to cater to a wider range of needs, some of our images are provided with multiple architectures under `OS / Arch`. These images offer greater compatibility across different operating systems and hardware architectures, ensuring that OpenIM can be deployed virtually anywhere. + +**Example:** + ++ [https://github.com/OpenIMSDK/chat/pkgs/container/openim-chat/113925695?tag=v1.1.0](https://github.com/OpenIMSDK/chat/pkgs/container/openim-chat/113925695?tag=v1.1.0) + + ## Methods and Steps for Pulling Images When pulling OpenIM's Docker images, you can choose the most suitable source based on your geographic location and network conditions. Here are the steps to pull OpenIM images from each source: +### Select image + +1. Choose the image repository platform you prefer. As previously mentioned, we recommend [OpenIM ghcr.io](https://github.com/orgs/OpenIMSDK/packages). + +2. Choose the image name and image version that suits your needs. Refer to the description above for more details. + + +### Install image + 1. First, make sure Docker is installed on your machine. If not, you can refer to the [Docker official documentation](https://docs.docker.com/get-docker/) for installation. 2. Open the terminal and run the following commands to pull the images: @@ -66,4 +98,4 @@ When pulling OpenIM's Docker images, you can choose the most suitable source bas 3. Run the `docker images` command to confirm that the image has been successfully pulled. -This concludes OpenIM's image management strategy and the steps for pulling images. If you have any questions, please feel free to ask. \ No newline at end of file +This concludes OpenIM's image management strategy and the steps for pulling images. If you have any questions, please feel free to ask. From be10c57153df39aeb32e1bdea2444224722f937a Mon Sep 17 00:00:00 2001 From: Xinwei Xiong <3293172751NSS@gmail.com> Date: Mon, 31 Jul 2023 10:13:13 +0800 Subject: [PATCH 43/61] Update README.md (#719) --- docs/conversions/README.md | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/docs/conversions/README.md b/docs/conversions/README.md index 05fd7dcb1..e8532728c 100644 --- a/docs/conversions/README.md +++ b/docs/conversions/README.md @@ -1,9 +1,10 @@ ## OpenIM Project Development Standards -- [Code Standards](https://chat.openai.com/go_code.md) -- [Directory Standards](https://chat.openai.com/directory.md) -- [Commit Standards](https://chat.openai.com/commit.md) -- [Versioning Standards](https://chat.openai.com/version.md) -- [Interface Standards](https://chat.openai.com/api.md) -- [Log Standards](https://chat.openai.com/log.md) -- [Error Code Standards](https://chat.openai.com/error_code.md) \ No newline at end of file +- [Code Standards](./go_code.md) +- [Docker Images Standards](./images.md) +- [Directory Standards](./directory.md) +- [Commit Standards](./commit.md) +- [Versioning Standards](./version.md) +- [Interface Standards](./api.md) +- [Log Standards](./log.md) +- [Error Code Standards](./error_code.md) From 1ca6c97364e8c109d618e248042dd16ae3186909 Mon Sep 17 00:00:00 2001 From: Xinwei Xiong <3293172751NSS@gmail.com> Date: Mon, 31 Jul 2023 11:33:20 +0800 Subject: [PATCH 44/61] Release/v3.1 merge (#724) * docs: add readme docs Signed-off-by: Xinwei Xiong(cubxxw-openim) <3293172751nss@gmail.com> * feat: add script yaml Signed-off-by: Xinwei Xiong(cubxxw-openim) <3293172751nss@gmail.com> * feat: add script yaml Signed-off-by: Xinwei Xiong(cubxxw-openim) <3293172751nss@gmail.com> * feat: add test Signed-off-by: Xinwei Xiong(cubxxw-openim) <3293172751nss@gmail.com> * feat: add test Signed-off-by: Xinwei Xiong(cubxxw-openim) <3293172751nss@gmail.com> * fix bug: reject group req bug * feat: add go relase Signed-off-by: Xinwei Xiong(cubxxw-openim) <3293172751nss@gmail.com> * fix bug: join group failed * fix bug: join group failed * synchronize the image and tag name of open-im-server * restore the IP in the env to 127.0.0.1 * synchronize the image and tag name of chat * fix: docker images (#702) Signed-off-by: Xinwei Xiong(cubxxw-openim) <3293172751nss@gmail.com> * fix: adjust the order: first replace the values in the .env file, then replace the configuration in the config file * fix: adjust the order: first replace the values in the .env file, then replace the configuration in the config file * fix: adjust the order: first replace the values in the .env file, then replace the configuration in the config file * fix: get userid function call rpc and message gateway add status change callback (#699) * fix: to start im or chat, ZooKeeper must be started first. * fix: msg gateway start output err info Signed-off-by: Gordon <1432970085@qq.com> * fix: msg gateway start output err info Signed-off-by: Gordon <1432970085@qq.com> * chore: package path changes Signed-off-by: withchao <993506633@qq.com> * fix: go mod update Signed-off-by: Gordon <1432970085@qq.com> * fix: token update Signed-off-by: Gordon <1432970085@qq.com> * chore: package path changes Signed-off-by: withchao <993506633@qq.com> * chore: package path changes Signed-off-by: withchao <993506633@qq.com> * fix: token update Signed-off-by: Gordon <1432970085@qq.com> * fix: token update Signed-off-by: Gordon <1432970085@qq.com> * fix: token update Signed-off-by: Gordon <1432970085@qq.com> * fix: token update Signed-off-by: Gordon <1432970085@qq.com> * fix: token update Signed-off-by: Gordon <1432970085@qq.com> * fix: token update Signed-off-by: Gordon <1432970085@qq.com> * fix: get all userID Signed-off-by: Gordon <46924906+FGadvancer@users.noreply.github.com> * fix: msggateway add online status call Signed-off-by: Gordon <46924906+FGadvancer@users.noreply.github.com> --------- Signed-off-by: Gordon <1432970085@qq.com> Signed-off-by: withchao <993506633@qq.com> Signed-off-by: Gordon <46924906+FGadvancer@users.noreply.github.com> Co-authored-by: withchao <993506633@qq.com> * Update version.md (#703) * Update version.md (#704) * docs: update create CODE_OF_CONDUCT.md (#705) * fix: docker images (#706) * fix: docker images Signed-off-by: Xinwei Xiong(cubxxw-openim) <3293172751nss@gmail.com> * fix: chat scripts config Signed-off-by: Xinwei Xiong(cubxxw-openim) <3293172751nss@gmail.com> --------- Signed-off-by: Xinwei Xiong(cubxxw-openim) <3293172751nss@gmail.com> * Update docker-compose.yaml (#707) * fix: docker images (#709) * fix: docker images Signed-off-by: Xinwei Xiong(cubxxw-openim) <3293172751nss@gmail.com> * fix: chat scripts config Signed-off-by: Xinwei Xiong(cubxxw-openim) <3293172751nss@gmail.com> --------- Signed-off-by: Xinwei Xiong(cubxxw-openim) <3293172751nss@gmail.com> * Create dependabot.yml (#708) * Update golang.mk (#710) * build(deps): bump github.com/minio/minio-go/v7 from 7.0.59 to 7.0.61 (#711) Bumps [github.com/minio/minio-go/v7](https://github.com/minio/minio-go) from 7.0.59 to 7.0.61. - [Release notes](https://github.com/minio/minio-go/releases) - [Commits](https://github.com/minio/minio-go/compare/v7.0.59...v7.0.61) --- updated-dependencies: - dependency-name: github.com/minio/minio-go/v7 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * build(deps): bump github.com/go-sql-driver/mysql from 1.6.0 to 1.7.1 (#713) Bumps [github.com/go-sql-driver/mysql](https://github.com/go-sql-driver/mysql) from 1.6.0 to 1.7.1. - [Release notes](https://github.com/go-sql-driver/mysql/releases) - [Changelog](https://github.com/go-sql-driver/mysql/blob/master/CHANGELOG.md) - [Commits](https://github.com/go-sql-driver/mysql/compare/v1.6.0...v1.7.1) --- updated-dependencies: - dependency-name: github.com/go-sql-driver/mysql dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * build(deps): bump google.golang.org/api from 0.114.0 to 0.134.0 (#714) Bumps [google.golang.org/api](https://github.com/googleapis/google-api-go-client) from 0.114.0 to 0.134.0. - [Release notes](https://github.com/googleapis/google-api-go-client/releases) - [Changelog](https://github.com/googleapis/google-api-go-client/blob/main/CHANGES.md) - [Commits](https://github.com/googleapis/google-api-go-client/compare/v0.114.0...v0.134.0) --- updated-dependencies: - dependency-name: google.golang.org/api dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * build(deps): bump gorm.io/driver/mysql from 1.3.5 to 1.5.1 (#712) Bumps [gorm.io/driver/mysql](https://github.com/go-gorm/mysql) from 1.3.5 to 1.5.1. - [Commits](https://github.com/go-gorm/mysql/compare/v1.3.5...v1.5.1) --- updated-dependencies: - dependency-name: gorm.io/driver/mysql dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * build(deps): bump github.com/tencentyun/cos-go-sdk-v5 (#715) Bumps [github.com/tencentyun/cos-go-sdk-v5](https://github.com/tencentyun/cos-go-sdk-v5) from 0.7.41 to 0.7.42. - [Release notes](https://github.com/tencentyun/cos-go-sdk-v5/releases) - [Changelog](https://github.com/tencentyun/cos-go-sdk-v5/blob/master/CHANGELOG.md) - [Commits](https://github.com/tencentyun/cos-go-sdk-v5/compare/v0.7.41...v0.7.42) --- updated-dependencies: - dependency-name: github.com/tencentyun/cos-go-sdk-v5 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * docs: more about docker image install (#718) docs: more about docker image install * Update README.md (#719) --------- Signed-off-by: Xinwei Xiong(cubxxw-openim) <3293172751nss@gmail.com> Signed-off-by: Gordon <1432970085@qq.com> Signed-off-by: withchao <993506633@qq.com> Signed-off-by: Gordon <46924906+FGadvancer@users.noreply.github.com> Signed-off-by: dependabot[bot] Co-authored-by: wangchuxiao Co-authored-by: skiffer-git <72860476+skiffer-git@users.noreply.github.com> Co-authored-by: Gordon <46924906+FGadvancer@users.noreply.github.com> Co-authored-by: withchao <993506633@qq.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- scripts/install_im_server.sh | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/scripts/install_im_server.sh b/scripts/install_im_server.sh index 33f5f241a..0961193f1 100755 --- a/scripts/install_im_server.sh +++ b/scripts/install_im_server.sh @@ -37,12 +37,24 @@ function onCtrlC () { exit 1 } +# Load environment variables from .env file +source ${OPENIM_ROOT}/.env + # Get the public internet IP address internet_ip=$(curl ifconfig.me -s) echo -e "${PURPLE_PREFIX}=========> Your public internet IP address is ${internet_ip} ${COLOR_SUFFIX} \n" -# Load environment variables from .env file -source ${OPENIM_ROOT}/.env +# Replace local IP address with the public IP address in .env file +if [ $API_URL == "http://127.0.0.1:10002/object/" ]; then + sed -i "s/127.0.0.1/${internet_ip}/" ${OPENIM_ROOT}/.env +fi + +if [ $MINIO_ENDPOINT == "http://127.0.0.1:10005" ]; then + sed -i "s/127.0.0.1/${internet_ip}/" ${OPENIM_ROOT}/.env +fi + + + echo -e "${PURPLE_PREFIX}=========> Your minio endpoint is ${MINIO_ENDPOINT} ${COLOR_SUFFIX} \n" @@ -59,15 +71,6 @@ echo -e "${PURPLE_PREFIX}=========> env_check.sh ${COLOR_SUFFIX} \n" ${SCRIPTS_ROOT}/env_check.sh -# Replace local IP address with the public IP address in .env file -if [ $API_URL == "http://127.0.0.1:10002/object/" ]; then - sed -i "s/127.0.0.1/${internet_ip}/" ${OPENIM_ROOT}/.env -fi - -if [ $MINIO_ENDPOINT == "http://127.0.0.1:10005" ]; then - sed -i "s/127.0.0.1/${internet_ip}/" ${OPENIM_ROOT}/.env -fi - # Go back to the previous directory cd ${OPENIM_ROOT} @@ -79,4 +82,4 @@ else docker compose up -d fi -${SCRIPTS_ROOT}/docker_check_service.sh \ No newline at end of file +${SCRIPTS_ROOT}/docker_check_service.sh From 74313d54c2d25d8eeaad630db5e8f2843ee902e6 Mon Sep 17 00:00:00 2001 From: WangchuXiao Date: Mon, 31 Jul 2023 11:53:53 +0800 Subject: [PATCH 45/61] fix bug: /msg/batch_send_msg isSendAll param not effect send msg to all user (#725) * docs: add readme docs Signed-off-by: Xinwei Xiong(cubxxw-openim) <3293172751nss@gmail.com> * feat: add script yaml Signed-off-by: Xinwei Xiong(cubxxw-openim) <3293172751nss@gmail.com> * feat: add script yaml Signed-off-by: Xinwei Xiong(cubxxw-openim) <3293172751nss@gmail.com> * feat: add test Signed-off-by: Xinwei Xiong(cubxxw-openim) <3293172751nss@gmail.com> * feat: add test Signed-off-by: Xinwei Xiong(cubxxw-openim) <3293172751nss@gmail.com> * fix bug: reject group req bug * feat: add go relase Signed-off-by: Xinwei Xiong(cubxxw-openim) <3293172751nss@gmail.com> * fix bug: join group failed * fix bug: join group failed * fix: get userid function call rpc and message gateway add status change callback (#700) Co-authored-by: withchao <993506633@qq.com> * fix bug: send all not send msg 2 all user --------- Signed-off-by: Xinwei Xiong(cubxxw-openim) <3293172751nss@gmail.com> Co-authored-by: Xinwei Xiong(cubxxw-openim) <3293172751nss@gmail.com> Co-authored-by: Gordon <46924906+FGadvancer@users.noreply.github.com> Co-authored-by: withchao <993506633@qq.com> --- internal/api/msg.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/api/msg.go b/internal/api/msg.go index 8480ac7d3..e4a8fda17 100644 --- a/internal/api/msg.go +++ b/internal/api/msg.go @@ -262,8 +262,8 @@ func (m *MessageApi) BatchSendMsg(c *gin.Context) { apiresp.GinError(c, err) return } + recvIDs = append(recvIDs, recvIDsPart...) if len(recvIDsPart) < showNumber { - recvIDs = append(recvIDs, recvIDsPart...) break } pageNumber++ From 62141fa1214b56ca7b1d5e95583b0623c8046ded Mon Sep 17 00:00:00 2001 From: Alan <68671759+hanzhixiao@users.noreply.github.com> Date: Mon, 31 Jul 2023 15:37:46 +0800 Subject: [PATCH 46/61] Docs: Update README.md (#726) --- README.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 3c52475f3..5ed6664db 100644 --- a/README.md +++ b/README.md @@ -89,9 +89,12 @@ make check ### Compile from source Ur need `Go 1.18` or higher version, and `make`. + +Version Details: https://github.com/OpenIMSDK/Open-IM-Server/blob/main/docs/conversions/version.md + ```bash # choose what you need -BRANCH=release-v3.0 +BRANCH=release-v3.1 git clone -b $BRANCH https://github.com/OpenIMSDK/Open-IM-Server openim && export openim=$(pwd)/openim && cd $openim && make build ``` Read about the [OpenIM Version Policy](https://github.com/OpenIMSDK/Open-IM-Server/blob/main/docs/conversions/version.md) From b131013b3f15d89f141beb50e07bf6b178adfdff Mon Sep 17 00:00:00 2001 From: withchao <48119764+withchao@users.noreply.github.com> Date: Mon, 31 Jul 2023 17:41:40 +0800 Subject: [PATCH 47/61] feat: add get_group_member_user_id api (#734) --- internal/api/group.go | 4 ++++ internal/api/route.go | 1 + 2 files changed, 5 insertions(+) diff --git a/internal/api/group.go b/internal/api/group.go index ab397a8ac..ad640e74f 100644 --- a/internal/api/group.go +++ b/internal/api/group.go @@ -139,3 +139,7 @@ func (o *GroupApi) GroupCreateCount(c *gin.Context) { func (o *GroupApi) GetGroups(c *gin.Context) { a2r.Call(group.GroupClient.GetGroups, o.Client, c) } + +func (o *GroupApi) GetGroupMemberUserIDs(c *gin.Context) { + a2r.Call(group.GroupClient.GetGroupMemberUserIDs, o.Client, c) +} diff --git a/internal/api/route.go b/internal/api/route.go index 1926b55f1..5dd0c4cc7 100644 --- a/internal/api/route.go +++ b/internal/api/route.go @@ -129,6 +129,7 @@ func NewGinRouter(discov discoveryregistry.SvcDiscoveryRegistry, rdb redis.Unive groupRouterGroup.POST("/set_group_member_info", g.SetGroupMemberInfo) groupRouterGroup.POST("/get_group_abstract_info", g.GetGroupAbstractInfo) groupRouterGroup.POST("/get_groups", g.GetGroups) + groupRouterGroup.POST("/get_group_member_user_id", g.GetGroupMemberUserIDs) } superGroupRouterGroup := r.Group("/super_group", ParseToken) { From fb021baf526fe6922f56b45a0eb8ecb77c6b37ec Mon Sep 17 00:00:00 2001 From: Xinwei Xiong <3293172751NSS@gmail.com> Date: Mon, 31 Jul 2023 18:39:47 +0800 Subject: [PATCH 48/61] docs: update readme version (#735) --- docs/conversions/version.md | 27 +++++++++++++++++++++------ 1 file changed, 21 insertions(+), 6 deletions(-) diff --git a/docs/conversions/version.md b/docs/conversions/version.md index 06e34543b..c8a3dbd1c 100644 --- a/docs/conversions/version.md +++ b/docs/conversions/version.md @@ -6,21 +6,36 @@ OpenIM, the open source project, employs a comprehensive version management syst ## Main Branch -The `main` branch is where all the latest code resides. It's the hub of activity, embodying all the cutting-edge features that are currently being developed or updated. However, since it's subject to frequent changes and updates, it may not always represent the most stable version of the software. Access the `main` branch [here](https://github.com/openimsdk/openim-server/tree/main). +The `main` branch is where all the latest code resides. It's the hub of activity, embodying all the cutting-edge features that are currently being developed or updated. However, since it's subject to frequent changes and updates, it may not always represent the most stable version of the software. Access the `main` branch [here](https://github.com/OpenIMSDK/Open-IM-Server/tree/main). ## Release Branch -On the other hand, we have the `release` branch. For instance, in the context of version 3.1, we maintain a `release-v3.1` branch. Unlike the `main` branch, the release branch is designed to be a continuously stable and updated version of the software. This provides a reliable option for users who prefer stability over the latest, but potentially unstable, features. Access the `release-v3.1` branch [here](https://github.com/openimsdk/openim-server/tree/release-v3.1). +On the other hand, we have the `release` branch. For instance, in the context of version 3.1, we maintain a `release-v3.1` branch. Unlike the `main` branch, the release branch is designed to be a continuously stable and updated version of the software. This provides a reliable option for users who prefer stability over the latest, but potentially unstable, features. Access the `release-v3.1` branch [here](https://github.com/OpenIMSDK/Open-IM-Server/tree/release-v3.1). ## Tag Management -Finally, there's `tag` management. Despite having both `main` and `release` branches, `tag` serves a crucial role. Tags are immutable, i.e., they remain unchanged once created. Therefore, if you need a specific version of the software, you can use the corresponding tag. Check out the available tags [here](https://github.com/openimsdk/openim-server/tags). +In addition to the `main` and `release` branches, `tag` also plays a pivotal role in version control. Tags are immutable, meaning once they're created, they remain unchanged. Therefore, if you need a specific version of the software, you can use the corresponding tag. All of our available tags can be viewed [here](https://github.com/OpenIMSDK/Open-IM-Server/tags). -Moreover, our Docker image versions are closely tied with these three components. For instance, a tag might correspond to the Docker image `ghcr.io/openimsdk/openim-server:v3.1.0`, a release would be `ghcr.io/openimsdk/openim-server:release-v3.0`, and the main branch might be represented as `ghcr.io/openimsdk/openim-server:main` or `ghcr.io/openimsdk/openim-server:latest`. +Moreover, our Docker image versions are closely tied with these three components. For example, a tag might correspond to the Docker image `ghcr.io/openimsdk/openim-server:v3.1.0`, a release might be represented as `ghcr.io/openimsdk/openim-server:release-v3.0`, and the main branch could be represented as `ghcr.io/openimsdk/openim-server:main` or `ghcr.io/openimsdk/openim-server:latest`. -To find out more, or to contribute to our project, please visit our GitHub repository at [OpenIM Server](https://github.com/openimsdk/openim-server). +Here is the specification of our version numbers: -We believe that this approach offers a balanced blend of innovation and stability, enabling us to provide the best possible software to our users. +- **Revision version number**: The third digit of the version number, representing bug fixes or code optimizations, usually no new features are added and it is backward compatible with older versions. + +- **Build version number**: Usually automatically generated by the system, every code submission will result in an automatic increment by 1. + +- Version modifiers + + : These can represent the development stage and stability of the software. Common ones include: + + - `alpha`: An internal testing version with many bugs, generally used for communication among developers. + - `beta`: A test version with many bugs, generally used for testing by eager community members, who provide feedback to the developers. + - `rc`: Release candidate, to be released as the official version, it's the last test version before the official version. + - `ga`: General Availability, the first stable release. + - `r/release/or nothing`: The final release version, intended for general users. + - `lts`: Long Term Support, the official will specify the maintenance year for this version and will fix all bugs found in this version. + +When adding partial functions to the project, the minor version number increases by 1, and the revision version number resets to 0. When there are major changes in the project, the major version number increases by 1. The build number is generally automatically generated by the compiler during the compilation process, only the format needs to be defined, and it does not need to be manually controlled. ## OpenIM version From 4e7f7e8605fbaf572f64ec3708201bbede33e37e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 31 Jul 2023 18:41:18 +0800 Subject: [PATCH 49/61] build(deps): bump github.com/spf13/cobra from 1.6.1 to 1.7.0 (#727) Bumps [github.com/spf13/cobra](https://github.com/spf13/cobra) from 1.6.1 to 1.7.0. - [Release notes](https://github.com/spf13/cobra/releases) - [Commits](https://github.com/spf13/cobra/compare/v1.6.1...v1.7.0) --- updated-dependencies: - dependency-name: github.com/spf13/cobra dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 4 ++-- go.sum | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/go.mod b/go.mod index e016ff06f..0e2045aa8 100644 --- a/go.mod +++ b/go.mod @@ -77,7 +77,7 @@ require ( github.com/googleapis/enterprise-certificate-proxy v0.2.5 // indirect github.com/googleapis/gax-go/v2 v2.12.0 // indirect github.com/hashicorp/go-uuid v1.0.2 // indirect - github.com/inconshreveable/mousetrap v1.0.1 // indirect + github.com/inconshreveable/mousetrap v1.1.0 // indirect github.com/jcmturner/aescts/v2 v2.0.0 // indirect github.com/jcmturner/dnsutils/v2 v2.0.0 // indirect github.com/jcmturner/gofork v1.0.0 // indirect @@ -134,7 +134,7 @@ require ( github.com/goccy/go-json v0.10.2 // indirect github.com/lestrrat-go/strftime v1.0.6 // indirect github.com/mattn/go-isatty v0.0.19 // indirect - github.com/spf13/cobra v1.6.1 + github.com/spf13/cobra v1.7.0 github.com/ugorji/go/codec v1.2.11 // indirect go.uber.org/zap v1.24.0 // indirect golang.org/x/crypto v0.11.0 // indirect diff --git a/go.sum b/go.sum index 067ef5301..49db92e88 100644 --- a/go.sum +++ b/go.sum @@ -180,8 +180,8 @@ github.com/hashicorp/go-uuid v1.0.2 h1:cfejS+Tpcp13yd5nYHWDI6qVCny6wyX2Mt5SGur2I github.com/hashicorp/go-uuid v1.0.2/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= -github.com/inconshreveable/mousetrap v1.0.1 h1:U3uMjPSQEBMNp1lFxmllqCPM6P5u/Xq7Pgzkat/bFNc= -github.com/inconshreveable/mousetrap v1.0.1/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= +github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= +github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= github.com/jcmturner/aescts/v2 v2.0.0 h1:9YKLH6ey7H4eDBXW8khjYslgyqG2xZikXP0EQFKrle8= github.com/jcmturner/aescts/v2 v2.0.0/go.mod h1:AiaICIRyfYg35RUkr8yESTqvSy7csK90qZ5xfvvsoNs= github.com/jcmturner/dnsutils/v2 v2.0.0 h1:lltnkeZGL0wILNvrNiVCR6Ro5PGU/SeBvVO/8c/iPbo= @@ -298,8 +298,8 @@ github.com/rs/xid v1.5.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= -github.com/spf13/cobra v1.6.1 h1:o94oiPyS4KD1mPy2fmcYYHHfCxLqYjJOhGsCHFZtEzA= -github.com/spf13/cobra v1.6.1/go.mod h1:IOw/AERYS7UzyrGinqmz6HLUo219MORXGxhbaJUqzrY= +github.com/spf13/cobra v1.7.0 h1:hyqWnYt1ZQShIddO5kBpj3vu05/++x6tJ6dg8EC572I= +github.com/spf13/cobra v1.7.0/go.mod h1:uLxZILRyS/50WlhOIKD7W6V5bgeIt+4sICxh6uRMrb0= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= From f971a148c88d9d4007264fcc8b390b53d6644df7 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 31 Jul 2023 18:41:41 +0800 Subject: [PATCH 50/61] build(deps): bump github.com/go-playground/validator/v10 (#728) Bumps [github.com/go-playground/validator/v10](https://github.com/go-playground/validator) from 10.14.0 to 10.14.1. - [Release notes](https://github.com/go-playground/validator/releases) - [Commits](https://github.com/go-playground/validator/compare/v10.14.0...v10.14.1) --- updated-dependencies: - dependency-name: github.com/go-playground/validator/v10 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 0e2045aa8..d6be16329 100644 --- a/go.mod +++ b/go.mod @@ -8,7 +8,7 @@ require ( github.com/bwmarrin/snowflake v0.3.0 // indirect github.com/dtm-labs/rockscache v0.1.1 github.com/gin-gonic/gin v1.9.1 - github.com/go-playground/validator/v10 v10.14.0 + github.com/go-playground/validator/v10 v10.14.1 github.com/gogo/protobuf v1.3.2 github.com/golang-jwt/jwt/v4 v4.5.0 github.com/golang/protobuf v1.5.3 diff --git a/go.sum b/go.sum index 49db92e88..623e24cbf 100644 --- a/go.sum +++ b/go.sum @@ -100,8 +100,8 @@ github.com/go-playground/locales v0.14.1 h1:EWaQ/wswjilfKLTECiXz7Rh+3BjFhfDFKv/o 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= github.com/go-playground/universal-translator v0.18.1/go.mod h1:xekY+UJKNuX9WP91TpwSH2VMlDf28Uj24BCp08ZFTUY= -github.com/go-playground/validator/v10 v10.14.0 h1:vgvQWe3XCz3gIeFDm/HnTIbj6UGmg/+t63MyGU2n5js= -github.com/go-playground/validator/v10 v10.14.0/go.mod h1:9iXMNT7sEkjXb0I+enO7QXmzG6QCsPWY4zveKFVRSyU= +github.com/go-playground/validator/v10 v10.14.1 h1:9c50NUPC30zyuKprjL3vNZ0m5oG+jU0zvx4AqHGnv4k= +github.com/go-playground/validator/v10 v10.14.1/go.mod h1:9iXMNT7sEkjXb0I+enO7QXmzG6QCsPWY4zveKFVRSyU= github.com/go-redis/redis v6.15.9+incompatible h1:K0pv1D7EQUjfyoMql+r/jZqCLizCGKFlFgcHWWmHQjg= github.com/go-redis/redis v6.15.9+incompatible/go.mod h1:NAIEuMOZ/fxfXJIrKDQDz8wamY7mA7PouImQ2Jvg6kA= github.com/go-sql-driver/mysql v1.7.0/go.mod h1:OXbVy3sEdcQ2Doequ6Z5BW6fXNQTmx+9S1MCJN5yJMI= From 37611ab0dd32b97e8999549412a0e5f153016235 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 31 Jul 2023 18:43:25 +0800 Subject: [PATCH 51/61] build(deps): bump google.golang.org/grpc from 1.56.2 to 1.57.0 (#730) Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.56.2 to 1.57.0. - [Release notes](https://github.com/grpc/grpc-go/releases) - [Commits](https://github.com/grpc/grpc-go/compare/v1.56.2...v1.57.0) --- updated-dependencies: - dependency-name: google.golang.org/grpc dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index d6be16329..002456235 100644 --- a/go.mod +++ b/go.mod @@ -27,7 +27,7 @@ require ( go.mongodb.org/mongo-driver v1.12.0 golang.org/x/image v0.9.0 // indirect google.golang.org/api v0.134.0 - google.golang.org/grpc v1.56.2 + google.golang.org/grpc v1.57.0 google.golang.org/protobuf v1.31.0 gopkg.in/yaml.v3 v3.0.1 gorm.io/driver/mysql v1.5.1 diff --git a/go.sum b/go.sum index 623e24cbf..39d3269cc 100644 --- a/go.sum +++ b/go.sum @@ -486,8 +486,8 @@ google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTp google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11+0rQ= -google.golang.org/grpc v1.56.2 h1:fVRFRnXvU+x6C4IlHZewvJOVHoOv1TUuQyoRsYnB4bI= -google.golang.org/grpc v1.56.2/go.mod h1:I9bI3vqKfayGqPUAwGdOSu7kt6oIJLixfffKrpXqQ9s= +google.golang.org/grpc v1.57.0 h1:kfzNeI/klCGD2YPMUlaGNT3pxvYfga7smW3Vth8Zsiw= +google.golang.org/grpc v1.57.0/go.mod h1:Sd+9RMTACXwmub0zcNY2c4arhtrbBYD1AUHI/dt16Mo= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= From a7acc8d9d27a922faa60e41ae9bcf64020c29b55 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 31 Jul 2023 18:43:34 +0800 Subject: [PATCH 52/61] build(deps): bump github.com/stretchr/testify from 1.8.3 to 1.8.4 (#731) Bumps [github.com/stretchr/testify](https://github.com/stretchr/testify) from 1.8.3 to 1.8.4. - [Release notes](https://github.com/stretchr/testify/releases) - [Commits](https://github.com/stretchr/testify/compare/v1.8.3...v1.8.4) --- updated-dependencies: - dependency-name: github.com/stretchr/testify dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 2 +- go.sum | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/go.mod b/go.mod index 002456235..3552dc765 100644 --- a/go.mod +++ b/go.mod @@ -23,7 +23,7 @@ require ( github.com/prometheus/client_golang v1.16.0 github.com/robfig/cron/v3 v3.0.1 github.com/sirupsen/logrus v1.9.3 // indirect - github.com/stretchr/testify v1.8.3 + github.com/stretchr/testify v1.8.4 go.mongodb.org/mongo-driver v1.12.0 golang.org/x/image v0.9.0 // indirect google.golang.org/api v0.134.0 diff --git a/go.sum b/go.sum index 39d3269cc..d82a9c662 100644 --- a/go.sum +++ b/go.sum @@ -314,8 +314,9 @@ github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/ github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= -github.com/stretchr/testify v1.8.3 h1:RP3t2pwF7cMEbC1dqtB6poj3niw/9gnV4Cjg5oW5gtY= github.com/stretchr/testify v1.8.3/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= +github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.563/go.mod h1:7sCQWVkxcsR38nffDW057DRGk8mUjK1Ing/EFOK8s8Y= github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/kms v1.0.563/go.mod h1:uom4Nvi9W+Qkom0exYiJ9VWJjXwyxtPYTkKkaLMlfE0= github.com/tencentyun/cos-go-sdk-v5 v0.7.42 h1:Up1704BJjI5orycXKjpVpvuOInt9GC5pqY4knyE9Uds= From 0ca097db8f56efa26c5128a153d0736f75d28356 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 31 Jul 2023 18:51:47 +0800 Subject: [PATCH 53/61] build(deps): bump github.com/gorilla/websocket from 1.4.2 to 1.5.0 (#729) Bumps [github.com/gorilla/websocket](https://github.com/gorilla/websocket) from 1.4.2 to 1.5.0. - [Release notes](https://github.com/gorilla/websocket/releases) - [Commits](https://github.com/gorilla/websocket/compare/v1.4.2...v1.5.0) --- updated-dependencies: - dependency-name: github.com/gorilla/websocket dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 3552dc765..9180c49f3 100644 --- a/go.mod +++ b/go.mod @@ -12,7 +12,7 @@ require ( github.com/gogo/protobuf v1.3.2 github.com/golang-jwt/jwt/v4 v4.5.0 github.com/golang/protobuf v1.5.3 - github.com/gorilla/websocket v1.4.2 + github.com/gorilla/websocket v1.5.0 github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 github.com/jinzhu/copier v0.3.5 github.com/lestrrat-go/file-rotatelogs v2.4.0+incompatible // indirect diff --git a/go.sum b/go.sum index d82a9c662..e804eb461 100644 --- a/go.sum +++ b/go.sum @@ -171,8 +171,8 @@ github.com/googleapis/gax-go/v2 v2.12.0 h1:A+gCJKdRfqXkr+BIRGtZLibNXf0m1f9E4HG56 github.com/googleapis/gax-go/v2 v2.12.0/go.mod h1:y+aIqrI5eb1YGMVJfuV3185Ts/D7qKpsEkdD5+I6QGU= github.com/gorilla/securecookie v1.1.1/go.mod h1:ra0sb63/xPlUeL+yeDciTfxMRAA+MP+HVt/4epWDjd4= github.com/gorilla/sessions v1.2.1/go.mod h1:dk2InVEVJ0sfLlnXv9EAgkf6ecYs/i80K/zI+bUmuGM= -github.com/gorilla/websocket v1.4.2 h1:+/TMaTYc4QFitKJxsQ7Yye35DkWvkdLcvGKqM+x0Ufc= -github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= +github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc= +github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 h1:Ovs26xHkKqVztRpIrF/92BcuyuQ/YW4NSIpoGtfXNho= github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= From 444dc1ae6eba7ff44053a4899bcac3bf2b8f9376 Mon Sep 17 00:00:00 2001 From: Xinwei Xiong <3293172751NSS@gmail.com> Date: Tue, 1 Aug 2023 17:16:37 +0800 Subject: [PATCH 54/61] Update images.md (#743) --- docs/conversions/images.md | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/docs/conversions/images.md b/docs/conversions/images.md index f2072dea2..70401ec07 100644 --- a/docs/conversions/images.md +++ b/docs/conversions/images.md @@ -54,22 +54,19 @@ When pulling OpenIM's Docker images, you can choose the most suitable source bas - Pull from GitHub: - ``` - bashCopy code + ```bash docker pull ghcr.io/openimsdk/openim-server:latest ``` - Pull from Alibaba Cloud: - ``` - bashCopy code + ```bash docker pull registry.cn-hangzhou.aliyuncs.com/openimsdk/openim-server:latest ``` - Pull from Docker Hub: - ``` - bashCopy code + ```bash docker pull docker.io/openim/openim-server:latest ``` @@ -77,22 +74,19 @@ When pulling OpenIM's Docker images, you can choose the most suitable source bas - Pull from GitHub: - ``` - bashCopy code + ```bash docker pull ghcr.io/openimsdk/openim-chat:latest ``` - Pull from Alibaba Cloud: - ``` - bashCopy code + ```bash docker pull registry.cn-hangzhou.aliyuncs.com/openimsdk/openim-chat:latest ``` - Pull from Docker Hub: - ``` - bashCopy code + ```bash docker pull docker.io/openim/openim-chat:latest ``` From b514bd89341bfafa30109808993432693b4160c7 Mon Sep 17 00:00:00 2001 From: pluto <83957921+plutoyty@users.noreply.github.com> Date: Tue, 1 Aug 2023 22:10:02 +0800 Subject: [PATCH 55/61] Nginx reverse proxy and TLS configuration (#742) * Resolving code conflicts after project directory changes and Add subscribe and unsubscribe mongodb operations * Organize and update module dependencies * Get user online status * Get user online status * Get user online status * Nginx reverse proxy and TLS configuration * update "Nginx reverse proxy and TLS configuration" --- config/open-im-ng-example.conf | 102 ++++++--------------------------- 1 file changed, 18 insertions(+), 84 deletions(-) diff --git a/config/open-im-ng-example.conf b/config/open-im-ng-example.conf index a817f7357..e5e584ff8 100644 --- a/config/open-im-ng-example.conf +++ b/config/open-im-ng-example.conf @@ -4,38 +4,28 @@ upstream im_msg_gateway{ upstream im_api{ server 127.0.0.1:10002; #IM群组用户api服务器地址 根据部署情况可指定多台 } -upstream im_jssdk_gateway{ - server 127.0.0.1:10003; #IM jssdk服务器地址 根据部署情况可指定多台 - } upstream storage { server 127.0.0.1:10005; #MinIO服务器地址 暂时支持1台 } -upstream im_admin{ - server 127.0.0.1:10006; #IM admin服务器地址 根据部署情况可指定多台 - } upstream im_grafana{ server 127.0.0.1:10007; #IM 统计服务器地址 docker-compose启动所在机器 } -upstream im_chat{ +upstream im_chat_api{ server 127.0.0.1:10008; #IM 商业版登录注册服务器地址 根据部署情况可指定多台 } -upstream im_complete_admin{ +upstream im_admin_api{ server 127.0.0.1:10009; #IM 商业版admin地址 根据部署情况可指定多台 } -upstream im_organization{ - server 127.0.0.1:10010; #IM 商业版组织架构服务器地址 根据部署情况可指定多台 - } upstream im_open_rtc{ server 127.0.0.1:7880; #rtc 音视频通话 服务器地址 根据部署情况可指定多台 } - server { listen 443; - server_name web.rentsoft.cn; #1 web im 端 域名 + server_name test-web.rentsoft.cn; #1 web im 端 域名 ssl on; - ssl_certificate /etc/nginx/conf.d/ssl/web.rentsoft.cn.crt; #2 证书 - ssl_certificate_key /etc/nginx/conf.d/ssl/web.rentsoft.cn.key; #3 证书 + ssl_certificate /etc/nginx/conf.d/ssl/test-web.rentsoft.cn.crt; #2 证书 + ssl_certificate_key /etc/nginx/conf.d/ssl/test-web.rentsoft.cn.key; #3 证书 ssl_session_timeout 5m; gzip on; gzip_min_length 1k; @@ -72,22 +62,6 @@ server { proxy_set_header X-Forwarded-For $remote_addr; proxy_pass http://im_api/; } - location /jssdk_gateway { #10003 jssdk - proxy_http_version 1.1; - proxy_set_header Upgrade $http_upgrade; - proxy_set_header Connection "Upgrade"; - proxy_set_header X-real-ip $remote_addr; - proxy_set_header X-Forwarded-For $remote_addr; - proxy_pass http://im_jssdk_gateway/; - } - location ^~/admin/ { #10006 admin - proxy_http_version 1.1; - proxy_set_header Upgrade $http_upgrade; - proxy_set_header Connection "Upgrade"; - proxy_set_header X-real-ip $remote_addr; - proxy_set_header X-Forwarded-For $remote_addr; - proxy_pass http://im_admin/; - } location ^~/grafana/ { #10007 prometheus proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; @@ -96,29 +70,21 @@ server { proxy_set_header X-Forwarded-For $remote_addr; proxy_pass http://im_grafana/; } - location ^~/chat/ { #10008 chat login - proxy_http_version 1.1; - proxy_set_header Upgrade $http_upgrade; - proxy_set_header Connection "Upgrade"; - proxy_set_header X-real-ip $remote_addr; - proxy_set_header X-Forwarded-For $remote_addr; - proxy_pass http://im_chat/; - } + location ^~/chat/ { #10008 im_chat_api + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection "Upgrade"; + proxy_set_header X-real-ip $remote_addr; + proxy_set_header X-Forwarded-For $remote_addr; + proxy_pass http://im_chat_api/; + } location ^~/complete_admin/ { #10009 admin proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "Upgrade"; proxy_set_header X-real-ip $remote_addr; proxy_set_header X-Forwarded-For $remote_addr; - proxy_pass http://im_complete_admin/; - } - location ^~/organization/ { #10010 organization - proxy_http_version 1.1; - proxy_set_header Upgrade $http_upgrade; - proxy_set_header Connection "Upgrade"; - proxy_set_header X-real-ip $remote_addr; - proxy_set_header X-Forwarded-For $remote_addr; - proxy_pass http://im_organization/; + proxy_pass http://im_admin_api/; } location ^~/open_rtc/ { #7880 rtc proxy_http_version 1.1; @@ -132,17 +98,17 @@ server { server { listen 80; - server_name web.rentsoft.cn ; #1 web im 端 域名 + server_name test-web.rentsoft.cn ; #1 web im 端 域名 rewrite ^(.*)$ https://${server_name}$1 permanent; } server { ssl_session_timeout 5m; listen 443; - server_name storage.rentsoft.cn; #1 MinIO存储域名 + server_name test-storage.rentsoft.cn; #1 MinIO存储域名 ssl on; - ssl_certificate /etc/nginx/conf.d/ssl/storage.rentsoft.cn.crt; #证书 - ssl_certificate_key /etc/nginx/conf.d/ssl/storage.rentsoft.cn.key; #证书 + ssl_certificate /etc/nginx/conf.d/ssl/test-storage.rentsoft.cn.crt; #证书 + ssl_certificate_key /etc/nginx/conf.d/ssl/test-storage.rentsoft.cn.key; #证书 gzip on; gzip_min_length 1k; gzip_buffers 4 16k; @@ -160,35 +126,3 @@ server { client_max_body_size 8000M; } } - - -server { - listen 443; - server_name admin.rentsoft.cn; #后台管理域名 - ssl on; - ssl_certificate /etc/nginx/conf.d/ssl/admin.rentsoft.cn.crt; # 证书 - ssl_certificate_key /etc/nginx/conf.d/ssl/admin.rentsoft.cn.key; #证书 - ssl_session_timeout 5m; - gzip on; - gzip_min_length 1k; - gzip_buffers 4 16k; - gzip_comp_level 2; - gzip_types text/plain application/javascript application/x-javascript text/css application/xml text/javascript application/x-httpd-php image/jpeg image/gif image/png; - gzip_vary off; - gzip_disable "MSIE [1-6]\."; - location / { - proxy_set_header Host $host; - proxy_set_header X-Real-Ip $remote_addr; - proxy_set_header X-Forwarded-For $remote_addr; - proxy_set_header X-NginX-Proxy true; - root /data1/online/Open-IM-Admin/dist/; #管理后台web静态资源存放路径 - index index.html; - try_files $uri $uri/ /index.html; - } -} - -server { - listen 80; - server_name admin.rentsoft.cn; #管理后台 域名 - rewrite ^(.*)$ https://${server_name}$1 permanent; -} From 31cd19af0945c37f6b469b52f463db3e2ebc8127 Mon Sep 17 00:00:00 2001 From: Xinwei Xiong <3293172751NSS@gmail.com> Date: Wed, 2 Aug 2023 10:24:15 +0800 Subject: [PATCH 56/61] Update docker-compose.yaml (#745) --- docker-compose.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docker-compose.yaml b/docker-compose.yaml index 394232df3..c28c8bc96 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -100,7 +100,7 @@ services: openim_server: - image: ghcr.io/openimsdk/openim-server:latest + image: ghcr.io/openimsdk/openim-server:main container_name: openim-server volumes: - ./logs:/Open-IM-Server/logs @@ -124,7 +124,7 @@ services: max-file: "2" openim_chat: - image: ghcr.io/openimsdk/openim-chat:latest + image: ghcr.io/openimsdk/openim-chat:main container_name: openim_chat restart: always depends_on: From d9dbd739ab7b1539af5e81794fba666c39bbeb30 Mon Sep 17 00:00:00 2001 From: withchao <48119764+withchao@users.noreply.github.com> Date: Wed, 2 Aug 2023 10:41:34 +0800 Subject: [PATCH 57/61] feat: Perfect with rpc but no api (#747) * feat: add get_group_member_user_id api * feat: add SendBusinessNotification api * feat: add GetFriendIDs api * update pkg --- go.mod | 2 +- go.sum | 4 ++-- internal/api/friend.go | 4 ++++ internal/api/msg.go | 47 ++++++++++++++++++++++++++++++++++++++++++ internal/api/route.go | 2 ++ 5 files changed, 56 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 9180c49f3..cbaca83b8 100644 --- a/go.mod +++ b/go.mod @@ -38,7 +38,7 @@ require github.com/google/uuid v1.3.0 require ( github.com/OpenIMSDK/protocol v0.0.3 - github.com/OpenIMSDK/tools v0.0.5 + github.com/OpenIMSDK/tools v0.0.13 github.com/aliyun/aliyun-oss-go-sdk v2.2.7+incompatible github.com/go-redis/redis v6.15.9+incompatible github.com/go-sql-driver/mysql v1.7.1 diff --git a/go.sum b/go.sum index e804eb461..0e6352156 100644 --- a/go.sum +++ b/go.sum @@ -19,8 +19,8 @@ firebase.google.com/go v3.13.0+incompatible/go.mod h1:xlah6XbEyW6tbfSklcfe5FHJIw github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/OpenIMSDK/protocol v0.0.3 h1:CFQtmnyW+1dYKVFaVaHcJ6oYuMiMdNfU2gC1xz3K/9I= github.com/OpenIMSDK/protocol v0.0.3/go.mod h1:F25dFrwrIx3lkNoiuf6FkCfxuwf8L4Z8UIsdTHP/r0Y= -github.com/OpenIMSDK/tools v0.0.5 h1:yBVHJ3EpIDcp8VFKPjuGr6MQvFa3t4JByZ+vmeC06/Q= -github.com/OpenIMSDK/tools v0.0.5/go.mod h1:eg+q4A34Qmu73xkY0mt37FHGMCMfC6CtmOnm0kFEGFI= +github.com/OpenIMSDK/tools v0.0.13 h1:rcw4HS8S2DPZR9UOBxD8/ol9UBMzXBypzOVEytDRIMo= +github.com/OpenIMSDK/tools v0.0.13/go.mod h1:eg+q4A34Qmu73xkY0mt37FHGMCMfC6CtmOnm0kFEGFI= github.com/QcloudApi/qcloud_sign_golang v0.0.0-20141224014652-e4130a326409/go.mod h1:1pk82RBxDY/JZnPQrtqHlUFfCctgdorsd9M06fMynOM= github.com/Shopify/sarama v1.29.0 h1:ARid8o8oieau9XrHI55f/L3EoRAhm9px6sonbD7yuUE= github.com/Shopify/sarama v1.29.0/go.mod h1:2QpgD79wpdAESqNQMxNc0KYMkycd4slxGdV3TWSVqrU= diff --git a/internal/api/friend.go b/internal/api/friend.go index f64a99ef3..91fc30347 100644 --- a/internal/api/friend.go +++ b/internal/api/friend.go @@ -83,3 +83,7 @@ func (o *FriendApi) ImportFriends(c *gin.Context) { func (o *FriendApi) IsFriend(c *gin.Context) { a2r.Call(friend.FriendClient.IsFriend, o.Client, c) } + +func (o *FriendApi) GetFriendIDs(c *gin.Context) { + a2r.Call(friend.FriendClient.GetFriendIDs, o.Client, c) +} diff --git a/internal/api/msg.go b/internal/api/msg.go index e4a8fda17..e7f06dffa 100644 --- a/internal/api/msg.go +++ b/internal/api/msg.go @@ -16,6 +16,8 @@ package api import ( "github.com/OpenIMSDK/Open-IM-Server/pkg/authverify" + "github.com/OpenIMSDK/Open-IM-Server/pkg/common/config" + "github.com/OpenIMSDK/tools/mcontext" "github.com/gin-gonic/gin" "github.com/go-playground/validator/v10" "github.com/mitchellh/mapstructure" @@ -234,6 +236,51 @@ func (m *MessageApi) SendMessage(c *gin.Context) { apiresp.GinSuccess(c, respPb) } +func (m *MessageApi) SendBusinessNotification(c *gin.Context) { + req := struct { + Key string `json:"key"` + Data string `json:"data"` + SendUserID string `json:"sendUserID"` + RecvUserID string `json:"recvUserID"` + }{} + if err := c.BindJSON(&req); err != nil { + apiresp.GinError(c, errs.ErrArgs.WithDetail(err.Error()).Wrap()) + return + } + if !authverify.IsAppManagerUid(c) { + apiresp.GinError(c, errs.ErrNoPermission.Wrap("only app manager can send message")) + return + } + sendMsgReq := msg.SendMsgReq{ + MsgData: &sdkws.MsgData{ + SendID: req.SendUserID, + RecvID: req.RecvUserID, + Content: []byte(utils.StructToJsonString(&sdkws.NotificationElem{ + Detail: utils.StructToJsonString(&struct { + Key string `json:"key"` + Data string `json:"data"` + }{Key: req.Key, Data: req.Data}), + })), + MsgFrom: constant.SysMsgType, + ContentType: constant.BusinessNotification, + SessionType: constant.SingleChatType, + CreateTime: utils.GetCurrentTimestampByMill(), + ClientMsgID: utils.GetMsgID(mcontext.GetOpUserID(c)), + Options: config.GetOptionsByNotification(config.NotificationConf{ + IsSendMsg: false, + ReliabilityLevel: 1, + UnreadCount: false, + }), + }, + } + respPb, err := m.Client.SendMsg(c, &sendMsgReq) + if err != nil { + apiresp.GinError(c, err) + return + } + apiresp.GinSuccess(c, respPb) +} + func (m *MessageApi) BatchSendMsg(c *gin.Context) { var ( req apistruct.BatchSendMsgReq diff --git a/internal/api/route.go b/internal/api/route.go index 5dd0c4cc7..5fd3f115a 100644 --- a/internal/api/route.go +++ b/internal/api/route.go @@ -102,6 +102,7 @@ func NewGinRouter(discov discoveryregistry.SvcDiscoveryRegistry, rdb redis.Unive friendRouterGroup.POST("/remove_black", f.RemoveBlack) friendRouterGroup.POST("/import_friend", f.ImportFriends) friendRouterGroup.POST("/is_friend", f.IsFriend) + friendRouterGroup.POST("/get_friend_id", f.GetFriendIDs) } g := NewGroupApi(*groupRpc) groupRouterGroup := r.Group("/group", ParseToken) @@ -167,6 +168,7 @@ func NewGinRouter(discov discoveryregistry.SvcDiscoveryRegistry, rdb redis.Unive msgGroup.POST("/newest_seq", m.GetSeq) msgGroup.POST("/search_msg", m.SearchMsg) msgGroup.POST("/send_msg", m.SendMessage) + msgGroup.POST("/send_business_notification", m.SendBusinessNotification) msgGroup.POST("/pull_msg_by_seq", m.PullMsgBySeqs) msgGroup.POST("/revoke_msg", m.RevokeMsg) msgGroup.POST("/mark_msgs_as_read", m.MarkMsgsAsRead) From f592a3abd751ca5be42f395f5f61f1a6c2ecb8e8 Mon Sep 17 00:00:00 2001 From: pluto <83957921+plutoyty@users.noreply.github.com> Date: Thu, 3 Aug 2023 09:44:10 +0800 Subject: [PATCH 58/61] Fix bug 755 (#758) * Resolving code conflicts after project directory changes and Add subscribe and unsubscribe mongodb operations * Organize and update module dependencies * Get user online status * Get user online status * Get user online status * fix-bug-755 * Modify statusmod to a prime number to reduce hash conflicts --- pkg/common/db/cache/user.go | 28 ++++++++++++---------------- 1 file changed, 12 insertions(+), 16 deletions(-) diff --git a/pkg/common/db/cache/user.go b/pkg/common/db/cache/user.go index 5c76af22f..65afb400d 100644 --- a/pkg/common/db/cache/user.go +++ b/pkg/common/db/cache/user.go @@ -18,6 +18,8 @@ import ( "context" "encoding/json" "github.com/OpenIMSDK/protocol/user" + "github.com/OpenIMSDK/tools/errs" + "hash/crc32" "strconv" "time" @@ -33,7 +35,7 @@ const ( userGlobalRecvMsgOptKey = "USER_GLOBAL_RECV_MSG_OPT_KEY:" olineStatusKey = "ONLINE_STATUS:" userOlineStatusExpireTime = time.Second * 60 * 60 * 24 - statusMod = 500 + statusMod = 501 ) type UserCache interface { @@ -165,11 +167,8 @@ func (u *UserCacheRedis) getOnlineStatusKey(userID string) string { func (u *UserCacheRedis) GetUserStatus(ctx context.Context, userIDs []string) ([]*user.OnlineStatus, error) { var res []*user.OnlineStatus for _, userID := range userIDs { - UserIDNum, err := strconv.Atoi(userID) - if err != nil { - return nil, err - } - var modKey = strconv.Itoa(UserIDNum % statusMod) + UserIDNum := crc32.ChecksumIEEE([]byte(userID)) + var modKey = strconv.Itoa(int(UserIDNum % statusMod)) var onlineStatus user.OnlineStatus key := olineStatusKey + modKey result, err := u.rdb.HGet(ctx, key, userID).Result() @@ -183,12 +182,12 @@ func (u *UserCacheRedis) GetUserStatus(ctx context.Context, userIDs []string) ([ }) continue } else { - return nil, err + return nil, errs.Wrap(err) } } err = json.Unmarshal([]byte(result), &onlineStatus) if err != nil { - return nil, err + return nil, errs.Wrap(err) } onlineStatus.UserID = userID res = append(res, &onlineStatus) @@ -200,23 +199,20 @@ func (u *UserCacheRedis) GetUserStatus(ctx context.Context, userIDs []string) ([ func (u *UserCacheRedis) SetUserStatus(ctx context.Context, list []*user.OnlineStatus) error { for _, status := range list { var isNewKey int64 - UserIDNum, err := strconv.Atoi(status.UserID) - if err != nil { - return err - } - var modKey = strconv.Itoa(UserIDNum % statusMod) + UserIDNum := crc32.ChecksumIEEE([]byte(status.UserID)) + var modKey = strconv.Itoa(int(UserIDNum % statusMod)) key := olineStatusKey + modKey jsonData, err := json.Marshal(status) if err != nil { - return err + return errs.Wrap(err) } isNewKey, err = u.rdb.Exists(ctx, key).Result() if err != nil { - return err + return errs.Wrap(err) } _, err = u.rdb.HSet(ctx, key, status.UserID, string(jsonData)).Result() if err != nil { - return err + return errs.Wrap(err) } if isNewKey > 0 { u.rdb.Expire(ctx, key, userOlineStatusExpireTime) From 4950ccf4ec5c336edfd8dc71e8dbb0aeb9175f36 Mon Sep 17 00:00:00 2001 From: pluto <83957921+plutoyty@users.noreply.github.com> Date: Thu, 3 Aug 2023 16:04:35 +0800 Subject: [PATCH 59/61] nginx minio configuration picture can not be sent (#763) * fix-bug-762 * update * example --- config/open-im-ng-example.conf | 112 +++++++++++++++++++++++---------- 1 file changed, 78 insertions(+), 34 deletions(-) diff --git a/config/open-im-ng-example.conf b/config/open-im-ng-example.conf index e5e584ff8..10a2ecb52 100644 --- a/config/open-im-ng-example.conf +++ b/config/open-im-ng-example.conf @@ -1,31 +1,37 @@ upstream im_msg_gateway{ - server 127.0.0.1:10001; #IM消息服务器地址 根据部署情况可指定多台 + server 127.0.0.1:10001; #IM Message server address Multiple can be specified according to the deployment } upstream im_api{ - server 127.0.0.1:10002; #IM群组用户api服务器地址 根据部署情况可指定多台 - } -upstream storage { - server 127.0.0.1:10005; #MinIO服务器地址 暂时支持1台 + server 127.0.0.1:10002; #IM Group user api server address Multiple can be specified according to the deployment } upstream im_grafana{ - server 127.0.0.1:10007; #IM 统计服务器地址 docker-compose启动所在机器 + server 127.0.0.1:10007; #IM Statistical server address The machine where docker-compose starts } upstream im_chat_api{ - server 127.0.0.1:10008; #IM 商业版登录注册服务器地址 根据部署情况可指定多台 + server 127.0.0.1:10008; #IM Business version login registration server address Multiple can be specified according to the deployment } upstream im_admin_api{ - server 127.0.0.1:10009; #IM 商业版admin地址 根据部署情况可指定多台 + server 127.0.0.1:10009; #IM The admin address of the commercial version can specify multiple units according to the deployment situation } upstream im_open_rtc{ - server 127.0.0.1:7880; #rtc 音视频通话 服务器地址 根据部署情况可指定多台 + server 127.0.0.1:7880; #rtc Audio and video call server address Multiple devices can be specified according to the deployment } +upstream minio_s3_2 { + least_conn; + server 127.0.0.1:10005; +} + +upstream minio_console_2 { + least_conn; + server 127.0.0.1:9090; +} server { listen 443; - server_name test-web.rentsoft.cn; #1 web im 端 域名 + server_name your-domain.com; #your-domain.com ssl on; - ssl_certificate /etc/nginx/conf.d/ssl/test-web.rentsoft.cn.crt; #2 证书 - ssl_certificate_key /etc/nginx/conf.d/ssl/test-web.rentsoft.cn.key; #3 证书 + ssl_certificate /etc/nginx/conf.d/ssl/your-domain.com.crt; #2 Certificate + ssl_certificate_key /etc/nginx/conf.d/ssl/your-domain.com.key; #3 Certificate ssl_session_timeout 5m; gzip on; gzip_min_length 1k; @@ -42,7 +48,7 @@ server { proxy_set_header X-Real-Ip $remote_addr; proxy_set_header X-Forwarded-For $remote_addr; proxy_set_header X-NginX-Proxy true; - root /data1/online/Pc-Web-Demo/build/; # web im静态资源存放路径 + root /data1/online/Pc-Web-Demo/build/; # web im static resource storage path index index.html; try_files $uri $uri/ /index.html; } @@ -98,31 +104,69 @@ server { server { listen 80; - server_name test-web.rentsoft.cn ; #1 web im 端 域名 + server_name test-web.rentsoft.cn ; #1 web im end domain name rewrite ^(.*)$ https://${server_name}$1 permanent; } + server { - ssl_session_timeout 5m; - listen 443; - server_name test-storage.rentsoft.cn; #1 MinIO存储域名 - ssl on; - ssl_certificate /etc/nginx/conf.d/ssl/test-storage.rentsoft.cn.crt; #证书 - ssl_certificate_key /etc/nginx/conf.d/ssl/test-storage.rentsoft.cn.key; #证书 - gzip on; - gzip_min_length 1k; - gzip_buffers 4 16k; - gzip_comp_level 2; - gzip_types text/plain application/javascript application/x-javascript text/css application/xml text/javascript application/x-httpd-php image/jpeg image/gif image/png; - gzip_vary off; - gzip_disable "MSIE [1-6]\."; + listen 443; + + server_name your-domain.com; #your-domain.com + ssl on; + ssl_certificate /etc/nginx/conf.d/ssl/your-domain.com.crt; #Certificate + ssl_certificate_key /etc/nginx/conf.d/ssl/your-domain.com.key; #Certificate + gzip on; + gzip_min_length 1k; + gzip_buffers 4 16k; + gzip_comp_level 2; + gzip_types text/plain application/javascript application/x-javascript text/css application/xml text/javascript application/x-httpd-php image/jpeg image/gif image/png application/wasm; + gzip_vary off; + gzip_disable "MSIE [1-6]\."; + # Allow special characters in headers + ignore_invalid_headers off; + # Allow any size file to be uploaded. + # Set to a value such as 1000m; to restrict file size to a specific value + client_max_body_size 0; + # Disable buffering + proxy_buffering off; + proxy_request_buffering off; + location / { - proxy_pass http://storage; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header X-Forwarded-Proto $scheme; - proxy_set_header Host $http_host; - proxy_http_version 1.1; - client_max_body_size 8000M; + proxy_set_header Host $http_host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Proto $scheme; + + proxy_connect_timeout 300; + # Default is HTTP/1, keepalive is only enabled in HTTP/1.1 + proxy_http_version 1.1; + proxy_set_header Connection ""; + chunked_transfer_encoding off; + + proxy_pass http://minio_s3_2; # This uses the upstream directive definition to load balance + } + + location /minio/ui { + rewrite ^/minio/ui/(.*) /$1 break; + proxy_set_header Host $http_host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Proto $scheme; + proxy_set_header X-NginX-Proxy true; + + # This is necessary to pass the correct IP to be hashed + real_ip_header X-Real-IP; + + proxy_connect_timeout 300; + + # To support websockets in MinIO versions released after January 2023 + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection "upgrade"; + + chunked_transfer_encoding off; + + proxy_pass http://minio_console_2; # This uses the upstream directive definition to load balance } } From 7707375cf50087f70f506cb57db61bca5b9c294a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 4 Aug 2023 11:15:05 +0800 Subject: [PATCH 60/61] build(deps): bump go.mongodb.org/mongo-driver from 1.12.0 to 1.12.1 (#764) Bumps [go.mongodb.org/mongo-driver](https://github.com/mongodb/mongo-go-driver) from 1.12.0 to 1.12.1. - [Release notes](https://github.com/mongodb/mongo-go-driver/releases) - [Commits](https://github.com/mongodb/mongo-go-driver/compare/v1.12.0...v1.12.1) --- updated-dependencies: - dependency-name: go.mongodb.org/mongo-driver dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index cbaca83b8..f813ba5fe 100644 --- a/go.mod +++ b/go.mod @@ -24,7 +24,7 @@ require ( github.com/robfig/cron/v3 v3.0.1 github.com/sirupsen/logrus v1.9.3 // indirect github.com/stretchr/testify v1.8.4 - go.mongodb.org/mongo-driver v1.12.0 + go.mongodb.org/mongo-driver v1.12.1 golang.org/x/image v0.9.0 // indirect google.golang.org/api v0.134.0 google.golang.org/grpc v1.57.0 diff --git a/go.sum b/go.sum index 0e6352156..f705f2efd 100644 --- a/go.sum +++ b/go.sum @@ -338,8 +338,8 @@ github.com/youmark/pkcs8 v0.0.0-20181117223130-1be2e3e5546d/go.mod h1:rHwXgn7Jul github.com/yuin/goldmark v1.1.27/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= -go.mongodb.org/mongo-driver v1.12.0 h1:aPx33jmn/rQuJXPQLZQ8NtfPQG8CaqgLThFtqRb0PiE= -go.mongodb.org/mongo-driver v1.12.0/go.mod h1:AZkxhPnFJUoH7kZlFkVKucV20K387miPfm7oimrSmK0= +go.mongodb.org/mongo-driver v1.12.1 h1:nLkghSU8fQNaK7oUmDhQFsnrtcoNy7Z6LVFKsEecqgE= +go.mongodb.org/mongo-driver v1.12.1/go.mod h1:/rGBTebI3XYboVmgz+Wv3Bcbl3aD0QF9zl6kDDw18rQ= go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0= go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= From f21d64c00076b52b15995a62709d8e969a5b37f6 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 4 Aug 2023 15:29:01 +0800 Subject: [PATCH 61/61] build(deps): bump github.com/OpenIMSDK/protocol from 0.0.3 to 0.0.4 (#769) Bumps [github.com/OpenIMSDK/protocol](https://github.com/OpenIMSDK/protocol) from 0.0.3 to 0.0.4. - [Release notes](https://github.com/OpenIMSDK/protocol/releases) - [Commits](https://github.com/OpenIMSDK/protocol/compare/v0.0.3...v0.0.4) --- updated-dependencies: - dependency-name: github.com/OpenIMSDK/protocol dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index f813ba5fe..686cadce4 100644 --- a/go.mod +++ b/go.mod @@ -37,7 +37,7 @@ require ( require github.com/google/uuid v1.3.0 require ( - github.com/OpenIMSDK/protocol v0.0.3 + github.com/OpenIMSDK/protocol v0.0.4 github.com/OpenIMSDK/tools v0.0.13 github.com/aliyun/aliyun-oss-go-sdk v2.2.7+incompatible github.com/go-redis/redis v6.15.9+incompatible diff --git a/go.sum b/go.sum index f705f2efd..9a820bfd2 100644 --- a/go.sum +++ b/go.sum @@ -17,8 +17,8 @@ cloud.google.com/go/storage v1.30.1/go.mod h1:NfxhC0UJE1aXSx7CIIbCf7y9HKT7Biccwk firebase.google.com/go v3.13.0+incompatible h1:3TdYC3DDi6aHn20qoRkxwGqNgdjtblwVAyRLQwGn/+4= firebase.google.com/go v3.13.0+incompatible/go.mod h1:xlah6XbEyW6tbfSklcfe5FHJIwjt8toICdV5Wh9ptHs= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/OpenIMSDK/protocol v0.0.3 h1:CFQtmnyW+1dYKVFaVaHcJ6oYuMiMdNfU2gC1xz3K/9I= -github.com/OpenIMSDK/protocol v0.0.3/go.mod h1:F25dFrwrIx3lkNoiuf6FkCfxuwf8L4Z8UIsdTHP/r0Y= +github.com/OpenIMSDK/protocol v0.0.4 h1:zEEAi677nog+k4u3e5h36nvYeb1XAwcKQ3Uc2tzxHYs= +github.com/OpenIMSDK/protocol v0.0.4/go.mod h1:F25dFrwrIx3lkNoiuf6FkCfxuwf8L4Z8UIsdTHP/r0Y= github.com/OpenIMSDK/tools v0.0.13 h1:rcw4HS8S2DPZR9UOBxD8/ol9UBMzXBypzOVEytDRIMo= github.com/OpenIMSDK/tools v0.0.13/go.mod h1:eg+q4A34Qmu73xkY0mt37FHGMCMfC6CtmOnm0kFEGFI= github.com/QcloudApi/qcloud_sign_golang v0.0.0-20141224014652-e4130a326409/go.mod h1:1pk82RBxDY/JZnPQrtqHlUFfCctgdorsd9M06fMynOM=