diff --git a/.env b/.env index 048662d97..e7971a07a 100644 --- a/.env +++ b/.env @@ -1,5 +1,5 @@ USER=root PASSWORD=openIM123 -MINIO_ENDPOINT=http://127.0.0.1:10005 -API_URL=http://127.0.0.1:10002/object/ +MINIO_ENDPOINT=http://116.30.3.80:10005 +API_URL=http://116.30.3.80:10002/object/ DATA_DIR=./ diff --git a/.github/sync.yml b/.github/sync.yml index fdc003a0f..4e9f9d17e 100644 --- a/.github/sync.yml +++ b/.github/sync.yml @@ -67,6 +67,10 @@ group: - repos: | OpenIMSDK/OpenKF@main OpenIMSDK/openim-miniprogram-demo@main + OpenIMSDK/docs + OpenIMSDK/chat + OpenIMSDK/community + OpenIMSDK/openim-charts OpenIMSDK/openim-sdk-cpp@main files: - source: LICENSE @@ -80,13 +84,22 @@ group: replace: false - source: .github/workflows/project-progress.yml dest: .github/workflows/project-progress.yml - replace: false + replace: false - source: .github/workflows/help-comment-issue.yml dest: .github/workflows/help-comment-issue.yml replace: false - source: .github/.codecov.yml dest: .github/.codecov.yml replace: false + - source: .github/workflows/cla.yml + dest: .github/workflows/cla.yml + replace: false + - source: .github/workflows/auto-assign-issue.yml + dest: .github/workflows/auto-assign-issue.yml + replace: false + - source: .github/workflows/release.yml + dest: .github/workflows/release.yml + replace: false - source: ./scripts/githooks/ dest: ./scripts/githooks/ replace: true \ No newline at end of file diff --git a/.github/workflows/auto-assign-issue.yml b/.github/workflows/auto-assign-issue.yml new file mode 100644 index 000000000..06fee28a1 --- /dev/null +++ b/.github/workflows/auto-assign-issue.yml @@ -0,0 +1,29 @@ +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 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/bot-auto-cherry-pick.yml b/.github/workflows/bot-auto-cherry-pick.yml new file mode 100644 index 000000000..4cb2cf0ec --- /dev/null +++ b/.github/workflows/bot-auto-cherry-pick.yml @@ -0,0 +1,53 @@ +name: 'Github Rebot for Cherry Pick when PR is merged' +on: + pull_request_target: + types: + - closed + +jobs: + comment: + runs-on: ubuntu-latest + steps: + - name: Comment cherry-pick command + uses: actions/github-script@v5 + with: + script: | + const pr = context.payload.pull_request; + if (!pr.merged) { + console.log("PR is not merged. Skipping..."); + return; + } + if (!pr.milestone || !pr.milestone.title) { + console.log("Milestone is not set. Skipping..."); + return; + } + const milestone = pr.milestone.title; + const ref = `heads/release-${milestone}`; + let branchExists; + try { + await github.rest.git.getRef({ + owner: context.repo.owner, + repo: context.repo.repo, + ref: ref + }); + branchExists = true; + } catch (error) { + if (error.status === 404) { + console.log(`Branch ${ref} does not exist. Skipping...`); + branchExists = false; + } else { + throw error; // Rethrow if it's another error + } + } + if (!branchExists) { + return; + } + const cherryPickCmd = `/cherry-pick release-${milestone}`; + console.log(`Adding comment: ${cherryPickCmd}`); + await github.rest.issues.createComment({ + owner: context.repo.owner, + repo: context.repo.repo, + issue_number: pr.number, + body: cherryPickCmd + }); + github-token: ${{ secrets.BOT_GITHUB_TOKEN }} \ No newline at end of file diff --git a/.github/workflows/bot-cherry-pick.yml b/.github/workflows/bot-cherry-pick.yml new file mode 100644 index 000000000..9b5ff49bb --- /dev/null +++ b/.github/workflows/bot-cherry-pick.yml @@ -0,0 +1,19 @@ +name: Github Rebot for Cherry Pick On Comment +on: + issue_comment: + types: [created] +jobs: + cherry-pick: + name: Cherry Pick + if: github.event.issue.pull_request != '' && contains(github.event.comment.body, '/cherry-pick') && github.event.comment.user.login=='kubbot' + runs-on: ubuntu-latest + steps: + - name: Checkout the latest code + uses: actions/checkout@v2 + with: + token: ${{ secrets.BOT_GITHUB_TOKEN }} + fetch-depth: 0 # otherwise, you will fail to push refs to dest repo + - name: Automatic Cherry Pick + uses: vendoo/gha-cherry-pick@v1 + env: + GITHUB_TOKEN: ${{ secrets.BOT_GITHUB_TOKEN }} \ No newline at end of file diff --git a/.github/workflows/build-docker-image.yml b/.github/workflows/build-docker-image.yml index 553ae5d10..31e0a5b65 100644 --- a/.github/workflows/build-docker-image.yml +++ b/.github/workflows/build-docker-image.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 Build Docker Images on: push: @@ -9,8 +23,7 @@ jobs: strategy: matrix: bin: - - ssserver - - sslocal + - openim-server steps: - name: Checkout uses: actions/checkout@v3 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 new file mode 100644 index 000000000..603a49399 --- /dev/null +++ b/.github/workflows/cla.yml @@ -0,0 +1,48 @@ +name: "OpenIM CLA Assistant" +on: + issue_comment: + types: [created] + pull_request_target: + types: [opened,closed,synchronize] + +# explicitly configure permissions, in case your GITHUB_TOKEN workflow permissions are set to read-only in repository settings +permissions: + actions: write + contents: write + pull-requests: write + statuses: write + +env: + # Define Open-IM-Server variables here + OPEN_IM_SERVER_REMOTE_ORGANIZATION: openim-sigs + REMOTE_REPOSITORY: cla + OPEN_IM_SERVER_CLA_DOCUMENT: https://github.com/openim-sigs/cla/blob/main/README.md + OPEN_IM_SERVER_SIGNATURES_PATH: signatures/${{ github.event.repository.name }}/cla.json + + OPEN_IM_SERVER_ALLOWLIST: kubbot,bot* + +jobs: + CLAAssistant: + runs-on: ubuntu-latest + steps: + - name: "CLA Assistant" + if: (github.event.comment.body == 'recheck' || github.event.comment.body == 'I have read the CLA Document and I hereby sign the CLA') || github.event_name == 'pull_request_target' + uses: contributor-assistant/github-action@v2.3.0 + env: + GITHUB_TOKEN: ${{ secrets.BOT_GITHUB_TOKEN }} + PERSONAL_ACCESS_TOKEN: ${{ secrets.REDBOT_GITHUB_TOKEN }} + with: + path-to-signatures: ${{ env.OPEN_IM_SERVER_SIGNATURES_PATH }} + path-to-document: ${{ env.OPEN_IM_SERVER_CLA_DOCUMENT }} + branch: 'main' + allowlist: ${{ env.OPEN_IM_SERVER_ALLOWLIST }} + + remote-organization-name: ${{ env.OPEN_IM_SERVER_REMOTE_ORGANIZATION }} + 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).
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/${{ 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/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 000000000..3fbad1e5f --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,45 @@ +name: 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/*' + +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 diff --git a/.github/workflows/depsreview.yaml b/.github/workflows/depsreview.yaml new file mode 100644 index 000000000..c95afb845 --- /dev/null +++ b/.github/workflows/depsreview.yaml @@ -0,0 +1,18 @@ +# Copyright © 2023 KubeCub open source community. All rights reserved. +# Licensed under the MIT License (the "License"); +# you may not use this file except in compliance with the License. + +name: Dependency Review +on: [pull_request] + +permissions: + contents: read + +jobs: + dependency-review: + runs-on: ubuntu-latest + steps: + - name: 'Checkout Repository' + uses: actions/checkout@v3 + - name: 'Dependency Review' + uses: actions/dependency-review-action@v3 \ No newline at end of file diff --git a/.github/workflows/e2e-test.yml b/.github/workflows/e2e-test.yml index e69de29bb..a3451d6aa 100644 --- a/.github/workflows/e2e-test.yml +++ b/.github/workflows/e2e-test.yml @@ -0,0 +1,2 @@ +# name: OpenIM e2e Test + diff --git a/.github/workflows/golangci-link.yml b/.github/workflows/golangci-lint.yml similarity index 94% rename from .github/workflows/golangci-link.yml rename to .github/workflows/golangci-lint.yml index f3664c1bc..adf33d8d4 100644 --- a/.github/workflows/golangci-link.yml +++ b/.github/workflows/golangci-lint.yml @@ -13,12 +13,12 @@ # limitations under the License. -name: OpenKF golangci-lint +name: OpenIM golangci-lint on: push: branches: [main] -# pull_request: -# branches: [main] + pull_request: + branches: [main] jobs: golangci: name: lint @@ -48,4 +48,4 @@ jobs: # only-new-issues: true # Optional:The mode to install golangci-lint. It can be 'binary' or 'goinstall'. - install-mode: "goinstall" \ No newline at end of file + install-mode: "goinstall" diff --git a/.github/workflows/gosec.yml b/.github/workflows/gosec.yml index 60f42ae1e..43fba5c0c 100644 --- a/.github/workflows/gosec.yml +++ b/.github/workflows/gosec.yml @@ -1,30 +1,31 @@ -# name: Run gosec +name: OpenIM Run Gosec -# # gosec is a source code security audit tool for the Go language. It performs a static -# # analysis of the Go code, looking for potential security problems. The main functions of gosec are: -# # 1. Find common security vulnerabilities, such as SQL injection, command injection, and cross-site scripting (XSS). -# # 2. Audit codes according to common security standards and find non-standard codes. -# # 3. Assist the Go language engineer to write safe and reliable code. +# gosec is a source code security audit tool for the Go language. It performs a static +# analysis of the Go code, looking for potential security problems. The main functions of gosec are: +# 1. Find common security vulnerabilities, such as SQL injection, command injection, and cross-site scripting (XSS). +# 2. Audit codes according to common security standards and find non-standard codes. +# 3. Assist the Go language engineer to write safe and reliable code. +# https://github.com/securego/gosec/ +on: + push: + branches: "*" + pull_request: + branches: "*" + paths-ignore: + - '*.md' + - '*.yml' + - '.github' -# on: -# push: -# branches: "*" -# pull_request: -# branches: "*" -# paths-ignore: -# - '*.md' -# - '*.yml' -# - '.github' - -# jobs: -# golang-security-action: -# runs-on: ubuntu-latest -# env: -# GO111MODULE: on -# steps: -# - name: Check out code -# uses: actions/checkout@v3 -# - name: Run Gosec Security Scanner -# uses: securego/gosec@master -# with: -# args: ./... \ No newline at end of file +jobs: + golang-security-action: + runs-on: ubuntu-latest + env: + GO111MODULE: on + steps: + - name: Check out code + uses: actions/checkout@v3 + - name: Run Gosec Security Scanner + uses: securego/gosec@master + with: + args: ./... + continue-on-error: true \ No newline at end of file diff --git a/.github/workflows/help-comment-issue.yml b/.github/workflows/help-comment-issue.yml index b1414d7c2..5f52e638f 100644 --- a/.github/workflows/help-comment-issue.yml +++ b/.github/workflows/help-comment-issue.yml @@ -18,4 +18,4 @@ jobs: body: | This issue is available for anyone to work on. **Make sure to reference this issue in your pull request.** :sparkles: Thank you for your contribution! :sparkles: [Join slack 🤖](https://join.slack.com/t/openimsdk/shared_invite/zt-1tmoj26uf-_FDy3dowVHBiGvLk9e5Xkg) to connect and communicate with our developers. - If you wish to accept this assignment, please leave a comment in the comments section: `/accept`.🎯 + If you wish to accept this assignment, please leave a comment in the comments section: `/accept`.🎯 \ No newline at end of file diff --git a/.github/workflows/image.yml b/.github/workflows/image.yml index f6d02cf63..2ecfad6ea 100644 --- a/.github/workflows/image.yml +++ b/.github/workflows/image.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: Build Image on: 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: diff --git a/.github/workflows/lock-issue.yml b/.github/workflows/lock-issue.yml new file mode 100644 index 000000000..8cf0433d6 --- /dev/null +++ b/.github/workflows/lock-issue.yml @@ -0,0 +1,51 @@ +name: 'Lock Threads' + +on: + schedule: + - cron: '0 * * * *' + workflow_dispatch: + +permissions: + issues: write + pull-requests: write + +concurrency: + group: lock + +jobs: + action: + runs-on: ubuntu-latest + steps: + - uses: dessant/lock-threads@v4 + with: + github-token: ${{ secrets.BOT_GITHUB_TOKEN }} + issue-inactive-days: '365' + exclude-issue-created-before: '' + exclude-issue-created-after: '' + exclude-issue-created-between: '' + exclude-issue-closed-before: '' + exclude-issue-closed-after: '' + exclude-issue-closed-between: '' + include-any-issue-labels: '' + include-all-issue-labels: '' + exclude-any-issue-labels: '' + add-issue-labels: '' + remove-issue-labels: '' + issue-comment: '' + issue-lock-reason: 'resolved' + pr-inactive-days: '365' + exclude-pr-created-before: '' + exclude-pr-created-after: '' + exclude-pr-created-between: '' + exclude-pr-closed-before: '' + exclude-pr-closed-after: '' + exclude-pr-closed-between: '' + include-any-pr-labels: '' + include-all-pr-labels: '' + exclude-any-pr-labels: '' + add-pr-labels: '' + remove-pr-labels: '' + pr-comment: '' + pr-lock-reason: 'resolved' + process-only: '' + log-output: false \ No newline at end of file diff --git a/.github/workflows/opencommit.yml b/.github/workflows/opencommit.yml index 80fc9e302..69f7d7f23 100644 --- a/.github/workflows/opencommit.yml +++ b/.github/workflows/opencommit.yml @@ -1,4 +1,4 @@ -name: 'OpenCommit Action' +name: 'OpenIM Commit Action' on: push: diff --git a/.github/workflows/openim-ci.yml b/.github/workflows/openim-ci.yml deleted file mode 100644 index 6460a43b1..000000000 --- a/.github/workflows/openim-ci.yml +++ /dev/null @@ -1,134 +0,0 @@ -# Copyright © 2023 OpenIM open source community. All rights reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -name: OpenIM CI - -on: - push: - branches: - - main - paths-ignore: - - "docs/**" - - "README.md" - - "README_zh-CN.md" - - "CONTRIBUTING.md" - pull_request: - branches: - - main - paths-ignore: - - "README.md" - - "README_zh-CN.md" - - "CONTRIBUTING.md" - - "docs/**" - -env: - GO_VERSION: "1.19" - GOLANGCI_VERSION: "v1.50.1" - -jobs: - openim: - name: Test with go ${{ matrix.go_version }} on ${{ matrix.os }} - runs-on: ${{ matrix.os }} - environment: - name: openim - - strategy: - matrix: - go_version: ["1.18","1.19","1.20"] - os: [ubuntu-latest] - - steps: - - name: Set up Go ${{ matrix.go_version }} - uses: actions/setup-go@v2 - with: - go-version: ${{ matrix.go_version }} - id: go - - - name: Check out code into the Go module directory - uses: actions/checkout@v2 - - - name: Run go modules tidy - run: | - make tidy - - - name: Run go format - run: | - make format - echo "Run go format successfully" - continue-on-error: true - - # - name: Generate all necessary files, such as error code files - # run: | - # make generate - - # - name: Check syntax and styling of go sources - # run: | - # set -e - # make lint - - # - name: Run unit test and get test coverage - # run: | - # make cover - - - name: Build source code for host platform - run: | - make build - echo "Build source code for host platform successfully" - - # - name: Collect Test Coverage File - # uses: actions/upload-artifact@v1.0.0 - # with: - # name: main-output - # path: _output/tmp/coverage.out - - # - name: Set up Docker Buildx - # uses: docker/setup-buildx-action@v1 - -# lint: -# runs-on: ubuntu-20.04 -# steps: -# - name: Checkout -# uses: actions/checkout@v3 -# with: -# fetch-depth: 0 - -# - name: Set up Go -# uses: actions/setup-go@v3 -# with: -# go-version: ${{ env.GO_VERSION }} - -# - name: golangci-lint -# uses: golangci/golangci-lint-action@v3 -# with: -# version: ${{ env.GOLANGCI_VERSION }} - -# docker-image-tests: -# runs-on: ubuntu-20.04 -# steps: -# - name: Checkout -# uses: actions/checkout@v3 -# with: -# fetch-depth: 0 - -# - name: Set up Go -# uses: actions/setup-go@v3 -# with: -# go-version: ${{ env.GO_VERSION }} - -# - name: Run tests -# run: make build - -# - name: Test docker image -# run: | -# docker build -t openim:ci-build . diff --git a/.github/workflows/openimci.yml b/.github/workflows/openimci.yml new file mode 100644 index 000000000..cd055b5b7 --- /dev/null +++ b/.github/workflows/openimci.yml @@ -0,0 +1,176 @@ +# 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 CI Aotu Build and Install + +on: + push: + branches: + - main + paths-ignore: + - "docs/**" + - "README.md" + - "README_zh-CN.md" + - "CONTRIBUTING.md" + pull_request: + branches: + - main + paths-ignore: + - "README.md" + - "README_zh-CN.md" + - "CONTRIBUTING.md" + - "docs/**" + +env: + GO_VERSION: "1.19" + GOLANGCI_VERSION: "v1.50.1" + +jobs: + openim: + name: Test with go ${{ matrix.go_version }} on ${{ matrix.os }} + runs-on: ${{ matrix.os }} + permissions: + # Give the default GITHUB_TOKEN write permission to commit and push the changed files back to the repository. + contents: write + environment: + name: openim + + strategy: + matrix: + go_version: ["1.18","1.19","1.20"] + os: [ubuntu-latest] + + steps: + - name: Set up Go ${{ matrix.go_version }} + uses: actions/setup-go@v2 + with: + go-version: ${{ matrix.go_version }} + id: go + + - name: Check out code into the Go module directory + uses: actions/checkout@v3 + + - name: Install Task + uses: arduino/setup-task@v1 + with: + version: 2.x + + - 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: Clean all build + run: | + sudo make clean + echo "Clean all build successfully" + + - name: push OpenIM + uses: stefanzweifel/git-auto-commit-action@v4 + with: + commit_message: "cicd: robot automated Change" + # commit_options: '--no-verify --signoff' + branch: main + # create_branch: true + # # Optional commit user and author settings + # commit_user_name: kubbot # defaults to "github-actions[bot]" + # commit_user_email: 3293172751ysy@gmail.com # defaults to "41898282+github-actions[bot]@users.noreply.github.com" + # commit_author: Kubbot # defaults to author of the commit that triggered the run + continue-on-error: true + + - name: Set Current Directory + id: set_directory + run: | + echo "::set-output name=directory::$(pwd)" + continue-on-error: true + + - name: Collect Test Coverage File + id: collect_coverage + run: | + cd ${{ steps.set_directory.outputs.directory }} + make cover + echo "::set-output name=coverage_file::./_output/tmp/coverage.out" + continue-on-error: true + + - name: Display Test Coverage + run: | + echo "Test Coverage:" + cat ${{ steps.collect_coverage.outputs.coverage_file }} + continue-on-error: true + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v1 + continue-on-error: true + + openim-start: + name: Teat OpenIM make install start on ${{ matrix.os }} + runs-on: ${{ matrix.os }} + environment: + name: openim + strategy: + matrix: + go_version: ["1.20"] + os: ["ubuntu-latest"] + steps: + - name: Set up Go ${{ matrix.go_version }} + uses: actions/setup-go@v2 + with: + go-version: ${{ matrix.go_version }} + id: go + + - name: Check out code into the Go module directory + uses: actions/checkout@v2 + + - name: Run OpenIM make install start + run: | + sudo make install \ No newline at end of file diff --git a/.github/workflows/project-progress.yml b/.github/workflows/project-progress.yml index ad721a361..247404aa0 100644 --- a/.github/workflows/project-progress.yml +++ b/.github/workflows/project-progress.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. + # GitHub recommends pinning actions to a commit SHA. # To get a newer version, you will need to update the SHA. # You can also reference a tag or branch, but the action may change without warning. @@ -17,6 +31,6 @@ jobs: steps: - uses: alex-page/github-project-automation-plus@v0.8.3 with: - project: OpenIM 2023 Sprint 🔥 + 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/.github/workflows/release.yml b/.github/workflows/release.yml index 280804c94..c4f190766 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,4 +1,4 @@ -name: goreleaser +name: OpenIM Server Release on: push: @@ -8,8 +8,8 @@ on: permissions: contents: write - # packages: write - # issues: write + packages: write + issues: write jobs: goreleaser: @@ -35,3 +35,30 @@ jobs: # Your GoReleaser Pro key, if you are using the 'goreleaser-pro' # distribution: # GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }} + + goreleaser-check-pkgs: + runs-on: ubuntu-latest + env: + DOCKER_CLI_EXPERIMENTAL: "enabled" + needs: [ goreleaser ] + if: github.ref == 'refs/heads/main' + strategy: + matrix: + format: [ deb, rpm, apk ] + steps: + - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3 + with: + fetch-depth: 0 + - uses: arduino/setup-task@e26d8975574116b0097a1161e0fe16ba75d84c1c # v1 + with: + version: 3.x + repo-token: ${{ secrets.GITHUB_TOKEN }} + - uses: docker/setup-qemu-action@2b82ce82d56a2a04d2637cd93a637ae1b359c0a7 # v2 + - uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3 + with: + path: | + ./_output/dist/*.deb + ./_output/dist/*.rpm + ./_output/dist/*.apk + key: ${{ github.ref }} + - run: task goreleaser:test:${{ matrix.format }} \ No newline at end of file diff --git a/.github/workflows/scripts-test.yml b/.github/workflows/scripts-test.yml index 3b12f2d3c..badb33012 100644 --- a/.github/workflows/scripts-test.yml +++ b/.github/workflows/scripts-test.yml @@ -28,46 +28,45 @@ jobs: - name: Start Docker Compose run: | - docker compose stop - sleep 30 - docker compose up -d - sleep 60 + sudo docker compose stop + sudo sleep 30 + sudo docker compose up -d + sudo sleep 60 continue-on-error: true - name: Stop all services run: | - chmod +x ./scripts/stop_all.sh - ./scripts/stop_all.sh - cat logs/openIM.log 2>/dev/null + sudo chmod +x ./scripts/stop_all.sh + sudo ./scripts/stop_all.sh + sudo cat logs/openIM.log 2>/dev/null shell: bash continue-on-error: true - name: Build all services run: | - chmod +x ./scripts/build_all_service.sh - ./scripts/build_all_service.sh - cat logs/openIM.log 2>/dev/null + sudo chmod +x ./scripts/build_all_service.sh + sudo ./scripts/build_all_service.sh + sudo cat logs/openIM.log 2>/dev/null shell: bash - continue-on-error: true - name: Start all services run: | - chmod +x ./scripts/start_all.sh - ./scripts/start_all.sh - cat logs/openIM.log 2>/dev/null + sudo chmod +x ./scripts/start_all.sh + sudo ./scripts/start_all.sh + sudo cat logs/openIM.log 2>/dev/null continue-on-error: true shell: bash - name: Check all services run: | - chmod +x ./scripts/check_all.sh - ./scripts/check_all.sh - cat logs/openIM.log 2>/dev/null + sudo chmod +x ./scripts/check_all.sh + sudo ./scripts/check_all.sh + sudo cat logs/openIM.log 2>/dev/null shell: bash - name: Print openIM.log run: | - cat logs/* 2>/dev/null - cat logs/* 2>/dev/null >> "$GITHUB_OUTPUT" + sudo cat logs/* 2>/dev/null + sudo cat logs/* 2>/dev/null >> "$GITHUB_OUTPUT" shell: bash continue-on-error: true diff --git a/.gitignore b/.gitignore index e870d0a42..e6808d57e 100644 --- a/.gitignore +++ b/.gitignore @@ -22,6 +22,7 @@ logs .devcontainer components out-test +Dockerfile.cross ### Makefile ### tmp/ @@ -389,4 +390,5 @@ Sessionx.vim [._]*.un~ # End of https://www.toptal.com/developers/gitignore/api/go,git,vim,tags,test,emacs,backup,jetbrains -.idea \ No newline at end of file +.idea +dist/ 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/.goreleaser.yaml b/.goreleaser.yaml new file mode 100644 index 000000000..f9ca78474 --- /dev/null +++ b/.goreleaser.yaml @@ -0,0 +1,448 @@ +# This is an example .goreleaser.yml file with some sensible defaults. +# Make sure to check the documentation at https://goreleaser.com + +before: + hooks: + # You may remove this if you don't use go modules. + - make tidy + - make copyright.add + # you may remove this if you don't need go generate + - go generate ./... + +snapshot: + name_template: "{{ incpatch .Version }}-next" + +# gomod: +# proxy: true + +report_sizes: true + +# metadata: +# mod_timestamp: "{{ .CommitTimestamp }}" + +builds: + - binary: openim-api + id: openim-api + main: ./cmd/openim-api/main.go + goos: + - darwin + - windows + - linux + goarch: + - s390x + - mips64 + - mips64le + - amd64 + - ppc64le + - arm64 + goarm: + - 6 + - 7 + - binary: openim-cmdutils + id: openim-cmdutils + main: ./cmd/openim-cmdutils/main.go + goos: + - darwin + - windows + - linux + goarch: + - s390x + - mips64 + - mips64le + - amd64 + - ppc64le + - arm64 + goarm: + - 6 + - 7 + - binary: openim-crontask + id: openim-crontask + main: ./cmd/openim-crontask/main.go + goos: + - darwin + - windows + - linux + goarch: + - s390x + - mips64 + - mips64le + - amd64 + - ppc64le + - arm64 + goarm: + - 6 + - 7 + - binary: openim-msggateway + id: openim-msggateway + main: ./cmd/openim-msggateway/main.go + goos: + - darwin + - windows + - linux + goarch: + - s390x + - mips64 + - mips64le + - amd64 + - ppc64le + - arm64 + goarm: + - 6 + - 7 + - binary: openim-msgtransfer + id: openim-msgtransfer + main: ./cmd/openim-msgtransfer/main.go + goos: + - darwin + - windows + - linux + goarch: + - s390x + - mips64 + - mips64le + - amd64 + - ppc64le + - arm64 + goarm: + - 6 + - 7 + - binary: openim-push + id: openim-push + main: ./cmd/openim-push/main.go + goos: + - darwin + - windows + - linux + goarch: + - s390x + - mips64 + - mips64le + - amd64 + - ppc64le + - arm64 + goarm: + - 6 + - 7 + - binary: openim-rpc-auth + id: openim-rpc-auth + main: ./cmd/openim-rpc/openim-rpc-auth/main.go + goos: + - darwin + - windows + - linux + goarch: + - s390x + - mips64 + - mips64le + - amd64 + - ppc64le + - arm64 + goarm: + - 6 + - 7 + - binary: openim-rpc-conversation + id: openim-rpc-conversation + main: ./cmd/openim-rpc/openim-rpc-conversation/main.go + goos: + - darwin + - windows + - linux + goarch: + - s390x + - mips64 + - mips64le + - amd64 + - ppc64le + - arm64 + goarm: + - 6 + - 7 + - binary: openim-rpc-friend + id: openim-rpc-friend + main: ./cmd/openim-rpc/openim-rpc-friend/main.go + goos: + - darwin + - windows + - linux + goarch: + - s390x + - mips64 + - mips64le + - amd64 + - ppc64le + - arm64 + goarm: + - 6 + - 7 + - binary: openim-rpc-group + id: openim-rpc-group + main: ./cmd/openim-rpc/openim-rpc-group/main.go + goos: + - darwin + - windows + - linux + goarch: + - s390x + - mips64 + - mips64le + - amd64 + - ppc64le + - arm64 + goarm: + - 6 + - 7 + - binary: openim-rpc-msg + id: openim-rpc-msg + main: ./cmd/openim-rpc/openim-rpc-msg/main.go + goos: + - darwin + - windows + - linux + goarch: + - s390x + - mips64 + - mips64le + - amd64 + - ppc64le + - arm64 + goarm: + - 6 + - 7 + - binary: openim-rpc-third + id: openim-rpc-third + main: ./cmd/openim-rpc/openim-rpc-third/main.go + goos: + - darwin + - windows + - linux + goarch: + - s390x + - mips64 + - mips64le + - amd64 + - ppc64le + - arm64 + goarm: + - 6 + - 7 + - binary: openim-rpc-user + id: openim-rpc-user + main: ./cmd/openim-rpc/openim-rpc-user/main.go + goos: + - darwin + - windows + - linux + goarch: + - s390x + - mips64 + - mips64le + - amd64 + - ppc64le + - arm64 + goarm: + - 6 + - 7 + +archives: + - format: tar.gz + # this name template makes the OS and Arch compatible with the results of uname. + name_template: >- + {{ .ProjectName }}_ + {{- title .Os }}_ + {{- if eq .Arch "amd64" }}x86_64 + {{- else if eq .Arch "386" }}i386 + {{- else }}{{ .Arch }}{{ end }} + {{- if .Arm }}v{{ .Arm }}{{ end }} + # use zip for windows archives + files: + - LICENSE + - README.md + - CHANGELOG/* + - CONTRIBUTING.md + - docs/* + - src: "*.md" + dst: docs + + # Strip parent folders when adding files to the archive. + strip_parent: true + + # File info. + # Not all fields are supported by all formats available formats. + # + # Default: copied from the source file + info: + # Templates: allowed (since v1.14) + owner: root + + # Templates: allowed (since v1.14) + group: root + + # Must be in time.RFC3339Nano format. + # + # Templates: allowed (since v1.14) + mtime: "{{ .CommitDate }}" + + # File mode. + mode: 0644 + + format_overrides: + - goos: windows + format: zip + +changelog: + sort: asc + use: github + filters: + exclude: + - "^test:" + - "^chore" + - "merge conflict" + - Merge pull request + - Merge remote-tracking branch + - Merge branch + - go mod tidy + groups: + - title: Dependency updates + regexp: '^.*?(feat|fix)\(deps\)!?:.+$' + order: 300 + - title: "New Features" + regexp: '^.*?feat(\([[:word:]]+\))??!?:.+$' + order: 100 + - title: "Security updates" + regexp: '^.*?sec(\([[:word:]]+\))??!?:.+$' + order: 150 + - title: "Bug fixes" + regexp: '^.*?fix(\([[:word:]]+\))??!?:.+$' + order: 200 + - title: "Documentation updates" + regexp: ^.*?doc(\([[:word:]]+\))??!?:.+$ + order: 400 + - title: "Build process updates" + regexp: ^.*?build(\([[:word:]]+\))??!?:.+$ + order: 400 + - title: Other work + order: 9999 + + +nfpms: + - id: packages + builds: + - openim-api + - openim-cmdutils + - openim-crontask + - openim-msggateway + - openim-msgtransfer + - openim-push + - openim-rpc-auth + - openim-rpc-conversation + - openim-rpc-friend + - openim-rpc-group + - openim-rpc-msg + - openim-rpc-third + - openim-rpc-user + # Your app's vendor. + vendor: OpenIMSDK + homepage: https://github.com/OpenIMSDK/Open-IM-Server + maintainer: kubbot + description: |- + Auto sync github labels + kubbot && openimbot + license: MIT + formats: + - apk + - deb + - rpm + - termux.deb # Since: v1.11 + - archlinux # Since: v1.13 + dependencies: + - git + recommends: + - golang + + +# The lines beneath this are called `modelines`. See `:help modeline` +# Feel free to remove those if you don't want/use them. +# yaml-language-server: $schema=https://goreleaser.com/static/schema.json +# vim: set ts=2 sw=2 tw=0 fo=cnqoj + +# Default: './dist' +dist: ./_output/dist + +# .goreleaser.yaml +milestones: + # You can have multiple milestone configs + - + # Repository for the milestone + # Default is extracted from the origin remote URL + repo: + owner: user + name: repo + + # Whether to close the milestone + close: true + + # Fail release on errors, such as missing milestone. + fail_on_error: false + + # Name of the milestone + # + # Default: '{{ .Tag }}' + name_template: "Current Release" + +# publishers: +# - name: "fury.io" +# ids: +# - packages +# dir: "{{ dir .ArtifactPath }}" +# cmd: | +# bash -c ' +# if [[ "{{ .Tag }}" =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then +# curl -F package=@{{ .ArtifactName }} https://{{ .Env.FURY_TOKEN }}@push.fury.io/{{ .Env.USERNAME }}/ +# else +# echo "Skipping deployment: Non-production release detected" +# fi' + +checksum: + name_template: "{{ .ProjectName }}_checksums.txt" + algorithm: sha256 + +release: + footer: | + **Full Changelog**: https://github.com/OpenIMSDK/Open-IM-Server/compare/{{ .PreviousTag }}...{{ .Tag }} + + ## Helping out + + This release is only possible thanks to **all** the support of some **awesome people**! + + 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. + +

+ + + + + + + + + +

+ + + ## Contact Us + + 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. + + 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. + + 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. + + In addition to Slack, we also offer the following ways to get in touch: + + + : 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. + + Whether you're looking to join our community or have any questions or suggestions, we welcome you to get in touch with us. diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 24793b187..85f92bb36 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -130,7 +130,7 @@ To propose PR for the Open-IM-Server item, we assume you have registered a GitHu ```bash ❯ git rebase upstream/main - ❯ make link # golangci-lint run -c .golangci.yml + ❯ make lint # golangci-lint run -c .golangci.yml ❯ git add -A # add changes to staging ❯ git commit -a -s -m "message for your changes" # -s adds a Signed-off-by trailer ``` diff --git a/Dockerfile b/Dockerfile index 230b9d6d6..33c4651c9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,9 @@ # Build Stage -FROM golang as build +FROM golang:1.20 AS builder + +LABEL org.opencontainers.image.source=https://github.com/OpenIMSDK/Open-IM-Server +LABEL org.opencontainers.image.description="OpenIM Server image" +LABEL org.opencontainers.image.licenses="Apache 2.0" # Set go mod installation source and proxy ARG GO111MODULE=on @@ -24,9 +28,9 @@ RUN apk --no-cache add tzdata VOLUME ["/Open-IM-Server/logs", "/Open-IM-Server/config", "/Open-IM-Server/scripts", "/Open-IM-Server/db/sdk"] # Copy scripts and binary files to the production image -COPY --from=build /Open-IM-Server/scripts /Open-IM-Server/scripts -COPY --from=build /Open-IM-Server/_output/bin/platforms/linux/arm64 /Open-IM-Server/_output/bin/platforms/linux/arm64 +COPY --from=builder /Open-IM-Server/scripts /Open-IM-Server/scripts +COPY --from=builder /Open-IM-Server/_output/bin/platforms/linux/amd64 /Open-IM-Server/_output/bin/platforms/linux/amd64 WORKDIR /Open-IM-Server/scripts -CMD ["./docker_start_all.sh"] +CMD ["docker_start_all.sh"] \ No newline at end of file diff --git a/Makefile b/Makefile index d1c733717..74e183543 100644 --- a/Makefile +++ b/Makefile @@ -63,6 +63,11 @@ build: multiarch: @$(MAKE) go.build.multiarch +## install: Install deployment openim ✨ +.PHONY: install +install: + @$(MAKE) go.install + ## tidy: tidy go.mod ✨ .PHONY: tidy tidy: diff --git a/README-zh_CN.md b/README-zh_CN.md index 1cdd0a52e..b9b58deec 100644 --- a/README-zh_CN.md +++ b/README-zh_CN.md @@ -26,12 +26,14 @@ ## Open-IM-Server 是什么 -Open-IM-Server 是一款即时通讯服务器,使用纯 Golang 开发,采用 JSON over WebSocket 传输协议。在 Open-IM-Server 中,所有东西都是消息,因此您可以轻松扩展自定义消息,而无需修改服务器代码。使用微服务架构,Open-IM-Server 可以使用集群进行部署。通过在客户端服务器上部署 Open-IM-Server,开发人员可以免费快速地将即时通讯和实时网络功能集成到自己的应用程序中,并确保业务数据的安全性和隐私性。 +Open-IM-Server 是一款即时通讯服务器,使用纯 Golang 开发,采用 JSON over WebSocket 传输协议。在 Open-IM-Server 中,所有东西都是消息,因此您可以轻松扩展自定义消息,而无需修改服务器代码。使用微服务架构,Open-IM-Server 可以使用集群进行部署。通过在服务器上部署 Open-IM-Server,开发人员可以快速地将即时通讯和实时网络功能集成到自己的应用程序中,并确保业务数据的安全性和隐私性。 + +Open-IM-Server并不是一个独立的产品,本身不包含账号的注册和登录服务。 +为方便大家测试,我们开源了包括登录注册功能的 [chat 仓库](https://github.com/OpenIMSDK/chat),chat 业务服务端和 Open-IM-Server 一起部署,即可搭建一个聊天产品。 ## 特点 -+ 免费 -+ 可扩展架构 ++ 开源 + 易于集成 + 良好的可扩展性 + 高性能 @@ -40,137 +42,207 @@ Open-IM-Server 是一款即时通讯服务器,使用纯 Golang 开发,采用 ## 社区 -+ 访问中文官方网站:[Open-IM中文开发文档](https://doc.rentsoft.cn/) ++ 访问中文官方网站:[OpenIM中文开发文档](https://doc.rentsoft.cn/) ## 快速开始 -### 安装Open-IM-Server - -> Open-IM 依赖于五个开源高性能组件:ETCD、MySQL、MongoDB、Redis 和 Kafka。在部署 Open-IM-Server 之前,请确保已安装上述五个组件。如果您的服务器没有上述组件,则必须首先安装缺失组件。如果您已经拥有上述组件,则建议直接使用它们。如果没有,则建议使用 Docker-compose,无需安装依赖项,一键部署,更快更方便。 - -### 使用 Docker 部署 - -1. 安装 [Go 环境](https://golang.org/doc/install)。确保 Go 版本至少为 1.17。 +### 使用 docker-compose 部署 -2. 克隆 Open-IM 项目到您的服务器 +1. 克隆项目 - `git clone --recursive` +``` +git clone https://github.com/OpenIMSDK/Open-IM-Server +cd Open-IM-Server +git checkout release-v3.0 #or other release branch +``` -3. 部署 +2. 修改 .env - 1. 修改 env +``` +此处主要修改相关组件密码 +USER=root #不用修改 +PASSWORD=openIM123 #8位以上的数字和字母组合密码,密码对redis mysql mongo生效,以及config/config.yaml中的accessSecret +ENDPOINT=http://127.0.0.1:10005 #minio对外服务的ip和端口,或用域名storage.xx.xx,app要能访问到此ip和端口或域名, +API_URL=http://127.0.0.1:10002/object/ #app要能访问到此ip和端口或域名, +DATA_DIR=./ #指定大磁盘目录 +``` - ``` - #cd Open-IM-server - USER=root - PASSWORD=openIM123 #密码至少8位数字,不包括特殊字符 - ENDPOINT=http://127.0.0.1:10005 #请用互联网IP替换127.0.0.1 - DATA_DIR=./ - ``` +3. 部署和启动 - 2. 部署和启动 +注意:此命令只能执行一次,它会根据.env 中的 PASSWORD 变量修改 docker-compose 中组件密码,并修改 config/config.yaml 中的组件密码 +如果.env 中的密码变了,需要先 docker-compose down ; rm components -rf 后再执行此命令。 - ``` - chmod +x install_im_server.sh; - ./install_im_server.sh; - ``` +``` +chmod +x install_im_server.sh; +./install_im_server.sh; +``` - 3. 检查服务 +4. 检查服务 - ``` - cd scripts; - ./docker_check_service.sh - ./check_all.sh - ``` +``` +cd scripts; +./docker_check_service.sh +``` - ![https://github.com/OpenIMSDK/Open-IM-Server/blob/main/docs/Open-IM-Servers-on-System.png](https://github.com/OpenIMSDK/Open-IM-Server/blob/main/docs/Open-IM-Servers-on-System.png) +![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) -### 使用源代码部署 +### 使用源码编译 -1. Go 1.17 或更高版本。 +1. Go 1.18或更高版本。 2. 克隆 ``` - git clone --recursive - cd cmd/openim-sdk-core - git checkout main + git clone https://github.com/OpenIMSDK/Open-IM-Server + cd Open-IM-Server + git checkout release-v3.0 #or other release branch ``` -3. 设置可执行权限 +3. 编译 ``` - cd ../../scripts/ + cd Open-IM-server/scripts chmod +x *.sh + ./build_all_service.sh ``` -4. 构建 - - ``` - ./batch_build_all_service.sh - ``` - -所有服务已成功构建 - -### 配置说明 - -> Open-IM 配置分为基本组件配置和业务内部服务配置。当使用产品时,开发人员需要将每个组件的地址填写为其服务器组件的地址,并确保业务内部服务端口未被占用。 - -### 基本组件配置说明 - -+ ETCD - + Etcd 用于 RPC 服务的发现和注册,Etcd Schema 是注册名称的前缀,建议将其修改为公司名称,Etcd 地址(ip+port)支持集群部署,可以填写多个 ETCD 地址,也可以只有一个 etcd 地址。 +所有服务已成功构建如图所示 + +![编译成功](https://github.com/OpenIMSDK/Open-IM-Server/blob/main/docs/images/build.png) + +### 组件配置说明 + +config/config.yaml中针对存储组件有详细的配置说明 + ++ Zookeeper + + 用于RPC 服务发现和注册,支持集群。 + + ```` + ``` + zookeeper: + schema: openim #不建议修改 + address: [ 127.0.0.1:2181 ] #地址 + username: #用户名 + password: #密码 + ``` + ```` + + + + MySQL - + MySQL 用于消息和用户关系的全存储,暂时不支持集群部署。修改地址、用户、密码和数据库名称。 + + + 用于存储用户、关系链、群组,支持数据库主备。 + + ``` + mysql: + address: [ 127.0.0.1:13306 ] #地址 + username: root #用户名 + password: openIM123 #密码 + database: openIM_v2 #不建议修改 + maxOpenConn: 1000 #最大连接数 + maxIdleConn: 100 #最大空闲连接数 + maxLifeTime: 60 #连接可以重复使用的最长时间(秒) + logLevel: 4 #日志级别 1=slient 2=error 3=warn 4=info + slowThreshold: 500 #慢语句阈值 (毫秒) + ``` + + + + Mongo - + Mongo 用于消息的离线存储,默认存储 7 天。暂时不支持集群部署。只需修改地址和数据库名称即可。 + + 用于存储离线消息,支持mongo分片集群。 + + ``` + mongo: + uri: #不为空则直接使用该值 + address: [ 127.0.0.1:37017 ] #地址 + database: openIM #mongo db 默认即可 + username: root #用户名 + password: openIM123 #密码 + maxPoolSize: 100 #最大连接数 + ``` + + Redis - + Redis 目前主要用于消息序列号存储和用户令牌信息存储。暂时不支持集群部署。只需修改相应的 Redis 地址和密码即可。 + + 用于存储消息序列号、最新消息、用户token及mysql缓存,支持集群部署。 + + ``` + redis: + address: [ 127.0.0.1:16379 ] #地址 + username: #用户名 + password: openIM123 #密码 + ``` + + Kafka - + Kafka 用作消息传输存储队列,支持集群部署,只需修改相应的地址。 - -### 内部服务配置说明 + + 用于消息队列,用于消息解耦,支持集群部署。 + + ``` + kafka: + username: #用户名 + password: #密码 + addr: [ 127.0.0.1:9092 ] #地址 + latestMsgToRedis: + topic: "latestMsgToRedis" + offlineMsgToMongo: + topic: "offlineMsgToMongoMysql" + msgToPush: + topic: "msqToPush" + msgToModify: + topic: "msgToModify" + consumerGroupID: + msgToRedis: redis + msgToMongo: mongo + msgToMySql: mysql + msgToPush: push + msgToModify: modify + ``` -+ credential&&push - + Open-IM 需要使用三方离线推送功能。目前使用的是腾讯的三方推送,支持 IOS、Android 和 OSX 推送。这些信息是腾讯推送的一些注册信息,开发人员需要去腾讯云移动推送注册相应的信息。如果您没有填写相应的信息,则无法使用离线消息推送功能。 -+ api&&rpcport&&longconnsvr&&rpcregistername - + API 端口是 HTTP 接口,longconnsvr 是 WebSocket 监听端口,rpcport 是内部服务启动端口。两者都支持集群部署。请确保这些端口未被使用。如果要为单个服务打开多个服务,请填写多个以逗号分隔的端口。rpcregistername 是每个服务在注册表 Etcd 中注册的服务名称,无需修改。 -+ log&&modulename - + 日志配置包括日志文件的存储路径,日志发送到 Elasticsearch 进行日志查看。目前不支持将日志发送到 Elasticsearch。暂时不需要修改配置。modulename 用于根据服务模块的名称拆分日志。默认配置可以。 +### 启停服务 -### 脚本说明 +启动服务 -> Open-IM 脚本提供服务编译、启动和停止脚本。有四个 Open-IM 脚本启动模块,一个是 http+rpc 服务启动模块,第二个是 WebSocket 服务启动模块,然后是 msg_transfer 模块,最后是 push 模块。 +``` +./start_all.sh; +``` -+ path_info.sh&&style_info.sh&& +检查服务 - functions.sh +``` +./check_all.sh +``` - + 包含每个模块的路径信息,包括源代码所在的路径、服务启动名称、shell 打印字体样式以及一些用于处理 shell 字符串的函数。 +停止服务 -+ build_all_service.sh +``` +./stop_all.sh +``` - + 编译模块,将 Open-IM 的所有源代码编译为二进制文件并放入 bin 目录。 +### 开放 IM 端口 -+ start_rpc_api_service.sh&&msg_gateway_start.sh&&msg_transfer_start.sh&&push_start.sh +| TCP 端口 | 说明 | 操作 | +| --------- | ----------------------------------------------------- | --------------------------------------- | +| TCP:10001 | ws 协议,消息端口,如消息发送、推送等,用于客户端 SDK | 端口放行或 nginx 反向代理,并关闭防火墙 | +| TCP:10002 | api 端口,如用户、好友、群组、消息等接口。 | 端口放行或 nginx 反向代理,并关闭防火墙 | +| TCP:10005 | 选择 minio 存储时需要(openIM 默认使用 minio 存储) | 端口放行或 nginx 反向代理,并关闭防火墙 | - + 独立脚本启动模块,后跟 API 和 RPC 模块、消息网关模块、消息传输模块和推送模块。 +### 开放 Chat 端口 -+ start_all.sh&&stop_all.sh +| TCP 端口 | 说明 | 操作 | +| --------- | ------------------------ | --------------------------------------- | +| TCP:10008 | 业务系统,如注册、登录等 | 端口放行或 nginx 反向代理,并关闭防火墙 | +| TCP:10009 | 管理后台,如统计、封号等 | 端口放行或 nginx 反向代理,并关闭防火墙 | - + 总脚本,启动所有服务和关闭所有服务。 +## APP和OpenIM关系 -## 认证流程图 +OpenIM 是开源的即时通讯组件,它并不是一个独立的产品,此图展示了AppServer、AppClient、Open-IM-Server以及Open-IM-SDK之间的关系 -![https://github.com/OpenIMSDK/Open-IM-Server/blob/main/docs/open-im-server.png](https://github.com/OpenIMSDK/Open-IM-Server/blob/main/docs/open-im-server.png) +![https://github.com/OpenIMSDK/Open-IM-Server/blob/main/docs/open-im-server.png](https://github.com/OpenIMSDK/Open-IM-Server/blob/main/docs/images/open-im-server.png) -## 架构 +## 整体架构 -![https://github.com/OpenIMSDK/Open-IM-Server/blob/main/docs/Architecture.jpg](https://github.com/OpenIMSDK/Open-IM-Server/blob/main/docs/Architecture.jpg) +![https://github.com/OpenIMSDK/Open-IM-Server/blob/main/docs/Architecture.jpg](https://github.com/OpenIMSDK/Open-IM-Server/blob/main/docs/images/Architecture.jpg) ## 开始开发 OpenIM -[社区存储库](https://github.com/OpenIMSDK/community)包含有关从源代码构建 Kubernetes、如何贡献代码和文档、有关什么的联系人等所有信息。 +[社区存储库](https://github.com/OpenIMSDK/community)包含有关从源代码构建 Kubernetes、如何贡献代码和文档。 ## 贡献 diff --git a/README.md b/README.md index b180f4438..c4a4318b2 100644 --- a/README.md +++ b/README.md @@ -3,6 +3,7 @@

+

⭐️ Open source Instant Messaging Server ⭐️

@@ -28,142 +29,215 @@ ## What is Open-IM-Server -Instant messaging server. Backend in pure Golang, wire transport protocol is JSON over websocket. -Everything is a message in Open-IM-Server, so you can extend custom messages easily, there is no need to modify the server code. -Using microservice architectures, Open-IM-Server can be deployed using clusters. -By deployment of the Open-IM-Server on the customer's server, developers can integrate instant messaging and real-time network capabilities into their own applications free of charge and quickly, and ensure the security and privacy of business data. +Open-IM-Server is an instant messaging server developed using pure Golang, adopting JSON over WebSocket as the communication protocol. In Open-IM-Server, everything is a message, so you can easily extend custom messages without modifying the server code. With a microservice architecture, Open-IM-Server can be deployed using clusters. By deploying Open-IM-Server on a server, developers can quickly integrate instant messaging and real-time networking features into their applications, ensuring the security and privacy of business data. + +Open-IM-Server is not a standalone product and does not include account registration and login services. For your convenience, we have open-sourced the [chat repository](https://github.com/OpenIMSDK/chat) which includes login and registration functionality. By deploying the chat business server alongside Open-IM-Server, a chat product can be set up. ## Features -- Everything in Free -- Scalable architecture -- Easy integration -- Good scalability +- Open source +- Easy to integrate +- Excellent scalability - High performance - Lightweight - Supports multiple protocols ## Community -- Visit the Chinese official website here: [📚 Open-IM docs](https://www.openim.online/zh) +- Visit the official website: [OpenIM Developer Documentation](https://www.openim.online/) -## Quick start +## Quick Start -### Installing Open-IM-Server +### Deploying with docker-compose -> Open-IM relies on five open source high-performance components: ETCD, MySQL, MongoDB, Redis, and Kafka. Privatization deployment Before Open-IM-Server, please make sure that the above five components have been installed. If your server does not have the above components, you must first install Missing components. If you have the above components, it is recommended to use them directly. If not, it is recommended to use Docker-compose, no To install dependencies, one-click deployment, faster and more convenient. +1. Clone the project -#### Deploy using Docker +``` +clone https://github.com/OpenIMSDK/Open-IM-Server +cd Open-IM-Server +git checkout release-v3.0 #or other release branch +``` -1. Install [Go environment](https://golang.org/doc/install). Make sure Go version is at least 1.17 +1. Modify .env -2. Clone the Open-IM project to your server +``` +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, +API_URL=http://127.0.0.1:10002/object/ #the app must be able to access this IP and port or domain, +DATA_DIR=./ #designate large disk directory +``` - ``` - git clone https://github.com/OpenIMSDK/Open-IM-Server.git --recursive - ``` +1. Deploy and start -3. Deploy - - 1. Modify env - - ``` - #cd Open-IM-server - USER=root - PASSWORD=openIM123 #Password with more than 8 digits, excluding special characters - ENDPOINT=http://127.0.0.1:10005 #Replace 127.0.0.1 with Internet IP - DATA_DIR=./ - ``` - - 2. Deploy && Start - - ``` - chmod +x install_im_server.sh; - ./install_im_server.sh; - ``` - - 4. Check service - - ``` - cd scripts; - ./docker_check_service.sh./check_all.sh - ``` - - ![OpenIMServersonSystempng](https://github.com/OpenIMSDK/Open-IM-Server/blob/main/docs/images/Open-IM-Servers-on-System.png) - -#### Deploy using source code - -1. Go 1.17 or above. -2. Clone +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. -```shell -git clone https://github.com/OpenIMSDK/Open-IM-Server.git --recursive -cd cmd/openim-sdk-core -git checkout main +``` +chmod +x install_im_server.sh; +./install_im_server.sh; ``` -1. Set executable permissions +1. Check the service -```shell -cd ../../scripts/ -chmod +x *.sh +``` +cd scripts; +./docker_check_service.sh ``` -1. build +![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) -```shell -./batch_build_all_service.sh -``` -all services build success -### CONFIGURATION INSTRUCTIONS +### Compile from source + +1. Go 1.18 or higher version. + +2. Clone + + ``` + git clone https://github.com/OpenIMSDK/Open-IM-Server + cd Open-IM-Server + git checkout release-v3.0 #or other release branch + ``` + +3. Compile + + ``` + cd Open-IM-server/scripts + chmod +x *.sh + ./build_all_service.sh + ``` + +All services have been successfully built as shown in the figure + +![Successful Compilation](https://github.com/OpenIMSDK/Open-IM-Server/blob/main/docs/images/build.png) -> Open-IM configuration is divided into basic component configuration and business internal service configuration. Developers need to fill in the address of each component as the address of their server component when using the product, and ensure that the internal service port of the business is not occupied +### Component Configuration Instructions -#### Basic Component Configuration Instructions +The config/config.yaml file has detailed configuration instructions for the storage components. + +- Zookeeper + + - Used for RPC service discovery and registration, cluster support. + + ``` + zookeeper: + schema: openim #Not recommended to modify + address: [ 127.0.0.1:2181 ] #address + username: #username + password: #password + ``` -- ETCD - - Etcd is used for the discovery and registration of rpc services, etcd Schema is the prefix of the registered name, it is recommended to modify it to your company name, etcd address (ip+port) supports clustered deployment, you can fill in multiple ETCD addresses separated by commas, and also only one etcd address. - MySQL - - mysql is used for full storage of messages and user relationships. Cluster deployment is not supported for the time being. Modify addresses and users, passwords, and database names. + + - Used for storing users, relationships, and groups, supports master-slave database. + + ``` + mysql: + address: [ 127.0.0.1:13306 ] #address + username: root #username + password: openIM123 #password + database: openIM_v2 #Not recommended to modify + maxOpenConn: 1000 #maximum connection + maxIdleConn: 100 #maximum idle connection + maxLifeTime: 60 #maximum time a connection can be reused (seconds) + logLevel: 4 #log level 1=slient 2=error 3=warn 4=info + slowThreshold: 500 #slow statement threshold (milliseconds) + ``` + - Mongo - - Mongo is used for offline storage of messages. The default storage is 7 days. Cluster deployment is temporarily not supported. Just modify the address and database name. + + - Used for storing offline messages, supports mongo sharded clusters. + + ``` + mongo: + uri: #Use this value directly if not empty + address: [ 127.0.0.1:37017 ] #address + database: openIM #default mongo db + username: root #username + password: openIM123 #password + maxPoolSize: 100 #maximum connections + ``` + - Redis - - Redis is currently mainly used for message serial number storage and user token information storage. Cluster deployment is temporarily not supported. Just modify the corresponding redis address and password. + + - Used for storing message sequence numbers, latest messages, user tokens, and mysql cache, supports cluster deployment. + + ``` + redis: + address: [ 127.0.0.1:16379 ] #address + username: #username + password: openIM123 #password + ``` + - Kafka - - Kafka is used as a message transfer storage queue to support cluster deployment, just modify the corresponding address -#### Internal Service Configuration Instructions + - Used for message queues, for message decoupling, supports cluster deployment. + + ``` + kafka: + username: #username + password: #password + addr: [ 127.0.0.1:9092 ] #address + latestMsgToRedis: + topic: "latestMsgToRedis" + offlineMsgToMongo: + topic: "offlineMsgToMongoMysql" + msgToPush: + topic: "msqToPush" + msgToModify: + topic: "msgToModify" + consumerGroupID: + msgToRedis: redis + msgToMongo: mongo + msgToMySql: mysql + msgToPush: push + msgToModify: modify + ``` + +### Start and Stop Services + +Start services + +``` +./start_all.sh; +``` + +Check services + +``` +./check_all.sh +``` + +Stop services + +``` +./stop_all.sh +``` + +### Open IM Ports -- credential&&push - - The Open-IM needs to use the three-party offline push function. Currently, Tencent's three-party push is used. It supports IOS, Android and OSX push. This information is some registration information pushed by Tencent. Developers need to go to Tencent Cloud Mobile Push to register the corresponding information. If you do not fill in the corresponding information, you cannot use the offline message push function -- api&&rpcport&&longconnsvr&&rpcregistername - - The api port is the http interface, longconnsvr is the websocket listening port, and rpcport is the internal service startup port. Both support cluster deployment. Make sure that these ports are not used. If you want to open multiple services for a single service, fill in multiple ports separated by commas. rpcregistername is the service name registered by each service to the registry etcd, no need to modify -- log&&modulename - - The log configuration includes the storage path of the log file, and the log is sent to elasticsearch for log viewing. Currently, the log is not supported to be sent to elasticsearch. The configuration does not need to be modified for the time being. The modulename is used to split the log according to the name of the service module. The default configuration is fine. -- multiloginpolicy&&tokenpolicy - - Open-IM supports multi-terminal login. Currently, there are three multi-terminal login policies. The PC terminal and the mobile terminal are online at the same time by default. When multiple policies are configured to be true, the first policy with true is used by default, and the token policy is the generated token policy. , The developer can customize the expiration time of the token +| TCP Port | Description | Operation | +| --------- | ------------------------------------------------------------ | ----------------------------------------------------- | +| TCP:10001 | ws protocol, message port such as message sending, pushing etc, used for client SDK | Port release or nginx reverse proxy, and firewall off | +| TCP:10002 | api port, such as user, friend, group, message interfaces. | Port release or nginx reverse proxy, and firewall off | +| TCP:10005 | Required when choosing minio storage (openIM uses minio storage by default) | Port release or nginx reverse proxy, and firewall off | -### scripts DESCRIPTION +### Open Chat Ports -> Open-IM scripts provides service compilation, start, and stop scripts. There are four Open-IM scripts start modules, one is the http+rpc service start module, the second is the websocket service start module, then the msg_transfer module, and the last is the push module +| TCP Port | Description | Operation | +| --------- | --------------------------------------------------- | ----------------------------------------------------- | +| TCP:10008 | Business system, such as registration, login etc | Port release or nginx reverse proxy, and firewall off | +| TCP:10009 | Management backend, such as statistics, banning etc | Port release or nginx reverse proxy, and firewall off | -- path_info.sh&&style_info.sh&&functions.sh - - Contains the path information of each module, including the path where the source code is located, the name of the service startup, the shell print font style, and some functions for processing shell strings -- build_all_service.sh - - Compile the module, compile all the source code of Open-IM into a binary file and put it into the bin directory -- start_rpc_api_service.sh&&msg_gateway_start.sh&&msg_transfer_start.sh&&push_start.sh - - Independent scripts startup module, followed by api and rpc modules, message gateway module, message transfer module, and push module -- start_all.sh&&stop_all.sh - - Total scripts, start all services and close all services +## Relationship Between APP and OpenIM -## Authentication Clow Chart +OpenIM is an open source instant messaging component, it is not an independent product. This image shows the relationship between AppServer, AppClient, Open-IM-Server and Open-IM-SDK. -![avatar](https://github.com/OpenIMSDK/Open-IM-Server/blob/main/docs/images/open-im-server.png) +![https://github.com/OpenIMSDK/Open-IM-Server/blob/main/docs/open-im-server.png](https://github.com/OpenIMSDK/Open-IM-Server/blob/main/docs/images/open-im-server.png) -## Architecture +## Overall Architecture -![avatar](https://github.com/OpenIMSDK/Open-IM-Server/blob/main/docs/images/Architecture.jpg) +![https://github.com/OpenIMSDK/Open-IM-Server/blob/main/docs/Architecture.jpg](https://github.com/OpenIMSDK/Open-IM-Server/blob/main/docs/images/Architecture.jpg) ## To start developing OpenIM The [community repository](https://github.com/OpenIMSDK/community) hosts all information about building Kubernetes from source, how to contribute code and documentation, who to contact about what, etc. @@ -182,7 +256,7 @@ We take notes of each [biweekly meeting](https://github.com/OpenIMSDK/Open-IM-Se ## Who are using Open-IM-Server The [user case studies](https://github.com/OpenIMSDK/community/blob/main/ADOPTERS.md) page includes the user list of the project. You can leave a [📝comment](https://github.com/OpenIMSDK/Open-IM-Server/issues/379) to let us know your use case. -![avatar](https://github.com/OpenIMSDK/OpenIM-Docs/blob/main/docs/images/WechatIMG20.jpeg) +![avatar](https://openim-1253691595.cos.ap-nanjing.myqcloud.com/WechatIMG20.jpeg) ## License diff --git a/assets/logo-gif/openim-logo.gif b/assets/logo-gif/openim-logo.gif index 42d7d6536..f4b4817c4 100644 Binary files a/assets/logo-gif/openim-logo.gif and b/assets/logo-gif/openim-logo.gif differ diff --git a/cmd/openim-api/main.go b/cmd/openim-api/main.go index 1cd09b652..c967906e9 100644 --- a/cmd/openim-api/main.go +++ b/cmd/openim-api/main.go @@ -18,22 +18,22 @@ import ( "context" "fmt" "net" + "net/http" "os" "runtime" "strconv" "time" - "net/http" _ "net/http/pprof" "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 45f3b7179..10d43bd3e 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: #用户名 @@ -74,12 +74,12 @@ api: object: enable: "minio" #使用minio - apiURL: "http://127.0.0.1:10002/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 #过期时间(天) diff --git a/docker-compose.yaml b/docker-compose.yaml index 66e12ba97..cd80dbf19 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -100,7 +100,7 @@ services: openim_server: - image: ghcr.io/openimsdk/openim-server:v3.0.0-rc.2 + image: ghcr.io/openimsdk/openim-server:v3.0 container_name: openim-server volumes: - ./logs:/Open-IM-Server/logs @@ -124,7 +124,7 @@ services: max-file: "2" openim_chat: - image: openim/openim_chat:v1.1.0 + image: ghcr.io/openimsdk/openim-chat:v1.0.0 container_name: openim_chat restart: always depends_on: 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/docs/images/build.png b/docs/images/build.png new file mode 100644 index 000000000..7c5914c82 Binary files /dev/null and b/docs/images/build.png differ diff --git a/docs/images/docker_build.png b/docs/images/docker_build.png new file mode 100644 index 000000000..f4be10f68 Binary files /dev/null and b/docs/images/docker_build.png differ diff --git a/go.mod b/go.mod index 8a7fd7153..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.32.0 - github.com/bwmarrin/snowflake v0.3.0 + github.com/Shopify/sarama v1.29.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,15 +131,12 @@ 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 ) - -replace github.com/Shopify/sarama => github.com/Shopify/sarama v1.29.0 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/golangci.yaml b/golangci.yaml deleted file mode 100644 index 1cf6a2ab2..000000000 --- a/golangci.yaml +++ /dev/null @@ -1,933 +0,0 @@ -# Copyright © 2023 OpenIMSDK open source community. All rights reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# This file contains all available configuration options -# with their default values. - -# options for analysis running -run: - # default concurrency is a available CPU number - concurrency: 4 - - # timeout for analysis, e.g. 30s, 5m, default is 1m - timeout: 5m - - # exit code when at least one issue was found, default is 1 - issues-exit-code: 1 - - # include test files or not, default is true - tests: true - - # list of build tags, all linters use it. Default is empty list. - build-tags: - - mytag - - # which dirs to skip: issues from them won't be reported; - # can use regexp here: generated.*, regexp is applied on full path; - # default value is empty list, but default dirs are skipped independently - # from this option's value (see skip-dirs-use-default). - # "/" will be replaced by current OS file path separator to properly work - # on Windows. - skip-dirs: - - util - - .*~ - - api/swagger/docs - - server/docs - - # default is true. Enables skipping of directories: - # vendor$, third_party$, testdata$, examples$, Godeps$, builtin$ - skip-dirs-use-default: true - - # which files to skip: they will be analyzed, but issues from them - # won't be reported. Default value is empty list, but there is - # no need to include all autogenerated files, we confidently recognize - # autogenerated files. If it's not please let us know. - # "/" will be replaced by current OS file path separator to properly work - # on Windows. - skip-files: - - ".*\\.my\\.go$" - - _test.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 - # automatic updating of go.mod described above. Instead, it fails when any changes - # to go.mod are needed. This setting is most useful to check that go.mod does - # not need updates, such as in a continuous integration and testing system. - # If invoked with -mod=vendor, the go command assumes that the vendor - # directory holds the correct copies of dependencies and ignores - # the dependency descriptions in go.mod. - #modules-download-mode: release|readonly|vendor - - # Allow multiple parallel golangci-lint instances running. - # If false (default) - golangci-lint acquires file lock on start. - allow-parallel-runners: true - - -# output configuration options -output: - # colored-line-number|line-number|json|tab|checkstyle|code-climate, default is "colored-line-number" - format: colored-line-number - - # print lines of code with issue, default is true - print-issued-lines: true - - # print linter name in the end of issue text, default is true - print-linter-name: true - - # make issues output unique by line, default is true - uniq-by-line: true - - # add a prefix to the output file references; default is no prefix - path-prefix: "" - - # sorts results by: filepath, line and column - sort-results: true - -# all available settings of specific linters -linters-settings: - bidichk: - # The following configurations check for all mentioned invisible unicode - # runes. It can be omitted because all runes are enabled by default. - left-to-right-embedding: true - right-to-left-embedding: true - pop-directional-formatting: true - left-to-right-override: true - right-to-left-override: true - left-to-right-isolate: true - right-to-left-isolate: true - first-strong-isolate: true - pop-directional-isolate: true - dogsled: - # checks assignments with too many blank identifiers; default is 2 - max-blank-identifiers: 2 - dupl: - # tokens count to trigger issue, 150 by default - threshold: 100 - errcheck: - # report about not checking of errors in type assertions: `a := b.(MyStruct)`; - # default is false: such cases aren't reported by default. - check-type-assertions: false - - # report about assignment of errors to blank identifier: `num, _ := strconv.Atoi(numStr)`; - # default is false: such cases aren't reported by default. - check-blank: false - - # [deprecated] comma-separated list of pairs of the form pkg:regex - # the regex is used to ignore names within pkg. (default "fmt:.*"). - # see https://github.com/kisielk/errcheck#the-deprecated-method for details - #ignore: GenMarkdownTree,os:.*,BindPFlags,WriteTo,Help - #ignore: (os\.)?std(out|err)\..*|.*Close|.*Flush|os\.Remove(All)?|.*print(f|ln)?|os\.(Un)?Setenv - - # path to a file containing a list of functions to exclude from checking - # see https://github.com/kisielk/errcheck#excluding-functions for details - #exclude: errcheck.txt - - errorlint: - # Check whether fmt.Errorf uses the %w verb for formatting errors. See the readme for caveats - errorf: true - # Check for plain type assertions and type switches - asserts: true - # Check for plain error comparisons - comparison: true - - exhaustive: - # check switch statements in generated files also - check-generated: false - # indicates that switch statements are to be considered exhaustive if a - # 'default' case is present, even if all enum members aren't listed in the - # switch - default-signifies-exhaustive: false - # enum members matching the supplied regex do not have to be listed in - # switch statements to satisfy exhaustiveness - ignore-enum-members: "" - # consider enums only in package scopes, not in inner scopes - package-scope-only: false - exhaustivestruct: - struct-patterns: - - '*.Test' - - '*.Test2' - - '*.Embedded' - - '*.External' - - # forbidigo: - # # Forbid the following identifiers (identifiers are written using regexp): - # forbid: - # - ^print.*$ - # - 'fmt\.Print.*' - # - fmt.Println.* # too much log noise - # - ginkgo\\.F.* # these are used just for local development - # # Exclude godoc examples from forbidigo checks. Default is true. - # exclude_godoc_examples: false - funlen: - lines: 150 - statements: 50 - gci: - # put imports beginning with prefix after 3rd-party packages; - # only support one prefix - # if not set, use goimports.local-prefixes - prefix: github.com/OpenIMSDK/OpenKF - gocognit: - # minimal code complexity to report, 30 by default (but we recommend 10-20) - min-complexity: 30 - goconst: - # minimal length of string constant, 3 by default - min-len: 3 - # minimal occurrences count to trigger, 3 by default - min-occurrences: 3 - # ignore test files, false by default - ignore-tests: false - # look for existing constants matching the values, true by default - match-constant: true - # search also for duplicated numbers, false by default - numbers: false - # minimum value, only works with goconst.numbers, 3 by default - min: 3 - # maximum value, only works with goconst.numbers, 3 by default - max: 3 - # ignore when constant is not used as function argument, true by default - ignore-calls: true - - gocritic: - # Which checks should be enabled; can't be combined with 'disabled-checks'; - # See https://go-critic.github.io/overview#checks-overview - # To check which checks are enabled run `GL_DEBUG=gocritic golangci-lint run` - # By default list of stable checks is used. - enabled-checks: - #- rangeValCopy - - nestingreduce - - truncatecmp - - unnamedresult - - ruleguard - - # Which checks should be disabled; can't be combined with 'enabled-checks'; default is empty - disabled-checks: - - regexpMust - - ifElseChain - #- exitAfterDefer - - # Enable multiple checks by tags, run `GL_DEBUG=gocritic golangci-lint run` to see all tags and checks. - # Empty list by default. See https://github.com/go-critic/go-critic#usage -> section "Tags". - enabled-tags: - - performance - disabled-tags: - - experimental - - # Settings passed to gocritic. - # The settings key is the name of a supported gocritic checker. - # The list of supported checkers can be find in https://go-critic.github.io/overview. - settings: - captLocal: # must be valid enabled check name - # whether to restrict checker to params only (default true) - paramsOnly: true - elseif: - # whether to skip balanced if-else pairs (default true) - skipBalanced: true - hugeParam: - # size in bytes that makes the warning trigger (default 80) - sizeThreshold: 80 - nestingReduce: - # min number of statements inside a branch to trigger a warning (default 5) - bodyWidth: 5 - rangeExprCopy: - # size in bytes that makes the warning trigger (default 512) - sizeThreshold: 512 - # whether to check test functions (default true) - skipTestFuncs: true - rangeValCopy: - # size in bytes that makes the warning trigger (default 128) - sizeThreshold: 32 - # whether to check test functions (default true) - skipTestFuncs: true - ruleguard: - # path to a gorules file for the ruleguard checker - rules: '' - truncateCmp: - # whether to skip int/uint/uintptr types (default true) - skipArchDependent: true - underef: - # whether to skip (*x).method() calls where x is a pointer receiver (default true) - skipRecvDeref: true - unnamedResult: - # whether to check exported functions - checkExported: true - gocyclo: - # minimal code complexity to report, 30 by default (but we recommend 10-20) - min-complexity: 30 - cyclop: - # the maximal code complexity to report - max-complexity: 50 - # the maximal average package complexity. If it's higher than 0.0 (float) the check is enabled (default 0.0) - package-average: 0.0 - # should ignore tests (default false) - skip-tests: false - godot: - # comments to be checked: `declarations`, `toplevel`, or `all` - scope: declarations - # list of regexps for excluding particular comment lines from check - exclude: - # example: exclude comments which contain numbers - # - '[0-9]+' - # check that each sentence starts with a capital letter - capital: false - godox: - # report any comments starting with keywords, this is useful for TODO or FIXME comments that - # might be left in the code accidentally and should be resolved before merging - keywords: # default keywords are TODO, BUG, and FIXME, these can be overwritten by this setting - #- TODO - - BUG - - FIXME - #- NOTE - - OPTIMIZE # marks code that should be optimized before merging - - HACK # marks hack-arounds that should be removed before merging - gofmt: - # simplify code: gofmt with `-s` option, true by default - simplify: true - - gofumpt: - # Select the Go version to target. The default is `1.18`. - lang-version: "1.20" - - # Choose whether or not to use the extra rules that are disabled - # by default - extra-rules: false - - goheader: - values: - const: - # define here const type values in format k:v, for example: - # COMPANY: MY COMPANY - regexp: - # define here regexp type values, for example - # AUTHOR: .*@mycompany\.com - template: # |- - # put here copyright header template for source code files, for example: - # Note: {{ YEAR }} is a builtin value that returns the year relative to the current machine time. - # - # {{ AUTHOR }} {{ COMPANY }} {{ YEAR }} - # SPDX-License-Identifier: Apache-2.0 - - # 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. - template-path: - # also as alternative of directive 'template' you may put the path to file with the template source - goimports: - # put imports beginning with prefix after 3rd-party packages; - # it's a comma-separated list of prefixes - local-prefixes: github.com/OpenIMSDK/OpenKF - golint: - # minimal confidence for issues, default is 0.8 - min-confidence: 0.9 - gomnd: - settings: - mnd: - # the list of enabled checks, see https://github.com/tommy-muehle/go-mnd/#checks for description. - checks: argument,case,condition,operation,return,assign - # ignored-numbers: 1000 - # ignored-files: magic_.*.go - # ignored-functions: math.* - gomoddirectives: - # Allow local `replace` directives. Default is false. - replace-local: true - # List of allowed `replace` directives. Default is empty. - replace-allow-list: - - google.golang.org/grpc - - # Allow to not explain why the version has been retracted in the `retract` directives. Default is false. - retract-allow-no-explanation: false - # Forbid the use of the `exclude` directives. Default is false. - exclude-forbidden: false - gomodguard: - allowed: - modules: # List of allowed modules - - gorm.io/gorm - - gorm.io/driver/mysql - - k8s.io/klog - # - gopkg.in/yaml.v2 - domains: # List of allowed module domains - - google.golang.org - - gopkg.in - - golang.org - - github.com - - go.uber.org - - go.etcd.io - blocked: - versions: - - github.com/MakeNowJust/heredoc: - version: "> 2.0.9" - reason: "use the latest version" - local_replace_directives: false # Set to true to raise lint issues for packages that are loaded from a local path via replace directive - - gosec: - # To select a subset of rules to run. - # Available rules: https://github.com/securego/gosec#available-rules - includes: - - G401 - - G306 - - G101 - # To specify a set of rules to explicitly exclude. - # Available rules: https://github.com/securego/gosec#available-rules - excludes: - - G204 - # Exclude generated files - exclude-generated: true - # Filter out the issues with a lower severity than the given value. Valid options are: low, medium, high. - severity: "low" - # Filter out the issues with a lower confidence than the given value. Valid options are: low, medium, high. - confidence: "low" - # To specify the configuration of rules. - # The configuration of rules is not fully documented by gosec: - # https://github.com/securego/gosec#configuration - # https://github.com/securego/gosec/blob/569328eade2ccbad4ce2d0f21ee158ab5356a5cf/rules/rulelist.go#L60-L102 - config: - G306: "0600" - G101: - pattern: "(?i)example" - ignore_entropy: false - entropy_threshold: "80.0" - per_char_threshold: "3.0" - truncate: "32" - - gosimple: - # Select the Go version to target. The default is '1.13'. - go: "1.20" - # https://staticcheck.io/docs/options#checks - checks: [ "all" ] - - govet: - # report about shadowed variables - check-shadowing: true - - # settings per analyzer - settings: - printf: # analyzer name, run `go tool vet help` to see all analyzers - funcs: # run `go tool vet help printf` to see available settings for `printf` analyzer - - (github.com/golangci/golangci-lint/pkg/logutils.Log).Infof - - (github.com/golangci/golangci-lint/pkg/logutils.Log).Warnf - - (github.com/golangci/golangci-lint/pkg/logutils.Log).Errorf - - (github.com/golangci/golangci-lint/pkg/logutils.Log).Fatalf - - # enable or disable analyzers by name - enable: - - atomicalign - enable-all: false - disable: - - shadow - disable-all: false - # depguard: - # list-type: blacklist - # include-go-root: false - # packages: - # - github.com/Sirupsen/logrus - # packages-with-error-message: - # # specify an error message to output when a blacklisted package is used - # - github.com/Sirupsen/logrus: "logging is allowed only by logutils.Log" - ifshort: - # Maximum length of variable declaration measured in number of lines, after which linter won't suggest using short syntax. - # Has higher priority than max-decl-chars. - max-decl-lines: 1 - # Maximum length of variable declaration measured in number of characters, after which linter won't suggest using short syntax. - max-decl-chars: 30 - - importas: - # if set to `true`, force to use alias. - no-unaliased: true - # List of aliases - alias: - # using `servingv1` alias for `knative.dev/serving/pkg/apis/serving/v1` package - - pkg: knative.dev/serving/pkg/apis/serving/v1 - alias: servingv1 - # using `autoscalingv1alpha1` alias for `knative.dev/serving/pkg/apis/autoscaling/v1alpha1` package - - pkg: knative.dev/serving/pkg/apis/autoscaling/v1alpha1 - alias: autoscalingv1alpha1 - # You can specify the package path by regular expression, - # and alias by regular expression expansion syntax like below. - # see https://github.com/julz/importas#use-regular-expression for details - - pkg: knative.dev/serving/pkg/apis/(\w+)/(v[\w\d]+) - alias: $1$2 - # using `jwt` alias for `github.com/appleboy/gin-jwt/v2` package - jwt: github.com/appleboy/gin-jwt/v2 - - ireturn: - # ireturn allows using `allow` and `reject` settings at the same time. - # Both settings are lists of the keywords and regular expressions matched to interface or package names. - # keywords: - # - `empty` for `interface{}` - # - `error` for errors - # - `stdlib` for standard library - # - `anon` for anonymous interfaces - - # By default, it allows using errors, empty interfaces, anonymous interfaces, - # and interfaces provided by the standard library. - allow: - - anon - - error - - empty - - stdlib - # You can specify idiomatic endings for interface - - (or|er)$ - - # Reject patterns - reject: - - github.com\/user\/package\/v4\.Type - - lll: - # max line length, lines longer will be reported. Default is 120. - # '\t' is counted as 1 character by default, and can be changed with the tab-width option - line-length: 240 - # tab width in spaces. Default to 1. - tab-width: 4 - maligned: - # print struct with more effective memory layout or not, false by default - suggest-new: true - misspell: - # Correct spellings using locale preferences for US or UK. - # Default is to use a neutral variety of English. - # Setting locale to US will correct the British spelling of 'colour' to 'color'. - locale: US - ignore-words: - - someword - nakedret: - # make an issue if func has more lines of code than this setting and it has naked returns; default is 30 - max-func-lines: 30 - - nestif: - # minimal complexity of if statements to report, 5 by default - min-complexity: 4 - - nilnil: - # By default, nilnil checks all returned types below. - checked-types: - - ptr - - func - - iface - - map - - chan - - nlreturn: - # size of the block (including return statement that is still "OK") - # so no return split required. - block-size: 1 - - nolintlint: - # Disable to ensure that all nolint directives actually have an effect. Default is true. - allow-unused: false - # Disable to ensure that nolint directives don't have a leading space. Default is true. - allow-leading-space: true - # Exclude following linters from requiring an explanation. Default is []. - allow-no-explanation: [ ] - # Enable to require an explanation of nonzero length after each nolint directive. Default is false. - require-explanation: false - # Enable to require nolint directives to mention the specific linter being suppressed. Default is false. - require-specific: true - - prealloc: - # XXX: we don't recommend using this linter before doing performance profiling. - # For most programs usage of prealloc will be a premature optimization. - - # Report preallocation suggestions only on simple loops that have no returns/breaks/continues/gotos in them. - # True by default. - simple: true - range-loops: true # Report preallocation suggestions on range loops, true by default - for-loops: false # Report preallocation suggestions on for loops, false by default - - promlinter: - # Promlinter cannot infer all metrics name in static analysis. - # Enable strict mode will also include the errors caused by failing to parse the args. - strict: false - # Please refer to https://github.com/yeya24/promlinter#usage for detailed usage. - disabled-linters: - # - "Help" - # - "MetricUnits" - # - "Counter" - # - "HistogramSummaryReserved" - # - "MetricTypeInName" - # - "ReservedChars" - # - "CamelCase" - # - "lintUnitAbbreviations" - - predeclared: - # comma-separated list of predeclared identifiers to not report on - ignore: "" - # include method names and field names (i.e., qualified names) in checks - q: false - rowserrcheck: - packages: - - github.com/jmoiron/sqlx - revive: - # see https://github.com/mgechev/revive#available-rules for details. - ignore-generated-header: true - severity: warning - rules: - - name: indent-error-flow - severity: warning - staticcheck: - # Select the Go version to target. The default is '1.13'. - go: "1.16" - # https://staticcheck.io/docs/options#checks - checks: [ "all" ] - - stylecheck: - # Select the Go version to target. The default is '1.13'. - go: "1.16" - - # https://staticcheck.io/docs/options#checks - checks: [ "all", "-ST1000", "-ST1003", "-ST1016", "-ST1020", "-ST1021", "-ST1022" ] - # https://staticcheck.io/docs/options#dot_import_whitelist - dot-import-whitelist: - - fmt - # https://staticcheck.io/docs/options#initialisms - initialisms: [ "ACL", "API", "ASCII", "CPU", "CSS", "DNS", "EOF", "GUID", "HTML", "HTTP", "HTTPS", "ID", "IP", "JSON", "QPS", "RAM", "RPC", "SLA", "SMTP", "SQL", "SSH", "TCP", "TLS", "TTL", "UDP", "UI", "GID", "UID", "UUID", "URI", "URL", "UTF8", "VM", "XML", "XMPP", "XSRF", "XSS" ] - # https://staticcheck.io/docs/options#http_status_code_whitelist - http-status-code-whitelist: [ "200", "400", "404", "500" ] - - - tagliatelle: - # check the struck tag name case - case: - # use the struct field name to check the name of the struct tag - use-field-name: true - rules: - # any struct tag type can be used. - # support string case: `camel`, `pascal`, `kebab`, `snake`, `goCamel`, `goPascal`, `goKebab`, `goSnake`, `upper`, `lower` - json: camel - yaml: camel - xml: camel - bson: camel - avro: snake - mapstructure: kebab - - testpackage: - # regexp pattern to skip files - skip-regexp: (id|export|internal)_test\.go - thelper: - # The following configurations enable all checks. It can be omitted because all checks are enabled by default. - # You can enable only required checks deleting unnecessary checks. - test: - first: true - name: true - begin: true - benchmark: - first: true - name: true - begin: true - tb: - first: true - name: true - begin: true - - tenv: - # The option `all` will run against whole test files (`_test.go`) regardless of method/function signatures. - # By default, only methods that take `*testing.T`, `*testing.B`, and `testing.TB` as arguments are checked. - all: false - - unparam: - # Inspect exported functions, default is false. Set to true if no external program/library imports your code. - # XXX: if you enable this setting, unparam will report a lot of false-positives in text editors: - # if it's called for subdir of a project it can't find external interfaces. All text editor integrations - # with golangci-lint call it on a directory with the changed file. - check-exported: false - unused: - # treat code as a program (not a library) and report unused exported identifiers; default is false. - # XXX: if you enable this setting, unused will report a lot of false-positives in text editors: - # if it's called for subdir of a project it can't find funcs usages. All text editor integrations - # with golangci-lint call it on a directory with the changed file. - check-exported: false - whitespace: - multi-if: false # Enforces newlines (or comments) after every multi-line if statement - multi-func: false # Enforces newlines (or comments) after every multi-line function signature - - wrapcheck: - # An array of strings that specify substrings of signatures to ignore. - # If this set, it will override the default set of ignored signatures. - # See https://github.com/tomarrell/wrapcheck#configuration for more information. - ignoreSigs: - - .Errorf( - - errors.New( - - errors.Unwrap( - - .Wrap( - - .Wrapf( - - .WithMessage( - - .WithMessagef( - - .WithStack( - ignorePackageGlobs: - - encoding/* - - github.com/pkg/* - - wsl: - # If true append is only allowed to be cuddled if appending value is - # matching variables, fields or types on line above. Default is true. - strict-append: true - # Allow calls and assignments to be cuddled as long as the lines have any - # matching variables, fields or types. Default is true. - allow-assign-and-call: true - # Allow assignments to be cuddled with anything. Default is false. - allow-assign-and-anything: false - # Allow multiline assignments to be cuddled. Default is true. - allow-multiline-assign: true - # Allow declarations (var) to be cuddled. - allow-cuddle-declarations: false - # Allow trailing comments in ending of blocks - allow-trailing-comment: false - # Force newlines in end of case at this limit (0 = never). - force-case-trailing-whitespace: 0 - # Force cuddling of err checks with err var assignment - force-err-cuddling: false - # Allow leading comments to be separated with empty liens - allow-separated-leading-comment: false - makezero: - # Allow only slices initialized with a length of zero. Default is false. - always: false - - - # The custom section can be used to define linter plugins to be loaded at runtime. See README doc - # for more info. - #custom: - # Each custom linter should have a unique name. - #example: - # The path to the plugin *.so. Can be absolute or local. Required for each custom linter - #path: /path/to/example.so - # The description of the linter. Optional, just for documentation purposes. - #description: This is an example usage of a plugin linter. - # Intended to point to the repo location of the linter. Optional, just for documentation purposes. - #original-url: github.com/golangci/example-linter - -linters: - # please, do not use `enable-all`: it's deprecated and will be removed soon. - # inverted configuration with `enable-all` and `disable` is not scalable during updates of golangci-lint - # enable-all: true - disable-all: true - enable: - - typecheck - - asciicheck - - bodyclose - - cyclop - - deadcode - # - depguard - - dogsled - - dupl - - durationcheck - - errcheck - - errorlint - - exhaustive - - exportloopref - # - forbidigo - - funlen - # - gci - # - gochecknoinits - - gocognit - - goconst - - gocyclo - - godot - - godox - - gofmt - - gofumpt - - goheader - - goimports - - gomoddirectives - - gomodguard - - goprintffuncname - - gosec - - gosimple - - govet - - ifshort - - importas - - ineffassign - - lll - - makezero - - misspell - - nakedret - - nestif - - nilerr - - nlreturn - - noctx - - nolintlint - - paralleltest - - prealloc - - predeclared - - promlinter - - revive - - rowserrcheck - - sqlclosecheck - - staticcheck - - structcheck - - stylecheck - - thelper - - tparallel - - unconvert - - unparam - - unused - - varcheck - - wastedassign - - whitespace - - bidichk - - wastedassign - - golint - - execinquery - - nosprintfhostport - - grouper - - decorder - - errchkjson - - maintidx - #- containedctx - #- tagliatelle - #- nonamedreturns - #- nilnil - #- tenv - #- varnamelen - #- contextcheck - #- errname - #- ForceTypeAssert - #- nilassign - fast: false - -issues: - # List of regexps of issue texts to exclude, empty list by default. - # But independently from this option we use default exclude patterns, - # it can be disabled by `exclude-use-default: false`. To list all - # excluded by default patterns execute `golangci-lint run --help` - exclude: - - tools/.* - - test/.* - - third_party/.* - - # Excluding configuration per-path, per-linter, per-text and per-source - exclude-rules: - - linters: - - golint - path: (internal/api/.*)\.go # exclude golint for internal/api/... files - - - linters: - - revive - path: (log/.*)\.go - - - linters: - - wrapcheck - path: (cmd/.*|pkg/.*)\.go - - - linters: - - typecheck - #path: (pkg/storage/.*)\.go - path: (internal/.*|pkg/.*)\.go - - - path: (cmd/.*|test/.*|tools/.*|internal/pump/pumps/.*)\.go - linters: - - forbidigo - - - path: (cmd/[a-z]*/.*|store/.*)\.go - linters: - - dupl - - - linters: - - gocritic - text: (hugeParam:|rangeValCopy:) - - - path: (cmd/[a-z]*/.*)\.go - linters: - - lll - - - path: (validator/.*|code/.*|validator/.*|watcher/watcher/.*) - linters: - - gochecknoinits - - - path: (internal/.*/options|internal/pump|pkg/log/options.go|internal/authzserver|tools/) - linters: - - tagliatelle - - - path: (pkg/app/.*)\.go - linters: - - deadcode - - unused - - varcheck - - forbidigo - - # Exclude some staticcheck messages - - linters: - - staticcheck - text: "SA9003:" - - # Exclude lll issues for long lines with go:generate - - linters: - - lll - source: "^//go:generate " - - # Independently from option `exclude` we use default exclude patterns, - # it can be disabled by this option. To list all - # excluded by default patterns execute `golangci-lint run --help`. - # Default value for this option is true. - exclude-use-default: true - - # The default value is false. If set to true exclude and exclude-rules - # regular expressions become case sensitive. - exclude-case-sensitive: false - - # The list of ids of default excludes to include or disable. By default it's empty. - include: - - EXC0002 # disable excluding of issues about comments from golint - - # Maximum issues count per one linter. Set to 0 to disable. Default is 50. - max-issues-per-linter: 0 - - # Maximum count of issues with the same text. Set to 0 to disable. Default is 3. - max-same-issues: 0 - - # Show only new issues: if there are unstaged changes or untracked files, - # only those changes are analyzed, else only changes in HEAD~ are analyzed. - # It's a super-useful option for integration of golangci-lint into existing - # large codebase. It's not practical to fix all existing issues at the moment - # of integration: much better don't allow issues in new code. - # Default is false. - new: false - - # Show only new issues created after git revision `REV` - # new-from-rev: REV - - # Show only new issues created in git patch with set file path. - #new-from-patch: path/to/patch/file - - # Fix found issues (if it's supported by the linter) - fix: true - -severity: - # Default value is empty string. - # Set the default severity for issues. If severity rules are defined and the issues - # do not match or no severity is provided to the rule this will be the default - # severity applied. Severities should match the supported severity names of the - # selected out format. - # - Code climate: https://docs.codeclimate.com/docs/issues#issue-severity - # - Checkstyle: https://checkstyle.sourceforge.io/property_types.html#severity - # - Github: https://help.github.com/en/actions/reference/workflow-commands-for-github-actions#setting-an-error-message - default-severity: error - - # The default value is false. - # If set to true severity-rules regular expressions become case sensitive. - case-sensitive: false - - # Default value is empty list. - # When a list of severity rules are provided, severity information will be added to lint - # issues. Severity rules have the same filtering capability as exclude rules except you - # are allowed to specify one matcher per severity rule. - # Only affects out formats that support setting severity information. - rules: - - linters: - - dupl - severity: info \ No newline at end of file diff --git a/init_docker.sh b/init_docker.sh old mode 100644 new mode 100755 index 09213bf50..b06eda469 --- a/init_docker.sh +++ b/init_docker.sh @@ -1,5 +1,14 @@ #!/usr/bin/env bash +mark='' +for ((ratio=0;${ratio}<=100;ratio+=5)) +do + sleep 0.2 + printf "progress:[%-40s]%d%%\r" "${mark}" "${ratio}" + mark="##${mark}" +done +echo + set -e # Change directory to the 'scripts' folder @@ -21,7 +30,12 @@ if ! command -v docker >/dev/null 2>&1; then fi # Start Docker services using docker-compose -docker-compose up -d +if command -v docker-compose &> /dev/null +then + docker-compose up -d +else + docker compose up -d +fi # Move back to the 'scripts' folder cd scripts diff --git a/install_guide.sh b/install_guide.sh old mode 100644 new mode 100755 diff --git a/install_im_compose.sh b/install_im_compose.sh deleted file mode 100644 index 687a827d1..000000000 --- a/install_im_compose.sh +++ /dev/null @@ -1,21 +0,0 @@ -#!/usr/bin/env bash -internet_ip=`curl ifconfig.me -s` -echo $internet_ip - -source .env -echo $MINIO_ENDPOINT -if [ $MINIO_ENDPOINT == "http://127.0.0.1:10005" ]; then - sed -i "s/127.0.0.1/${internet_ip}/" .env - -fi - -cd scripts ; -chmod +x *.sh ; -./init_pwd.sh -./env_check.sh; -cd .. ; -docker-compose -f im-compose.yaml up -d -docker ps - - - diff --git a/install_im_server.sh b/install_im_server.sh deleted file mode 100644 index c526d43db..000000000 --- a/install_im_server.sh +++ /dev/null @@ -1,43 +0,0 @@ -#!/usr/bin/env bash - -# Get the public internet IP address -internet_ip=$(curl ifconfig.me -s) -echo $internet_ip - -# Load environment variables from .env file -source .env -echo $MINIO_ENDPOINT - -# 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}/" .env -fi - -if [ $MINIO_ENDPOINT == "http://127.0.0.1:10005" ]; then - sed -i "s/127.0.0.1/${internet_ip}/" .env -fi - -# Change directory to scripts folder -cd scripts -chmod +x *.sh - -# Execute necessary scripts -./init_pwd.sh -./env_check.sh - -# Go back to the previous directory -cd .. - -# Check if docker-compose command is available -if command -v docker-compose &> /dev/null -then - docker-compose up -d -else - docker compose up -d -fi - -# Change directory to scripts folder again -cd scripts - -# Check docker services -./docker_check_service.sh \ No newline at end of file diff --git a/internal/api/auth.go b/internal/api/auth.go index 531b39622..11debbea9 100644 --- a/internal/api/auth.go +++ b/internal/api/auth.go @@ -17,16 +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/discoveryregistry" - "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 -func NewAuthApi(discov discoveryregistry.SvcDiscoveryRegistry) AuthApi { - return AuthApi(*rpcclient.NewAuth(discov)) +func NewAuthApi(client rpcclient.Auth) AuthApi { + return AuthApi(client) } func (o *AuthApi) UserToken(c *gin.Context) { diff --git a/internal/api/conversation.go b/internal/api/conversation.go index 6058049a1..0d8b41e37 100644 --- a/internal/api/conversation.go +++ b/internal/api/conversation.go @@ -17,16 +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/discoveryregistry" - "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 -func NewConversationApi(discov discoveryregistry.SvcDiscoveryRegistry) ConversationApi { - return ConversationApi(*rpcclient.NewConversation(discov)) +func NewConversationApi(client rpcclient.Conversation) ConversationApi { + return ConversationApi(client) } func (o *ConversationApi) GetAllConversations(c *gin.Context) { 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 60a08a8e7..7af614fa4 100644 --- a/internal/api/friend.go +++ b/internal/api/friend.go @@ -15,18 +15,17 @@ package api import ( - "github.com/OpenIMSDK/Open-IM-Server/pkg/a2r" - "github.com/OpenIMSDK/Open-IM-Server/pkg/discoveryregistry" - "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" ) type FriendApi rpcclient.Friend -func NewFriendApi(discov discoveryregistry.SvcDiscoveryRegistry) FriendApi { - return FriendApi(*rpcclient.NewFriend(discov)) +func NewFriendApi(client rpcclient.Friend) FriendApi { + return FriendApi(client) } func (o *FriendApi) ApplyToAddFriend(c *gin.Context) { diff --git a/internal/api/group.go b/internal/api/group.go index a87af8e6b..2603bb858 100644 --- a/internal/api/group.go +++ b/internal/api/group.go @@ -15,18 +15,17 @@ package api import ( - "github.com/OpenIMSDK/Open-IM-Server/pkg/a2r" - "github.com/OpenIMSDK/Open-IM-Server/pkg/discoveryregistry" - "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" ) type GroupApi rpcclient.Group -func NewGroupApi(discov discoveryregistry.SvcDiscoveryRegistry) GroupApi { - return GroupApi(*rpcclient.NewGroup(discov)) +func NewGroupApi(client rpcclient.Group) GroupApi { + return GroupApi(client) } func (o *GroupApi) CreateGroup(c *gin.Context) { @@ -132,6 +131,7 @@ func (o *GroupApi) GetSuperGroupsInfo(c *gin.Context) { func (o *GroupApi) GroupCreateCount(c *gin.Context) { a2r.Call(group.GroupClient.GroupCreateCount, o.Client, c) } + func (o *GroupApi) GetGroups(c *gin.Context) { a2r.Call(group.GroupClient.GetGroups, o.Client, c) } diff --git a/internal/api/msg.go b/internal/api/msg.go index dba6a52d7..d79be716b 100644 --- a/internal/api/msg.go +++ b/internal/api/msg.go @@ -20,27 +20,27 @@ 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/discoveryregistry" - "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 { - rpcclient.Message - validate *validator.Validate + *rpcclient.Message + validate *validator.Validate + userRpcClient *rpcclient.UserRpcClient } -func NewMessageApi(discov discoveryregistry.SvcDiscoveryRegistry) MessageApi { - return MessageApi{Message: *rpcclient.NewMessage(discov), validate: validator.New()} +func NewMessageApi(msgRpcClient *rpcclient.Message, userRpcClient *rpcclient.User) MessageApi { + return MessageApi{Message: msgRpcClient, validate: validator.New(), userRpcClient: rpcclient.NewUserRpcClientByUser(userRpcClient)} } func (MessageApi) SetOptions(options map[string]bool, value bool) { @@ -50,9 +50,10 @@ func (MessageApi) SetOptions(options map[string]bool, value bool) { utils.SetSwitchFromOptions(options, constant.IsConversationUpdate, value) } -func (m MessageApi) newUserSendMsgReq(c *gin.Context, params *apistruct.ManagementSendMsgReq) *msg.SendMsgReq { +func (m MessageApi) newUserSendMsgReq(c *gin.Context, params *apistruct.SendMsg) *msg.SendMsgReq { var newContent string var err error + options := make(map[string]bool, 5) switch params.ContentType { case constant.Text: newContent = params.Content["text"].(string) @@ -70,11 +71,9 @@ func (m MessageApi) newUserSendMsgReq(c *gin.Context, params *apistruct.Manageme fallthrough case constant.CustomOnlineOnly: fallthrough - case constant.Revoke: - newContent = params.Content["revokeMsgClientID"].(string) default: + newContent = utils.StructToJsonString(params.Content) } - options := make(map[string]bool, 5) if params.IsOnlineOnly { m.SetOptions(options, false) } @@ -98,7 +97,6 @@ func (m MessageApi) newUserSendMsgReq(c *gin.Context, params *apistruct.Manageme MsgFrom: constant.SysMsgType, ContentType: params.ContentType, Content: []byte(newContent), - RecvID: params.RecvID, CreateTime: utils.GetCurrentTimestampByMill(), Options: options, OfflinePushInfo: params.OfflinePushInfo, @@ -163,19 +161,9 @@ func (m *MessageApi) DeleteMsgPhysical(c *gin.Context) { a2r.Call(msg.MsgClient.DeleteMsgPhysical, m.Client, c) } -func (m *MessageApi) SendMessage(c *gin.Context) { - params := apistruct.ManagementSendMsgReq{} - if err := c.BindJSON(¶ms); err != nil { - apiresp.GinError(c, errs.ErrArgs.WithDetail(err.Error()).Wrap()) - return - } - if !tokenverify.IsAppManagerUid(c) { - apiresp.GinError(c, errs.ErrNoPermission.Wrap("only app manager can send message")) - return - } - +func (m *MessageApi) getSendMsgReq(c *gin.Context, req apistruct.SendMsg) (sendMsgReq *msg.SendMsgReq, err error) { var data interface{} - switch params.ContentType { + switch req.ContentType { case constant.Text: data = apistruct.TextElem{} case constant.Picture: @@ -192,25 +180,45 @@ func (m *MessageApi) SendMessage(c *gin.Context) { data = apistruct.RevokeElem{} case constant.OANotification: data = apistruct.OANotificationElem{} - params.SessionType = constant.NotificationChatType + req.SessionType = constant.NotificationChatType case constant.CustomNotTriggerConversation: data = apistruct.CustomElem{} case constant.CustomOnlineOnly: data = apistruct.CustomElem{} default: - apiresp.GinError(c, errs.ErrArgs.WithDetail("not support err contentType").Wrap()) + return nil, errs.ErrArgs.WithDetail("not support err contentType") + } + if err := mapstructure.WeakDecode(req.Content, &data); err != nil { + return nil, err + } + log.ZDebug(c, "getSendMsgReq", "data", data) + if err := m.validate.Struct(data); err != nil { + return nil, err + } + return m.newUserSendMsgReq(c, &req), nil +} + +func (m *MessageApi) SendMessage(c *gin.Context) { + req := apistruct.SendMsgReq{} + if err := c.BindJSON(&req); err != nil { + apiresp.GinError(c, errs.ErrArgs.WithDetail(err.Error()).Wrap()) return } - if err := mapstructure.WeakDecode(params.Content, &data); err != nil { - apiresp.GinError(c, errs.ErrArgs.Wrap(err.Error())) + log.ZInfo(c, "SendMessage", "req", req) + if !tokenverify.IsAppManagerUid(c) { + apiresp.GinError(c, errs.ErrNoPermission.Wrap("only app manager can send message")) return - } else if err := m.validate.Struct(params); err != nil { - apiresp.GinError(c, errs.ErrArgs.Wrap(err.Error())) + } + + sendMsgReq, err := m.getSendMsgReq(c, req.SendMsg) + if err != nil { + log.ZError(c, "decodeData failed", err) + apiresp.GinError(c, err) return } - pbReq := m.newUserSendMsgReq(c, ¶ms) + sendMsgReq.MsgData.RecvID = req.RecvID var status int - respPb, err := m.Client.SendMsg(c, pbReq) + respPb, err := m.Client.SendMsg(c, sendMsgReq) if err != nil { status = constant.MsgSendFailed apiresp.GinError(c, err) @@ -226,107 +234,64 @@ func (m *MessageApi) SendMessage(c *gin.Context) { apiresp.GinSuccess(c, respPb) } -func (m *MessageApi) ManagementBatchSendMsg(c *gin.Context) { - params := apistruct.ManagementBatchSendMsgReq{} - resp := apistruct.ManagementBatchSendMsgResp{} - var msgSendFailedFlag bool - if err := c.BindJSON(¶ms); err != nil { +func (m *MessageApi) BatchSendMsg(c *gin.Context) { + var ( + req apistruct.BatchSendMsgReq + resp apistruct.BatchSendMsgResp + ) + if err := c.BindJSON(&req); err != nil { + log.ZError(c, "BatchSendMsg BindJSON failed", err) apiresp.GinError(c, errs.ErrArgs.WithDetail(err.Error()).Wrap()) return } - if !tokenverify.IsAppManagerUid(c) { + log.ZInfo(c, "BatchSendMsg", "req", req) + if err := tokenverify.CheckAdmin(c); err != nil { apiresp.GinError(c, errs.ErrNoPermission.Wrap("only app manager can send message")) return } - var data interface{} - switch params.ContentType { - case constant.Text: - data = apistruct.TextElem{} - case constant.Picture: - data = apistruct.PictureElem{} - case constant.Voice: - data = apistruct.SoundElem{} - case constant.Video: - data = apistruct.VideoElem{} - case constant.File: - data = apistruct.FileElem{} - case constant.Custom: - data = apistruct.CustomElem{} - case constant.Revoke: - data = apistruct.RevokeElem{} - case constant.OANotification: - data = apistruct.OANotificationElem{} - params.SessionType = constant.NotificationChatType - case constant.CustomNotTriggerConversation: - data = apistruct.CustomElem{} - case constant.CustomOnlineOnly: - data = apistruct.CustomElem{} - default: - apiresp.GinError(c, errs.ErrArgs.WithDetail("not support err contentType").Wrap()) - return + var recvIDs []string + var err error + if req.IsSendAll { + pageNumber := 1 + showNumber := 500 + for { + recvIDsPart, err := m.userRpcClient.GetAllUserIDs(c, int32(pageNumber), int32(showNumber)) + if err != nil { + log.ZError(c, "GetAllUserIDs failed", err) + apiresp.GinError(c, err) + return + } + if len(recvIDsPart) < showNumber { + recvIDs = append(recvIDs, recvIDsPart...) + break + } + pageNumber++ + } + } else { + recvIDs = req.RecvIDs } - if err := mapstructure.WeakDecode(params.Content, &data); err != nil { - apiresp.GinError(c, errs.ErrArgs.Wrap(err.Error())) - return - } else if err := m.validate.Struct(params); err != nil { - apiresp.GinError(c, errs.ErrArgs.Wrap(err.Error())) + log.ZDebug(c, "BatchSendMsg nums", "nums ", len(recvIDs)) + sendMsgReq, err := m.getSendMsgReq(c, req.SendMsg) + if err != nil { + log.ZError(c, "decodeData failed", err) + apiresp.GinError(c, err) return } - - t := &apistruct.ManagementSendMsgReq{ - SendID: params.SendID, - GroupID: params.GroupID, - SenderNickname: params.SenderNickname, - SenderFaceURL: params.SenderFaceURL, - SenderPlatformID: params.SenderPlatformID, - Content: params.Content, - ContentType: params.ContentType, - SessionType: params.SessionType, - IsOnlineOnly: params.IsOnlineOnly, - NotOfflinePush: params.NotOfflinePush, - OfflinePushInfo: params.OfflinePushInfo, - } - pbReq := m.newUserSendMsgReq(c, t) - var recvList []string - if params.IsSendAll { - // req2 := &user.GetAllUserIDReq{} - // resp2, err := m.Message.GetAllUserID(c, req2) - // if err != nil { - // apiresp.GinError(c, errs.ErrArgs.Wrap(err.Error())) - // return - // } - // recvList = resp2.UserIDs - } else { - recvList = params.RecvIDList - } - - for _, recvID := range recvList { - pbReq.MsgData.RecvID = recvID - rpcResp, err := m.Client.SendMsg(c, pbReq) + for _, recvID := range recvIDs { + sendMsgReq.MsgData.RecvID = recvID + rpcResp, err := m.Client.SendMsg(c, sendMsgReq) if err != nil { - resp.Data.FailedIDList = append(resp.Data.FailedIDList, recvID) - msgSendFailedFlag = true + resp.FailedIDs = append(resp.FailedIDs, recvID) continue } - resp.Data.ResultList = append(resp.Data.ResultList, &apistruct.SingleReturnResult{ + resp.Results = append(resp.Results, &apistruct.SingleReturnResult{ ServerMsgID: rpcResp.ServerMsgID, ClientMsgID: rpcResp.ClientMsgID, SendTime: rpcResp.SendTime, RecvID: recvID, }) } - var status int32 - if msgSendFailedFlag { - status = constant.MsgSendFailed - } else { - status = constant.MsgSendSuccessed - } - _, err := m.Client.SetSendMsgStatus(c, &msg.SetSendMsgStatusReq{Status: status}) - if err != nil { - apiresp.GinError(c, errs.ErrArgs.Wrap(err.Error())) - return - } apiresp.GinSuccess(c, resp) } diff --git a/internal/api/route.go b/internal/api/route.go index 51dea2d42..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,11 +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 { @@ -40,8 +48,17 @@ func NewGinRouter(discov discoveryregistry.SvcDiscoveryRegistry, rdb redis.Unive } log.ZInfo(context.Background(), "load config", "config", config.Config) r.Use(gin.Recovery(), mw.CorsHandler(), mw.GinParseOperationID()) - u := NewUserApi(discov) - m := NewMessageApi(discov) + // init rpc client here + userRpc := rpcclient.NewUser(discov) + groupRpc := rpcclient.NewGroup(discov) + friendRpc := rpcclient.NewFriend(discov) + messageRpc := rpcclient.NewMessage(discov) + conversationRpc := rpcclient.NewConversation(discov) + authRpc := rpcclient.NewAuth(discov) + thirdRpc := rpcclient.NewThird(discov) + + u := NewUserApi(*userRpc) + m := NewMessageApi(messageRpc, userRpc) if config.Config.Prometheus.Enable { prome.NewApiRequestCounter() prome.NewApiRequestFailedCounter() @@ -49,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) @@ -62,10 +79,10 @@ func NewGinRouter(discov discoveryregistry.SvcDiscoveryRegistry, rdb redis.Unive userRouterGroup.POST("/get_users_online_status", ParseToken, u.GetUsersOnlineStatus) userRouterGroup.POST("/get_users_online_token_detail", ParseToken, u.GetUsersOnlineTokenDetail) } - //friend routing group + // friend routing group friendRouterGroup := r.Group("/friend", ParseToken) { - f := NewFriendApi(discov) + f := NewFriendApi(*friendRpc) friendRouterGroup.POST("/delete_friend", f.DeleteFriend) friendRouterGroup.POST("/get_friend_apply_list", f.GetFriendApplyList) friendRouterGroup.POST("/get_self_friend_apply_list", f.GetSelfApplyList) @@ -79,7 +96,7 @@ func NewGinRouter(discov discoveryregistry.SvcDiscoveryRegistry, rdb redis.Unive friendRouterGroup.POST("/import_friend", f.ImportFriends) friendRouterGroup.POST("/is_friend", f.IsFriend) } - g := NewGroupApi(discov) + g := NewGroupApi(*groupRpc) groupRouterGroup := r.Group("/group", ParseToken) { groupRouterGroup.POST("/create_group", g.CreateGroup) @@ -110,18 +127,18 @@ func NewGinRouter(discov discoveryregistry.SvcDiscoveryRegistry, rdb redis.Unive superGroupRouterGroup.POST("/get_joined_group_list", g.GetJoinedSuperGroupList) superGroupRouterGroup.POST("/get_groups_info", g.GetSuperGroupsInfo) } - //certificate + // certificate authRouterGroup := r.Group("/auth") { - a := NewAuthApi(discov) + a := NewAuthApi(*authRpc) authRouterGroup.POST("/user_token", a.UserToken) authRouterGroup.POST("/parse_token", a.ParseToken) authRouterGroup.POST("/force_logout", ParseToken, a.ForceLogout) } - //Third service + // Third service thirdGroup := r.Group("/third", ParseToken) { - t := NewThirdApi(discov) + t := NewThirdApi(*thirdRpc) thirdGroup.POST("/fcm_update_token", t.FcmUpdateToken) thirdGroup.POST("/set_app_badge", t.SetAppBadge) @@ -135,7 +152,7 @@ func NewGinRouter(discov discoveryregistry.SvcDiscoveryRegistry, rdb redis.Unive objectGroup.POST("/access_url", t.AccessURL) objectGroup.GET("/*name", t.ObjectRedirect) } - //Message + // Message msgGroup := r.Group("/msg", ParseToken) { msgGroup.POST("/newest_seq", m.GetSeq) @@ -154,13 +171,13 @@ func NewGinRouter(discov discoveryregistry.SvcDiscoveryRegistry, rdb redis.Unive msgGroup.POST("/delete_msg_phsical_by_seq", m.DeleteMsgPhysicalBySeq) msgGroup.POST("/delete_msg_physical", m.DeleteMsgPhysical) - msgGroup.POST("/batch_send_msg", m.ManagementBatchSendMsg) + msgGroup.POST("/batch_send_msg", m.BatchSendMsg) msgGroup.POST("/check_msg_is_send_success", m.CheckMsgIsSendSuccess) } - //Conversation + // Conversation conversationGroup := r.Group("/conversation", ParseToken) { - c := NewConversationApi(discov) + c := NewConversationApi(*conversationRpc) conversationGroup.POST("/get_all_conversations", c.GetAllConversations) conversationGroup.POST("/get_conversation", c.GetConversation) conversationGroup.POST("/get_conversations", c.GetConversations) @@ -176,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 5b5de01d9..f267a0ec1 100644 --- a/internal/api/statistics.go +++ b/internal/api/statistics.go @@ -17,16 +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/discoveryregistry" - "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 -func NewStatisticsApi(discov discoveryregistry.SvcDiscoveryRegistry) StatisticsApi { - return StatisticsApi(*rpcclient.NewUser(discov)) +func NewStatisticsApi(client rpcclient.User) StatisticsApi { + return StatisticsApi(client) } func (s *StatisticsApi) UserRegister(c *gin.Context) { diff --git a/internal/api/third.go b/internal/api/third.go index 6852ae3a9..e480d4c11 100644 --- a/internal/api/third.go +++ b/internal/api/third.go @@ -15,24 +15,22 @@ 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/discoveryregistry" - "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 -func NewThirdApi(discov discoveryregistry.SvcDiscoveryRegistry) ThirdApi { - return ThirdApi(*rpcclient.NewThird(discov)) +func NewThirdApi(client rpcclient.Third) ThirdApi { + return ThirdApi(client) } func (o *ThirdApi) FcmUpdateToken(c *gin.Context) { @@ -96,5 +94,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) } diff --git a/internal/api/user.go b/internal/api/user.go index 4e9d1b0c7..c7bcf7862 100644 --- a/internal/api/user.go +++ b/internal/api/user.go @@ -17,22 +17,21 @@ 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/discoveryregistry" - "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 -func NewUserApi(discov discoveryregistry.SvcDiscoveryRegistry) UserApi { - return UserApi(*rpcclient.NewUser(discov)) +func NewUserApi(client rpcclient.User) UserApi { + return UserApi(client) } func (u *UserApi) UserRegister(c *gin.Context) { @@ -79,13 +78,19 @@ func (u *UserApi) GetUsersOnlineStatus(c *gin.Context) { var respResult []*msggateway.GetUsersOnlineStatusResp_SuccessResult flag := false - //Online push message + // Online push message for _, v := range conns { msgClient := msggateway.NewMsgGatewayClient(v) reply, err := msgClient.GetUsersOnlineStatus(c, &req) if err != nil { - log.ZWarn(c, "GetUsersOnlineStatus rpc err", err) - continue + log.ZWarn(c, "GetUsersOnlineStatus rpc err", err) + + parseError := apiresp.ParseError(err) + log.ZDebug(c, "errcode bantanger", "errcode", parseError.ErrCode) + if parseError.ErrCode == errs.NoPermissionError { + apiresp.GinError(c, err) + return + } } else { wsResult = append(wsResult, reply.SuccessResult...) } @@ -132,7 +137,7 @@ func (u *UserApi) GetUsersOnlineTokenDetail(c *gin.Context) { apiresp.GinError(c, err) return } - //Online push message + // Online push message for _, v := range conns { msgClient := msggateway.NewMsgGatewayClient(v) reply, err := msgClient.GetUsersOnlineStatus(c, &req) @@ -161,7 +166,6 @@ func (u *UserApi) GetUsersOnlineTokenDetail(c *gin.Context) { } } } - } for p, tokens := range m { t := new(msggateway.SinglePlatformToken) @@ -177,5 +181,4 @@ func (u *UserApi) GetUsersOnlineTokenDetail(c *gin.Context) { } apiresp.GinSuccess(c, respResult) - } 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 34f9cf47d..bc5fa1511 100644 --- a/internal/msggateway/client.go +++ b/internal/msggateway/client.go @@ -23,18 +23,20 @@ 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 ErrConnClosed = errors.New("conn has closed") -var ErrNotSupportMessageProtocol = errors.New("not support message protocol") -var ErrClientClosed = errors.New("client actively close the connection") -var ErrPanic = errors.New("panic error") +var ( + ErrConnClosed = errors.New("conn has closed") + ErrNotSupportMessageProtocol = errors.New("not support message protocol") + ErrClientClosed = errors.New("client actively close the connection") + ErrPanic = errors.New("panic error") +) const ( // MessageText is for UTF-8 encoded text messages like JSON. @@ -102,10 +104,12 @@ func (c *Client) ResetClient( c.closedErr = nil c.token = token } + func (c *Client) pongHandler(_ string) error { c.conn.SetReadDeadline(pongWait) return nil } + func (c *Client) readMessage() { defer func() { if r := recover(); r != nil { @@ -124,7 +128,7 @@ func (c *Client) readMessage() { return } log.ZDebug(c.ctx, "readMessage", "messageType", messageType) - if c.closed == true { //连接刚置位已经关闭,但是协程还没退出的场景 + if c.closed == true { // 连接刚置位已经关闭,但是协程还没退出的场景 c.closedErr = ErrConnClosed return } @@ -148,8 +152,8 @@ func (c *Client) readMessage() { default: } } - } + func (c *Client) handleMessage(message []byte) error { if c.IsCompress { var decompressErr error @@ -198,26 +202,26 @@ func (c *Client) handleMessage(message []byte) error { } c.replyMessage(ctx, &binaryReq, messageErr, resp) return nil - } + func (c *Client) setAppBackgroundStatus(ctx context.Context, req Req) ([]byte, error) { resp, isBackground, messageErr := c.longConnServer.SetUserDeviceBackground(ctx, req) if messageErr != nil { return nil, messageErr } c.IsBackground = isBackground - //todo callback + // todo callback return resp, nil - } + func (c *Client) close() { c.w.Lock() defer c.w.Unlock() c.closed = true c.conn.Close() c.longConnServer.UnRegister(c) - } + func (c *Client) replyMessage(ctx context.Context, binaryReq *Req, err error, resp []byte) { errResp := apiresp.ParseError(err) mReply := Resp{ @@ -234,6 +238,7 @@ func (c *Client) replyMessage(ctx context.Context, binaryReq *Req, err error, re log.ZWarn(ctx, "wireBinaryMsg replyMessage", err, "resp", mReply.String()) } } + func (c *Client) PushMessage(ctx context.Context, msgData *sdkws.MsgData) error { var msg sdkws.PushMessages conversationID := utils.GetConversationIDByMsg(msgData) @@ -296,5 +301,4 @@ func (c *Client) writePongMsg() error { } _ = c.conn.SetWriteDeadline(writeWait) return c.conn.WriteMessage(PongMessage, nil) - } diff --git a/internal/msggateway/compressor.go b/internal/msggateway/compressor.go index 97a9b1eff..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 { @@ -33,6 +33,7 @@ type GzipCompressor struct { func NewGzipCompressor() *GzipCompressor { return &GzipCompressor{compressProtocol: "gzip"} } + func (g *GzipCompressor) Compress(rawData []byte) ([]byte, error) { gzipBuffer := bytes.Buffer{} gz := gzip.NewWriter(&gzipBuffer) diff --git a/internal/msggateway/constant.go b/internal/msggateway/constant.go index 043c9d688..fe5f09bdc 100644 --- a/internal/msggateway/constant.go +++ b/internal/msggateway/constant.go @@ -27,11 +27,13 @@ const ( GzipCompressionProtocol = "gzip" BackgroundStatus = "isBackground" ) + const ( WebSocket = iota + 1 ) + const ( - //Websocket Protocol + // Websocket Protocol. WSGetNewestSeq = 1001 WSPullMsgBySeqList = 1002 WSSendMsg = 1003 diff --git a/internal/msggateway/context.go b/internal/msggateway/context.go index e5ccc00f4..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 { @@ -71,9 +71,11 @@ func newContext(respWriter http.ResponseWriter, req *http.Request) *UserConnCont ConnID: utils.Md5(req.RemoteAddr + "_" + strconv.Itoa(int(utils.GetCurrentTimestampByMill()))), } } + func (c *UserConnContext) GetRemoteAddr() string { return c.RemoteAddr } + func (c *UserConnContext) Query(key string) (string, bool) { var value string if value = c.Req.URL.Query().Get(key); value == "" { @@ -81,6 +83,7 @@ func (c *UserConnContext) Query(key string) (string, bool) { } return value, true } + func (c *UserConnContext) GetHeader(key string) (string, bool) { var value string if value = c.Req.Header.Get(key); value == "" { @@ -88,27 +91,35 @@ func (c *UserConnContext) GetHeader(key string) (string, bool) { } return value, true } + func (c *UserConnContext) SetHeader(key, value string) { c.RespWriter.Header().Set(key, value) } + func (c *UserConnContext) ErrReturn(error string, code int) { http.Error(c.RespWriter, error, code) } + func (c *UserConnContext) GetConnID() string { return c.ConnID } + func (c *UserConnContext) GetUserID() string { return c.Req.URL.Query().Get(WsUserID) } + func (c *UserConnContext) GetPlatformID() string { return c.Req.URL.Query().Get(PlatformID) } + func (c *UserConnContext) GetOperationID() string { return c.Req.URL.Query().Get(OperationID) } + func (c *UserConnContext) GetToken() string { return c.Req.URL.Query().Get(Token) } + func (c *UserConnContext) GetBackground() bool { b, err := strconv.ParseBool(c.Req.URL.Query().Get(BackgroundStatus)) if err != nil { diff --git a/internal/msggateway/encoder.go b/internal/msggateway/encoder.go index a34a66e66..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 { @@ -26,12 +26,12 @@ type Encoder interface { Decode(encodeData []byte, decodeData interface{}) error } -type GobEncoder struct { -} +type GobEncoder struct{} func NewGobEncoder() *GobEncoder { return &GobEncoder{} } + func (g *GobEncoder) Encode(data interface{}) ([]byte, error) { buff := bytes.Buffer{} enc := gob.NewEncoder(&buff) @@ -41,6 +41,7 @@ func (g *GobEncoder) Encode(data interface{}) ([]byte, error) { } return buff.Bytes(), nil } + func (g *GobEncoder) Decode(encodeData []byte, decodeData interface{}) error { buff := bytes.NewBuffer(encodeData) dec := gob.NewDecoder(buff) 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 ea7b9fd8d..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/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/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/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 { @@ -181,13 +181,12 @@ func (s *Server) KickUserOffline( if clients, _, ok := s.LongConnServer.GetUserPlatformCons(v, int(req.PlatformID)); ok { for _, client := range clients { log.ZDebug(ctx, "kick user offline", "userID", v, "platformID", req.PlatformID, "client", client) - err := client.KickOnlineMessage() - if err != nil { - return nil, err + if err := client.longConnServer.KickUserConn(client); err != nil { + log.ZWarn(ctx, "kick user offline failed", err, "userID", v, "platformID", req.PlatformID) } } } else { - log.ZWarn(ctx, "conn not exist", nil, "userID", v, "platformID", req.PlatformID) + log.ZInfo(ctx, "conn not exist", "userID", v, "platformID", req.PlatformID) } } return &msggateway.KickUserOfflineResp{}, nil @@ -197,6 +196,6 @@ func (s *Server) MultiTerminalLoginCheck( ctx context.Context, req *msggateway.MultiTerminalLoginCheckReq, ) (*msggateway.MultiTerminalLoginCheckResp, error) { - //TODO implement me + // TODO implement me panic("implement me") } diff --git a/internal/msggateway/init.go b/internal/msggateway/init.go index 03fe9f581..96dc4b89b 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/long_conn.go b/internal/msggateway/long_conn.go index 309ec2d8b..59e4d5b45 100644 --- a/internal/msggateway/long_conn.go +++ b/internal/msggateway/long_conn.go @@ -22,14 +22,14 @@ import ( ) type LongConn interface { - //Close this connection + // Close this connection Close() error // WriteMessage Write message to connection,messageType means data type,can be set binary(2) and text(1). WriteMessage(messageType int, message []byte) error // ReadMessage Read message from connection. ReadMessage() (int, []byte, error) // SetReadDeadline sets the read deadline on the underlying network connection, - //after a read has timed out, will return an error. + // after a read has timed out, will return an error. SetReadDeadline(timeout time.Duration) error // SetWriteDeadline sets to write deadline when send message,when read has timed out,will return error. SetWriteDeadline(timeout time.Duration) error @@ -58,6 +58,7 @@ func newGWebSocket(protocolType int, handshakeTimeout time.Duration) *GWebSocket func (d *GWebSocket) Close() error { return d.conn.Close() } + func (d *GWebSocket) GenerateLongConn(w http.ResponseWriter, r *http.Request) error { upgrader := &websocket.Upgrader{ HandshakeTimeout: d.handshakeTimeout, @@ -69,10 +70,10 @@ func (d *GWebSocket) GenerateLongConn(w http.ResponseWriter, r *http.Request) er } d.conn = conn return nil - } + func (d *GWebSocket) WriteMessage(messageType int, message []byte) error { - //d.setSendConn(d.conn) + // d.setSendConn(d.conn) return d.conn.WriteMessage(messageType, message) } @@ -83,6 +84,7 @@ func (d *GWebSocket) WriteMessage(messageType int, message []byte) error { func (d *GWebSocket) ReadMessage() (int, []byte, error) { return d.conn.ReadMessage() } + func (d *GWebSocket) SetReadDeadline(timeout time.Duration) error { return d.conn.SetReadDeadline(time.Now().Add(timeout)) } @@ -97,7 +99,6 @@ func (d *GWebSocket) Dial(urlStr string, requestHeader http.Header) (*http.Respo d.conn = conn } return httpResp, err - } func (d *GWebSocket) IsNil() bool { @@ -110,9 +111,11 @@ func (d *GWebSocket) IsNil() bool { func (d *GWebSocket) SetConnNil() { d.conn = nil } + func (d *GWebSocket) SetReadLimit(limit int64) { d.conn.SetReadLimit(limit) } + func (d *GWebSocket) SetPongHandler(handler PongHandler) { d.conn.SetPongHandler(handler) } diff --git a/internal/msggateway/message_handler.go b/internal/msggateway/message_handler.go index 874101a05..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 { @@ -75,8 +75,10 @@ type GrpcHandler struct { func NewGrpcHandler(validate *validator.Validate, client discoveryregistry.SvcDiscoveryRegistry) *GrpcHandler { msgRpcClient := rpcclient.NewMessageRpcClient(client) pushRpcClient := rpcclient.NewPushRpcClient(client) - return &GrpcHandler{msgRpcClient: &msgRpcClient, - pushClient: &pushRpcClient, validate: validate} + return &GrpcHandler{ + msgRpcClient: &msgRpcClient, + pushClient: &pushRpcClient, validate: validate, + } } func (g GrpcHandler) GetSeq(context context.Context, data Req) ([]byte, error) { @@ -164,6 +166,7 @@ func (g GrpcHandler) UserLogout(context context.Context, data Req) ([]byte, erro } return c, nil } + func (g GrpcHandler) SetUserDeviceBackground(_ context.Context, data Req) ([]byte, bool, error) { req := sdkws.SetAppBackgroundStatusReq{} if err := proto.Unmarshal(data.Data, &req); err != nil { diff --git a/internal/msggateway/n_ws_server.go b/internal/msggateway/n_ws_server.go index c204dc115..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 { @@ -47,6 +47,7 @@ type LongConnServer interface { Validate(s interface{}) error SetCacheHandler(cache cache.MsgModel) SetDiscoveryRegistry(client discoveryregistry.SvcDiscoveryRegistry) + KickUserConn(client *Client) error UnRegister(c *Client) Compressor Encoder @@ -86,6 +87,7 @@ type kickHandler struct { func (ws *WsServer) SetDiscoveryRegistry(client discoveryregistry.SvcDiscoveryRegistry) { ws.MessageHandler = NewGrpcHandler(ws.validate, client) } + func (ws *WsServer) SetCacheHandler(cache cache.MsgModel) { ws.cache = cache } @@ -113,7 +115,6 @@ func NewWsServer(opts ...Option) (*WsServer, error) { } if config.port < 1024 { return nil, errors.New("port not allow to listen") - } v := validator.New() return &WsServer{ @@ -134,6 +135,7 @@ func NewWsServer(opts ...Option) (*WsServer, error) { Encoder: NewGobEncoder(), }, nil } + func (ws *WsServer) Run() error { var client *Client go func() { @@ -144,13 +146,13 @@ func (ws *WsServer) Run() error { case client = <-ws.unregisterChan: ws.unregisterClient(client) case onlineInfo := <-ws.kickHandlerChan: - ws.multiTerminalLoginChecker(onlineInfo) + ws.multiTerminalLoginChecker(onlineInfo.clientOK, onlineInfo.oldClients, onlineInfo.newClient) } } }() http.HandleFunc("/", ws.wsHandler) // http.HandleFunc("/metrics", func(w http.ResponseWriter, r *http.Request) {}) - return http.ListenAndServe(":"+utils.IntToString(ws.port), nil) //Start listening + return http.ListenAndServe(":"+utils.IntToString(ws.port), nil) // Start listening } func (ws *WsServer) registerClient(client *Client) { @@ -165,7 +167,6 @@ func (ws *WsServer) registerClient(client *Client) { log.ZDebug(client.ctx, "user not exist", "userID", client.UserID, "platformID", client.PlatformID) atomic.AddInt64(&ws.onlineUserNum, 1) atomic.AddInt64(&ws.onlineUserConnNum, 1) - } else { i := &kickHandler{ clientOK: clientOK, @@ -176,7 +177,7 @@ func (ws *WsServer) registerClient(client *Client) { log.ZDebug(client.ctx, "user exist", "userID", client.UserID, "platformID", client.PlatformID) if clientOK { ws.clients.Set(client.UserID, client) - //已经有同平台的连接存在 + // 已经有同平台的连接存在 log.ZInfo(client.ctx, "repeat login", "userID", client.UserID, "platformID", client.PlatformID, "old remote addr", getRemoteAdders(oldClients)) atomic.AddInt64(&ws.onlineUserConnNum, 1) } else { @@ -194,6 +195,7 @@ func (ws *WsServer) registerClient(client *Client) { ws.onlineUserConnNum, ) } + func getRemoteAdders(client []*Client) string { var ret string for i, c := range client { @@ -206,86 +208,83 @@ func getRemoteAdders(client []*Client) string { return ret } -func (ws *WsServer) multiTerminalLoginChecker(info *kickHandler) { +func (ws *WsServer) KickUserConn(client *Client) error { + ws.clients.deleteClients(client.UserID, []*Client{client}) + return client.KickOnlineMessage() +} + +func (ws *WsServer) multiTerminalLoginChecker(clientOK bool, oldClients []*Client, newClient *Client) { switch config.Config.MultiLoginPolicy { case constant.DefalutNotKick: case constant.PCAndOther: - if constant.PlatformIDToClass(info.newClient.PlatformID) == constant.TerminalPC { + if constant.PlatformIDToClass(newClient.PlatformID) == constant.TerminalPC { return } fallthrough case constant.AllLoginButSameTermKick: - if info.clientOK { - ws.clients.deleteClients(info.newClient.UserID, info.oldClients) - for _, c := range info.oldClients { + if clientOK { + ws.clients.deleteClients(newClient.UserID, oldClients) + for _, c := range oldClients { err := c.KickOnlineMessage() if err != nil { log.ZWarn(c.ctx, "KickOnlineMessage", err) } } m, err := ws.cache.GetTokensWithoutError( - info.newClient.ctx, - info.newClient.UserID, - info.newClient.PlatformID, + newClient.ctx, + newClient.UserID, + newClient.PlatformID, ) if err != nil && err != redis.Nil { log.ZWarn( - info.newClient.ctx, + newClient.ctx, "get token from redis err", err, "userID", - info.newClient.UserID, + newClient.UserID, "platformID", - info.newClient.PlatformID, + newClient.PlatformID, ) return } if m == nil { log.ZWarn( - info.newClient.ctx, + newClient.ctx, "m is nil", errors.New("m is nil"), "userID", - info.newClient.UserID, + newClient.UserID, "platformID", - info.newClient.PlatformID, + newClient.PlatformID, ) return } log.ZDebug( - info.newClient.ctx, + newClient.ctx, "get token from redis", "userID", - info.newClient.UserID, + newClient.UserID, "platformID", - info.newClient.PlatformID, + newClient.PlatformID, "tokenMap", m, ) for k := range m { - if k != info.newClient.ctx.GetToken() { + if k != newClient.ctx.GetToken() { m[k] = constant.KickedToken } } - log.ZDebug(info.newClient.ctx, "set token map is ", "token map", m, "userID", info.newClient.UserID) - err = ws.cache.SetTokenMapByUidPid(info.newClient.ctx, info.newClient.UserID, info.newClient.PlatformID, m) + log.ZDebug(newClient.ctx, "set token map is ", "token map", m, "userID", newClient.UserID) + err = ws.cache.SetTokenMapByUidPid(newClient.ctx, newClient.UserID, newClient.PlatformID, m) if err != nil { - log.ZWarn( - info.newClient.ctx, - "SetTokenMapByUidPid err", - err, - "userID", - info.newClient.UserID, - "platformID", - info.newClient.PlatformID, - ) + log.ZWarn(newClient.ctx, "SetTokenMapByUidPid err", err, "userID", newClient.UserID, "platformID", newClient.PlatformID) return } } } - } + func (ws *WsServer) unregisterClient(client *Client) { defer ws.clientPool.Put(client) isDeleteUser := ws.clients.delete(client.UserID, client.ctx.GetRemoteAddr()) diff --git a/internal/msggateway/options.go b/internal/msggateway/options.go index cee415f99..24cbbe43f 100644 --- a/internal/msggateway/options.go +++ b/internal/msggateway/options.go @@ -16,33 +16,38 @@ package msggateway import "time" -type Option func(opt *configs) -type configs struct { - //长连接监听端口 - port int - //长连接允许最大链接数 - maxConnNum int64 - //连接握手超时时间 - handshakeTimeout time.Duration - //允许消息最大长度 - messageMaxMsgLength int -} +type ( + Option func(opt *configs) + configs struct { + // 长连接监听端口 + port int + // 长连接允许最大链接数 + maxConnNum int64 + // 连接握手超时时间 + handshakeTimeout time.Duration + // 允许消息最大长度 + messageMaxMsgLength int + } +) func WithPort(port int) Option { return func(opt *configs) { opt.port = port } } + func WithMaxConnNum(num int64) Option { return func(opt *configs) { opt.maxConnNum = num } } + func WithHandshakeTimeout(t time.Duration) Option { return func(opt *configs) { opt.handshakeTimeout = t } } + func WithMessageMaxMsgLength(length int) Option { return func(opt *configs) { opt.messageMaxMsgLength = length diff --git a/internal/msggateway/user_map.go b/internal/msggateway/user_map.go index 9e6757731..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 { @@ -29,6 +29,7 @@ type UserMap struct { func newUserMap() *UserMap { return &UserMap{} } + func (u *UserMap) GetAll(key string) ([]*Client, bool) { allClients, ok := u.m.Load(key) if ok { @@ -36,6 +37,7 @@ func (u *UserMap) GetAll(key string) ([]*Client, bool) { } return nil, ok } + func (u *UserMap) Get(key string, platformID int) ([]*Client, bool, bool) { allClients, userExisted := u.m.Load(key) if userExisted { @@ -47,12 +49,12 @@ func (u *UserMap) Get(key string, platformID int) ([]*Client, bool, bool) { } if len(clients) > 0 { return clients, userExisted, true - } return clients, userExisted, false } return nil, userExisted, false } + func (u *UserMap) Set(key string, v *Client) { allClients, existed := u.m.Load(key) if existed { @@ -67,6 +69,7 @@ func (u *UserMap) Set(key string, v *Client) { u.m.Store(key, clients) } } + func (u *UserMap) delete(key string, connRemoteAddr string) (isDeleteUser bool) { allClients, existed := u.m.Load(key) if existed { @@ -87,6 +90,7 @@ func (u *UserMap) delete(key string, connRemoteAddr string) (isDeleteUser bool) } return existed } + func (u *UserMap) deleteClients(key string, clients []*Client) (isDeleteUser bool) { m := utils.SliceToMapAny(clients, func(c *Client) (string, struct{}) { return c.ctx.GetRemoteAddr(), struct{}{} @@ -110,6 +114,7 @@ func (u *UserMap) deleteClients(key string, clients []*Client) (isDeleteUser boo } return existed } + func (u *UserMap) DeleteAll(key string) { u.m.Delete(key) } diff --git a/internal/msgtransfer/init.go b/internal/msgtransfer/init.go index 0a52dea96..037564f7a 100644 --- a/internal/msgtransfer/init.go +++ b/internal/msgtransfer/init.go @@ -19,19 +19,20 @@ import ( "sync" "time" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/config" + "google.golang.org/grpc" + "google.golang.org/grpc/credentials/insecure" + "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" - "google.golang.org/grpc" - "google.golang.org/grpc/credentials/insecure" + "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 { @@ -66,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())) @@ -74,7 +75,7 @@ func StartTransfer(prometheusPort int) error { msgDocModel := unrelation.NewMsgMongoDriver(mongo.GetDatabase()) msgMysModel := relation.NewChatLogGorm(db) chatLogDatabase := controller.NewChatLogDatabase(msgMysModel) - msgDatabase := controller.NewCommonMsgDatabase(msgDocModel, msgModel, msgMysModel) + msgDatabase := controller.NewCommonMsgDatabase(msgDocModel, msgModel) conversationRpcClient := rpcclient.NewConversationRpcClient(client) groupRpcClient := rpcclient.NewGroupRpcClient(client) msgTransfer := NewMsgTransfer(chatLogDatabase, msgDatabase, &conversationRpcClient, &groupRpcClient) @@ -84,9 +85,12 @@ func StartTransfer(prometheusPort int) error { func NewMsgTransfer(chatLogDatabase controller.ChatLogDatabase, msgDatabase controller.CommonMsgDatabase, - conversationRpcClient *rpcclient.ConversationRpcClient, groupRpcClient *rpcclient.GroupRpcClient) *MsgTransfer { - return &MsgTransfer{persistentCH: NewPersistentConsumerHandler(chatLogDatabase), historyCH: NewOnlineHistoryRedisConsumerHandler(msgDatabase, conversationRpcClient, groupRpcClient), - historyMongoCH: NewOnlineHistoryMongoConsumerHandler(msgDatabase)} + conversationRpcClient *rpcclient.ConversationRpcClient, groupRpcClient *rpcclient.GroupRpcClient, +) *MsgTransfer { + return &MsgTransfer{ + persistentCH: NewPersistentConsumerHandler(chatLogDatabase), historyCH: NewOnlineHistoryRedisConsumerHandler(msgDatabase, conversationRpcClient, groupRpcClient), + historyMongoCH: NewOnlineHistoryMongoConsumerHandler(msgDatabase), + } } func (m *MsgTransfer) initPrometheus() { diff --git a/internal/msgtransfer/online_history_msg_handler.go b/internal/msgtransfer/online_history_msg_handler.go index 574288de0..19121334a 100644 --- a/internal/msgtransfer/online_history_msg_handler.go +++ b/internal/msgtransfer/online_history_msg_handler.go @@ -21,27 +21,29 @@ 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 ConsumerMsgs = 3 -const SourceMessages = 4 -const MongoMessages = 5 -const ChannelNum = 100 +const ( + ConsumerMsgs = 3 + SourceMessages = 4 + MongoMessages = 5 + ChannelNum = 100 +) type MsgChannelValue struct { uniqueKey string @@ -85,7 +87,7 @@ func NewOnlineHistoryRedisConsumerHandler( ) *OnlineHistoryRedisConsumerHandler { var och OnlineHistoryRedisConsumerHandler och.msgDatabase = database - och.msgDistributionCh = make(chan Cmd2Value) //no buffer channel + och.msgDistributionCh = make(chan Cmd2Value) // no buffer channel go och.MessagesDistributionHandle() for i := 0; i < ChannelNum; i++ { och.chArrays[i] = make(chan Cmd2Value, 50) @@ -93,8 +95,10 @@ func NewOnlineHistoryRedisConsumerHandler( } och.conversationRpcClient = conversationRpcClient och.groupRpcClient = groupRpcClient - och.historyConsumerGroup = kafka.NewMConsumerGroup(&kafka.MConsumerGroupConfig{KafkaVersion: sarama.V2_0_0_0, - OffsetsInitial: sarama.OffsetNewest, IsReturnErr: false}, []string{config.Config.Kafka.LatestMsgToRedis.Topic}, + och.historyConsumerGroup = kafka.NewMConsumerGroup(&kafka.MConsumerGroupConfig{ + KafkaVersion: sarama.V2_0_0_0, + OffsetsInitial: sarama.OffsetNewest, IsReturnErr: false, + }, []string{config.Config.Kafka.LatestMsgToRedis.Topic}, config.Config.Kafka.Addr, config.Config.Kafka.ConsumerGroupID.MsgToRedis) // statistics.NewStatistics(&och.singleMsgSuccessCount, config.Config.ModuleName.MsgTransferName, fmt.Sprintf("%d // second singleMsgCount insert to mongo", constant.StatisticsTimeInterval), constant.StatisticsTimeInterval) @@ -163,7 +167,7 @@ func (och *OnlineHistoryRedisConsumerHandler) Run(channelID int) { } } -// 获取消息/通知 存储的消息列表, 不存储并且推送的消息列表, +// 获取消息/通知 存储的消息列表, 不存储并且推送的消息列表,. func (och *OnlineHistoryRedisConsumerHandler) getPushStorageMsgList( totalMsgs []*ContextMsg, ) (storageMsgList, notStorageMsgList, storageNotificatoinList, notStorageNotificationList, modifyMsgList []*sdkws.MsgData) { @@ -312,7 +316,7 @@ func (och *OnlineHistoryRedisConsumerHandler) MessagesDistributionHandle() { triggerChannelValue := cmd.Value.(TriggerChannelValue) ctx := triggerChannelValue.ctx consumerMessages := triggerChannelValue.cMsgList - //Aggregation map[userid]message list + // Aggregation map[userid]message list log.ZDebug(ctx, "batch messages come to distribution center", "length", len(consumerMessages)) for i := 0; i < len(consumerMessages); i++ { ctxMsg := &ContextMsg{} @@ -378,13 +382,13 @@ func (och *OnlineHistoryRedisConsumerHandler) MessagesDistributionHandle() { } } } + func withAggregationCtx(ctx context.Context, values []*ContextMsg) context.Context { var allMessageOperationID string for i, v := range values { if opid := mcontext.GetOperationID(v.ctx); opid != "" { if i == 0 { allMessageOperationID += opid - } else { allMessageOperationID += "$" + opid } @@ -431,13 +435,15 @@ func (och *OnlineHistoryRedisConsumerHandler) ConsumeClaim( ctx := mcontext.WithTriggerIDContext(context.Background(), utils.OperationIDGenerator()) log.ZDebug(ctx, "timer trigger msg consumer start", "length", len(ccMsg)) for i := 0; i < len(ccMsg)/split; i++ { - //log.Debug() + // log.Debug() och.msgDistributionCh <- Cmd2Value{Cmd: ConsumerMsgs, Value: TriggerChannelValue{ - ctx: ctx, cMsgList: ccMsg[i*split : (i+1)*split]}} + ctx: ctx, cMsgList: ccMsg[i*split : (i+1)*split], + }} } if (len(ccMsg) % split) > 0 { och.msgDistributionCh <- Cmd2Value{Cmd: ConsumerMsgs, Value: TriggerChannelValue{ - ctx: ctx, cMsgList: ccMsg[split*(len(ccMsg)/split):]}} + ctx: ctx, cMsgList: ccMsg[split*(len(ccMsg)/split):], + }} } log.ZDebug(ctx, "timer trigger msg consumer end", "length", len(ccMsg)) } diff --git a/internal/msgtransfer/online_msg_to_mongo_handler.go b/internal/msgtransfer/online_msg_to_mongo_handler.go index a7bfa3c8f..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 { @@ -34,8 +34,10 @@ type OnlineHistoryMongoConsumerHandler struct { func NewOnlineHistoryMongoConsumerHandler(database controller.CommonMsgDatabase) *OnlineHistoryMongoConsumerHandler { mc := &OnlineHistoryMongoConsumerHandler{ - historyConsumerGroup: kfk.NewMConsumerGroup(&kfk.MConsumerGroupConfig{KafkaVersion: sarama.V2_0_0_0, - OffsetsInitial: sarama.OffsetNewest, IsReturnErr: false}, []string{config.Config.Kafka.MsgToMongo.Topic}, + historyConsumerGroup: kfk.NewMConsumerGroup(&kfk.MConsumerGroupConfig{ + KafkaVersion: sarama.V2_0_0_0, + OffsetsInitial: sarama.OffsetNewest, IsReturnErr: false, + }, []string{config.Config.Kafka.MsgToMongo.Topic}, config.Config.Kafka.Addr, config.Config.Kafka.ConsumerGroupID.MsgToMongo), msgDatabase: database, } diff --git a/internal/msgtransfer/persistent_msg_handler.go b/internal/msgtransfer/persistent_msg_handler.go index 9ee0f5393..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" @@ -36,8 +36,10 @@ type PersistentConsumerHandler struct { func NewPersistentConsumerHandler(database controller.ChatLogDatabase) *PersistentConsumerHandler { return &PersistentConsumerHandler{ - persistentConsumerGroup: kfk.NewMConsumerGroup(&kfk.MConsumerGroupConfig{KafkaVersion: sarama.V2_0_0_0, - OffsetsInitial: sarama.OffsetNewest, IsReturnErr: false}, []string{config.Config.Kafka.LatestMsgToRedis.Topic}, + persistentConsumerGroup: kfk.NewMConsumerGroup(&kfk.MConsumerGroupConfig{ + KafkaVersion: sarama.V2_0_0_0, + OffsetsInitial: sarama.OffsetNewest, IsReturnErr: false, + }, []string{config.Config.Kafka.LatestMsgToRedis.Topic}, config.Config.Kafka.Addr, config.Config.Kafka.ConsumerGroupID.MsgToMySql), chatLogDatabase: database, } @@ -59,9 +61,9 @@ func (pc *PersistentConsumerHandler) handleChatWs2Mysql( } return log.ZDebug(ctx, "handleChatWs2Mysql", "msg", msgFromMQ.MsgData) - //Control whether to store history messages (mysql) + // Control whether to store history messages (mysql) isPersist := utils.GetSwitchFromOptions(msgFromMQ.MsgData.Options, constant.IsPersistent) - //Only process receiver data + // Only process receiver data if isPersist { switch msgFromMQ.MsgData.SessionType { case constant.SingleChatType, constant.NotificationChatType: 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 8b880ae1f..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 @@ -95,7 +96,7 @@ func (f *Fcm) Push(ctx context.Context, userIDs []string, title, content string, if err == nil { apns.Payload.Aps.Badge = &unreadCountSum } else { - //log.Error(operationID, "IncrUserBadgeUnreadCountSum redis err", err.Error(), uid) + // log.Error(operationID, "IncrUserBadgeUnreadCountSum redis err", err.Error(), uid) Fail++ continue } @@ -107,7 +108,7 @@ func (f *Fcm) Push(ctx context.Context, userIDs []string, title, content string, zero := 1 apns.Payload.Aps.Badge = &zero } else { - //log.Error(operationID, "GetUserBadgeUnreadCountSum redis err", err.Error(), uid) + // log.Error(operationID, "GetUserBadgeUnreadCountSum redis err", err.Error(), uid) Fail++ continue } @@ -127,7 +128,7 @@ func (f *Fcm) Push(ctx context.Context, userIDs []string, title, content string, response, err := f.fcmMsgCli.SendAll(ctx, messages) if err != nil { Fail = Fail + messageCount - //log.Info(operationID, "some token push err", err.Error(), messageCount) + // log.Info(operationID, "some token push err", err.Error(), messageCount) } else { Success = Success + response.SuccessCount Fail = Fail + response.FailureCount diff --git a/internal/push/offlinepush/getui/body.go b/internal/push/offlinepush/getui/body.go index bd0f7b07f..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 { @@ -145,7 +145,7 @@ func newPushReq(title, content string) PushReq { } func newBatchPushReq(userIDs []string, taskID string) PushReq { - var IsAsync = true + IsAsync := true return PushReq{Audience: &Audience{Alias: userIDs}, IsAsync: &IsAsync, TaskID: &taskID} } diff --git a/internal/push/offlinepush/getui/push.go b/internal/push/offlinepush/getui/push.go index 2681aede6..b440ef71b 100644 --- a/internal/push/offlinepush/getui/push.go +++ b/internal/push/offlinepush/getui/push.go @@ -15,27 +15,26 @@ package getui import ( - "sync" - - "github.com/go-redis/redis" - "context" "crypto/sha256" "encoding/hex" "errors" "strconv" + "sync" "time" + "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 ( @@ -49,7 +48,7 @@ const ( taskURL = "/push/list/message" batchPushURL = "/push/list/alias" - // codes + // codes. tokenExpireCode = 10001 tokenExpireTime = 60 * 60 * 23 taskIDTTL = 1000 * 60 * 60 * 24 @@ -142,7 +141,7 @@ func (g *Client) GetTaskID(ctx context.Context, token string, pushReq PushReq) ( return respTask.TaskID, nil } -// max num is 999 +// max num is 999. func (g *Client) batchPush(ctx context.Context, token string, userIDs []string, pushReq PushReq) error { taskID, err := g.GetTaskID(ctx, token, pushReq) if err != nil { 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 eae782c63..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 ( @@ -66,6 +66,7 @@ func (p *Platform) Set(os string) error { return nil } + func (p *Platform) SetPlatform(platform string) error { switch platform { case constant.AndroidPlatformStr: @@ -75,8 +76,8 @@ func (p *Platform) SetPlatform(platform string) error { default: return errors.New("platform err") } - } + func (p *Platform) SetIOS() error { return p.Set(IOS) } diff --git a/internal/push/offlinepush/jpush/body/pushobj.go b/internal/push/offlinepush/jpush/body/pushobj.go index 950f93777..c8c112f69 100644 --- a/internal/push/offlinepush/jpush/body/pushobj.go +++ b/internal/push/offlinepush/jpush/body/pushobj.go @@ -37,6 +37,7 @@ func (p *PushObj) SetNotification(no *Notification) { func (p *PushObj) SetMessage(m *Message) { p.Message = m } + func (p *PushObj) SetOptions(o *Options) { p.Options = o } 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/offlinepush/offlinepush_interface.go b/internal/push/offlinepush/offlinepush_interface.go index 44dfce2b8..a5d4051f9 100644 --- a/internal/push/offlinepush/offlinepush_interface.go +++ b/internal/push/offlinepush/offlinepush_interface.go @@ -18,10 +18,12 @@ import ( "context" ) +// OfflinePusher Offline Pusher. type OfflinePusher interface { Push(ctx context.Context, userIDs []string, title, content string, opts *Opts) error } +// Opts opts. type Opts struct { Signal *Signal IOSPushSound string @@ -29,6 +31,7 @@ type Opts struct { Ex string } +// Signal message id. type Signal struct { ClientMsgID string } diff --git a/internal/push/push_handler.go b/internal/push/push_handler.go index 86db1c762..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 { @@ -37,8 +37,10 @@ type ConsumerHandler struct { func NewConsumerHandler(pusher *Pusher) *ConsumerHandler { var consumerHandler ConsumerHandler consumerHandler.pusher = pusher - consumerHandler.pushConsumerGroup = kfk.NewMConsumerGroup(&kfk.MConsumerGroupConfig{KafkaVersion: sarama.V2_0_0_0, - OffsetsInitial: sarama.OffsetNewest, IsReturnErr: false}, []string{config.Config.Kafka.MsgToPush.Topic}, config.Config.Kafka.Addr, + consumerHandler.pushConsumerGroup = kfk.NewMConsumerGroup(&kfk.MConsumerGroupConfig{ + KafkaVersion: sarama.V2_0_0_0, + OffsetsInitial: sarama.OffsetNewest, IsReturnErr: false, + }, []string{config.Config.Kafka.MsgToPush.Topic}, config.Config.Kafka.Addr, config.Config.Kafka.ConsumerGroupID.MsgToPush) return &consumerHandler } @@ -63,7 +65,13 @@ func (c *ConsumerHandler) handleMs2PsChat(ctx context.Context, msg []byte) { case constant.SuperGroupChatType: err = c.pusher.Push2SuperGroup(ctx, pbData.MsgData.GroupID, pbData.MsgData) default: - err = c.pusher.Push2User(ctx, []string{pbData.MsgData.SendID, pbData.MsgData.RecvID}, pbData.MsgData) + var pushUserIDs []string + if pbData.MsgData.SendID != pbData.MsgData.RecvID { + pushUserIDs = []string{pbData.MsgData.SendID, pbData.MsgData.RecvID} + } else { + pushUserIDs = []string{pbData.MsgData.SendID} + } + err = c.pusher.Push2User(ctx, pushUserIDs, pbData.MsgData) } if err != nil { if err == errNoOfflinePusher { @@ -76,7 +84,8 @@ func (c *ConsumerHandler) handleMs2PsChat(ctx context.Context, msg []byte) { func (ConsumerHandler) Setup(_ sarama.ConsumerGroupSession) error { return nil } func (ConsumerHandler) Cleanup(_ sarama.ConsumerGroupSession) error { return nil } func (c *ConsumerHandler) ConsumeClaim(sess sarama.ConsumerGroupSession, - claim sarama.ConsumerGroupClaim) error { + claim sarama.ConsumerGroupClaim, +) error { for msg := range claim.Messages() { ctx := c.pushConsumerGroup.GetContextFromMsg(msg) c.handleMs2PsChat(ctx, msg.Value) 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 f12b4b4c8..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 { @@ -54,7 +54,8 @@ var errNoOfflinePusher = errors.New("no offlinePusher is configured") func NewPusher(discov discoveryregistry.SvcDiscoveryRegistry, offlinePusher offlinepush.OfflinePusher, database controller.PushDatabase, groupLocalCache *localcache.GroupLocalCache, conversationLocalCache *localcache.ConversationLocalCache, - conversationRpcClient *rpcclient.ConversationRpcClient, groupRpcClient *rpcclient.GroupRpcClient, msgRpcClient *rpcclient.MessageRpcClient) *Pusher { + conversationRpcClient *rpcclient.ConversationRpcClient, groupRpcClient *rpcclient.GroupRpcClient, msgRpcClient *rpcclient.MessageRpcClient, +) *Pusher { return &Pusher{ discov: discov, database: database, @@ -223,7 +224,7 @@ func (p *Pusher) Push2SuperGroup(ctx context.Context, groupID string, msg *sdkws } needOfflinePushUserIDs = utils.DifferenceString(notNotificationUserIDs, needOfflinePushUserIDs) } - //Use offline push messaging + // Use offline push messaging if len(needOfflinePushUserIDs) > 0 { var offlinePushUserIDs []string err = callbackOfflinePush(ctx, needOfflinePushUserIDs, msg, &offlinePushUserIDs) @@ -254,7 +255,7 @@ func (p *Pusher) GetConnsAndOnlinePush(ctx context.Context, msg *sdkws.MsgData, if err != nil { return nil, err } - //Online push message + // Online push message for _, v := range conns { msgClient := msggateway.NewMsgGatewayClient(v) reply, err := msgClient.SuperGroupOnlineBatchPushOneMsg(ctx, &msggateway.OnlineBatchPushOneMsgReq{MsgData: msg, PushToUserIDs: pushToUserIDs}) @@ -265,7 +266,6 @@ func (p *Pusher) GetConnsAndOnlinePush(ctx context.Context, msg *sdkws.MsgData, if reply != nil && reply.SinglePushResult != nil { wsResults = append(wsResults, reply.SinglePushResult...) } - } return wsResults, nil } 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 48e21fbce..48e4e5922 100644 --- a/internal/rpc/auth/auth.go +++ b/internal/rpc/auth/auth.go @@ -19,18 +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/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 { @@ -129,11 +130,16 @@ func (s *authServer) forceKickOff(ctx context.Context, userID string, platformID if err != nil { return err } + for _, v := range conns { + log.ZDebug(ctx, "forceKickOff", "conn", v.(*grpc.ClientConn).Target()) + } for _, v := range conns { client := msggateway.NewMsgGatewayClient(v) kickReq := &msggateway.KickUserOfflineReq{KickUserIDList: []string{userID}, PlatformID: platformID} _, err := client.KickUserOffline(ctx, kickReq) - return utils.Wrap(err, "") + if err != nil { + log.ZError(ctx, "forceKickOff", err, "kickReq", kickReq) + } } return nil } diff --git a/internal/rpc/conversation/conversaion.go b/internal/rpc/conversation/conversaion.go index 5372d4220..e27756749 100644 --- a/internal/rpc/conversation/conversaion.go +++ b/internal/rpc/conversation/conversaion.go @@ -17,21 +17,22 @@ package conversation import ( "context" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/constant" + "google.golang.org/grpc" + "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" - "google.golang.org/grpc" + 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 { @@ -184,7 +185,7 @@ func (c *conversationServer) SetConversations(ctx context.Context, req *pbConver return &pbConversation.SetConversationsResp{}, nil } -// 获取超级大群开启免打扰的用户ID +// 获取超级大群开启免打扰的用户ID. func (c *conversationServer) GetRecvMsgNotNotifyUserIDs(ctx context.Context, req *pbConversation.GetRecvMsgNotNotifyUserIDsReq) (*pbConversation.GetRecvMsgNotNotifyUserIDsResp, error) { userIDs, err := c.conversationDatabase.FindRecvMsgNotNotifyUserIDs(ctx, req.GroupID) if err != nil { @@ -193,7 +194,7 @@ func (c *conversationServer) GetRecvMsgNotNotifyUserIDs(ctx context.Context, req return &pbConversation.GetRecvMsgNotNotifyUserIDsResp{UserIDs: userIDs}, nil } -// create conversation without notification for msg redis transfer +// 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) @@ -247,7 +248,10 @@ func (c *conversationServer) GetUserConversationIDsHash(ctx context.Context, req return &pbConversation.GetUserConversationIDsHashResp{Hash: hash}, nil } -func (c *conversationServer) GetConversationsByConversationID(ctx context.Context, req *pbConversation.GetConversationsByConversationIDReq) (*pbConversation.GetConversationsByConversationIDResp, error) { +func (c *conversationServer) GetConversationsByConversationID( + ctx context.Context, + req *pbConversation.GetConversationsByConversationIDReq, +) (*pbConversation.GetConversationsByConversationIDResp, error) { conversations, err := c.conversationDatabase.GetConversationsByConversationID(ctx, req.ConversationIDs) if err != nil { return nil, err 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 4c528d1d1..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,7 +83,12 @@ func Start(client registry.SvcDiscoveryRegistry, server *grpc.Server) error { return nil } -// ok +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, req *pbfriend.ApplyToAddFriendReq, @@ -116,7 +121,7 @@ func (s *friendServer) ApplyToAddFriend( return resp, nil } -// ok +// ok. func (s *friendServer) ImportFriends( ctx context.Context, req *pbfriend.ImportFriendReq, @@ -142,7 +147,7 @@ func (s *friendServer) ImportFriends( return &pbfriend.ImportFriendResp{}, nil } -// ok +// ok. func (s *friendServer) RespondFriendApply( ctx context.Context, req *pbfriend.RespondFriendApplyReq, @@ -178,7 +183,7 @@ func (s *friendServer) RespondFriendApply( return nil, errs.ErrArgs.Wrap("req.HandleResult != -1/1") } -// ok +// ok. func (s *friendServer) DeleteFriend( ctx context.Context, req *pbfriend.DeleteFriendReq, @@ -199,7 +204,7 @@ func (s *friendServer) DeleteFriend( return resp, nil } -// ok +// ok. func (s *friendServer) SetFriendRemark( ctx context.Context, req *pbfriend.SetFriendRemarkReq, @@ -220,7 +225,7 @@ func (s *friendServer) SetFriendRemark( return resp, nil } -// ok +// ok. func (s *friendServer) GetDesignatedFriends( ctx context.Context, req *pbfriend.GetDesignatedFriendsReq, @@ -240,7 +245,7 @@ func (s *friendServer) GetDesignatedFriends( return resp, nil } -// ok 获取接收到的好友申请(即别人主动申请的) +// ok 获取接收到的好友申请(即别人主动申请的). func (s *friendServer) GetPaginationFriendsApplyTo( ctx context.Context, req *pbfriend.GetPaginationFriendsApplyToReq, @@ -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 } @@ -263,7 +267,7 @@ func (s *friendServer) GetPaginationFriendsApplyTo( return resp, nil } -// ok 获取主动发出去的好友申请列表 +// ok 获取主动发出去的好友申请列表. func (s *friendServer) GetPaginationFriendsApplyFrom( ctx context.Context, req *pbfriend.GetPaginationFriendsApplyFromReq, @@ -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 } @@ -286,7 +289,7 @@ func (s *friendServer) GetPaginationFriendsApplyFrom( return resp, nil } -// ok +// ok. func (s *friendServer) IsFriend( ctx context.Context, req *pbfriend.IsFriendReq, @@ -300,7 +303,7 @@ func (s *friendServer) IsFriend( return resp, nil } -// ok +// ok. func (s *friendServer) GetPaginationFriends( ctx context.Context, req *pbfriend.GetPaginationFriendsReq, @@ -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 161e8b8f8..4c041e13a 100644 --- a/internal/rpc/group/group.go +++ b/internal/rpc/group/group.go @@ -17,35 +17,37 @@ package group import ( "context" "fmt" - pbConversation "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/conversation" - "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/wrapperspb" "math/big" "math/rand" "strconv" "strings" "time" + 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" - "google.golang.org/grpc" + 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 { @@ -92,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)) @@ -229,7 +236,7 @@ func (s *groupServer) CreateGroup(ctx context.Context, req *pbGroup.CreateGroupR } }() } else { - //s.Notification.GroupCreatedNotification(ctx, group, groupMembers, userMap) + // s.Notification.GroupCreatedNotification(ctx, group, groupMembers, userMap) tips := &sdkws.GroupCreatedTips{ Group: resp.GroupInfo, OperationTime: group.CreateTime.UnixMilli(), @@ -258,7 +265,7 @@ func (s *groupServer) GetJoinedGroupList(ctx context.Context, req *pbGroup.GetJo pageNumber = req.Pagination.PageNumber showNumber = req.Pagination.ShowNumber } - //total, members, err := s.GroupDatabase.PageGroupMember(ctx, nil, []string{req.FromUserID}, nil, pageNumber, showNumber) + // total, members, err := s.GroupDatabase.PageGroupMember(ctx, nil, []string{req.FromUserID}, nil, pageNumber, showNumber) total, members, err := s.GroupDatabase.PageGetJoinGroup(ctx, req.FromUserID, pageNumber, showNumber) if err != nil { return nil, err @@ -515,7 +522,7 @@ func (s *groupServer) KickGroupMember(ctx context.Context, req *pbGroup.KickGrou Notification: group.Notification, Introduction: group.Introduction, FaceURL: group.FaceURL, - //OwnerUserID: owner[0].UserID, + // OwnerUserID: owner[0].UserID, CreateTime: group.CreateTime.UnixMilli(), MemberCount: num, Ex: group.Ex, @@ -575,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 @@ -585,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 } @@ -900,7 +905,6 @@ func (s *groupServer) SetGroupInfo(ctx context.Context, req *pbGroup.SetGroupInf }() num++ s.Notification.GroupInfoSetAnnouncementNotification(ctx, &sdkws.GroupInfoSetAnnouncementTips{Group: tips.Group, OpUser: tips.OpUser}) - } switch len(data) - num { case 0: @@ -1104,7 +1108,7 @@ func (s *groupServer) DismissGroup(ctx context.Context, req *pbGroup.DismissGrou if err != nil { return nil, err } - //s.Notification.GroupDismissedNotification(ctx, req) + // s.Notification.GroupDismissedNotification(ctx, req) tips := &sdkws.GroupDismissedTips{ Group: s.groupDB2PB(group, owner.UserID, num), OpUser: &sdkws.GroupMemberFullInfo{}, diff --git a/internal/rpc/group/statistics.go b/internal/rpc/group/statistics.go index 9b83a5ead..8aeefbee3 100644 --- a/internal/rpc/group/statistics.go +++ b/internal/rpc/group/statistics.go @@ -16,9 +16,10 @@ package group import ( "context" - "github.com/OpenIMSDK/Open-IM-Server/pkg/errs" - "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/group" "time" + + "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 1176924d5..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) { @@ -39,7 +39,7 @@ func (m *msgServer) GetConversationsHasReadAndMaxSeq(ctx context.Context, req *m if err != nil { return nil, err } - var conversationMaxSeqMap = make(map[string]int64) + conversationMaxSeqMap := make(map[string]int64) for _, conversation := range conversations { if conversation.MaxSeq != 0 { conversationMaxSeqMap[conversation.ConversationID] = conversation.MaxSeq 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 671450eee..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) { @@ -84,6 +84,7 @@ func (m *msgServer) sendMsgSuperGroupChat( resp.ClientMsgID = req.MsgData.ClientMsgID return resp, nil } + func (m *msgServer) setConversationAtInfo(nctx context.Context, msg *sdkws.MsgData) { log.ZDebug(nctx, "setConversationAtInfo", "msg", msg) ctx := mcontext.NewCtx("@@@" + mcontext.GetOperationID(nctx)) @@ -101,7 +102,7 @@ func (m *msgServer) setConversationAtInfo(nctx context.Context, msg *sdkws.MsgDa return } atUserID = utils.DifferenceString([]string{constant.AtAllString}, msg.AtUserIDList) - if len(atUserID) == 0 { //just @everyone + if len(atUserID) == 0 { // just @everyone conversation.GroupAtType = &wrapperspb.Int32Value{Value: constant.AtAll} } else { //@Everyone and @other people conversation.GroupAtType = &wrapperspb.Int32Value{Value: constant.AtAllAtMe} @@ -123,7 +124,6 @@ func (m *msgServer) setConversationAtInfo(nctx context.Context, msg *sdkws.MsgDa log.ZWarn(ctx, "SetConversations", err, msg.AtUserIDList, conversation) } } - } func (m *msgServer) sendMsgNotification( @@ -189,3 +189,7 @@ func (m *msgServer) sendMsgSingleChat(ctx context.Context, req *pbMsg.SendMsgReq return resp, nil } } + +func (m *msgServer) BatchSendMsg(ctx context.Context, in *pbMsg.BatchSendMessageReq) (*pbMsg.BatchSendMessageResp, error) { + return nil, nil +} 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 cf50dfb9f..542f59d4b 100644 --- a/internal/rpc/msg/server.go +++ b/internal/rpc/msg/server.go @@ -16,36 +16,36 @@ package msg import ( "context" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/relation" "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 MessageInterceptorChain []MessageInterceptorFunc -type msgServer struct { - RegisterCenter discoveryregistry.SvcDiscoveryRegistry - MsgDatabase controller.CommonMsgDatabase - Group *rpcclient.GroupRpcClient - User *rpcclient.UserRpcClient - Conversation *rpcclient.ConversationRpcClient - friend *rpcclient.FriendRpcClient - GroupLocalCache *localcache.GroupLocalCache - ConversationLocalCache *localcache.ConversationLocalCache - MessageLocker MessageLocker - Handlers MessageInterceptorChain - notificationSender *rpcclient.NotificationSender -} +type ( + MessageInterceptorChain []MessageInterceptorFunc + msgServer struct { + RegisterCenter discoveryregistry.SvcDiscoveryRegistry + MsgDatabase controller.CommonMsgDatabase + Group *rpcclient.GroupRpcClient + User *rpcclient.UserRpcClient + Conversation *rpcclient.ConversationRpcClient + friend *rpcclient.FriendRpcClient + GroupLocalCache *localcache.GroupLocalCache + ConversationLocalCache *localcache.ConversationLocalCache + Handlers MessageInterceptorChain + notificationSender *rpcclient.NotificationSender + } +) func (m *msgServer) addInterceptorHandler(interceptorFunc ...MessageInterceptorFunc) { m.Handlers = append(m.Handlers, interceptorFunc...) @@ -80,12 +80,7 @@ func Start(client discoveryregistry.SvcDiscoveryRegistry, server *grpc.Server) e userRpcClient := rpcclient.NewUserRpcClient(client) groupRpcClient := rpcclient.NewGroupRpcClient(client) friendRpcClient := rpcclient.NewFriendRpcClient(client) - mysql, err := relation.NewGormDB() - if err != nil { - return err - } - msgMysModel := relation.NewChatLogGorm(mysql) - msgDatabase := controller.NewCommonMsgDatabase(msgDocModel, cacheModel, msgMysModel) + msgDatabase := controller.NewCommonMsgDatabase(msgDocModel, cacheModel) s := &msgServer{ Conversation: &conversationClient, User: &userRpcClient, @@ -95,7 +90,6 @@ func Start(client discoveryregistry.SvcDiscoveryRegistry, server *grpc.Server) e GroupLocalCache: localcache.NewGroupLocalCache(&groupRpcClient), ConversationLocalCache: localcache.NewConversationLocalCache(&conversationClient), friend: &friendRpcClient, - MessageLocker: NewLockerMessage(cacheModel), } s.notificationSender = rpcclient.NewNotificationSender(rpcclient.WithLocalSendMsg(s.SendMsg)) s.addInterceptorHandler(MessageHasReadEnabled) diff --git a/internal/rpc/msg/statistics.go b/internal/rpc/msg/statistics.go index 309534507..c5a4658bb 100644 --- a/internal/rpc/msg/statistics.go +++ b/internal/rpc/msg/statistics.go @@ -16,15 +16,24 @@ package msg import ( "context" - "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" "time" + + "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/table/unrelation" + "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) { - msgCount, userCount, users, dateCount, err := m.MsgDatabase.RangeUserSendCount(ctx, time.UnixMilli(req.Start), time.UnixMilli(req.End), req.Group, req.Ase, req.Pagination.PageNumber, req.Pagination.ShowNumber) + msgCount, userCount, users, dateCount, err := m.MsgDatabase.RangeUserSendCount( + ctx, + time.UnixMilli(req.Start), + time.UnixMilli(req.End), + req.Group, + req.Ase, + req.Pagination.PageNumber, + req.Pagination.ShowNumber, + ) if err != nil { return nil, err } @@ -59,7 +68,14 @@ func (m *msgServer) GetActiveUser(ctx context.Context, req *msg.GetActiveUserReq } func (m *msgServer) GetActiveGroup(ctx context.Context, req *msg.GetActiveGroupReq) (*msg.GetActiveGroupResp, error) { - msgCount, groupCount, groups, dateCount, err := m.MsgDatabase.RangeGroupSendCount(ctx, time.UnixMilli(req.Start), time.UnixMilli(req.End), req.Ase, req.Pagination.PageNumber, req.Pagination.ShowNumber) + msgCount, groupCount, groups, dateCount, err := m.MsgDatabase.RangeGroupSendCount( + ctx, + time.UnixMilli(req.Start), + time.UnixMilli(req.End), + req.Ase, + req.Pagination.PageNumber, + req.Pagination.ShowNumber, + ) if err != nil { return nil, err } diff --git a/internal/rpc/msg/sync_msg.go b/internal/rpc/msg/sync_msg.go index 01510ffef..edcb4ff89 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/common/constant" - "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/msg" - "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/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" ) func (m *msgServer) PullMessageBySeqs( @@ -94,6 +95,7 @@ func (m *msgServer) GetMaxSeq(ctx context.Context, req *sdkws.GetMaxSeqReq) (*sd for _, conversationID := range conversationIDs { conversationIDs = append(conversationIDs, utils.GetNotificationConversationIDByConversationID(conversationID)) } + conversationIDs = append(conversationIDs, utils.GetSelfNotificationConversationID(req.UserID)) log.ZDebug(ctx, "GetMaxSeq", "conversationIDs", conversationIDs) maxSeqs, err := m.MsgDatabase.GetMaxSeqs(ctx, conversationIDs) if err != nil { @@ -107,11 +109,11 @@ func (m *msgServer) GetMaxSeq(ctx context.Context, req *sdkws.GetMaxSeqReq) (*sd func (m *msgServer) SearchMessage(ctx context.Context, req *msg.SearchMessageReq) (resp *msg.SearchMessageResp, err error) { var chatLogs []*sdkws.MsgData + var total int32 resp = &msg.SearchMessageResp{} - if chatLogs, err = m.MsgDatabase.SearchMessage(ctx, req); err != nil { + if total, chatLogs, err = m.MsgDatabase.SearchMessage(ctx, req); err != nil { return nil, err } - var num int for _, chatLog := range chatLogs { pbChatLog := &msg.ChatLog{} utils.CopyStructFields(pbChatLog, chatLog) @@ -130,7 +132,7 @@ func (m *msgServer) SearchMessage(ctx context.Context, req *msg.SearchMessageReq if err != nil { return nil, err } - pbChatLog.SenderNickname = recvUser.Nickname + pbChatLog.RecvNickname = recvUser.Nickname case constant.GroupChatType, constant.SuperGroupChatType: group, err := m.Group.GetGroupInfo(ctx, chatLog.GroupID) @@ -145,9 +147,8 @@ func (m *msgServer) SearchMessage(ctx context.Context, req *msg.SearchMessageReq pbChatLog.GroupType = group.GroupType } resp.ChatLogs = append(resp.ChatLogs, pbChatLog) - num++ } - resp.ChatLogsNum = int32(num) + resp.ChatLogsNum = total return resp, nil } 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 be2945182..32c05ec82 100644 --- a/internal/rpc/msg/verify.go +++ b/internal/rpc/msg/verify.go @@ -20,17 +20,15 @@ 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} -) +var ExcludeContentType = []int{constant.HasReadReceipt} type Validator interface { validate(pb *msg.SendMsgReq) (bool, int32, string) @@ -126,6 +124,7 @@ func (m *msgServer) messageVerification(ctx context.Context, data *msg.SendMsgRe return nil } } + func (m *msgServer) encapsulateMsgData(msg *sdkws.MsgData) { msg.ServerMsgID = GetMsgID(msg.SendID) msg.SendTime = utils.GetCurrentTimestampByMill() diff --git a/internal/rpc/third/s3.go b/internal/rpc/third/s3.go index 984fca94f..38b0eb03c 100644 --- a/internal/rpc/third/s3.go +++ b/internal/rpc/third/s3.go @@ -16,14 +16,15 @@ package third import ( "context" + "time" + "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" - "time" + "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 99ddcb342..5db6c39e4 100644 --- a/internal/rpc/third/third.go +++ b/internal/rpc/third/third.go @@ -17,22 +17,24 @@ package third import ( "context" "fmt" + "net/url" + "time" + "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/s3" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/s3/cos" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/s3/minio" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/s3/oss" - "net/url" - "time" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/config" + "google.golang.org/grpc" + "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" - "google.golang.org/grpc" + "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 247f3e21d..5a7d1697b 100644 --- a/internal/rpc/third/tool.go +++ b/internal/rpc/third/tool.go @@ -18,12 +18,13 @@ import ( "context" "errors" "fmt" - "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" "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 { 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 9b1e691e5..65e977274 100644 --- a/internal/rpc/user/user.go +++ b/internal/rpc/user/user.go @@ -17,28 +17,30 @@ package user import ( "context" "errors" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/log" "strings" "time" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/config" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/constant" + "github.com/OpenIMSDK/tools/log" + "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" - "github.com/OpenIMSDK/Open-IM-Server/pkg/utils" "google.golang.org/grpc" + + "github.com/OpenIMSDK/tools/utils" ) type userServer struct { @@ -65,7 +67,7 @@ func Start(client registry.SvcDiscoveryRegistry, server *grpc.Server) error { return errors.New("len(config.Config.Manager.AppManagerUid) != len(config.Config.Manager.Nickname)") } for k, v := range config.Config.Manager.UserID { - users = append(users, &tablerelation.UserModel{UserID: v, Nickname: config.Config.Manager.Nickname[k]}) + users = append(users, &tablerelation.UserModel{UserID: v, Nickname: config.Config.Manager.Nickname[k], AppMangerLevel: constant.AppAdmin}) } userDB := relation.NewUserGorm(db) cache := cache.NewUserCacheRedis(rdb, userDB, cache.GetDefaultOpt()) @@ -233,7 +235,7 @@ func (s *userServer) GetGlobalRecvMessageOpt(ctx context.Context, req *pbuser.Ge } func (s *userServer) GetAllUserID(ctx context.Context, req *pbuser.GetAllUserIDReq) (resp *pbuser.GetAllUserIDResp, err error) { - userIDs, err := s.UserDatabase.GetAllUserID(ctx) + userIDs, err := s.UserDatabase.GetAllUserID(ctx, req.Pagination.PageNumber, req.Pagination.ShowNumber) if err != nil { return nil, err } diff --git a/internal/tools/conversation.go b/internal/tools/conversation.go index 8efa77be8..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() { @@ -33,17 +33,30 @@ func (c *MsgTool) ConversationsDestructMsgs() { } log.ZDebug(context.Background(), "nums conversations need destruct", "nums", len(conversations)) for _, conversation := range conversations { - log.ZDebug(ctx, "UserMsgsDestruct", "conversationID", conversation.ConversationID, "ownerUserID", conversation.OwnerUserID, "msgDestructTime", conversation.MsgDestructTime, "lastMsgDestructTime", conversation.LatestMsgDestructTime) + ctx = mcontext.NewCtx(utils.GetSelfFuncName() + "-" + utils.OperationIDGenerator() + "-" + conversation.ConversationID + "-" + conversation.OwnerUserID) + log.ZDebug( + ctx, + "UserMsgsDestruct", + "conversationID", + conversation.ConversationID, + "ownerUserID", + conversation.OwnerUserID, + "msgDestructTime", + conversation.MsgDestructTime, + "lastMsgDestructTime", + conversation.LatestMsgDestructTime, + ) + now := time.Now() seqs, err := c.msgDatabase.UserMsgsDestruct(ctx, conversation.OwnerUserID, conversation.ConversationID, conversation.MsgDestructTime, conversation.LatestMsgDestructTime) if err != nil { log.ZError(ctx, "user msg destruct failed", err, "conversationID", conversation.ConversationID, "ownerUserID", conversation.OwnerUserID) continue } - if err := c.conversationDatabase.UpdateUsersConversationFiled(ctx, []string{conversation.OwnerUserID}, conversation.ConversationID, map[string]interface{}{"latest_msg_destruct_time": time.Now()}); err != nil { - log.ZError(ctx, "updateUsersConversationFiled failed", err, "conversationID", conversation.ConversationID, "ownerUserID", conversation.OwnerUserID) - continue - } if len(seqs) > 0 { + if err := c.conversationDatabase.UpdateUsersConversationFiled(ctx, []string{conversation.OwnerUserID}, conversation.ConversationID, map[string]interface{}{"latest_msg_destruct_time": now}); err != nil { + log.ZError(ctx, "updateUsersConversationFiled failed", err, "conversationID", conversation.ConversationID, "ownerUserID", conversation.OwnerUserID) + continue + } if err := c.msgNotificationSender.UserDeleteMsgsNotification(ctx, conversation.OwnerUserID, conversation.ConversationID, seqs); err != nil { log.ZError(ctx, "userDeleteMsgsNotification failed", err, "conversationID", conversation.ConversationID, "ownerUserID", conversation.OwnerUserID) } 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 40539c757..8e67bc350 100644 --- a/internal/tools/msg.go +++ b/internal/tools/msg.go @@ -20,23 +20,24 @@ import ( "math" "time" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/config" + "github.com/redis/go-redis/v9" + "google.golang.org/grpc" + "google.golang.org/grpc/credentials/insecure" + "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/redis/go-redis/v9" - "google.golang.org/grpc" - "google.golang.org/grpc/credentials/insecure" + "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 { @@ -48,7 +49,8 @@ type MsgTool struct { } func NewMsgTool(msgDatabase controller.CommonMsgDatabase, userDatabase controller.UserDatabase, - groupDatabase controller.GroupDatabase, conversationDatabase controller.ConversationDatabase, msgNotificationSender *notification.MsgNotificationSender) *MsgTool { + groupDatabase controller.GroupDatabase, conversationDatabase controller.ConversationDatabase, msgNotificationSender *notification.MsgNotificationSender, +) *MsgTool { return &MsgTool{ msgDatabase: msgDatabase, userDatabase: userDatabase, @@ -79,14 +81,18 @@ func InitMsgTool() (*MsgTool, error) { } discov.AddOption(mw.GrpcClient(), grpc.WithTransportCredentials(insecure.NewCredentials())) userDB := relation.NewUserGorm(db) - msgDatabase := controller.InitCommonMsgDatabase(rdb, mongo.GetDatabase(), db) + msgDatabase := controller.InitCommonMsgDatabase(rdb, mongo.GetDatabase()) userDatabase := controller.NewUserDatabase( userDB, cache.NewUserCacheRedis(rdb, relation.NewUserGorm(db), cache.GetDefaultOpt()), tx.NewGorm(db), ) groupDatabase := controller.InitGroupDatabase(db, rdb, mongo.GetDatabase()) - conversationDatabase := controller.NewConversationDatabase(relation.NewConversationGorm(db), cache.NewConversationRedis(rdb, cache.GetDefaultOpt(), relation.NewConversationGorm(db)), tx.NewGorm(db)) + conversationDatabase := controller.NewConversationDatabase( + relation.NewConversationGorm(db), + cache.NewConversationRedis(rdb, cache.GetDefaultOpt(), relation.NewConversationGorm(db)), + tx.NewGorm(db), + ) msgRpcClient := rpcclient.NewMessageRpcClient(discov) msgNotificationSender := notification.NewMsgNotificationSender(rpcclient.WithRpcClient(&msgRpcClient)) msgTool := NewMsgTool(msgDatabase, userDatabase, groupDatabase, conversationDatabase, msgNotificationSender) 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/auth.go b/pkg/apistruct/auth.go deleted file mode 100644 index a1538347d..000000000 --- a/pkg/apistruct/auth.go +++ /dev/null @@ -1,68 +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 apistruct - -type UserRegisterReq struct { - Secret string `json:"secret" binding:"required,max=32"` - Platform int32 `json:"platform" binding:"required,min=1,max=12"` - ApiUserInfo - OperationID string `json:"operationID" binding:"required"` -} - -type UserTokenInfo struct { - UserID string `json:"userID"` - Token string `json:"token"` - ExpiredTime int64 `json:"expiredTime"` -} -type UserRegisterResp struct { - UserToken UserTokenInfo `json:"data"` -} - -type UserTokenReq struct { - Secret string `json:"secret" binding:"required,max=32"` - Platform int32 `json:"platform" binding:"required,min=1,max=12"` - UserID string `json:"userID" binding:"required,min=1,max=64"` - OperationID string `json:"operationID" binding:"required"` -} - -type UserTokenResp struct { - UserToken UserTokenInfo `json:"data"` -} - -type ForceLogoutReq struct { - Platform int32 `json:"platform" binding:"required,min=1,max=12"` - FromUserID string `json:"fromUserID" binding:"required,min=1,max=64"` - OperationID string `json:"operationID" binding:"required"` -} - -type ForceLogoutResp struct{} - -type ParseTokenReq struct { - OperationID string `json:"operationID" binding:"required"` -} - -//type ParseTokenResp struct { -// -// ExpireTime int64 `json:"expireTime" binding:"required"` -//} - -type ExpireTime struct { - ExpireTimeSeconds uint32 `json:"expireTimeSeconds"` -} - -type ParseTokenResp struct { - Data map[string]interface{} `json:"data" swaggerignore:"true"` - ExpireTime ExpireTime `json:"-"` -} diff --git a/pkg/apistruct/aws.go b/pkg/apistruct/aws.go deleted file mode 100644 index 3518baea0..000000000 --- a/pkg/apistruct/aws.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 apistruct - -type AwsStorageCredentialReq struct { - OperationID string `json:"operationID"` -} - -type AwsStorageCredentialRespData struct { - AccessKeyId string `json:"accessKeyID"` - SecretAccessKey string `json:"secretAccessKey"` - SessionToken string `json:"sessionToken"` - RegionID string `json:"regionId"` - Bucket string `json:"bucket"` - FinalHost string `json:"FinalHost"` -} - -type AwsStorageCredentialResp struct { - CosData AwsStorageCredentialRespData - Data map[string]interface{} `json:"data"` -} diff --git a/pkg/apistruct/conversation.go b/pkg/apistruct/conversation.go deleted file mode 100644 index efac9a563..000000000 --- a/pkg/apistruct/conversation.go +++ /dev/null @@ -1,131 +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 apistruct - -type OptResult struct { - ConversationID string `json:"conversationID"` - Result *int32 `json:"result"` -} -type GetAllConversationMessageOptReq struct { - OperationID string `json:"operationID" binding:"required"` - FromUserID string `json:"fromUserID" binding:"required"` -} -type GetAllConversationMessageOptResp struct { - ConversationOptResultList []*OptResult `json:"data"` -} -type GetReceiveMessageOptReq struct { - ConversationIDList []string `json:"conversationIDList" binding:"required"` - OperationID string `json:"operationID" binding:"required"` - FromUserID string `json:"fromUserID" binding:"required"` -} -type GetReceiveMessageOptResp struct { - ConversationOptResultList []*OptResult `json:"data"` -} -type SetReceiveMessageOptReq struct { - FromUserID string `json:"fromUserID" binding:"required"` - OperationID string `json:"operationID" binding:"required"` - Opt *int32 `json:"opt" binding:"required"` - ConversationIDList []string `json:"conversationIDList" binding:"required"` -} -type SetReceiveMessageOptResp struct { - ConversationOptResultList []*OptResult `json:"data"` -} - -type Conversation struct { - OwnerUserID string `json:"ownerUserID" binding:"required"` - ConversationID string `json:"conversationID" binding:"required"` - ConversationType int32 `json:"conversationType" binding:"required"` - UserID string `json:"userID"` - GroupID string `json:"groupID"` - RecvMsgOpt int32 `json:"recvMsgOpt" binding:"omitempty,oneof=0 1 2"` - UnreadCount int32 `json:"unreadCount" binding:"omitempty"` - DraftTextTime int64 `json:"draftTextTime"` - IsPinned bool `json:"isPinned" binding:"omitempty"` - IsPrivateChat bool `json:"isPrivateChat"` - BurnDuration int32 `json:"burnDuration"` - GroupAtType int32 `json:"groupAtType"` - IsNotInGroup bool `json:"isNotInGroup"` - UpdateUnreadCountTime int64 `json:"updateUnreadCountTime"` - AttachedInfo string `json:"attachedInfo"` - Ex string `json:"ex"` -} - -type SetConversationReq struct { - Conversation - NotificationType int32 `json:"notificationType"` - OperationID string `json:"operationID" binding:"required"` -} - -type SetConversationResp struct{} -type ModifyConversationFieldReq struct { - Conversation - FieldType int32 `json:"fieldType" binding:"required"` - UserIDList []string `json:"userIDList" binding:"required"` - OperationID string `json:"operationID" binding:"required"` -} -type ModifyConversationFieldResp struct{} - -type BatchSetConversationsReq struct { - Conversations []Conversation `json:"conversations" binding:"required"` - NotificationType int32 `json:"notificationType"` - OwnerUserID string `json:"ownerUserID" binding:"required"` - OperationID string `json:"operationID" binding:"required"` -} - -type BatchSetConversationsResp struct { - Data struct { - Success []string `json:"success"` - Failed []string `json:"failed"` - } `json:"data"` -} - -type GetConversationReq struct { - ConversationID string `json:"conversationID" binding:"required"` - OwnerUserID string `json:"ownerUserID" binding:"required"` - OperationID string `json:"operationID" binding:"required"` -} - -type GetConversationResp struct { - Conversation Conversation `json:"data"` -} - -type GetAllConversationsReq struct { - OwnerUserID string `json:"ownerUserID" binding:"required"` - OperationID string `json:"operationID" binding:"required"` -} - -type GetAllConversationsResp struct { - Conversations []Conversation `json:"data"` -} - -type GetConversationsReq struct { - ConversationIDs []string `json:"conversationIDs" binding:"required"` - OwnerUserID string `json:"ownerUserID" binding:"required"` - OperationID string `json:"operationID" binding:"required"` -} - -type GetConversationsResp struct { - Conversations []Conversation `json:"data"` -} - -type SetRecvMsgOptReq struct { - OwnerUserID string `json:"ownerUserID" binding:"required"` - ConversationID string `json:"conversationID"` - RecvMsgOpt int32 `json:"recvMsgOpt" binding:"omitempty,oneof=0 1 2"` - OperationID string `json:"operationID" binding:"required"` - NotificationType int32 `json:"notificationType"` -} - -type SetRecvMsgOptResp struct{} diff --git a/pkg/apistruct/cos.go b/pkg/apistruct/cos.go deleted file mode 100644 index bd2611553..000000000 --- a/pkg/apistruct/cos.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 apistruct - -import sts "github.com/tencentyun/qcloud-cos-sts-sdk/go" - -type TencentCloudStorageCredentialReq struct { - OperationID string `json:"operationID"` -} - -type TencentCloudStorageCredentialRespData struct { - *sts.CredentialResult - Region string `json:"region"` - Bucket string `json:"bucket"` -} - -type TencentCloudStorageCredentialResp struct { - CosData TencentCloudStorageCredentialRespData `json:"-"` - - Data map[string]interface{} `json:"data"` -} diff --git a/pkg/apistruct/friend.go b/pkg/apistruct/friend.go deleted file mode 100644 index 5aac9494e..000000000 --- a/pkg/apistruct/friend.go +++ /dev/null @@ -1,282 +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 apistruct - -//type ParamsCommFriend struct { -// OperationID string `json:"operationID" binding:"required"` -// ToUserID string `json:"toUserID" binding:"required"` -// FromUserID string `json:"fromUserID" binding:"required"` -//} -// -//type AddBlacklistReq struct { -// ParamsCommFriend -//} -//type AddBlacklistResp struct { -// -//} -// -//type ImportFriendReq struct { -// FriendUserIDList []string `json:"friendUserIDList" binding:"required"` -// OperationID string `json:"operationID" binding:"required"` -// FromUserID string `json:"fromUserID" binding:"required"` -//} -//type UserIDResult struct { -// UserID string `json:"userID"` -// Result int32 `json:"result"` -//} -//type ImportFriendResp struct { -// -// UserIDResultList []UserIDResult `json:"data"` -//} -// -//type AddFriendReq struct { -// ParamsCommFriend -// ReqMsg string `json:"reqMsg"` -//} -//type AddFriendResp struct { -// -//} -// -//type AddFriendResponseReq struct { -// ParamsCommFriend -// Flag int32 `json:"flag" binding:"required,oneof=-1 0 1"` -// HandleMsg string `json:"handleMsg"` -//} -//type AddFriendResponseResp struct { -// -//} -// -//type DeleteFriendReq struct { -// ParamsCommFriend -//} -//type DeleteFriendResp struct { -// -//} -// -//type GetBlackListReq struct { -// OperationID string `json:"operationID" binding:"required"` -// FromUserID string `json:"fromUserID" binding:"required"` -//} -//type GetBlackListResp struct { -// -// BlackUserInfoList []*sdkws.PublicUserInfo `json:"-"` -// Map []map[string]interface{} `json:"data" swaggerignore:"true"` -//} -// -////type PublicUserInfo struct { -//// UserID string `json:"userID"` -//// Nickname string `json:"nickname"` -//// FaceUrl string `json:"faceUrl"` -//// Gender int32 `json:"gender"` -////} -// -//type SetFriendRemarkReq struct { -// ParamsCommFriend -// Remark string `json:"remark"` -//} -//type SetFriendRemarkResp struct { -// -//} -// -//type RemoveBlacklistReq struct { -// ParamsCommFriend -//} -//type RemoveBlacklistResp struct { -// -//} -// -//type IsFriendReq struct { -// ParamsCommFriend -//} -//type Response struct { -// Friend bool `json:"isFriend"` -//} -//type IsFriendResp struct { -// -// Response Response `json:"data"` -//} -// -//type GetFriendsInfoReq struct { -// ParamsCommFriend -//} -//type GetFriendsInfoResp struct { -// -// FriendInfoList []*sdkws.FriendInfo `json:"-"` -// Map []map[string]interface{} `json:"data" swaggerignore:"true"` -//} -// -//type GetFriendListReq struct { -// OperationID string `json:"operationID" binding:"required"` -// FromUserID string `json:"fromUserID" binding:"required"` -//} -//type GetFriendListResp struct { -// -// FriendInfoList []*sdkws.FriendInfo `json:"-"` -// Map []map[string]interface{} `json:"data" swaggerignore:"true"` -//} -// -//type GetFriendApplyListReq struct { -// OperationID string `json:"operationID" binding:"required"` -// FromUserID string `json:"fromUserID" binding:"required"` -//} -//type GetFriendApplyListResp struct { -// -// FriendRequestList []*sdkws.FriendRequest `json:"-"` -// Map []map[string]interface{} `json:"data" swaggerignore:"true"` -//} -// -//type GetSelfApplyListReq struct { -// OperationID string `json:"operationID" binding:"required"` -// FromUserID string `json:"fromUserID" binding:"required"` -//} -//type GetSelfApplyListResp struct { -// -// FriendRequestList []*sdkws.FriendRequest `json:"-"` -// Map []map[string]interface{} `json:"data" swaggerignore:"true"` -//} - -type FriendInfo struct { - UserID string `json:"userID"` - Nickname string `json:"nickname"` - FaceURL string `json:"faceURL"` - Gender int32 `json:"gender"` - Ex string `json:"ex"` -} - -type PublicUserInfo struct { - UserID string `json:"userID"` - Nickname string `json:"nickname"` - FaceURL string `json:"faceURL"` - Gender int32 `json:"gender"` - Ex string `json:"ex"` -} - -type FriendRequest struct { - FromUserID string `json:"fromUserID"` - FromNickname string `json:"fromNickname"` - FromFaceURL string `json:"fromFaceURL"` - FromGender int32 `json:"fromGender"` - ToUserID string `json:"toUserID"` - ToNickname string `json:"toNickname"` - ToFaceURL string `json:"toFaceURL"` - ToGender int32 `json:"toGender"` - HandleResult int32 `json:"handleResult"` - ReqMsg string `json:"reqMsg"` - CreateTime uint32 `json:"createTime"` - HandlerUserID string `json:"handlerUserID"` - HandleMsg string `json:"handleMsg"` - HandleTime uint32 `json:"handleTime"` - Ex string `json:"ex"` -} - -type AddBlacklistReq struct { - ToUserID string `json:"toUserID" binding:"required"` - FromUserID string `json:"fromUserID" binding:"required"` -} -type AddBlacklistResp struct{} - -type ImportFriendReq struct { - FriendUserIDList []string `json:"friendUserIDList" binding:"required"` - FromUserID string `json:"fromUserID" binding:"required"` -} - -type ImportFriendResp struct { - // -} - -type AddFriendReq struct { - ToUserID string `json:"toUserID" binding:"required"` - FromUserID string `json:"fromUserID" binding:"required"` - ReqMsg string `json:"reqMsg"` -} -type AddFriendResp struct { - // -} - -type AddFriendResponseReq struct { - ToUserID string `json:"toUserID" binding:"required"` - FromUserID string `json:"fromUserID" binding:"required"` - HandleResult int32 `json:"flag" binding:"required,oneof=-1 0 1"` - HandleMsg string `json:"handleMsg"` -} -type AddFriendResponseResp struct{} - -type DeleteFriendReq struct { - ToUserID string `json:"toUserID" binding:"required"` - FromUserID string `json:"fromUserID" binding:"required"` -} -type DeleteFriendResp struct{} - -type GetBlackListReq struct { - FromUserID string `json:"fromUserID" binding:"required"` -} -type GetBlackListResp struct { - BlackUserInfoList []PublicUserInfo `json:"blackUserInfoList"` -} - -type SetFriendRemarkReq struct { - ToUserID string `json:"toUserID" binding:"required"` - FromUserID string `json:"fromUserID" binding:"required"` - Remark string `json:"remark"` -} -type SetFriendRemarkResp struct{} - -type RemoveBlacklistReq struct { - ToUserID string `json:"toUserID" binding:"required"` - FromUserID string `json:"fromUserID" binding:"required"` -} -type RemoveBlacklistResp struct{} - -type IsFriendReq struct { - ToUserID string `json:"toUserID" binding:"required"` - FromUserID string `json:"fromUserID" binding:"required"` -} -type Response struct { - Friend bool `json:"isFriend"` -} -type IsFriendResp struct { - Response Response `json:"data"` -} - -type GetFriendListReq struct { - OperationID string `json:"operationID" binding:"required"` - FromUserID string `json:"fromUserID" binding:"required"` -} -type GetFriendListResp struct { - OwnerUserID string `json:"ownerUserID"` - Remark string `json:"remark"` - CreateTime uint32 `json:"createTime"` - AddSource int32 `json:"addSource"` - OperatorUserID string `json:"operatorUserID"` - Ex string `json:"ex"` - // FriendUser *UserInfo // TODO -} - -type GetFriendApplyListReq struct { - OperationID string `json:"operationID" binding:"required"` - FromUserID string `json:"fromUserID" binding:"required"` -} - -type GetFriendApplyListResp struct { - FriendRequestList []FriendRequest `json:"friendRequestList"` -} - -type GetSelfApplyListReq struct { - OperationID string `json:"operationID" binding:"required"` - FromUserID string `json:"fromUserID" binding:"required"` -} -type GetSelfApplyListResp struct { - FriendRequestList []FriendRequest `json:"friendRequestList"` -} diff --git a/pkg/apistruct/group.go b/pkg/apistruct/group.go deleted file mode 100644 index a3a379164..000000000 --- a/pkg/apistruct/group.go +++ /dev/null @@ -1,272 +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 apistruct - -import ( - sdkws "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/sdkws" -) - -type KickGroupMemberReq struct { - GroupID string `json:"groupID" binding:"required"` - KickedUserIDList []string `json:"kickedUserIDList" binding:"required"` - Reason string `json:"reason"` - OperationID string `json:"operationID" binding:"required"` -} -type KickGroupMemberResp struct { - // UserIDResultList []*UserIDResult `json:"data"` -} - -type GetGroupMembersInfoReq struct { - GroupID string `json:"groupID" binding:"required"` - MemberList []string `json:"memberList" binding:"required"` - OperationID string `json:"operationID" binding:"required"` -} -type GetGroupMembersInfoResp struct { - MemberList []*sdkws.GroupMemberFullInfo `json:"-"` - Data []map[string]interface{} `json:"data" swaggerignore:"true"` -} - -type InviteUserToGroupReq struct { - GroupID string `json:"groupID" binding:"required"` - InvitedUserIDList []string `json:"invitedUserIDList" binding:"required"` - Reason string `json:"reason"` - OperationID string `json:"operationID" binding:"required"` -} -type InviteUserToGroupResp struct { - // UserIDResultList []*UserIDResult `json:"data"` -} - -type GetJoinedGroupListReq struct { - OperationID string `json:"operationID" binding:"required"` - FromUserID string `json:"fromUserID" binding:"required"` -} -type GetJoinedGroupListResp struct { - GroupInfoList []*sdkws.GroupInfo `json:"-"` - Data []map[string]interface{} `json:"data" swaggerignore:"true"` -} - -type GetGroupMemberListReq struct { - GroupID string `json:"groupID"` - Filter int32 `json:"filter"` - NextSeq int32 `json:"nextSeq"` - OperationID string `json:"operationID"` -} -type GetGroupMemberListResp struct { - NextSeq int32 `json:"nextSeq"` - MemberList []*sdkws.GroupMemberFullInfo `json:"-"` - Data []map[string]interface{} `json:"data" swaggerignore:"true"` -} - -type GetGroupAllMemberReq struct { - GroupID string `json:"groupID" binding:"required"` - OperationID string `json:"operationID" binding:"required"` - Offset int32 `json:"offset"` - Count int32 `json:"count"` -} -type GetGroupAllMemberResp struct { - MemberList []*sdkws.GroupMemberFullInfo `json:"-"` - Data []map[string]interface{} `json:"data" swaggerignore:"true"` -} - -// -//type GetGroupAllMemberListBySplitReq struct { -// GroupID string `json:"groupID" binding:"required"` -// OperationID string `json:"operationID" binding:"required"` -// Offset int32 `json:"offset" binding:"required"` -// Count int32 `json:"count" binding:"required"` -//} -//type GetGroupAllMemberListBySplitResp struct { -// -// MemberList []*sdkws.GroupMemberFullInfo `json:"-"` -// Map []map[string]interface{} `json:"data" swaggerignore:"true"` -//} - -type CreateGroupReq struct { - MemberList []*GroupAddMemberInfo `json:"memberList"` - OwnerUserID string `json:"ownerUserID"` - GroupType int32 `json:"groupType"` - GroupName string `json:"groupName"` - Notification string `json:"notification"` - Introduction string `json:"introduction"` - FaceURL string `json:"faceURL"` - Ex string `json:"ex"` - OperationID string `json:"operationID" binding:"required"` - GroupID string `json:"groupID"` -} -type CreateGroupResp struct { - GroupInfo sdkws.GroupInfo `json:"-"` - Data map[string]interface{} `json:"data" swaggerignore:"true"` -} - -type GetGroupApplicationListReq struct { - OperationID string `json:"operationID" binding:"required"` - FromUserID string `json:"fromUserID" binding:"required"` // 作为管理员或群主收到的 进群申请 -} - -type GetGroupApplicationListResp struct { - GroupRequestList []*sdkws.GroupRequest `json:"-"` - Data []map[string]interface{} `json:"data" swaggerignore:"true"` -} - -type GetUserReqGroupApplicationListReq struct { - OperationID string `json:"operationID" binding:"required"` - UserID string `json:"userID" binding:"required"` -} - -type GetUserRespGroupApplicationResp struct { - GroupRequestList []*sdkws.GroupRequest `json:"data"` -} - -type GetGroupInfoReq struct { - GroupIDList []string `json:"groupIDList" binding:"required"` - OperationID string `json:"operationID" binding:"required"` -} -type GetGroupInfoResp struct { - GroupInfoList []*sdkws.GroupInfo `json:"-"` - Data []map[string]interface{} `json:"data" swaggerignore:"true"` -} - -//type GroupInfoAlias struct { -// sdkws.GroupInfo -// NeedVerification int32 `protobuf:"bytes,13,opt,name=needVerification" json:"needVerification,omitempty"` -//} - -//type GroupInfoAlias struct { -// GroupID string `protobuf:"bytes,1,opt,name=groupID" json:"groupID,omitempty"` -// GroupName string `protobuf:"bytes,2,opt,name=groupName" json:"groupName,omitempty"` -// Notification string `protobuf:"bytes,3,opt,name=notification" json:"notification,omitempty"` -// Introduction string `protobuf:"bytes,4,opt,name=introduction" json:"introduction,omitempty"` -// FaceURL string `protobuf:"bytes,5,opt,name=faceURL" json:"faceURL,omitempty"` -// OwnerUserID string `protobuf:"bytes,6,opt,name=ownerUserID" json:"ownerUserID,omitempty"` -// CreateTime uint32 `protobuf:"varint,7,opt,name=createTime" json:"createTime,omitempty"` -// MemberCount uint32 `protobuf:"varint,8,opt,name=memberCount" json:"memberCount,omitempty"` -// Ex string `protobuf:"bytes,9,opt,name=ex" json:"ex,omitempty"` -// Status int32 `protobuf:"varint,10,opt,name=status" json:"status,omitempty"` -// CreatorUserID string `protobuf:"bytes,11,opt,name=creatorUserID" json:"creatorUserID,omitempty"` -// GroupType int32 `protobuf:"varint,12,opt,name=groupType" json:"groupType,omitempty"` -// NeedVerification int32 `protobuf:"bytes,13,opt,name=needVerification" json:"needVerification,omitempty"` -//} - -type ApplicationGroupResponseReq struct { - OperationID string `json:"operationID" binding:"required"` - GroupID string `json:"groupID" binding:"required"` - FromUserID string `json:"fromUserID" binding:"required"` // application from FromUserID - HandledMsg string `json:"handledMsg"` - HandleResult int32 `json:"handleResult" binding:"required,oneof=-1 1"` -} -type ApplicationGroupResponseResp struct{} - -type JoinGroupReq struct { - GroupID string `json:"groupID" binding:"required"` - ReqMessage string `json:"reqMessage"` - OperationID string `json:"operationID" binding:"required"` - JoinSource int32 `json:"joinSource"` - InviterUserID string `json:"inviterUserID"` -} - -type JoinGroupResp struct{} - -type QuitGroupReq struct { - GroupID string `json:"groupID" binding:"required"` - OperationID string `json:"operationID" binding:"required"` -} -type QuitGroupResp struct{} - -type SetGroupInfoReq struct { - GroupID string `json:"groupID" binding:"required"` - GroupName string `json:"groupName"` - Notification string `json:"notification"` - Introduction string `json:"introduction"` - FaceURL string `json:"faceURL"` - Ex string `json:"ex"` - OperationID string `json:"operationID" binding:"required"` - NeedVerification *int32 `json:"needVerification"` - LookMemberInfo *int32 `json:"lookMemberInfo"` - ApplyMemberFriend *int32 `json:"applyMemberFriend"` -} - -type SetGroupInfoResp struct{} - -type TransferGroupOwnerReq struct { - GroupID string `json:"groupID" binding:"required"` - OldOwnerUserID string `json:"oldOwnerUserID" binding:"required"` - NewOwnerUserID string `json:"newOwnerUserID" binding:"required"` - OperationID string `json:"operationID" binding:"required"` -} -type TransferGroupOwnerResp struct{} - -type DismissGroupReq struct { - GroupID string `json:"groupID" binding:"required"` - OperationID string `json:"operationID" binding:"required"` -} -type DismissGroupResp struct{} - -type MuteGroupMemberReq struct { - OperationID string `json:"operationID" binding:"required"` - GroupID string `json:"groupID" binding:"required"` - UserID string `json:"userID" binding:"required"` - MutedSeconds uint32 `json:"mutedSeconds" binding:"required"` -} -type MuteGroupMemberResp struct{} - -type CancelMuteGroupMemberReq struct { - OperationID string `json:"operationID" binding:"required"` - GroupID string `json:"groupID" binding:"required"` - UserID string `json:"userID" binding:"required"` -} -type CancelMuteGroupMemberResp struct{} - -type MuteGroupReq struct { - OperationID string `json:"operationID" binding:"required"` - GroupID string `json:"groupID" binding:"required"` -} -type MuteGroupResp struct{} - -type CancelMuteGroupReq struct { - OperationID string `json:"operationID" binding:"required"` - GroupID string `json:"groupID" binding:"required"` -} -type CancelMuteGroupResp struct{} - -type SetGroupMemberNicknameReq struct { - OperationID string `json:"operationID" binding:"required"` - GroupID string `json:"groupID" binding:"required"` - UserID string `json:"userID" binding:"required"` - Nickname string `json:"nickname"` -} - -type SetGroupMemberNicknameResp struct{} - -type SetGroupMemberInfoReq struct { - OperationID string `json:"operationID" binding:"required"` - GroupID string `json:"groupID" binding:"required"` - UserID string `json:"userID" binding:"required"` - Nickname *string `json:"nickname"` - FaceURL *string `json:"userGroupFaceUrl"` - RoleLevel *int32 `json:"roleLevel" validate:"gte=1,lte=3"` - Ex *string `json:"ex"` -} - -type SetGroupMemberInfoResp struct{} - -type GetGroupAbstractInfoReq struct { - OperationID string `json:"operationID"` - GroupID string `json:"groupID"` -} - -type GetGroupAbstractInfoResp struct { - GroupMemberNumber int32 `json:"groupMemberNumber"` - GroupMemberListHash uint64 `json:"groupMemberListHash"` -} diff --git a/pkg/apistruct/manage.go b/pkg/apistruct/manage.go index 042f61aa0..3a2945b37 100644 --- a/pkg/apistruct/manage.go +++ b/pkg/apistruct/manage.go @@ -15,37 +15,10 @@ package apistruct import ( - sdkws "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/sdkws" + sdkws "github.com/OpenIMSDK/protocol/sdkws" ) -type DeleteUsersReq struct { - OperationID string `json:"operationID" binding:"required"` - DeleteUserIDList []string `json:"deleteUserIDList" binding:"required"` -} -type DeleteUsersResp struct { - FailedUserIDList []string `json:"data"` -} -type GetAllUsersUidReq struct { - OperationID string `json:"operationID" binding:"required"` -} -type GetAllUsersUidResp struct { - UserIDList []string `json:"data"` -} -type GetUsersOnlineStatusReq struct { - OperationID string `json:"operationID" binding:"required"` - UserIDList []string `json:"userIDList" binding:"required,lte=200"` -} -type GetUsersOnlineStatusResp struct { - // SuccessResult []*msggateway.GetUsersOnlineStatusResp_SuccessResult `json:"data"` -} - -type AccountCheckReq struct { - OperationID string `json:"operationID" binding:"required"` - CheckUserIDList []string `json:"checkUserIDList" binding:"required,lte=100"` -} -type AccountCheckResp struct{} - -type ManagementSendMsg struct { +type SendMsg struct { SendID string `json:"sendID" binding:"required"` GroupID string `json:"groupID" binding:"required_if=SessionType 2|required_if=SessionType 3"` SenderNickname string `json:"senderNickname"` @@ -59,48 +32,25 @@ type ManagementSendMsg struct { OfflinePushInfo *sdkws.OfflinePushInfo `json:"offlinePushInfo"` } -type ManagementSendMsgReq struct { - SendID string `json:"sendID" binding:"required"` - RecvID string `json:"recvID" binding:"required_if" message:"recvID is required if sessionType is SingleChatType or NotificationChatType"` - GroupID string `json:"groupID" binding:"required_if" message:"groupID is required if sessionType is GroupChatType or SuperGroupChatType"` - SenderNickname string `json:"senderNickname"` - SenderFaceURL string `json:"senderFaceURL"` - SenderPlatformID int32 `json:"senderPlatformID"` - Content map[string]interface{} `json:"content" binding:"required" swaggerignore:"true"` - ContentType int32 `json:"contentType" binding:"required"` - SessionType int32 `json:"sessionType" binding:"required"` - IsOnlineOnly bool `json:"isOnlineOnly"` - NotOfflinePush bool `json:"notOfflinePush"` - OfflinePushInfo *sdkws.OfflinePushInfo `json:"offlinePushInfo"` +type SendMsgReq struct { + RecvID string `json:"recvID" binding:"required_if" message:"recvID is required if sessionType is SingleChatType or NotificationChatType"` + SendMsg } -type ManagementSendMsgResp struct { - ResultList sdkws.UserSendMsgResp `json:"data"` +type BatchSendMsgReq struct { + SendMsg + IsSendAll bool `json:"isSendAll"` + RecvIDs []string `json:"recvIDs"` } -type ManagementBatchSendMsgReq struct { - ManagementSendMsg - IsSendAll bool `json:"isSendAll"` - RecvIDList []string `json:"recvIDList"` +type BatchSendMsgResp struct { + Results []*SingleReturnResult `json:"results"` + FailedIDs []string `json:"failedUserIDs"` } -type ManagementBatchSendMsgResp struct { - Data struct { - ResultList []*SingleReturnResult `json:"resultList"` - FailedIDList []string - } `json:"data"` -} type SingleReturnResult struct { ServerMsgID string `json:"serverMsgID"` ClientMsgID string `json:"clientMsgID"` SendTime int64 `json:"sendTime"` RecvID string `json:"recvID"` } - -type CheckMsgIsSendSuccessReq struct { - OperationID string `json:"operationID"` -} - -type CheckMsgIsSendSuccessResp struct { - Status int32 `json:"status"` -} diff --git a/pkg/apistruct/msg.go b/pkg/apistruct/msg.go index 35351315a..a0c5e1429 100644 --- a/pkg/apistruct/msg.go +++ b/pkg/apistruct/msg.go @@ -14,46 +14,6 @@ package apistruct -type DelMsgReq struct { - UserID string `json:"userID,omitempty" binding:"required"` - SeqList []uint32 `json:"seqList,omitempty" binding:"required"` - OperationID string `json:"operationID,omitempty" binding:"required"` -} - -type DelMsgResp struct{} - -type CleanUpMsgReq struct { - UserID string `json:"userID" binding:"required"` - OperationID string `json:"operationID" binding:"required"` -} - -type CleanUpMsgResp struct{} - -type DelSuperGroupMsgReq struct { - UserID string `json:"userID" binding:"required"` - GroupID string `json:"groupID" binding:"required"` - SeqList []uint32 `json:"seqList,omitempty"` - IsAllDelete bool `json:"isAllDelete"` - OperationID string `json:"operationID" binding:"required"` -} - -type DelSuperGroupMsgResp struct{} - -type MsgDeleteNotificationElem struct { - GroupID string `json:"groupID"` - IsAllDelete bool `json:"isAllDelete"` - SeqList []uint32 `json:"seqList"` -} - -type SetMsgMinSeqReq struct { - UserID string `json:"userID" binding:"required"` - GroupID string `json:"groupID"` - MinSeq uint32 `json:"minSeq" binding:"required"` - OperationID string `json:"operationID" binding:"required"` -} - -type SetMsgMinSeqResp struct{} - type PictureBaseInfo struct { UUID string `mapstructure:"uuid"` Type string `mapstructure:"type"` @@ -113,7 +73,7 @@ type CustomElem struct { Extension string `mapstructure:"extension"` } type TextElem struct { - Content string `mapstructure:"content" validate:"required"` + Text string `mapstructure:"text" validate:"required"` } type RevokeElem struct { diff --git a/pkg/apistruct/oss.go b/pkg/apistruct/oss.go deleted file mode 100644 index 4f1e6c00a..000000000 --- a/pkg/apistruct/oss.go +++ /dev/null @@ -1,35 +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 apistruct - -type OSSCredentialReq struct { - OperationID string `json:"operationID"` - Filename string `json:"filename"` - FileType string `json:"file_type"` -} - -type OSSCredentialRespData struct { - Endpoint string `json:"endpoint"` - AccessKeyId string `json:"access_key_id"` - AccessKeySecret string `json:"access_key_secret"` - Token string `json:"token"` - Bucket string `json:"bucket"` - FinalHost string `json:"final_host"` -} - -type OSSCredentialResp struct { - OssData OSSCredentialRespData `json:"-"` - Data map[string]interface{} `json:"data"` -} diff --git a/pkg/apistruct/pagination.go b/pkg/apistruct/pagination.go deleted file mode 100644 index 02de39967..000000000 --- a/pkg/apistruct/pagination.go +++ /dev/null @@ -1,20 +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 apistruct - -type Pagination struct { - PageNumber int32 `json:"pageNumber" binding:"required"` - ShowNumber int32 `json:"showNumber" binding:"required"` -} diff --git a/pkg/apistruct/public.go b/pkg/apistruct/public.go index ff3a115ae..7589b1d0f 100644 --- a/pkg/apistruct/public.go +++ b/pkg/apistruct/public.go @@ -14,18 +14,6 @@ package apistruct -type ApiUserInfo struct { - UserID string `json:"userID" binding:"required,min=1,max=64" swaggo:"true,用户ID,"` - Nickname string `json:"nickname" binding:"omitempty,min=1,max=64" swaggo:"true,my id,19"` - FaceURL string `json:"faceURL" binding:"omitempty,max=1024"` - Gender int32 `json:"gender" binding:"omitempty,oneof=0 1 2"` - PhoneNumber string `json:"phoneNumber" binding:"omitempty,max=32"` - Birth int64 `json:"birth" binding:"omitempty"` - Email string `json:"email" binding:"omitempty,max=64"` - CreateTime int64 `json:"createTime"` - Ex string `json:"ex" binding:"omitempty,max=1024"` -} - type GroupAddMemberInfo struct { UserID string `json:"userID" binding:"required"` RoleLevel int32 `json:"roleLevel" binding:"required,oneof= 1 3"` diff --git a/pkg/apistruct/super_group.go b/pkg/apistruct/super_group.go deleted file mode 100644 index 92275eabf..000000000 --- a/pkg/apistruct/super_group.go +++ /dev/null @@ -1,31 +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 apistruct - -type GetJoinedSuperGroupListReq struct { - GetJoinedGroupListReq -} - -type GetJoinedSuperGroupListResp struct { - GetJoinedGroupListResp -} - -type GetSuperGroupsInfoReq struct { - GetGroupInfoReq -} - -type GetSuperGroupsInfoResp struct { - GetGroupInfoResp -} diff --git a/pkg/apistruct/third.go b/pkg/apistruct/third.go deleted file mode 100644 index ce4719e1f..000000000 --- a/pkg/apistruct/third.go +++ /dev/null @@ -1,128 +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 apistruct - -import "mime/multipart" - -type MinioStorageCredentialReq struct { - OperationID string `json:"operationID"` -} - -type MiniostorageCredentialResp struct { - SecretAccessKey string `json:"secretAccessKey"` - AccessKeyID string `json:"accessKeyID"` - SessionToken string `json:"sessionToken"` - BucketName string `json:"bucketName"` - StsEndpointURL string `json:"stsEndpointURL"` - StorageTime int `json:"storageTime"` - IsDistributedMod bool `json:"isDistributedMod"` -} - -type MinioUploadFileReq struct { - OperationID string `form:"operationID" binding:"required"` - FileType int `form:"fileType" binding:"required"` -} - -type MinioUploadFile struct { - URL string `json:"URL"` - NewName string `json:"newName"` - SnapshotURL string `json:"snapshotURL,omitempty"` - SnapshotNewName string `json:"snapshotName,omitempty"` -} - -type MinioUploadFileResp struct { - Data struct { - MinioUploadFile - } `json:"data"` -} - -type UploadUpdateAppReq struct { - OperationID string `form:"operationID" binding:"required"` - Type int `form:"type" binding:"required"` - Version string `form:"version" binding:"required"` - File *multipart.FileHeader `form:"file" binding:"required"` - Yaml *multipart.FileHeader `form:"yaml"` - ForceUpdate bool `form:"forceUpdate"` - UpdateLog string `form:"updateLog" binding:"required"` -} - -type UploadUpdateAppResp struct{} - -type GetDownloadURLReq struct { - OperationID string `json:"operationID" binding:"required"` - Type int `json:"type" binding:"required"` - Version string `json:"version" binding:"required"` -} - -type GetDownloadURLResp struct { - Data struct { - HasNewVersion bool `json:"hasNewVersion"` - ForceUpdate bool `json:"forceUpdate"` - FileURL string `json:"fileURL"` - YamlURL string `json:"yamlURL"` - Version string `json:"version"` - UpdateLog string `json:"update_log"` - } `json:"data"` -} - -type GetRTCInvitationInfoReq struct { - OperationID string `json:"operationID" binding:"required"` - ClientMsgID string `json:"clientMsgID" binding:"required"` -} - -type GetRTCInvitationInfoResp struct { - Data struct { - OpUserID string `json:"opUserID"` - Invitation struct { - InviterUserID string `json:"inviterUserID"` - InviteeUserIDList []string `json:"inviteeUserIDList"` - GroupID string `json:"groupID"` - RoomID string `json:"roomID"` - Timeout int32 `json:"timeout"` - MediaType string `json:"mediaType"` - SessionType int32 `json:"sessionType"` - InitiateTime int32 `json:"initiateTime"` - PlatformID int32 `json:"platformID"` - CustomData string `json:"customData"` - } `json:"invitation"` - OfflinePushInfo struct{} `json:"offlinePushInfo"` - } `json:"data"` -} - -type GetRTCInvitationInfoStartAppReq struct { - OperationID string `json:"operationID" binding:"required"` -} - -type GetRTCInvitationInfoStartAppResp struct { - GetRTCInvitationInfoResp -} - -/** - * FCM第三方上报Token. - */ -type FcmUpdateTokenReq struct { - OperationID string `json:"operationID" binding:"required"` - Platform int `json:"platform" binding:"required,min=1,max=2"` // only for ios + android - FcmToken string `json:"fcmToken" binding:"required"` -} - -type FcmUpdateTokenResp struct{} -type SetAppBadgeReq struct { - OperationID string `json:"operationID" binding:"required"` - FromUserID string `json:"fromUserID" binding:"required"` - AppUnreadCount int32 `json:"appUnreadCount"` -} - -type SetAppBadgeResp 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 f3547d649..f7b7a03ea 100644 --- a/pkg/common/cmd/msg_gateway.go +++ b/pkg/common/cmd/msg_gateway.go @@ -16,10 +16,10 @@ package cmd import ( "github.com/OpenIMSDK/Open-IM-Server/internal/msggateway" - //"github.com/OpenIMSDK/Open-IM-Server/internal/msggateway" + //"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 ae5599891..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 presistent - 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 38f033ab4..f31df39d2 100644 --- a/pkg/common/config/parse.go +++ b/pkg/common/config/parse.go @@ -15,34 +15,39 @@ 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 + // Root folder of this project. Root = filepath.Join(filepath.Dir(b), "../../..") ) 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 c9652984f..000000000 --- a/pkg/common/constant/constant.go +++ /dev/null @@ -1,361 +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" 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 169e1e758..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 e8808d199..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 { @@ -76,7 +76,7 @@ func Db2PbGroupMember(m *relation.GroupMemberModel) *sdkws.GroupMemberFullInfo { JoinTime: m.JoinTime.UnixMilli(), Nickname: m.Nickname, FaceURL: m.FaceURL, - //AppMangerLevel: m.AppMangerLevel, + // AppMangerLevel: m.AppMangerLevel, JoinSource: m.JoinSource, OperatorUserID: m.OperatorUserID, Ex: m.Ex, diff --git a/pkg/common/convert/msg.go b/pkg/common/convert/msg.go index 59215bb86..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 { @@ -54,7 +54,6 @@ func MsgPb2DB(msg *sdkws.MsgData) *unrelation.MsgDataModel { msgDataModel.AttachedInfo = msg.AttachedInfo msgDataModel.Ex = msg.Ex return &msgDataModel - } func MsgDB2Pb(msgModel *unrelation.MsgDataModel) *sdkws.MsgData { 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/black.go b/pkg/common/db/cache/black.go index d6b82ef33..bd990a4e0 100644 --- a/pkg/common/db/cache/black.go +++ b/pkg/common/db/cache/black.go @@ -29,13 +29,13 @@ const ( blackExpireTime = time.Second * 60 * 60 * 12 ) -// args fn will exec when no data in msgCache +// args fn will exec when no data in msgCache. type BlackCache interface { - //get blackIDs from msgCache + // get blackIDs from msgCache metaCache NewCache() BlackCache GetBlackIDs(ctx context.Context, userID string) (blackIDs []string, err error) - //del user's blackIDs msgCache, exec when a user's black list changed + // del user's blackIDs msgCache, exec when a user's black list changed DelBlackIDs(ctx context.Context, userID string) BlackCache } diff --git a/pkg/common/db/cache/conversation.go b/pkg/common/db/cache/conversation.go index c35f0c240..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 ( @@ -41,7 +41,7 @@ const ( conversationExpireTime = time.Second * 60 * 60 * 12 ) -// arg fn will exec when no data in msgCache +// arg fn will exec when no data in msgCache. type ConversationCache interface { metaCache NewCache() ConversationCache @@ -54,7 +54,7 @@ type ConversationCache interface { // get one conversation from msgCache GetConversation(ctx context.Context, ownerUserID, conversationID string) (*relationTb.ConversationModel, error) - DelConvsersations(ownerUserID string, conversationIDs ...string) ConversationCache + DelConversations(ownerUserID string, conversationIDs ...string) ConversationCache DelUsersConversation(conversationID string, ownerUserIDs ...string) ConversationCache // get one conversation from msgCache GetConversations( @@ -225,9 +225,9 @@ func (c *ConversationRedisCache) GetConversation( ) } -func (c *ConversationRedisCache) DelConvsersations(ownerUserID string, convsersationIDs ...string) ConversationCache { +func (c *ConversationRedisCache) DelConversations(ownerUserID string, conversationIDs ...string) ConversationCache { var keys []string - for _, conversationID := range convsersationIDs { + for _, conversationID := range conversationIDs { keys = append(keys, c.getConversationKey(ownerUserID, conversationID)) } cache := c.NewCache() diff --git a/pkg/common/db/cache/friend.go b/pkg/common/db/cache/friend.go index 4695987dd..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 ( @@ -32,7 +32,7 @@ const ( friendKey = "FRIEND_INFO:" ) -// args fn will exec when no data in msgCache +// args fn will exec when no data in msgCache. type FriendCache interface { metaCache NewCache() FriendCache @@ -109,7 +109,7 @@ func (f *FriendCacheRedis) DelFriendIDs(ownerUserID ...string) FriendCache { return new } -// todo +// todo. func (f *FriendCacheRedis) GetTwoWayFriendIDs( ctx context.Context, ownerUserID string, diff --git a/pkg/common/db/cache/group.go b/pkg/common/db/cache/group.go index 86adc2d0a..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 ( @@ -106,7 +106,8 @@ func NewGroupCacheRedis( opts rockscache.Options, ) GroupCache { rcClient := rockscache.NewClient(rdb, opts) - return &GroupCacheRedis{rcClient: rcClient, expireTime: groupExpireTime, + return &GroupCacheRedis{ + rcClient: rcClient, expireTime: groupExpireTime, groupDB: groupDB, groupMemberDB: groupMemberDB, groupRequestDB: groupRequestDB, mongoDB: mongoClient, metaCache: NewMetaCacheRedis(rcClient), } @@ -176,7 +177,7 @@ func (g *GroupCacheRedis) GetGroupMemberIndex(groupMember *relationTb.GroupMembe return 0, errIndex } -// / groupInfo +// / groupInfo. func (g *GroupCacheRedis) GetGroupsInfo( ctx context.Context, groupIDs []string, @@ -265,7 +266,7 @@ func (g *GroupCacheRedis) GetSuperGroupMemberIDs( ) } -// userJoinSuperGroup +// userJoinSuperGroup. func (g *GroupCacheRedis) DelJoinedSuperGroupIDs(userIDs ...string) GroupCache { new := g.NewCache() var keys []string @@ -286,7 +287,7 @@ func (g *GroupCacheRedis) DelSuperGroupMemberIDs(groupIDs ...string) GroupCache return new } -// groupMembersHash +// groupMembersHash. func (g *GroupCacheRedis) GetGroupMembersHash(ctx context.Context, groupID string) (hashCode uint64, err error) { return getCache( ctx, @@ -331,7 +332,7 @@ func (g *GroupCacheRedis) DelGroupMembersHash(groupID string) GroupCache { return cache } -// groupMemberIDs +// groupMemberIDs. func (g *GroupCacheRedis) GetGroupMemberIDs(ctx context.Context, groupID string) (groupMemberIDs []string, err error) { return getCache( ctx, diff --git a/pkg/common/db/cache/init_redis.go b/pkg/common/db/cache/init_redis.go index be0431adf..307e40327 100644 --- a/pkg/common/db/cache/init_redis.go +++ b/pkg/common/db/cache/init_redis.go @@ -22,16 +22,16 @@ 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 ( - maxRetry = 10 //number of retries + maxRetry = 10 // number of retries ) -// NewRedis Initialize redis connection +// NewRedis Initialize redis connection. func NewRedis() (redis.UniversalClient, error) { if len(config.Config.Redis.Address) == 0 { return nil, errors.New("redis address is empty") 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 7bf1a4a7d..000000000 --- a/pkg/common/db/cache/init_redis_test.go +++ /dev/null @@ -1,36 +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" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/config" - "testing" -) - -//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 5f57103b0..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" ) @@ -212,6 +212,7 @@ func (c *msgCache) GetMaxSeqs(ctx context.Context, conversationIDs []string) (m func (c *msgCache) GetMaxSeq(ctx context.Context, conversationID string) (int64, error) { return c.getSeq(ctx, conversationID, c.getMaxSeqKey) } + func (c *msgCache) SetMinSeq(ctx context.Context, conversationID string, minSeq int64) error { return c.setSeq(ctx, conversationID, minSeq, c.getMinSeqKey) } @@ -235,6 +236,7 @@ func (c *msgCache) SetMinSeqs(ctx context.Context, seqs map[string]int64) error func (c *msgCache) GetMinSeqs(ctx context.Context, conversationIDs []string) (map[string]int64, error) { return c.getSeqs(ctx, conversationIDs, c.getMinSeqKey) } + func (c *msgCache) GetMinSeq(ctx context.Context, conversationID string) (int64, error) { return c.getSeq(ctx, conversationID, c.getMinSeqKey) } @@ -359,7 +361,7 @@ func (c *msgCache) GetMessagesBySeq( ) (seqMsgs []*sdkws.MsgData, failedSeqs []int64, err error) { pipe := c.rdb.Pipeline() for _, v := range seqs { - //MESSAGE_CACHE:169.254.225.224_reliability1653387820_0_1 + // MESSAGE_CACHE:169.254.225.224_reliability1653387820_0_1 key := c.getMessageCacheKey(conversationID, v) if err := pipe.Get(ctx, key).Err(); err != nil && err != redis.Nil { return nil, nil, err diff --git a/pkg/common/db/controller/auth.go b/pkg/common/db/controller/auth.go index 454d9707f..491a1394b 100644 --- a/pkg/common/db/controller/auth.go +++ b/pkg/common/db/controller/auth.go @@ -19,16 +19,16 @@ 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 { - //结果为空 不返回错误 + // 结果为空 不返回错误 GetTokensWithoutError(ctx context.Context, userID string, platformID int) (map[string]int, error) - //创建token + // 创建token CreateToken(ctx context.Context, userID string, platformID int) (string, error) } @@ -43,7 +43,7 @@ func NewAuthDatabase(cache cache.MsgModel, accessSecret string, accessExpire int return &authDatabase{cache: cache, accessSecret: accessSecret, accessExpire: accessExpire} } -// 结果为空 不返回错误 +// 结果为空 不返回错误. func (a *authDatabase) GetTokensWithoutError( ctx context.Context, userID string, @@ -52,7 +52,7 @@ func (a *authDatabase) GetTokensWithoutError( return a.cache.GetTokensWithoutError(ctx, userID, platformID) } -// 创建token +// 创建token. func (a *authDatabase) CreateToken(ctx context.Context, userID string, platformID int) (string, error) { tokens, err := a.cache.GetTokensWithoutError(ctx, userID, platformID) if err != nil { diff --git a/pkg/common/db/controller/black.go b/pkg/common/db/controller/black.go index 13b375787..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 { @@ -48,7 +48,7 @@ func NewBlackDatabase(black relation.BlackModelInterface, cache cache.BlackCache return &blackDatabase{black, cache} } -// Create 增加黑名单 +// Create 增加黑名单. func (b *blackDatabase) Create(ctx context.Context, blacks []*relation.BlackModel) (err error) { if err := b.black.Create(ctx, blacks); err != nil { return err @@ -56,7 +56,7 @@ func (b *blackDatabase) Create(ctx context.Context, blacks []*relation.BlackMode return b.deleteBlackIDsCache(ctx, blacks) } -// Delete 删除黑名单 +// Delete 删除黑名单. func (b *blackDatabase) Delete(ctx context.Context, blacks []*relation.BlackModel) (err error) { if err := b.black.Delete(ctx, blacks); err != nil { return err @@ -72,7 +72,7 @@ func (b *blackDatabase) deleteBlackIDsCache(ctx context.Context, blacks []*relat return cache.ExecDel(ctx) } -// FindOwnerBlacks 获取黑名单列表 +// FindOwnerBlacks 获取黑名单列表. func (b *blackDatabase) FindOwnerBlacks( ctx context.Context, ownerUserID string, @@ -81,7 +81,7 @@ func (b *blackDatabase) FindOwnerBlacks( return b.black.FindOwnerBlacks(ctx, ownerUserID, pageNumber, showNumber) } -// CheckIn 检查user2是否在user1的黑名单列表中(inUser1Blacks==true) 检查user1是否在user2的黑名单列表中(inUser2Blacks==true) +// CheckIn 检查user2是否在user1的黑名单列表中(inUser1Blacks==true) 检查user1是否在user2的黑名单列表中(inUser2Blacks==true). func (b *blackDatabase) CheckIn( ctx context.Context, userID1, userID2 string, diff --git a/pkg/common/db/controller/chatlog.go b/pkg/common/db/controller/chatlog.go index 5385fdfec..37f620271 100644 --- a/pkg/common/db/controller/chatlog.go +++ b/pkg/common/db/controller/chatlog.go @@ -16,16 +16,11 @@ 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 { CreateChatLog(msg *pbMsg.MsgDataToMQ) error - GetChatLog( - chatLog *relationTb.ChatLogModel, - pageNumber, showNumber int32, - contentTypes []int32, - ) (int64, []relationTb.ChatLogModel, error) } func NewChatLogDatabase(chatLogModelInterface relationTb.ChatLogModelInterface) ChatLogDatabase { @@ -39,11 +34,3 @@ type chatLogDatabase struct { func (c *chatLogDatabase) CreateChatLog(msg *pbMsg.MsgDataToMQ) error { return c.chatLogModel.Create(msg) } - -func (c *chatLogDatabase) GetChatLog( - chatLog *relationTb.ChatLogModel, - pageNumber, showNumber int32, - contentTypes []int32, -) (int64, []relationTb.ChatLogModel, error) { - return c.chatLogModel.GetChatLog(chatLog, pageNumber, showNumber, contentTypes) -} diff --git a/pkg/common/db/controller/conversation.go b/pkg/common/db/controller/conversation.go index 659d250c6..0f3403084 100644 --- a/pkg/common/db/controller/conversation.go +++ b/pkg/common/db/controller/conversation.go @@ -18,30 +18,30 @@ 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 { - //UpdateUserConversationFiled 更新用户该会话的属性信息 + // UpdateUserConversationFiled 更新用户该会话的属性信息 UpdateUsersConversationFiled(ctx context.Context, userIDs []string, conversationID string, args map[string]interface{}) error - //CreateConversation 创建一批新的会话 + // CreateConversation 创建一批新的会话 CreateConversation(ctx context.Context, conversations []*relationTb.ConversationModel) error - //SyncPeerUserPrivateConversation 同步对端私聊会话内部保证事务操作 + // SyncPeerUserPrivateConversation 同步对端私聊会话内部保证事务操作 SyncPeerUserPrivateConversationTx(ctx context.Context, conversation []*relationTb.ConversationModel) error - //FindConversations 根据会话ID获取某个用户的多个会话 + // FindConversations 根据会话ID获取某个用户的多个会话 FindConversations(ctx context.Context, ownerUserID string, conversationIDs []string) ([]*relationTb.ConversationModel, error) - //FindRecvMsgNotNotifyUserIDs 获取超级大群开启免打扰的用户ID + // FindRecvMsgNotNotifyUserIDs 获取超级大群开启免打扰的用户ID FindRecvMsgNotNotifyUserIDs(ctx context.Context, groupID string) ([]string, error) - //GetUserAllConversation 获取一个用户在服务器上所有的会话 + // GetUserAllConversation 获取一个用户在服务器上所有的会话 GetUserAllConversation(ctx context.Context, ownerUserID string) ([]*relationTb.ConversationModel, error) - //SetUserConversations 设置用户多个会话属性,如果会话不存在则创建,否则更新,内部保证原子性 + // SetUserConversations 设置用户多个会话属性,如果会话不存在则创建,否则更新,内部保证原子性 SetUserConversations(ctx context.Context, ownerUserID string, conversations []*relationTb.ConversationModel) error - //SetUsersConversationFiledTx 设置多个用户会话关于某个字段的更新操作,如果会话不存在则创建,否则更新,内部保证事务操作 + // SetUsersConversationFiledTx 设置多个用户会话关于某个字段的更新操作,如果会话不存在则创建,否则更新,内部保证事务操作 SetUsersConversationFiledTx(ctx context.Context, userIDs []string, conversation *relationTb.ConversationModel, filedMap map[string]interface{}) error CreateGroupChatConversation(ctx context.Context, groupID string, userIDs []string) error GetConversationIDs(ctx context.Context, userID string) ([]string, error) @@ -98,14 +98,13 @@ func (c *conversationDatabase) SetUsersConversationFiledTx(ctx context.Context, temp.OwnerUserID = v temp.CreateTime = now conversations = append(conversations, temp) - } if len(conversations) > 0 { err = conversationTx.Create(ctx, conversations) if err != nil { return err } - cache = cache.DelConversationIDs(NotUserIDs...).DelUserConversationIDsHash(NotUserIDs...).DelConvsersations(conversation.ConversationID, NotUserIDs...) + cache = cache.DelConversationIDs(NotUserIDs...).DelUserConversationIDsHash(NotUserIDs...).DelConversations(conversation.ConversationID, NotUserIDs...) } return nil }); err != nil { @@ -129,7 +128,7 @@ func (c *conversationDatabase) CreateConversation(ctx context.Context, conversat var userIDs []string cache := c.cache.NewCache() for _, conversation := range conversations { - cache = cache.DelConvsersations(conversation.OwnerUserID, conversation.ConversationID) + cache = cache.DelConversations(conversation.OwnerUserID, conversation.ConversationID) userIDs = append(userIDs, conversation.OwnerUserID) } return cache.DelConversationIDs(userIDs...).DelUserConversationIDsHash(userIDs...).ExecDel(ctx) @@ -191,7 +190,7 @@ func (c *conversationDatabase) SetUserConversations(ctx context.Context, ownerUs var conversationIDs []string for _, conversation := range conversations { conversationIDs = append(conversationIDs, conversation.ConversationID) - cache = cache.DelConvsersations(conversation.OwnerUserID, conversation.ConversationID) + cache = cache.DelConversations(conversation.OwnerUserID, conversation.ConversationID) } conversationTx := c.conversationDB.NewTx(tx) existConversations, err := conversationTx.Find(ctx, ownerUserID, conversationIDs) @@ -248,7 +247,7 @@ func (c *conversationDatabase) CreateGroupChatConversation(ctx context.Context, for _, v := range notExistUserIDs { conversation := relationTb.ConversationModel{ConversationType: constant.SuperGroupChatType, GroupID: groupID, OwnerUserID: v, ConversationID: conversationID} conversations = append(conversations, &conversation) - cache = cache.DelConvsersations(v, conversationID) + cache = cache.DelConversations(v, conversationID) } cache = cache.DelConversationIDs(notExistUserIDs...).DelUserConversationIDsHash(notExistUserIDs...) if len(conversations) > 0 { @@ -262,7 +261,7 @@ func (c *conversationDatabase) CreateGroupChatConversation(ctx context.Context, return err } for _, v := range existConversationUserIDs { - cache = cache.DelConvsersations(v, conversationID) + cache = cache.DelConversations(v, conversationID) } return nil }); err != nil { diff --git a/pkg/common/db/controller/friend.go b/pkg/common/db/controller/friend.go index 4d549efcf..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 { @@ -93,7 +93,7 @@ func NewFriendDatabase( return &friendDatabase{friend: friend, friendRequest: friendRequest, cache: cache, tx: tx} } -// ok 检查user2是否在user1的好友列表中(inUser1Friends==true) 检查user1是否在user2的好友列表中(inUser2Friends==true) +// ok 检查user2是否在user1的好友列表中(inUser1Friends==true) 检查user1是否在user2的好友列表中(inUser2Friends==true). func (f *friendDatabase) CheckIn( ctx context.Context, userID1, userID2 string, @@ -109,7 +109,7 @@ func (f *friendDatabase) CheckIn( return utils.IsContain(userID2, userID1FriendIDs), utils.IsContain(userID1, userID2FriendIDs), nil } -// 增加或者更新好友申请 如果之前有记录则更新,没有记录则新增 +// 增加或者更新好友申请 如果之前有记录则更新,没有记录则新增. func (f *friendDatabase) AddFriendRequest( ctx context.Context, fromUserID, toUserID string, @@ -118,11 +118,11 @@ func (f *friendDatabase) AddFriendRequest( ) (err error) { return f.tx.Transaction(func(tx any) error { _, err := f.friendRequest.NewTx(tx).Take(ctx, fromUserID, toUserID) - //有db错误 + // 有db错误 if err != nil && errs.Unwrap(err) != gorm.ErrRecordNotFound { return err } - //无错误 则更新 + // 无错误 则更新 if err == nil { m := make(map[string]interface{}, 1) m["handle_result"] = 0 @@ -135,7 +135,7 @@ func (f *friendDatabase) AddFriendRequest( } return nil } - //gorm.ErrRecordNotFound 错误,则新增 + // gorm.ErrRecordNotFound 错误,则新增 if err := f.friendRequest.NewTx(tx).Create(ctx, []*relation.FriendRequestModel{{FromUserID: fromUserID, ToUserID: toUserID, ReqMsg: reqMsg, Ex: ex, CreateTime: time.Now(), HandleTime: time.Unix(0, 0)}}); err != nil { return err } @@ -143,7 +143,7 @@ func (f *friendDatabase) AddFriendRequest( }) } -// (1)先判断是否在好友表 (在不在都不返回错误) (2)对于不在好友列表的 插入即可 +// (1)先判断是否在好友表 (在不在都不返回错误) (2)对于不在好友列表的 插入即可. func (f *friendDatabase) BecomeFriends( ctx context.Context, ownerUserID string, @@ -152,7 +152,7 @@ func (f *friendDatabase) BecomeFriends( ) (err error) { cache := f.cache.NewCache() if err := f.tx.Transaction(func(tx any) error { - //先find 找出重复的 去掉重复的 + // 先find 找出重复的 去掉重复的 fs1, err := f.friend.NewTx(tx).FindFriends(ctx, ownerUserID, friendUserIDs) if err != nil { return err @@ -194,7 +194,7 @@ func (f *friendDatabase) BecomeFriends( return cache.ExecDel(ctx) } -// 拒绝好友申请 (1)检查是否有申请记录且为未处理状态 (没有记录返回错误) (2)修改申请记录 已拒绝 +// 拒绝好友申请 (1)检查是否有申请记录且为未处理状态 (没有记录返回错误) (2)修改申请记录 已拒绝. func (f *friendDatabase) RefuseFriendRequest( ctx context.Context, friendRequest *relation.FriendRequestModel, @@ -215,7 +215,7 @@ func (f *friendDatabase) RefuseFriendRequest( return nil } -// AgreeFriendRequest 同意好友申请 (1)检查是否有申请记录且为未处理状态 (没有记录返回错误) (2)检查是否好友(不返回错误) (3) 建立双向好友关系(存在的忽略) +// AgreeFriendRequest 同意好友申请 (1)检查是否有申请记录且为未处理状态 (没有记录返回错误) (2)检查是否好友(不返回错误) (3) 建立双向好友关系(存在的忽略). func (f *friendDatabase) AgreeFriendRequest( ctx context.Context, friendRequest *relation.FriendRequestModel, @@ -289,7 +289,7 @@ func (f *friendDatabase) AgreeFriendRequest( }) } -// 删除好友 外部判断是否好友关系 +// 删除好友 外部判断是否好友关系. func (f *friendDatabase) Delete(ctx context.Context, ownerUserID string, friendUserIDs []string) (err error) { if err := f.friend.Delete(ctx, ownerUserID, friendUserIDs); err != nil { return err @@ -297,7 +297,7 @@ func (f *friendDatabase) Delete(ctx context.Context, ownerUserID string, friendU return f.cache.DelFriendIDs(append(friendUserIDs, ownerUserID)...).ExecDel(ctx) } -// 更新好友备注 零值也支持 +// 更新好友备注 零值也支持. func (f *friendDatabase) UpdateRemark(ctx context.Context, ownerUserID, friendUserID, remark string) (err error) { if err := f.friend.UpdateRemark(ctx, ownerUserID, friendUserID, remark); err != nil { return err @@ -305,7 +305,7 @@ func (f *friendDatabase) UpdateRemark(ctx context.Context, ownerUserID, friendUs return f.cache.DelFriend(ownerUserID, friendUserID).ExecDel(ctx) } -// 获取ownerUserID的好友列表 无结果不返回错误 +// 获取ownerUserID的好友列表 无结果不返回错误. func (f *friendDatabase) PageOwnerFriends( ctx context.Context, ownerUserID string, @@ -314,7 +314,7 @@ func (f *friendDatabase) PageOwnerFriends( return f.friend.FindOwnerFriends(ctx, ownerUserID, pageNumber, showNumber) } -// friendUserID在哪些人的好友列表中 +// friendUserID在哪些人的好友列表中. func (f *friendDatabase) PageInWhoseFriends( ctx context.Context, friendUserID string, @@ -323,7 +323,7 @@ func (f *friendDatabase) PageInWhoseFriends( return f.friend.FindInWhoseFriends(ctx, friendUserID, pageNumber, showNumber) } -// 获取我发出去的好友申请 无结果不返回错误 +// 获取我发出去的好友申请 无结果不返回错误. func (f *friendDatabase) PageFriendRequestFromMe( ctx context.Context, userID string, @@ -332,7 +332,7 @@ func (f *friendDatabase) PageFriendRequestFromMe( return f.friendRequest.FindFromUserID(ctx, userID, pageNumber, showNumber) } -// 获取我收到的的好友申请 无结果不返回错误 +// 获取我收到的的好友申请 无结果不返回错误. func (f *friendDatabase) PageFriendRequestToMe( ctx context.Context, userID string, @@ -341,7 +341,7 @@ func (f *friendDatabase) PageFriendRequestToMe( return f.friendRequest.FindToUserID(ctx, userID, pageNumber, showNumber) } -// 获取某人指定好友的信息 如果有好友不存在,也返回错误 +// 获取某人指定好友的信息 如果有好友不存在,也返回错误. func (f *friendDatabase) FindFriendsWithError( ctx context.Context, ownerUserID string, diff --git a/pkg/common/db/controller/group.go b/pkg/common/db/controller/group.go index 9010e3350..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 { @@ -203,7 +203,7 @@ func (g *groupDatabase) CreateGroup( groups []*relationTb.GroupModel, groupMembers []*relationTb.GroupMemberModel, ) error { - var cache = g.cache.NewCache() + cache := g.cache.NewCache() if err := g.tx.Transaction(func(tx any) error { if len(groups) > 0 { if err := g.groupDB.NewTx(tx).Create(ctx, groups); err != nil { @@ -473,7 +473,7 @@ func (g *groupDatabase) UpdateGroupMember( } func (g *groupDatabase) UpdateGroupMembers(ctx context.Context, data []*relationTb.BatchUpdateGroupMember) error { - var cache = g.cache.NewCache() + cache := g.cache.NewCache() if err := g.tx.Transaction(func(tx any) error { for _, item := range data { if err := g.groupMemberDB.NewTx(tx).Update(ctx, item.GroupID, item.UserID, item.Map); err != nil { diff --git a/pkg/common/db/controller/msg.go b/pkg/common/db/controller/msg.go index 2e5699db3..555828c22 100644 --- a/pkg/common/db/controller/msg.go +++ b/pkg/common/db/controller/msg.go @@ -15,30 +15,27 @@ package controller import ( - relation2 "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/relation" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/table/relation" - "gorm.io/gorm" + "context" + "errors" "time" "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" - "context" - "errors" - - 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" "go.mongodb.org/mongo-driver/mongo" + + pbMsg "github.com/OpenIMSDK/protocol/msg" + "github.com/OpenIMSDK/protocol/sdkws" + "github.com/OpenIMSDK/tools/utils" ) const ( @@ -66,7 +63,7 @@ type CommonMsgDatabase interface { // 删除会话消息重置最小seq, remainTime为消息保留的时间单位秒,超时消息删除, 传0删除所有消息(此方法不删除redis cache) DeleteConversationMsgsAndSetMinSeq(ctx context.Context, conversationID string, remainTime int64) error // 用户标记删除过期消息返回标记删除的seq列表 - UserMsgsDestruct(cte context.Context, userID string, conversationID string, destructTime int64, lastMsgDestructTime time.Time) (seqs []int64, err error) + UserMsgsDestruct(ctx context.Context, userID string, conversationID string, destructTime int64, lastMsgDestructTime time.Time) (seqs []int64, err error) // 用户根据seq删除消息 DeleteUserMsgsBySeqs(ctx context.Context, userID string, conversationID string, seqs []int64) error @@ -95,7 +92,7 @@ type CommonMsgDatabase interface { GetConversationMinMaxSeqInMongoAndCache(ctx context.Context, conversationID string) (minSeqMongo, maxSeqMongo, minSeqCache, maxSeqCache int64, err error) SetSendMsgStatus(ctx context.Context, id string, status int32) error GetSendMsgStatus(ctx context.Context, id string) (int32, error) - SearchMessage(ctx context.Context, req *pbMsg.SearchMessageReq) (msgData []*sdkws.MsgData, err error) + SearchMessage(ctx context.Context, req *pbMsg.SearchMessageReq) (total int32, msgData []*sdkws.MsgData, err error) // to mq MsgToMQ(ctx context.Context, key string, msg2mq *sdkws.MsgData) error @@ -103,13 +100,27 @@ type CommonMsgDatabase interface { MsgToPushMQ(ctx context.Context, key, conversarionID string, msg2mq *sdkws.MsgData) (int32, int64, error) MsgToMongoMQ(ctx context.Context, key, conversarionID string, msgs []*sdkws.MsgData, lastSeq int64) error - RangeUserSendCount(ctx context.Context, start time.Time, end time.Time, group bool, ase bool, pageNumber int32, showNumber int32) (msgCount int64, userCount int64, users []*unRelationTb.UserCount, dateCount map[string]int64, err error) - RangeGroupSendCount(ctx context.Context, start time.Time, end time.Time, ase bool, pageNumber int32, showNumber int32) (msgCount int64, userCount int64, groups []*unRelationTb.GroupCount, dateCount map[string]int64, err error) -} - -func NewCommonMsgDatabase(msgDocModel unRelationTb.MsgDocModelInterface, cacheModel cache.MsgModel, msgMyqModel relation.ChatLogModelInterface) CommonMsgDatabase { + RangeUserSendCount( + ctx context.Context, + start time.Time, + end time.Time, + group bool, + ase bool, + pageNumber int32, + showNumber int32, + ) (msgCount int64, userCount int64, users []*unRelationTb.UserCount, dateCount map[string]int64, err error) + RangeGroupSendCount( + ctx context.Context, + start time.Time, + end time.Time, + ase bool, + pageNumber int32, + showNumber int32, + ) (msgCount int64, userCount int64, groups []*unRelationTb.GroupCount, dateCount map[string]int64, err error) +} + +func NewCommonMsgDatabase(msgDocModel unRelationTb.MsgDocModelInterface, cacheModel cache.MsgModel) CommonMsgDatabase { return &commonMsgDatabase{ - msgMyq: msgMyqModel, msgDocDatabase: msgDocModel, cache: cacheModel, producer: kafka.NewKafkaProducer(config.Config.Kafka.Addr, config.Config.Kafka.LatestMsgToRedis.Topic), @@ -118,18 +129,16 @@ func NewCommonMsgDatabase(msgDocModel unRelationTb.MsgDocModelInterface, cacheMo } } -func InitCommonMsgDatabase(rdb redis.UniversalClient, database *mongo.Database, dbGrom *gorm.DB) CommonMsgDatabase { +func InitCommonMsgDatabase(rdb redis.UniversalClient, database *mongo.Database) CommonMsgDatabase { cacheModel := cache.NewMsgCacheModel(rdb) msgDocModel := unrelation.NewMsgMongoDriver(database) - msgMyqModel := relation2.NewChatLogGorm(dbGrom) - CommonMsgDatabase := NewCommonMsgDatabase(msgDocModel, cacheModel, msgMyqModel) + CommonMsgDatabase := NewCommonMsgDatabase(msgDocModel, cacheModel) return CommonMsgDatabase } type commonMsgDatabase struct { msgDocDatabase unRelationTb.MsgDocModelInterface msg unRelationTb.MsgDocModel - msgMyq relation.ChatLogModelInterface cache cache.MsgModel producer *kafka.Producer producerToMongo *kafka.Producer @@ -172,7 +181,7 @@ func (db *commonMsgDatabase) BatchInsertBlock(ctx context.Context, conversationI return nil } num := db.msg.GetSingleGocMsgNum() - //num = 100 + // num = 100 for i, field := range fields { // 检查类型 var ok bool switch key { @@ -390,7 +399,7 @@ func (db *commonMsgDatabase) BatchInsertChat2Cache(ctx context.Context, conversa func (db *commonMsgDatabase) getMsgBySeqs(ctx context.Context, userID, conversationID string, seqs []int64) (totalMsgs []*sdkws.MsgData, err error) { for docID, seqs := range db.msg.GetDocIDSeqsMap(conversationID, seqs) { - //log.ZDebug(ctx, "getMsgBySeqs", "docID", docID, "seqs", seqs) + // log.ZDebug(ctx, "getMsgBySeqs", "docID", docID, "seqs", seqs) msgs, err := db.findMsgInfoBySeq(ctx, userID, docID, seqs) if err != nil { return nil, err @@ -575,7 +584,22 @@ func (db *commonMsgDatabase) GetMsgBySeqs(ctx context.Context, userID string, co log.ZError(ctx, "get message from redis exception", err, "failedSeqs", failedSeqs, "conversationID", conversationID) } } - log.ZInfo(ctx, "db.cache.GetMessagesBySeq", "userID", userID, "conversationID", conversationID, "seqs", seqs, "successMsgs", len(successMsgs), "failedSeqs", failedSeqs, "conversationID", conversationID) + log.ZInfo( + ctx, + "db.cache.GetMessagesBySeq", + "userID", + userID, + "conversationID", + conversationID, + "seqs", + seqs, + "successMsgs", + len(successMsgs), + "failedSeqs", + failedSeqs, + "conversationID", + conversationID, + ) prome.Add(prome.MsgPullFromRedisSuccessCounter, len(successMsgs)) if len(failedSeqs) > 0 { mongoMsgs, err := db.getMsgBySeqs(ctx, userID, conversationID, failedSeqs) @@ -617,7 +641,7 @@ func (db *commonMsgDatabase) UserMsgsDestruct(ctx context.Context, userID string if err != nil || msgDocModel.DocID == "" { if err != nil { if err == unrelation.ErrMsgListNotExist { - log.ZDebug(ctx, "deleteMsgRecursion finished", "conversationID", conversationID, "userID", userID, "index", index) + log.ZDebug(ctx, "not doc find", "conversationID", conversationID, "userID", userID, "index", index) } else { log.ZError(ctx, "deleteMsgRecursion GetUserMsgListByIndex failed", err, "conversationID", conversationID, "index", index) } @@ -628,31 +652,43 @@ func (db *commonMsgDatabase) UserMsgsDestruct(ctx context.Context, userID string index++ //&& msgDocModel.Msg[0].Msg.SendTime > lastMsgDestructTime.UnixMilli() if len(msgDocModel.Msg) > 0 { + i := 0 + var over bool for _, msg := range msgDocModel.Msg { + i++ if msg != nil && msg.Msg != nil && msg.Msg.SendTime+destructTime*1000 <= time.Now().UnixMilli() { - if msg.Msg.SendTime > lastMsgDestructTime.UnixMilli() && !utils.Contain(userID, msg.DelList...) { + if msg.Msg.SendTime+destructTime*1000 > lastMsgDestructTime.UnixMilli() && !utils.Contain(userID, msg.DelList...) { seqs = append(seqs, msg.Msg.Seq) } } else { - log.ZDebug(ctx, "deleteMsgRecursion finished", "conversationID", conversationID, "userID", userID, "index", index) + log.ZDebug(ctx, "all msg need destruct is found", "conversationID", conversationID, "userID", userID, "index", index, "stop index", i) + over = true break } - + } + if over { + break } } } log.ZDebug(ctx, "UserMsgsDestruct", "conversationID", conversationID, "userID", userID, "seqs", seqs) if len(seqs) > 0 { - latestSeq := seqs[len(seqs)-1] - if err := db.cache.SetConversationUserMinSeq(ctx, conversationID, userID, latestSeq); err != nil { + userMinSeq := seqs[len(seqs)-1] + 1 + currentUserMinSeq, err := db.cache.GetConversationUserMinSeq(ctx, conversationID, userID) + if err != nil && errs.Unwrap(err) != redis.Nil { return nil, err } + if currentUserMinSeq < userMinSeq { + if err := db.cache.SetConversationUserMinSeq(ctx, conversationID, userID, userMinSeq); err != nil { + return nil, err + } + } } return seqs, nil } -// this is struct for recursion +// this is struct for recursion. type delMsgRecursionStruct struct { minSeq int64 delDocIDs []string @@ -665,7 +701,7 @@ func (d *delMsgRecursionStruct) getSetMinSeq() int64 { // index 0....19(del) 20...69 // seq 70 // set minSeq 21 -// recursion 删除list并且返回设置的最小seq +// recursion 删除list并且返回设置的最小seq. func (db *commonMsgDatabase) deleteMsgRecursion(ctx context.Context, conversationID string, index int64, delStruct *delMsgRecursionStruct, remainTime int64) (int64, error) { // find from oldest list msgDocModel, err := db.msgDocDatabase.GetMsgDocModelByIndex(ctx, conversationID, index, 1) @@ -791,15 +827,19 @@ func (db *commonMsgDatabase) CleanUpUserConversationsMsgs(ctx context.Context, u func (db *commonMsgDatabase) SetMaxSeq(ctx context.Context, conversationID string, maxSeq int64) error { return db.cache.SetMaxSeq(ctx, conversationID, maxSeq) } + func (db *commonMsgDatabase) GetMaxSeqs(ctx context.Context, conversationIDs []string) (map[string]int64, error) { return db.cache.GetMaxSeqs(ctx, conversationIDs) } + func (db *commonMsgDatabase) GetMaxSeq(ctx context.Context, conversationID string) (int64, error) { return db.cache.GetMaxSeq(ctx, conversationID) } + func (db *commonMsgDatabase) SetMinSeq(ctx context.Context, conversationID string, minSeq int64) error { return db.cache.SetMinSeq(ctx, conversationID, minSeq) } + func (db *commonMsgDatabase) SetMinSeqs(ctx context.Context, seqs map[string]int64) error { return db.cache.SetMinSeqs(ctx, seqs) } @@ -807,18 +847,23 @@ func (db *commonMsgDatabase) SetMinSeqs(ctx context.Context, seqs map[string]int func (db *commonMsgDatabase) GetMinSeqs(ctx context.Context, conversationIDs []string) (map[string]int64, error) { return db.cache.GetMinSeqs(ctx, conversationIDs) } + func (db *commonMsgDatabase) GetMinSeq(ctx context.Context, conversationID string) (int64, error) { return db.cache.GetMinSeq(ctx, conversationID) } + func (db *commonMsgDatabase) GetConversationUserMinSeq(ctx context.Context, conversationID string, userID string) (int64, error) { return db.cache.GetConversationUserMinSeq(ctx, conversationID, userID) } + func (db *commonMsgDatabase) GetConversationUserMinSeqs(ctx context.Context, conversationID string, userIDs []string) (map[string]int64, error) { return db.cache.GetConversationUserMinSeqs(ctx, conversationID, userIDs) } + func (db *commonMsgDatabase) SetConversationUserMinSeq(ctx context.Context, conversationID string, userID string, minSeq int64) error { return db.cache.SetConversationUserMinSeq(ctx, conversationID, userID, minSeq) } + func (db *commonMsgDatabase) SetConversationUserMinSeqs(ctx context.Context, conversationID string, seqs map[string]int64) (err error) { return db.cache.SetConversationUserMinSeqs(ctx, conversationID, seqs) } @@ -834,6 +879,7 @@ func (db *commonMsgDatabase) UserSetHasReadSeqs(ctx context.Context, userID stri func (db *commonMsgDatabase) SetHasReadSeq(ctx context.Context, userID string, conversationID string, hasReadSeq int64) error { return db.cache.SetHasReadSeq(ctx, userID, conversationID, hasReadSeq) } + func (db *commonMsgDatabase) GetHasReadSeqs(ctx context.Context, userID string, conversationIDs []string) (map[string]int64, error) { return db.cache.GetHasReadSeqs(ctx, userID, conversationIDs) } @@ -884,22 +930,37 @@ func (db *commonMsgDatabase) GetMinMaxSeqMongo(ctx context.Context, conversation return } -func (db *commonMsgDatabase) RangeUserSendCount(ctx context.Context, start time.Time, end time.Time, group bool, ase bool, pageNumber int32, showNumber int32) (msgCount int64, userCount int64, users []*unRelationTb.UserCount, dateCount map[string]int64, err error) { +func (db *commonMsgDatabase) RangeUserSendCount( + ctx context.Context, + start time.Time, + end time.Time, + group bool, + ase bool, + pageNumber int32, + showNumber int32, +) (msgCount int64, userCount int64, users []*unRelationTb.UserCount, dateCount map[string]int64, err error) { return db.msgDocDatabase.RangeUserSendCount(ctx, start, end, group, ase, pageNumber, showNumber) } -func (db *commonMsgDatabase) RangeGroupSendCount(ctx context.Context, start time.Time, end time.Time, ase bool, pageNumber int32, showNumber int32) (msgCount int64, userCount int64, groups []*unRelationTb.GroupCount, dateCount map[string]int64, err error) { +func (db *commonMsgDatabase) RangeGroupSendCount( + ctx context.Context, + start time.Time, + end time.Time, + ase bool, + pageNumber int32, + showNumber int32, +) (msgCount int64, userCount int64, groups []*unRelationTb.GroupCount, dateCount map[string]int64, err error) { return db.msgDocDatabase.RangeGroupSendCount(ctx, start, end, ase, pageNumber, showNumber) } -func (db *commonMsgDatabase) SearchMessage(ctx context.Context, req *pbMsg.SearchMessageReq) (msgData []*sdkws.MsgData, err error) { +func (db *commonMsgDatabase) SearchMessage(ctx context.Context, req *pbMsg.SearchMessageReq) (total int32, msgData []*sdkws.MsgData, err error) { var totalMsgs []*sdkws.MsgData - msgs, err := db.msgDocDatabase.SearchMessage(ctx, req) + total, msgs, err := db.msgDocDatabase.SearchMessage(ctx, req) if err != nil { - return nil, err + return 0, nil, err } for _, msg := range msgs { totalMsgs = append(totalMsgs, convert.MsgDB2Pb(msg.Msg)) } - return totalMsgs, nil + return total, totalMsgs, nil } 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/s3.go b/pkg/common/db/controller/s3.go index ecc438ef2..220e8e070 100644 --- a/pkg/common/db/controller/s3.go +++ b/pkg/common/db/controller/s3.go @@ -16,11 +16,12 @@ package controller import ( "context" + "path/filepath" + "time" + "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/s3" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/s3/cont" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/table/relation" - "path/filepath" - "time" ) type S3Database interface { @@ -76,9 +77,7 @@ func (s *s3Database) AccessURL(ctx context.Context, name string, expire time.Dur } opt := &s3.AccessURLOption{ ContentType: obj.ContentType, - } - if filename := filepath.Base(obj.Name); filename != "" { - opt.ContentDisposition = `attachment; filename=` + filename + Filename: filepath.Base(obj.Name), } expireTime := time.Now().Add(expire) rawURL, err := s.s3.AccessURL(ctx, obj.Key, expire, opt) diff --git a/pkg/common/db/controller/user.go b/pkg/common/db/controller/user.go index db725ae60..4f9383b09 100644 --- a/pkg/common/db/controller/user.go +++ b/pkg/common/db/controller/user.go @@ -20,29 +20,29 @@ 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 { - //获取指定用户的信息 如有userID未找到 也返回错误 + // 获取指定用户的信息 如有userID未找到 也返回错误 FindWithError(ctx context.Context, userIDs []string) (users []*relation.UserModel, err error) - //获取指定用户的信息 如有userID未找到 不返回错误 + // 获取指定用户的信息 如有userID未找到 不返回错误 Find(ctx context.Context, userIDs []string) (users []*relation.UserModel, err error) - //插入多条 外部保证userID 不重复 且在db中不存在 + // 插入多条 外部保证userID 不重复 且在db中不存在 Create(ctx context.Context, users []*relation.UserModel) (err error) - //更新(非零值) 外部保证userID存在 + // 更新(非零值) 外部保证userID存在 Update(ctx context.Context, user *relation.UserModel) (err error) - //更新(零值) 外部保证userID存在 + // 更新(零值) 外部保证userID存在 UpdateByMap(ctx context.Context, userID string, args map[string]interface{}) (err error) - //如果没找到,不返回错误 + // 如果没找到,不返回错误 Page(ctx context.Context, pageNumber, showNumber int32) (users []*relation.UserModel, count int64, err error) - //只要有一个存在就为true + // 只要有一个存在就为true IsExist(ctx context.Context, userIDs []string) (exist bool, err error) - //获取所有用户ID - GetAllUserID(ctx context.Context) ([]string, error) - //函数内部先查询db中是否存在,存在则什么都不做;不存在则插入 + // 获取所有用户ID + GetAllUserID(ctx context.Context, pageNumber, showNumber int32) ([]string, error) + // 函数内部先查询db中是否存在,存在则什么都不做;不存在则插入 InitOnce(ctx context.Context, users []*relation.UserModel) (err error) // 获取用户总数 CountTotal(ctx context.Context, before *time.Time) (int64, error) @@ -75,7 +75,7 @@ func (u *userDatabase) InitOnce(ctx context.Context, users []*relation.UserModel return nil } -// 获取指定用户的信息 如有userID未找到 也返回错误 +// 获取指定用户的信息 如有userID未找到 也返回错误. 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 +87,13 @@ func (u *userDatabase) FindWithError(ctx context.Context, userIDs []string) (use return } -// 获取指定用户的信息 如有userID未找到 不返回错误 +// 获取指定用户的信息 如有userID未找到 不返回错误. func (u *userDatabase) Find(ctx context.Context, userIDs []string) (users []*relation.UserModel, err error) { users, err = u.cache.GetUsersInfo(ctx, userIDs) return } -// 插入多条 外部保证userID 不重复 且在db中不存在 +// 插入多条 外部保证userID 不重复 且在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 +111,7 @@ func (u *userDatabase) Create(ctx context.Context, users []*relation.UserModel) return u.cache.DelUsersInfo(userIDs...).ExecDel(ctx) } -// 更新(非零值) 外部保证userID存在 +// 更新(非零值) 外部保证userID存在. 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 +119,7 @@ func (u *userDatabase) Update(ctx context.Context, user *relation.UserModel) (er return u.cache.DelUsersInfo(user.UserID).ExecDel(ctx) } -// 更新(零值) 外部保证userID存在 +// 更新(零值) 外部保证userID存在. 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 +127,7 @@ func (u *userDatabase) UpdateByMap(ctx context.Context, userID string, args map[ return u.cache.DelUsersInfo(userID).ExecDel(ctx) } -// 获取,如果没找到,不返回错误 +// 获取,如果没找到,不返回错误. func (u *userDatabase) Page( ctx context.Context, pageNumber, showNumber int32, @@ -135,7 +135,7 @@ func (u *userDatabase) Page( return u.userDB.Page(ctx, pageNumber, showNumber) } -// userIDs是否存在 只要有一个存在就为true +// userIDs是否存在 只要有一个存在就为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,8 +147,8 @@ func (u *userDatabase) IsExist(ctx context.Context, userIDs []string) (exist boo return false, nil } -func (u *userDatabase) GetAllUserID(ctx context.Context) (userIDs []string, err error) { - return u.userDB.GetAllUserID(ctx) +func (u *userDatabase) GetAllUserID(ctx context.Context, pageNumber, showNumber int32) (userIDs []string, err error) { + return u.userDB.GetAllUserID(ctx, pageNumber, showNumber) } func (u *userDatabase) CountTotal(ctx context.Context, before *time.Time) (count int64, err error) { diff --git a/pkg/common/db/localcache/conversation.go b/pkg/common/db/localcache/conversation.go index de9f0401d..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 { @@ -76,5 +76,4 @@ func (g *ConversationLocalCache) GetConversationIDs(ctx context.Context, userID return conversationIDsResp.ConversationIDs, nil } return hash.ids, nil - } 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 c4068e3f7..056295e15 100644 --- a/pkg/common/db/relation/chat_log_model.go +++ b/pkg/common/db/relation/chat_log_model.go @@ -15,18 +15,16 @@ package relation import ( - "fmt" - "github.com/golang/protobuf/jsonpb" "github.com/jinzhu/copier" "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 { @@ -62,44 +60,3 @@ func (c *ChatLogGorm) Create(msg *pbMsg.MsgDataToMQ) error { chatLog.SendTime = utils.UnixMillSecondToTime(msg.MsgData.SendTime) return c.DB.Create(chatLog).Error } - -func (c *ChatLogGorm) GetChatLog( - chatLog *relation.ChatLogModel, - pageNumber, showNumber int32, - contentTypeList []int32, -) (int64, []relation.ChatLogModel, error) { - mdb := c.DB.Model(chatLog) - if chatLog.SendTime.Unix() > 0 { - mdb = mdb.Where("send_time > ? and send_time < ?", chatLog.SendTime, chatLog.SendTime.AddDate(0, 0, 1)) - } - if chatLog.Content != "" { - mdb = mdb.Where(" content like ? ", fmt.Sprintf("%%%s%%", chatLog.Content)) - } - if chatLog.SessionType == 1 { - mdb = mdb.Where("session_type = ?", chatLog.SessionType) - } else if chatLog.SessionType == 2 { - mdb = mdb.Where("session_type in (?)", []int{constant.GroupChatType, constant.SuperGroupChatType}) - } - if chatLog.ContentType != 0 { - mdb = mdb.Where("content_type = ?", chatLog.ContentType) - } - if chatLog.SendID != "" { - mdb = mdb.Where("send_id = ?", chatLog.SendID) - } - if chatLog.RecvID != "" { - mdb = mdb.Where("recv_id = ?", chatLog.RecvID) - } - if len(contentTypeList) > 0 { - mdb = mdb.Where("content_type in (?)", contentTypeList) - } - var count int64 - if err := mdb.Count(&count).Error; err != nil { - return 0, nil, err - } - var chatLogs []relation.ChatLogModel - mdb = mdb.Limit(int(showNumber)).Offset(int(showNumber * (pageNumber - 1))) - if err := mdb.Find(&chatLogs).Error; err != nil { - return 0, nil, err - } - return count, chatLogs, nil -} diff --git a/pkg/common/db/relation/conversation_model.go b/pkg/common/db/relation/conversation_model.go index 10b82ef7c..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 { @@ -207,7 +207,7 @@ func (c *ConversationGorm) GetConversationIDsNeedDestruct( ) (conversations []*relation.ConversationModel, err error) { return conversations, utils.Wrap( c.db(ctx). - Where("is_msg_destruct = 1 && UNIX_TIMESTAMP(NOW()) > (msg_destruct_time + UNIX_TIMESTAMP(latest_msg_destruct_time)) && msg_destruct_time != 0"). + Where("is_msg_destruct = 1 && msg_destruct_time != 0 && (UNIX_TIMESTAMP(NOW()) > (msg_destruct_time + UNIX_TIMESTAMP(latest_msg_destruct_time)) || latest_msg_destruct_time is NULL)"). Find(&conversations). Error, "", diff --git a/pkg/common/db/relation/friend_model.go b/pkg/common/db/relation/friend_model.go index 5a54f9b7c..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 { @@ -35,12 +35,12 @@ func (f *FriendGorm) NewTx(tx any) relation.FriendModelInterface { return &FriendGorm{NewMetaDB(tx.(*gorm.DB), &relation.FriendModel{})} } -// 插入多条记录 +// 插入多条记录. func (f *FriendGorm) Create(ctx context.Context, friends []*relation.FriendModel) (err error) { return utils.Wrap(f.db(ctx).Create(&friends).Error, "") } -// 删除ownerUserID指定的好友 +// 删除ownerUserID指定的好友. func (f *FriendGorm) Delete(ctx context.Context, ownerUserID string, friendUserIDs []string) (err error) { err = utils.Wrap( f.db(ctx). @@ -52,7 +52,7 @@ func (f *FriendGorm) Delete(ctx context.Context, ownerUserID string, friendUserI return err } -// 更新ownerUserID单个好友信息 更新零值 +// 更新ownerUserID单个好友信息 更新零值. func (f *FriendGorm) UpdateByMap( ctx context.Context, ownerUserID string, @@ -65,12 +65,12 @@ func (f *FriendGorm) UpdateByMap( ) } -// 更新好友信息的非零值 +// 更新好友信息的非零值. func (f *FriendGorm) Update(ctx context.Context, friends []*relation.FriendModel) (err error) { return utils.Wrap(f.db(ctx).Updates(&friends).Error, "") } -// 更新好友备注(也支持零值 ) +// 更新好友备注(也支持零值 ). func (f *FriendGorm) UpdateRemark(ctx context.Context, ownerUserID, friendUserID, remark string) (err error) { if remark != "" { return utils.Wrap( @@ -86,7 +86,7 @@ func (f *FriendGorm) UpdateRemark(ctx context.Context, ownerUserID, friendUserID return utils.Wrap(f.db(ctx).Where("owner_user_id = ?", ownerUserID).Updates(m).Error, "") } -// 获取单个好友信息,如没找到 返回错误 +// 获取单个好友信息,如没找到 返回错误. func (f *FriendGorm) Take( ctx context.Context, ownerUserID, friendUserID string, @@ -98,7 +98,7 @@ func (f *FriendGorm) Take( ) } -// 查找好友关系,如果是双向关系,则都返回 +// 查找好友关系,如果是双向关系,则都返回. func (f *FriendGorm) FindUserState( ctx context.Context, userID1, userID2 string, @@ -112,7 +112,7 @@ func (f *FriendGorm) FindUserState( ) } -// 获取 owner指定的好友列表 如果有friendUserIDs不存在,也不返回错误 +// 获取 owner指定的好友列表 如果有friendUserIDs不存在,也不返回错误. func (f *FriendGorm) FindFriends( ctx context.Context, ownerUserID string, @@ -124,7 +124,7 @@ func (f *FriendGorm) FindFriends( ) } -// 获取哪些人添加了friendUserID 如果有ownerUserIDs不存在,也不返回错误 +// 获取哪些人添加了friendUserID 如果有ownerUserIDs不存在,也不返回错误. func (f *FriendGorm) FindReversalFriends( ctx context.Context, friendUserID string, @@ -136,7 +136,7 @@ func (f *FriendGorm) FindReversalFriends( ) } -// 获取ownerUserID好友列表 支持翻页 +// 获取ownerUserID好友列表 支持翻页. func (f *FriendGorm) FindOwnerFriends( ctx context.Context, ownerUserID string, @@ -158,7 +158,7 @@ func (f *FriendGorm) FindOwnerFriends( return } -// 获取哪些人添加了friendUserID 支持翻页 +// 获取哪些人添加了friendUserID 支持翻页. func (f *FriendGorm) FindInWhoseFriends( ctx context.Context, friendUserID string, diff --git a/pkg/common/db/relation/friend_request_model.go b/pkg/common/db/relation/friend_request_model.go index 06fd08ff6..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 { @@ -35,12 +35,12 @@ func (f *FriendRequestGorm) NewTx(tx any) relation.FriendRequestModelInterface { return &FriendRequestGorm{NewMetaDB(tx.(*gorm.DB), &relation.FriendRequestModel{})} } -// 插入多条记录 +// 插入多条记录. func (f *FriendRequestGorm) Create(ctx context.Context, friendRequests []*relation.FriendRequestModel) (err error) { return utils.Wrap(f.db(ctx).Create(&friendRequests).Error, "") } -// 删除记录 +// 删除记录. func (f *FriendRequestGorm) Delete(ctx context.Context, fromUserID, toUserID string) (err error) { return utils.Wrap( f.db(ctx). @@ -51,7 +51,7 @@ func (f *FriendRequestGorm) Delete(ctx context.Context, fromUserID, toUserID str ) } -// 更新零值 +// 更新零值. func (f *FriendRequestGorm) UpdateByMap( ctx context.Context, fromUserID string, @@ -68,7 +68,7 @@ func (f *FriendRequestGorm) UpdateByMap( ) } -// 更新记录 (非零值) +// 更新记录 (非零值). func (f *FriendRequestGorm) Update(ctx context.Context, friendRequest *relation.FriendRequestModel) (err error) { return utils.Wrap( f.db(ctx). @@ -79,7 +79,7 @@ func (f *FriendRequestGorm) Update(ctx context.Context, friendRequest *relation. ) } -// 获取来指定用户的好友申请 未找到 不返回错误 +// 获取来指定用户的好友申请 未找到 不返回错误. func (f *FriendRequestGorm) Find( ctx context.Context, fromUserID, toUserID string, @@ -104,7 +104,7 @@ func (f *FriendRequestGorm) Take( return friendRequest, err } -// 获取toUserID收到的好友申请列表 +// 获取toUserID收到的好友申请列表. func (f *FriendRequestGorm) FindToUserID( ctx context.Context, toUserID string, @@ -126,7 +126,7 @@ func (f *FriendRequestGorm) FindToUserID( return } -// 获取fromUserID发出去的好友申请列表 +// 获取fromUserID发出去的好友申请列表. func (f *FriendRequestGorm) FindFromUserID( ctx context.Context, fromUserID string, 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 767f7db84..c95d51861 100644 --- a/pkg/common/db/relation/group_model.go +++ b/pkg/common/db/relation/group_model.go @@ -16,15 +16,16 @@ package relation import ( "context" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/constant" "time" + "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) @@ -67,6 +68,7 @@ func (g *GroupGorm) Search(ctx context.Context, keyword string, pageNumber, show db = db.WithContext(ctx).Where("status!=?", constant.GroupStatusDismissed) return ormutil.GormSearch[relation.GroupModel](db, []string{"name"}, keyword, pageNumber, showNumber) } + func (g *GroupGorm) GetGroupIDsByGroupType(ctx context.Context, groupType int) (groupIDs []string, err error) { return groupIDs, utils.Wrap(g.DB.Model(&relation.GroupModel{}).Where("group_type = ? ", groupType).Pluck("group_id", &groupIDs).Error, "") } 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 4a6758cba..29873cc89 100644 --- a/pkg/common/db/relation/mysql_init.go +++ b/pkg/common/db/relation/mysql_init.go @@ -21,20 +21,20 @@ 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" ) const ( - maxRetry = 100 //number of retries + maxRetry = 100 // number of retries ) -// newMysqlGormDB Initialize the database connection +// newMysqlGormDB Initialize the database connection. func newMysqlGormDB() (*gorm.DB, error) { dsn := fmt.Sprintf("%s:%s@tcp(%s)/%s?charset=utf8mb4&parseTime=true&loc=Local", config.Config.Mysql.Username, config.Config.Mysql.Password, config.Config.Mysql.Address[0], "mysql") @@ -84,7 +84,7 @@ func newMysqlGormDB() (*gorm.DB, error) { return db, nil } -// connectToDatabase Connection retry for mysql +// connectToDatabase Connection retry for mysql. func connectToDatabase(dsn string, maxRetry int) (*gorm.DB, error) { var db *gorm.DB var err error @@ -101,7 +101,7 @@ func connectToDatabase(dsn string, maxRetry int) (*gorm.DB, error) { return nil, err } -// NewGormDB gorm mysql +// NewGormDB gorm mysql. func NewGormDB() (*gorm.DB, error) { specialerror.AddReplace(gorm.ErrRecordNotFound, errs.ErrRecordNotFound) specialerror.AddErrHandler(replaceDuplicateKey) 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 d03216d9b..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 { @@ -34,35 +34,35 @@ func NewUserGorm(db *gorm.DB) relation.UserModelInterface { return &UserGorm{NewMetaDB(db, &relation.UserModel{})} } -// 插入多条 +// 插入多条. func (u *UserGorm) Create(ctx context.Context, users []*relation.UserModel) (err error) { return utils.Wrap(u.db(ctx).Create(&users).Error, "") } -// 更新用户信息 零值 +// 更新用户信息 零值. func (u *UserGorm) UpdateByMap(ctx context.Context, userID string, args map[string]interface{}) (err error) { return utils.Wrap(u.db(ctx).Model(&relation.UserModel{}).Where("user_id = ?", userID).Updates(args).Error, "") } -// 更新多个用户信息 非零值 +// 更新多个用户信息 非零值. func (u *UserGorm) Update(ctx context.Context, user *relation.UserModel) (err error) { return utils.Wrap(u.db(ctx).Model(user).Updates(user).Error, "") } -// 获取指定用户信息 不存在,也不返回错误 +// 获取指定用户信息 不存在,也不返回错误. func (u *UserGorm) Find(ctx context.Context, userIDs []string) (users []*relation.UserModel, err error) { err = utils.Wrap(u.db(ctx).Where("user_id in (?)", userIDs).Find(&users).Error, "") return users, err } -// 获取某个用户信息 不存在,则返回错误 +// 获取某个用户信息 不存在,则返回错误. func (u *UserGorm) Take(ctx context.Context, userID string) (user *relation.UserModel, err error) { user = &relation.UserModel{} err = utils.Wrap(u.db(ctx).Where("user_id = ?", userID).Take(&user).Error, "") return user, err } -// 获取用户信息 不存在,不返回错误 +// 获取用户信息 不存在,不返回错误. func (u *UserGorm) Page( ctx context.Context, pageNumber, showNumber int32, @@ -83,10 +83,9 @@ func (u *UserGorm) Page( return } -// 获取所有用户ID -func (u *UserGorm) GetAllUserID(ctx context.Context) (userIDs []string, err error) { - err = u.db(ctx).Pluck("user_id", &userIDs).Error - return userIDs, err +// 获取所有用户ID. +func (u *UserGorm) GetAllUserID(ctx context.Context, pageNumber, showNumber int32) (userIDs []string, err error) { + return userIDs, errs.Wrap(u.db(ctx).Limit(int(showNumber)).Offset(int((pageNumber-1)*showNumber)).Pluck("user_id", &userIDs).Error) } func (u *UserGorm) GetUserGlobalRecvMsgOpt(ctx context.Context, userID string) (opt int, err error) { diff --git a/pkg/common/db/s3/cont/controller.go b/pkg/common/db/s3/cont/controller.go index 0ab700e21..01dbc787f 100644 --- a/pkg/common/db/s3/cont/controller.go +++ b/pkg/common/db/s3/cont/controller.go @@ -20,13 +20,15 @@ import ( "encoding/hex" "errors" "fmt" - "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/google/uuid" "path" "strings" "time" + + "github.com/google/uuid" + + "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/s3" + "github.com/OpenIMSDK/tools/errs" + "github.com/OpenIMSDK/tools/log" ) func New(impl s3.Interface) *Controller { diff --git a/pkg/common/db/s3/cont/error.go b/pkg/common/db/s3/cont/error.go index af09779ee..be77bcb9e 100644 --- a/pkg/common/db/s3/cont/error.go +++ b/pkg/common/db/s3/cont/error.go @@ -16,6 +16,7 @@ package cont import ( "fmt" + "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/s3" ) diff --git a/pkg/common/db/s3/cos/cos.go b/pkg/common/db/s3/cos/cos.go index c3a2b104c..29d74ceb4 100644 --- a/pkg/common/db/s3/cos/cos.go +++ b/pkg/common/db/s3/cos/cos.go @@ -18,14 +18,16 @@ import ( "context" "errors" "fmt" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/config" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/s3" - "github.com/tencentyun/cos-go-sdk-v5" "net/http" "net/url" "strconv" "strings" "time" + + "github.com/tencentyun/cos-go-sdk-v5" + + "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/s3" + "github.com/OpenIMSDK/tools/config" ) const ( @@ -246,21 +248,27 @@ func (c *Cos) ListUploadedParts(ctx context.Context, uploadID string, name strin } func (c *Cos) AccessURL(ctx context.Context, name string, expire time.Duration, opt *s3.AccessURLOption) (string, error) { - //reqParams := make(url.Values) - //if opt != nil { - // if opt.ContentType != "" { - // reqParams.Set("Content-Type", opt.ContentType) - // } - // if opt.ContentDisposition != "" { - // reqParams.Set("Content-Disposition", opt.ContentDisposition) - // } - //} + var option *cos.PresignedURLOptions + if opt != nil { + query := make(url.Values) + if opt.ContentType != "" { + query.Set("response-content-type", opt.ContentType) + } + if opt.Filename != "" { + query.Set("response-content-disposition", `attachment; filename="`+opt.Filename+`"`) + } + if len(query) > 0 { + option = &cos.PresignedURLOptions{ + Query: &query, + } + } + } if expire <= 0 { expire = time.Hour * 24 * 365 * 99 // 99 years } else if expire < time.Second { expire = time.Second } - rawURL, err := c.client.Object.GetPresignedURL(ctx, http.MethodGet, name, c.credential.SecretID, c.credential.SecretKey, expire, nil) + rawURL, err := c.client.Object.GetPresignedURL(ctx, http.MethodGet, name, c.credential.SecretID, c.credential.SecretKey, expire, option) if err != nil { return "", err } diff --git a/pkg/common/db/s3/minio/minio.go b/pkg/common/db/s3/minio/minio.go index 48d192420..d5ac7de40 100644 --- a/pkg/common/db/s3/minio/minio.go +++ b/pkg/common/db/s3/minio/minio.go @@ -18,16 +18,19 @@ import ( "context" "errors" "fmt" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/config" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/s3" - "github.com/minio/minio-go/v7" - "github.com/minio/minio-go/v7/pkg/credentials" - "github.com/minio/minio-go/v7/pkg/signer" "net/http" "net/url" "strconv" "strings" + "sync" "time" + + "github.com/minio/minio-go/v7" + "github.com/minio/minio-go/v7/pkg/credentials" + "github.com/minio/minio-go/v7/pkg/signer" + + "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/s3" + "github.com/OpenIMSDK/tools/config" ) const ( @@ -54,21 +57,20 @@ func NewMinio() (s3.Interface, error) { if err != nil { return nil, err } - exists, err := client.BucketExists(context.Background(), conf.Bucket) - if err != nil { - return nil, err - } - if !exists { - if err := client.MakeBucket(context.Background(), conf.Bucket, minio.MakeBucketOptions{}); err != nil { - return nil, err - } - } - return &Minio{ + m := &Minio{ bucket: conf.Bucket, bucketURL: conf.Endpoint + "/" + conf.Bucket + "/", opts: opts, core: &minio.Core{Client: client}, - }, nil + lock: &sync.Mutex{}, + init: false, + } + ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second) + defer cancel() + if err := m.initMinio(ctx); err != nil { + fmt.Println("init minio error:", err) + } + return m, nil } type Minio struct { @@ -76,6 +78,30 @@ type Minio struct { bucketURL string opts *minio.Options core *minio.Core + lock sync.Locker + init bool +} + +func (m *Minio) initMinio(ctx context.Context) error { + if m.init { + return nil + } + m.lock.Lock() + defer m.lock.Unlock() + if m.init { + return nil + } + exists, err := m.core.Client.BucketExists(ctx, config.Config.Object.Minio.Bucket) + if err != nil { + return fmt.Errorf("check bucket exists error: %w", err) + } + if !exists { + if err := m.core.Client.MakeBucket(ctx, config.Config.Object.Minio.Bucket, minio.MakeBucketOptions{}); err != nil { + return fmt.Errorf("make bucket error: %w", err) + } + } + m.init = true + return nil } func (m *Minio) Engine() string { @@ -91,6 +117,9 @@ func (m *Minio) PartLimit() *s3.PartLimit { } func (m *Minio) InitiateMultipartUpload(ctx context.Context, name string) (*s3.InitiateMultipartUploadResult, error) { + if err := m.initMinio(ctx); err != nil { + return nil, err + } uploadID, err := m.core.NewMultipartUpload(ctx, m.bucket, name, minio.PutObjectOptions{}) if err != nil { return nil, err @@ -103,6 +132,9 @@ func (m *Minio) InitiateMultipartUpload(ctx context.Context, name string) (*s3.I } func (m *Minio) CompleteMultipartUpload(ctx context.Context, uploadID string, name string, parts []s3.Part) (*s3.CompleteMultipartUploadResult, error) { + if err := m.initMinio(ctx); err != nil { + return nil, err + } minioParts := make([]minio.CompletePart, len(parts)) for i, part := range parts { minioParts[i] = minio.CompletePart{ @@ -140,6 +172,9 @@ func (m *Minio) PartSize(ctx context.Context, size int64) (int64, error) { } func (m *Minio) AuthSign(ctx context.Context, uploadID string, name string, expire time.Duration, partNumbers []int) (*s3.AuthSignResult, error) { + if err := m.initMinio(ctx); err != nil { + return nil, err + } creds, err := m.opts.Creds.Get() if err != nil { return nil, err @@ -168,6 +203,9 @@ func (m *Minio) AuthSign(ctx context.Context, uploadID string, name string, expi } func (m *Minio) PresignedPutObject(ctx context.Context, name string, expire time.Duration) (string, error) { + if err := m.initMinio(ctx); err != nil { + return "", err + } rawURL, err := m.core.Client.PresignedPutObject(ctx, m.bucket, name, expire) if err != nil { return "", err @@ -176,10 +214,16 @@ func (m *Minio) PresignedPutObject(ctx context.Context, name string, expire time } func (m *Minio) DeleteObject(ctx context.Context, name string) error { + if err := m.initMinio(ctx); err != nil { + return err + } return m.core.Client.RemoveObject(ctx, m.bucket, name, minio.RemoveObjectOptions{}) } func (m *Minio) StatObject(ctx context.Context, name string) (*s3.ObjectInfo, error) { + if err := m.initMinio(ctx); err != nil { + return nil, err + } info, err := m.core.Client.StatObject(ctx, m.bucket, name, minio.StatObjectOptions{}) if err != nil { return nil, err @@ -193,6 +237,9 @@ func (m *Minio) StatObject(ctx context.Context, name string) (*s3.ObjectInfo, er } func (m *Minio) CopyObject(ctx context.Context, src string, dst string) (*s3.CopyObjectInfo, error) { + if err := m.initMinio(ctx); err != nil { + return nil, err + } result, err := m.core.Client.CopyObject(ctx, minio.CopyDestOptions{ Bucket: m.bucket, Object: dst, @@ -224,10 +271,16 @@ func (m *Minio) IsNotFound(err error) bool { } func (m *Minio) AbortMultipartUpload(ctx context.Context, uploadID string, name string) error { + if err := m.initMinio(ctx); err != nil { + return err + } return m.core.AbortMultipartUpload(ctx, m.bucket, name, uploadID) } func (m *Minio) ListUploadedParts(ctx context.Context, uploadID string, name string, partNumberMarker int, maxParts int) (*s3.ListUploadedPartsResult, error) { + if err := m.initMinio(ctx); err != nil { + return nil, err + } result, err := m.core.ListObjectParts(ctx, m.bucket, name, uploadID, partNumberMarker, maxParts) if err != nil { return nil, err @@ -251,21 +304,24 @@ func (m *Minio) ListUploadedParts(ctx context.Context, uploadID string, name str } func (m *Minio) AccessURL(ctx context.Context, name string, expire time.Duration, opt *s3.AccessURLOption) (string, error) { - //reqParams := make(url.Values) - //if opt != nil { - // if opt.ContentType != "" { - // reqParams.Set("Content-Type", opt.ContentType) - // } - // if opt.ContentDisposition != "" { - // reqParams.Set("Content-Disposition", opt.ContentDisposition) - // } - //} + if err := m.initMinio(ctx); err != nil { + return "", err + } + reqParams := make(url.Values) + if opt != nil { + if opt.ContentType != "" { + reqParams.Set("response-content-type", opt.ContentType) + } + if opt.Filename != "" { + reqParams.Set("response-content-disposition", `attachment; filename="`+opt.Filename+`"`) + } + } if expire <= 0 { expire = time.Hour * 24 * 365 * 99 // 99 years } else if expire < time.Second { expire = time.Second } - u, err := m.core.Client.PresignedGetObject(ctx, m.bucket, name, expire, nil) + u, err := m.core.Client.PresignedGetObject(ctx, m.bucket, name, expire, reqParams) if err != nil { return "", err } diff --git a/pkg/common/db/s3/oss/oss.go b/pkg/common/db/s3/oss/oss.go index 1b5745fe1..ee4d19464 100644 --- a/pkg/common/db/s3/oss/oss.go +++ b/pkg/common/db/s3/oss/oss.go @@ -18,14 +18,16 @@ import ( "context" "errors" "fmt" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/config" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/s3" - "github.com/aliyun/aliyun-oss-go-sdk/oss" "net/http" "net/url" "strconv" "strings" "time" + + "github.com/aliyun/aliyun-oss-go-sdk/oss" + + "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/s3" + "github.com/OpenIMSDK/tools/config" ) const ( @@ -144,10 +146,17 @@ func (o *OSS) AuthSign(ctx context.Context, uploadID string, name string, expire if o.credentials.GetSecurityToken() != "" { request.Header.Set(oss.HTTPHeaderOssSecurityToken, o.credentials.GetSecurityToken()) } + now := time.Now().UTC().Format(http.TimeFormat) request.Header.Set(oss.HTTPHeaderHost, request.Host) - request.Header.Set(oss.HTTPHeaderDate, time.Now().UTC().Format(http.TimeFormat)) - authorization := fmt.Sprintf(`OSS %s:%s`, o.credentials.GetAccessKeyID(), o.getSignedStr(request, fmt.Sprintf(`/%s/%s?partNumber=%d&uploadId=%s`, o.bucket.BucketName, name, partNumber, uploadID), o.credentials.GetAccessKeySecret())) + request.Header.Set(oss.HTTPHeaderDate, now) + request.Header.Set(oss.HttpHeaderOssDate, now) + authorization := fmt.Sprintf( + `OSS %s:%s`, + o.credentials.GetAccessKeyID(), + o.getSignedStr(request, fmt.Sprintf(`/%s/%s?partNumber=%d&uploadId=%s`, o.bucket.BucketName, name, partNumber, uploadID), o.credentials.GetAccessKeySecret()), + ) request.Header.Set(oss.HTTPHeaderAuthorization, authorization) + delete(request.Header, oss.HTTPHeaderDate) result.Parts[i] = s3.SignPart{ PartNumber: partNumber, Query: url.Values{"partNumber": {strconv.Itoa(partNumber)}}, @@ -255,19 +264,19 @@ func (o *OSS) ListUploadedParts(ctx context.Context, uploadID string, name strin } func (o *OSS) AccessURL(ctx context.Context, name string, expire time.Duration, opt *s3.AccessURLOption) (string, error) { - //var opts []oss.Option - //if opt != nil { - // if opt.ContentType != "" { - // opts = append(opts, oss.ContentType(opt.ContentType)) - // } - // if opt.ContentDisposition != "" { - // opts = append(opts, oss.ContentDisposition(opt.ContentDisposition)) - // } - //} + var opts []oss.Option + if opt != nil { + if opt.ContentType != "" { + opts = append(opts, oss.ResponseContentType(opt.ContentType)) + } + if opt.Filename != "" { + opts = append(opts, oss.ResponseContentDisposition(`attachment; filename="`+opt.Filename+`"`)) + } + } if expire <= 0 { expire = time.Hour * 24 * 365 * 99 // 99 years } else if expire < time.Second { expire = time.Second } - return o.bucket.SignURL(name, http.MethodGet, int64(expire/time.Second)) + return o.bucket.SignURL(name, http.MethodGet, int64(expire/time.Second), opts...) } diff --git a/pkg/common/db/s3/oss/sign.go b/pkg/common/db/s3/oss/sign.go index a272a64c5..9811ac476 100644 --- a/pkg/common/db/s3/oss/sign.go +++ b/pkg/common/db/s3/oss/sign.go @@ -19,12 +19,13 @@ import ( "crypto/sha1" "crypto/sha256" "encoding/base64" - "github.com/aliyun/aliyun-oss-go-sdk/oss" "hash" "io" "net/http" "sort" "strings" + + "github.com/aliyun/aliyun-oss-go-sdk/oss" ) func (o *OSS) getAdditionalHeaderKeys(req *http.Request) ([]string, map[string]string) { diff --git a/pkg/common/db/s3/s3.go b/pkg/common/db/s3/s3.go index 55adc313c..fadb09a0b 100644 --- a/pkg/common/db/s3/s3.go +++ b/pkg/common/db/s3/s3.go @@ -117,8 +117,8 @@ type ListUploadedPartsResult struct { } type AccessURLOption struct { - ContentType string `json:"contentType"` - ContentDisposition string `json:"contentDisposition"` + ContentType string `json:"contentType"` + Filename string `json:"filename"` } type Interface interface { diff --git a/pkg/common/db/table/relation/chatlog.go b/pkg/common/db/table/relation/chatlog.go index c67edb1fe..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 ( @@ -48,5 +48,4 @@ func (ChatLogModel) TableName() string { type ChatLogModelInterface interface { Create(msg *pbMsg.MsgDataToMQ) error - GetChatLog(chatLog *ChatLogModel, pageNumber, showNumber int32, contentTypes []int32) (int64, []ChatLogModel, error) } diff --git a/pkg/common/db/table/relation/conversation.go b/pkg/common/db/table/relation/conversation.go index 3e095238f..99c01e5b7 100644 --- a/pkg/common/db/table/relation/conversation.go +++ b/pkg/common/db/table/relation/conversation.go @@ -24,20 +24,20 @@ const ( ) type ConversationModel struct { - OwnerUserID string `gorm:"column:owner_user_id;primary_key;type:char(128)" json:"OwnerUserID"` - ConversationID string `gorm:"column:conversation_id;primary_key;type:char(128)" json:"conversationID"` - ConversationType int32 `gorm:"column:conversation_type" json:"conversationType"` - UserID string `gorm:"column:user_id;type:char(64)" json:"userID"` - GroupID string `gorm:"column:group_id;type:char(128)" json:"groupID"` - RecvMsgOpt int32 `gorm:"column:recv_msg_opt" json:"recvMsgOpt"` - IsPinned bool `gorm:"column:is_pinned" json:"isPinned"` - IsPrivateChat bool `gorm:"column:is_private_chat" json:"isPrivateChat"` - BurnDuration int32 `gorm:"column:burn_duration;default:30" json:"burnDuration"` - GroupAtType int32 `gorm:"column:group_at_type" json:"groupAtType"` - AttachedInfo string `gorm:"column:attached_info;type:varchar(1024)" json:"attachedInfo"` - Ex string `gorm:"column:ex;type:varchar(1024)" json:"ex"` - MaxSeq int64 `gorm:"column:max_seq" json:"maxSeq"` - MinSeq int64 `gorm:"column:min_seq" json:"minSeq"` + OwnerUserID string `gorm:"column:owner_user_id;primary_key;type:char(128)" json:"OwnerUserID"` + ConversationID string `gorm:"column:conversation_id;primary_key;type:char(128)" json:"conversationID"` + ConversationType int32 `gorm:"column:conversation_type" json:"conversationType"` + UserID string `gorm:"column:user_id;type:char(64)" json:"userID"` + GroupID string `gorm:"column:group_id;type:char(128)" json:"groupID"` + RecvMsgOpt int32 `gorm:"column:recv_msg_opt" json:"recvMsgOpt"` + IsPinned bool `gorm:"column:is_pinned" json:"isPinned"` + IsPrivateChat bool `gorm:"column:is_private_chat" json:"isPrivateChat"` + BurnDuration int32 `gorm:"column:burn_duration;default:30" json:"burnDuration"` + GroupAtType int32 `gorm:"column:group_at_type" json:"groupAtType"` + AttachedInfo string `gorm:"column:attached_info;type:varchar(1024)" json:"attachedInfo"` + Ex string `gorm:"column:ex;type:varchar(1024)" json:"ex"` + MaxSeq int64 `gorm:"column:max_seq" json:"maxSeq"` + MinSeq int64 `gorm:"column:min_seq" json:"minSeq"` CreateTime time.Time `gorm:"column:create_time;index:create_time;autoCreateTime"` IsMsgDestruct bool `gorm:"column:is_msg_destruct;default:false"` MsgDestructTime int64 `gorm:"column:msg_destruct_time;default:604800"` diff --git a/pkg/common/db/table/relation/user.go b/pkg/common/db/table/relation/user.go index f44a610ad..10a715bda 100644 --- a/pkg/common/db/table/relation/user.go +++ b/pkg/common/db/table/relation/user.go @@ -29,7 +29,7 @@ type UserModel struct { FaceURL string `gorm:"column:face_url;size:255"` Ex string `gorm:"column:ex;size:1024"` CreateTime time.Time `gorm:"column:create_time;index:create_time;autoCreateTime"` - AppMangerLevel int32 `gorm:"column:app_manger_level;default:18"` + AppMangerLevel int32 `gorm:"column:app_manger_level;default:1"` GlobalRecvMsgOpt int32 `gorm:"column:global_recv_msg_opt"` } @@ -63,7 +63,7 @@ type UserModelInterface interface { Take(ctx context.Context, userID string) (user *UserModel, err error) // 获取用户信息 不存在,不返回错误 Page(ctx context.Context, pageNumber, showNumber int32) (users []*UserModel, count int64, err error) - GetAllUserID(ctx context.Context) (userIDs []string, err error) + GetAllUserID(ctx context.Context, pageNumber, showNumber int32) (userIDs []string, err error) GetUserGlobalRecvMsgOpt(ctx context.Context, userID string) (opt int, err error) // 获取用户总数 CountTotal(ctx context.Context, before *time.Time) (count int64, err error) 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 3a8725f36..30e6670b5 100644 --- a/pkg/common/db/table/unrelation/msg.go +++ b/pkg/common/db/table/unrelation/msg.go @@ -16,13 +16,14 @@ package unrelation import ( "context" - "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/msg" "strconv" "time" + "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 ( @@ -109,7 +110,7 @@ type MsgDocModelInterface interface { GetMsgDocModelByIndex(ctx context.Context, conversationID string, index, sort int64) (*MsgDocModel, error) DeleteMsgsInOneDocByIndex(ctx context.Context, docID string, indexes []int) error MarkSingleChatMsgsAsRead(ctx context.Context, userID string, docID string, indexes []int64) error - SearchMessage(ctx context.Context, req *msg.SearchMessageReq) ([]*MsgInfoModel, error) + SearchMessage(ctx context.Context, req *msg.SearchMessageReq) (int32, []*MsgInfoModel, error) RangeUserSendCount( ctx context.Context, start time.Time, 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 9ce9929c5..44077a838 100644 --- a/pkg/common/db/unrelation/mongo.go +++ b/pkg/common/db/unrelation/mongo.go @@ -17,29 +17,29 @@ 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 ( - maxRetry = 10 //number of retries + maxRetry = 10 // number of retries ) type Mongo struct { db *mongo.Client } -// NewMongo Initialize MongoDB connection +// NewMongo Initialize MongoDB connection. func NewMongo() (*Mongo, error) { specialerror.AddReplace(mongo.ErrNoDocuments, errs.ErrRecordNotFound) uri := "mongodb://sample.host:27017/?maxPoolSize=20&w=majority" @@ -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 5d26d45b2..2f4a166e9 100644 --- a/pkg/common/db/unrelation/msg.go +++ b/pkg/common/db/unrelation/msg.go @@ -19,10 +19,11 @@ import ( "encoding/json" "errors" "fmt" - "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/msg" "time" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/constant" + "github.com/OpenIMSDK/protocol/msg" + + "github.com/OpenIMSDK/tools/constant" "go.mongodb.org/mongo-driver/bson" "go.mongodb.org/mongo-driver/bson/primitive" @@ -31,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") @@ -80,7 +81,7 @@ func (m *MsgMongoDriver) UpdateMsg( return res, nil } -// PushUnique value must slice +// PushUnique value must slice. func (m *MsgMongoDriver) PushUnique( ctx context.Context, docID string, @@ -555,7 +556,7 @@ func (m *MsgMongoDriver) MarkSingleChatMsgsAsRead( // } // } // -// ]) +// ]). func (m *MsgMongoDriver) RangeUserSendCount( ctx context.Context, start time.Time, @@ -1066,36 +1067,36 @@ func (m *MsgMongoDriver) RangeGroupSendCount( return result[0].MsgCount, result[0].UserCount, groups, dateCount, nil } -func (m *MsgMongoDriver) SearchMessage(ctx context.Context, req *msg.SearchMessageReq) ([]*table.MsgInfoModel, error) { - msgs, err := m.searchMessage(ctx, req) +func (m *MsgMongoDriver) SearchMessage(ctx context.Context, req *msg.SearchMessageReq) (int32, []*table.MsgInfoModel, error) { + total, msgs, err := m.searchMessage(ctx, req) if err != nil { - return nil, err + return 0, nil, err } for _, msg1 := range msgs { if msg1.IsRead { msg1.Msg.IsRead = true } } - return msgs, nil + return total, msgs, nil } -func (m *MsgMongoDriver) searchMessage(ctx context.Context, req *msg.SearchMessageReq) ([]*table.MsgInfoModel, error) { +func (m *MsgMongoDriver) searchMessage(ctx context.Context, req *msg.SearchMessageReq) (int32, []*table.MsgInfoModel, error) { var pipe mongo.Pipeline - conditon := bson.A{} + condition := bson.A{} if req.SendTime != "" { - conditon = append(conditon, bson.M{"$eq": bson.A{bson.M{"$dateToString": bson.M{"format": "%Y-%m-%d", "date": bson.M{"$toDate": "$$item.msg.send_time"}}}, req.SendTime}}) + condition = append(condition, bson.M{"$eq": bson.A{bson.M{"$dateToString": bson.M{"format": "%Y-%m-%d", "date": bson.M{"$toDate": "$$item.msg.send_time"}}}, req.SendTime}}) } if req.MsgType != 0 { - conditon = append(conditon, bson.M{"$eq": bson.A{"$$item.msg.content_type", req.MsgType}}) + condition = append(condition, bson.M{"$eq": bson.A{"$$item.msg.content_type", req.MsgType}}) } if req.SessionType != 0 { - conditon = append(conditon, bson.M{"$eq": bson.A{"$$item.msg.session_type", req.SessionType}}) + condition = append(condition, bson.M{"$eq": bson.A{"$$item.msg.session_type", req.SessionType}}) } if req.RecvID != "" { - conditon = append(conditon, bson.M{"$regexFind": bson.M{"input": "$$item.msg.recv_id", "regex": req.RecvID}}) + condition = append(condition, bson.M{"$regexFind": bson.M{"input": "$$item.msg.recv_id", "regex": req.RecvID}}) } if req.SendID != "" { - conditon = append(conditon, bson.M{"$regexFind": bson.M{"input": "$$item.msg.send_id", "regex": req.SendID}}) + condition = append(condition, bson.M{"$regexFind": bson.M{"input": "$$item.msg.send_id", "regex": req.SendID}}) } or := bson.A{ @@ -1131,15 +1132,20 @@ func (m *MsgMongoDriver) searchMessage(ctx context.Context, req *msg.SearchMessa }, { {"$project", bson.D{ - {"msgs", bson.D{ - {"$filter", bson.D{ - {"input", "$msgs"}, - {"as", "item"}, - {"cond", bson.D{ - {"$and", conditon}, + { + "msgs", bson.D{ + { + "$filter", bson.D{ + {"input", "$msgs"}, + {"as", "item"}, + { + "cond", bson.D{ + {"$and", condition}, + }, + }, + }, }, - }}, - }}, + }, }, {"doc_id", 1}, }}, @@ -1147,19 +1153,19 @@ func (m *MsgMongoDriver) searchMessage(ctx context.Context, req *msg.SearchMessa } cursor, err := m.MsgCollection.Aggregate(ctx, pipe) if err != nil { - return nil, err + return 0, nil, err } var msgsDocs []table.MsgDocModel err = cursor.All(ctx, &msgsDocs) if err != nil { - return nil, err + return 0, nil, err } if len(msgsDocs) == 0 { - return nil, errs.Wrap(mongo.ErrNoDocuments) + return 0, nil, errs.Wrap(mongo.ErrNoDocuments) } msgs := make([]*table.MsgInfoModel, 0) - for index, _ := range msgsDocs { + for index := range msgsDocs { for i := range msgsDocs[index].Msg { msg := msgsDocs[index].Msg[i] if msg == nil || msg.Msg == nil { @@ -1181,14 +1187,14 @@ func (m *MsgMongoDriver) searchMessage(ctx context.Context, req *msg.SearchMessa } data, err := json.Marshal(&revokeContent) if err != nil { - return nil, err + return 0, nil, err } elem := sdkws.NotificationElem{ Detail: string(data), } content, err := json.Marshal(&elem) if err != nil { - return nil, err + return 0, nil, err } msg.Msg.ContentType = constant.MsgRevokeNotification msg.Msg.Content = string(content) @@ -1196,5 +1202,12 @@ func (m *MsgMongoDriver) searchMessage(ctx context.Context, req *msg.SearchMessa msgs = append(msgs, msg) } } - return msgs, nil + start := (req.Pagination.PageNumber - 1) * req.Pagination.ShowNumber + n := int32(len(msgs)) + if start+req.Pagination.ShowNumber < n { + msgs = msgs[start : start+req.Pagination.ShowNumber] + } else { + msgs = msgs[start:] + } + return n, msgs, nil } 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 0f801e8b2..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" ) @@ -52,7 +52,6 @@ func NewMConsumerGroup(consumerConfig *MConsumerGroupConfig, topics, addrs []str func (mc *MConsumerGroup) GetContextFromMsg(cMsg *sarama.ConsumerMessage) context.Context { return GetContextWithMQHeader(cMsg.Headers) - } func (mc *MConsumerGroup) RegisterHandleAndConsumer(handler sarama.ConsumerGroupHandler) { diff --git a/pkg/common/kafka/producer.go b/pkg/common/kafka/producer.go index a749c76f8..8eeaa6825 100644 --- a/pkg/common/kafka/producer.go +++ b/pkg/common/kafka/producer.go @@ -17,13 +17,14 @@ package kafka import ( "context" "errors" - "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" "time" + "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" @@ -31,7 +32,7 @@ import ( ) const ( - maxRetry = 10 //number of retries + maxRetry = 10 // number of retries ) var errEmptyMsg = errors.New("binary msg is empty") @@ -43,14 +44,14 @@ type Producer struct { producer sarama.SyncProducer } -// NewKafkaProducer Initialize kafka producer +// NewKafkaProducer Initialize kafka producer. func NewKafkaProducer(addr []string, topic string) *Producer { p := Producer{} - p.config = sarama.NewConfig() //Instantiate a sarama Config - p.config.Producer.Return.Successes = true //Whether to enable the successes channel to be notified after the message is sent successfully + p.config = sarama.NewConfig() // Instantiate a sarama Config + p.config.Producer.Return.Successes = true // Whether to enable the successes channel to be notified after the message is sent successfully p.config.Producer.Return.Errors = true - p.config.Producer.RequiredAcks = sarama.WaitForAll //Set producer Message Reply level 0 1 all - p.config.Producer.Partitioner = sarama.NewHashPartitioner //Set the hash-key automatic hash partition. When sending a message, you must specify the key value of the message. If there is no key, the partition will be selected randomly + p.config.Producer.RequiredAcks = sarama.WaitForAll // Set producer Message Reply level 0 1 all + p.config.Producer.Partitioner = sarama.NewHashPartitioner // Set the hash-key automatic hash partition. When sending a message, you must specify the key value of the message. If there is no key, the partition will be selected randomly if config.Config.Kafka.Username != "" && config.Config.Kafka.Password != "" { p.config.Net.SASL.Enable = true p.config.Net.SASL.User = config.Config.Kafka.Username @@ -61,7 +62,7 @@ func NewKafkaProducer(addr []string, topic string) *Producer { var producer sarama.SyncProducer var err error for i := 0; i <= maxRetry; i++ { - producer, err = sarama.NewSyncProducer(p.addr, p.config) //Initialize the client + producer, err = sarama.NewSyncProducer(p.addr, p.config) // Initialize the client if err == nil { p.producer = producer return &p @@ -92,7 +93,8 @@ func GetMQHeaderWithContext(ctx context.Context) ([]sarama.RecordHeader, error) {Key: []byte(constant.OperationID), Value: []byte(operationID)}, {Key: []byte(constant.OpUserID), Value: []byte(opUserID)}, {Key: []byte(constant.OpUserPlatform), Value: []byte(platform)}, - {Key: []byte(constant.ConnID), Value: []byte(connID)}}, err + {Key: []byte(constant.ConnID), Value: []byte(connID)}, + }, err } func GetContextWithMQHeader(header []*sarama.RecordHeader) context.Context { diff --git a/internal/rpc/msg/lock.go b/pkg/common/locker/message_locker.go similarity index 99% rename from internal/rpc/msg/lock.go rename to pkg/common/locker/message_locker.go index 50224c6a3..2631f19b1 100644 --- a/internal/rpc/msg/lock.go +++ b/pkg/common/locker/message_locker.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package msg +package locker import ( "context" @@ -36,6 +36,7 @@ type LockerMessage struct { func NewLockerMessage(cache cache.MsgModel) *LockerMessage { return &LockerMessage{cache: cache} } + func (l *LockerMessage) LockMessageTypeKey(ctx context.Context, clientMsgID, typeKey string) (err error) { for i := 0; i < 3; i++ { err = l.cache.LockMessageTypeKey(ctx, clientMsgID, typeKey) @@ -47,8 +48,8 @@ func (l *LockerMessage) LockMessageTypeKey(ctx context.Context, clientMsgID, typ } } return err - } + func (l *LockerMessage) LockGlobalMessage(ctx context.Context, clientMsgID string) (err error) { for i := 0; i < 3; i++ { err = l.cache.LockMessageTypeKey(ctx, clientMsgID, GlOBALLOCK) @@ -60,11 +61,12 @@ func (l *LockerMessage) LockGlobalMessage(ctx context.Context, clientMsgID strin } } return err - } + func (l *LockerMessage) UnLockMessageTypeKey(ctx context.Context, clientMsgID string, typeKey string) error { return l.cache.UnLockMessageTypeKey(ctx, clientMsgID, typeKey) } + func (l *LockerMessage) UnLockGlobalMessage(ctx context.Context, clientMsgID string) error { return l.cache.UnLockMessageTypeKey(ctx, clientMsgID, GlOBALLOCK) } 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 9cf3fe144..000000000 --- a/pkg/common/log/zap.go +++ /dev/null @@ -1,303 +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 a544c2a25..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/gather.go b/pkg/common/prome/gather.go index 910df71d9..eb4bc6c3b 100644 --- a/pkg/common/prome/gather.go +++ b/pkg/common/prome/gather.go @@ -20,17 +20,17 @@ import ( ) var ( - //auth rpc + // auth rpc. UserLoginCounter prometheus.Counter UserRegisterCounter prometheus.Counter - //seg + // seg. SeqGetSuccessCounter prometheus.Counter SeqGetFailedCounter prometheus.Counter SeqSetSuccessCounter prometheus.Counter SeqSetFailedCounter prometheus.Counter - //msg-db + // msg-db. MsgInsertRedisSuccessCounter prometheus.Counter MsgInsertRedisFailedCounter prometheus.Counter MsgInsertMongoSuccessCounter prometheus.Counter @@ -40,7 +40,7 @@ var ( MsgPullFromMongoSuccessCounter prometheus.Counter MsgPullFromMongoFailedCounter prometheus.Counter - //msg-ws + // msg-ws. MsgRecvTotalCounter prometheus.Counter GetNewestSeqTotalCounter prometheus.Counter PullMsgBySeqListTotalCounter prometheus.Counter @@ -50,7 +50,7 @@ var ( WorkSuperGroupChatMsgRecvSuccessCounter prometheus.Counter OnlineUserGauge prometheus.Gauge - //msg-msg + // msg-msg. SingleChatMsgProcessSuccessCounter prometheus.Counter SingleChatMsgProcessFailedCounter prometheus.Counter GroupChatMsgProcessSuccessCounter prometheus.Counter @@ -58,23 +58,23 @@ var ( WorkSuperGroupChatMsgProcessSuccessCounter prometheus.Counter WorkSuperGroupChatMsgProcessFailedCounter prometheus.Counter - //msg-push + // msg-push. MsgOnlinePushSuccessCounter prometheus.Counter MsgOfflinePushSuccessCounter prometheus.Counter MsgOfflinePushFailedCounter prometheus.Counter - // api + // api. ApiRequestCounter prometheus.Counter ApiRequestSuccessCounter prometheus.Counter ApiRequestFailedCounter prometheus.Counter - // grpc + // grpc. GrpcRequestCounter prometheus.Counter GrpcRequestSuccessCounter prometheus.Counter GrpcRequestFailedCounter prometheus.Counter SendMsgCounter prometheus.Counter - // conversation + // conversation. ConversationCreateSuccessCounter prometheus.Counter ConversationCreateFailedCounter prometheus.Counter ) @@ -88,6 +88,7 @@ func NewUserLoginCounter() { Help: "The number of user login", }) } + func NewUserRegisterCounter() { if UserRegisterCounter != nil { return @@ -107,6 +108,7 @@ func NewSeqGetSuccessCounter() { Help: "The number of successful get seq", }) } + func NewSeqGetFailedCounter() { if SeqGetFailedCounter != nil { return @@ -126,6 +128,7 @@ func NewSeqSetSuccessCounter() { Help: "The number of successful set seq", }) } + func NewSeqSetFailedCounter() { if SeqSetFailedCounter != nil { return @@ -305,6 +308,7 @@ func NewGetNewestSeqTotalCounter() { Help: "the number of get newest seq", }) } + func NewPullMsgBySeqListTotalCounter() { if PullMsgBySeqListTotalCounter != nil { return @@ -404,6 +408,7 @@ func NewWorkSuperGroupChatMsgProcessSuccessCounter() { Help: "The number of work/super group chat msg successful processed", }) } + func NewWorkSuperGroupChatMsgProcessFailedCounter() { if WorkSuperGroupChatMsgProcessFailedCounter != nil { return @@ -433,6 +438,7 @@ func NewMsgOfflinePushSuccessCounter() { Help: "The number of msg successful offline pushed", }) } + func NewMsgOfflinePushFailedCounter() { if MsgOfflinePushFailedCounter != nil { return 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 68fee2602..000000000 --- a/pkg/common/tokenverify/jwt_token.go +++ /dev/null @@ -1,119 +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 089d34afe..000000000 --- a/pkg/discoveryregistry/zookeeper/discover.go +++ /dev/null @@ -1,125 +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/OpenIMSDK/Open-IM-Server/pkg/common/log" - "github.com/OpenIMSDK/Open-IM-Server/pkg/errs" - "github.com/pkg/errors" - - "github.com/go-zookeeper/zk" - "google.golang.org/grpc" - "google.golang.org/grpc/resolver" -) - -var ErrConnIsNil = errors.New("conn is nil") -var 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: - 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) - opts = append(s.options, opts...) - 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 fec72538d..000000000 --- a/pkg/discoveryregistry/zookeeper/register.go +++ /dev/null @@ -1,66 +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) 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.conn.CreateProtectedEphemeralSequential( - s.getPath(rpcRegisterName)+"/"+addr+"_", - []byte(addr), - zk.WorldACL(zk.PermAll), - ) - if err != nil { - return err - } - s.node = node - 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.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 e395a8f34..000000000 --- a/pkg/discoveryregistry/zookeeper/resolver.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 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) - // log.ZDebug(context.Background(), "build resolver start", "target", target, "cc", cc.UpdateState) - r := &Resolver{} - r.target = target - r.cc = cc - r.getConnsRemote = s.GetConnsRemote - r.ResolveNowZK(resolver.ResolveNowOptions{}) - s.lock.Lock() - defer s.lock.Unlock() - serviceName := strings.TrimLeft(target.URL.Path, "/") - s.resolvers[serviceName] = r - s.logger.Printf("build resolver finished: %+v, cc: %+v, key: %s", target, cc.UpdateState, serviceName) - // log.ZDebug(context.Background(), "build resolver finished", "target", target, "cc", cc.UpdateState, - // "serviceName", 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 a3b02b12e..000000000 --- a/pkg/discoveryregistry/zookeeper/zk.go +++ /dev/null @@ -1,222 +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 - - 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() - 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 4b7193824..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 45e935558..000000000 --- a/pkg/proto/auth/auth.go +++ /dev/null @@ -1,44 +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/errs" - -func (x *UserTokenReq) Check() error { - if x.UserID == "" { - return errs.ErrArgs.Wrap("userID is empty") - } - if x.PlatformID > 9 || x.PlatformID < 1 { - 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 > 9 || x.PlatformID < 1 { - 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 f2ad6a7a4..000000000 --- a/pkg/proto/friend/friend.go +++ /dev/null @@ -1,179 +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") - } - if x.Remark == "" { - return errs.ErrArgs.Wrap("remark 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 5b387cb3a..000000000 --- a/pkg/proto/group/group.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 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.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 *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 62b776856..000000000 --- a/pkg/proto/msg/msg.go +++ /dev/null @@ -1,207 +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") - } - 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") - } - 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 019d10ef8..000000000 --- a/pkg/proto/msg/msg.pb.go +++ /dev/null @@ -1,4679 +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 -} - -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, 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, 51) -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 - nil, // 48: OpenIMServer.msg.GetConversationsHasReadAndMaxSeqResp.SeqsEntry - nil, // 49: OpenIMServer.msg.GetActiveUserResp.DateCountEntry - nil, // 50: OpenIMServer.msg.GetActiveGroupResp.DateCountEntry - (*sdkws.MsgData)(nil), // 51: OpenIMServer.sdkws.MsgData - (*sdkws.RequestPagination)(nil), // 52: OpenIMServer.sdkws.RequestPagination - (*sdkws.UserInfo)(nil), // 53: OpenIMServer.sdkws.UserInfo - (*sdkws.GroupInfo)(nil), // 54: OpenIMServer.sdkws.GroupInfo - (*sdkws.GetMaxSeqReq)(nil), // 55: OpenIMServer.sdkws.GetMaxSeqReq - (*sdkws.PullMessageBySeqsReq)(nil), // 56: OpenIMServer.sdkws.PullMessageBySeqsReq - (*sdkws.GetMaxSeqResp)(nil), // 57: OpenIMServer.sdkws.GetMaxSeqResp - (*sdkws.PullMessageBySeqsResp)(nil), // 58: OpenIMServer.sdkws.PullMessageBySeqsResp -} -var file_msg_msg_proto_depIdxs = []int32{ - 51, // 0: OpenIMServer.msg.MsgDataToMQ.msgData:type_name -> OpenIMServer.sdkws.MsgData - 51, // 1: OpenIMServer.msg.MsgDataToDB.msgData:type_name -> OpenIMServer.sdkws.MsgData - 51, // 2: OpenIMServer.msg.PushMsgDataToMQ.msgData:type_name -> OpenIMServer.sdkws.MsgData - 51, // 3: OpenIMServer.msg.MsgDataToMongoByMQ.msgData:type_name -> OpenIMServer.sdkws.MsgData - 51, // 4: OpenIMServer.msg.SendMsgReq.msgData:type_name -> OpenIMServer.sdkws.MsgData - 51, // 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 - 48, // 9: OpenIMServer.msg.GetConversationsHasReadAndMaxSeqResp.seqs:type_name -> OpenIMServer.msg.GetConversationsHasReadAndMaxSeqResp.SeqsEntry - 52, // 10: OpenIMServer.msg.GetActiveUserReq.pagination:type_name -> OpenIMServer.sdkws.RequestPagination - 53, // 11: OpenIMServer.msg.ActiveUser.user:type_name -> OpenIMServer.sdkws.UserInfo - 49, // 12: OpenIMServer.msg.GetActiveUserResp.dateCount:type_name -> OpenIMServer.msg.GetActiveUserResp.DateCountEntry - 40, // 13: OpenIMServer.msg.GetActiveUserResp.users:type_name -> OpenIMServer.msg.ActiveUser - 52, // 14: OpenIMServer.msg.GetActiveGroupReq.pagination:type_name -> OpenIMServer.sdkws.RequestPagination - 54, // 15: OpenIMServer.msg.ActiveGroup.group:type_name -> OpenIMServer.sdkws.GroupInfo - 50, // 16: OpenIMServer.msg.GetActiveGroupResp.dateCount:type_name -> OpenIMServer.msg.GetActiveGroupResp.DateCountEntry - 43, // 17: OpenIMServer.msg.GetActiveGroupResp.groups:type_name -> OpenIMServer.msg.ActiveGroup - 52, // 18: OpenIMServer.msg.SearchMessageReq.pagination:type_name -> OpenIMServer.sdkws.RequestPagination - 47, // 19: OpenIMServer.msg.SearchMessageResp.chatLogs:type_name -> OpenIMServer.msg.ChatLog - 37, // 20: OpenIMServer.msg.GetConversationsHasReadAndMaxSeqResp.SeqsEntry.value:type_name -> OpenIMServer.msg.Seqs - 55, // 21: OpenIMServer.msg.msg.GetMaxSeq:input_type -> OpenIMServer.sdkws.GetMaxSeqReq - 34, // 22: OpenIMServer.msg.msg.GetConversationMaxSeq:input_type -> OpenIMServer.msg.GetConversationMaxSeqReq - 56, // 23: OpenIMServer.msg.msg.PullMessageBySeqs:input_type -> OpenIMServer.sdkws.PullMessageBySeqsReq - 45, // 24: OpenIMServer.msg.msg.SearchMessage:input_type -> OpenIMServer.msg.SearchMessageReq - 6, // 25: OpenIMServer.msg.msg.SendMsg:input_type -> OpenIMServer.msg.SendMsgReq - 24, // 26: OpenIMServer.msg.msg.ClearConversationsMsg:input_type -> OpenIMServer.msg.ClearConversationsMsgReq - 26, // 27: OpenIMServer.msg.msg.UserClearAllMsg:input_type -> OpenIMServer.msg.UserClearAllMsgReq - 28, // 28: OpenIMServer.msg.msg.DeleteMsgs:input_type -> OpenIMServer.msg.DeleteMsgsReq - 32, // 29: OpenIMServer.msg.msg.DeleteMsgPhysicalBySeq:input_type -> OpenIMServer.msg.DeleteMsgPhysicalBySeqReq - 30, // 30: OpenIMServer.msg.msg.DeleteMsgPhysical:input_type -> OpenIMServer.msg.DeleteMsgPhysicalReq - 8, // 31: OpenIMServer.msg.msg.SetSendMsgStatus:input_type -> OpenIMServer.msg.SetSendMsgStatusReq - 10, // 32: OpenIMServer.msg.msg.GetSendMsgStatus:input_type -> OpenIMServer.msg.GetSendMsgStatusReq - 15, // 33: OpenIMServer.msg.msg.RevokeMsg:input_type -> OpenIMServer.msg.RevokeMsgReq - 17, // 34: OpenIMServer.msg.msg.MarkMsgsAsRead:input_type -> OpenIMServer.msg.MarkMsgsAsReadReq - 19, // 35: OpenIMServer.msg.msg.MarkConversationAsRead:input_type -> OpenIMServer.msg.MarkConversationAsReadReq - 21, // 36: OpenIMServer.msg.msg.SetConversationHasReadSeq:input_type -> OpenIMServer.msg.SetConversationHasReadSeqReq - 36, // 37: OpenIMServer.msg.msg.GetConversationsHasReadAndMaxSeq:input_type -> OpenIMServer.msg.GetConversationsHasReadAndMaxSeqReq - 39, // 38: OpenIMServer.msg.msg.GetActiveUser:input_type -> OpenIMServer.msg.GetActiveUserReq - 42, // 39: OpenIMServer.msg.msg.GetActiveGroup:input_type -> OpenIMServer.msg.GetActiveGroupReq - 57, // 40: OpenIMServer.msg.msg.GetMaxSeq:output_type -> OpenIMServer.sdkws.GetMaxSeqResp - 35, // 41: OpenIMServer.msg.msg.GetConversationMaxSeq:output_type -> OpenIMServer.msg.GetConversationMaxSeqResp - 58, // 42: OpenIMServer.msg.msg.PullMessageBySeqs:output_type -> OpenIMServer.sdkws.PullMessageBySeqsResp - 46, // 43: OpenIMServer.msg.msg.SearchMessage:output_type -> OpenIMServer.msg.SearchMessageResp - 7, // 44: OpenIMServer.msg.msg.SendMsg:output_type -> OpenIMServer.msg.SendMsgResp - 25, // 45: OpenIMServer.msg.msg.ClearConversationsMsg:output_type -> OpenIMServer.msg.ClearConversationsMsgResp - 27, // 46: OpenIMServer.msg.msg.UserClearAllMsg:output_type -> OpenIMServer.msg.UserClearAllMsgResp - 29, // 47: OpenIMServer.msg.msg.DeleteMsgs:output_type -> OpenIMServer.msg.DeleteMsgsResp - 33, // 48: OpenIMServer.msg.msg.DeleteMsgPhysicalBySeq:output_type -> OpenIMServer.msg.DeleteMsgPhysicalBySeqResp - 31, // 49: OpenIMServer.msg.msg.DeleteMsgPhysical:output_type -> OpenIMServer.msg.DeleteMsgPhysicalResp - 9, // 50: OpenIMServer.msg.msg.SetSendMsgStatus:output_type -> OpenIMServer.msg.SetSendMsgStatusResp - 11, // 51: OpenIMServer.msg.msg.GetSendMsgStatus:output_type -> OpenIMServer.msg.GetSendMsgStatusResp - 16, // 52: OpenIMServer.msg.msg.RevokeMsg:output_type -> OpenIMServer.msg.RevokeMsgResp - 18, // 53: OpenIMServer.msg.msg.MarkMsgsAsRead:output_type -> OpenIMServer.msg.MarkMsgsAsReadResp - 20, // 54: OpenIMServer.msg.msg.MarkConversationAsRead:output_type -> OpenIMServer.msg.MarkConversationAsReadResp - 22, // 55: OpenIMServer.msg.msg.SetConversationHasReadSeq:output_type -> OpenIMServer.msg.SetConversationHasReadSeqResp - 38, // 56: OpenIMServer.msg.msg.GetConversationsHasReadAndMaxSeq:output_type -> OpenIMServer.msg.GetConversationsHasReadAndMaxSeqResp - 41, // 57: OpenIMServer.msg.msg.GetActiveUser:output_type -> OpenIMServer.msg.GetActiveUserResp - 44, // 58: OpenIMServer.msg.msg.GetActiveGroup:output_type -> OpenIMServer.msg.GetActiveGroupResp - 40, // [40:59] is the sub-list for method output_type - 21, // [21:40] is the sub-list for method input_type - 21, // [21:21] is the sub-list for extension type_name - 21, // [21:21] is the sub-list for extension extendee - 0, // [0:21] 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 - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_msg_msg_proto_rawDesc, - NumEnums: 0, - NumMessages: 51, - 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 33e29e1f2..000000000 --- a/pkg/proto/msg/msg.proto +++ /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. - -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; -} - - -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 09ae39c7e..000000000 --- a/pkg/proto/user/user.go +++ /dev/null @@ -1,164 +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.Secret == "" { - return errs.ErrArgs.Wrap("Secret is empty") - } - 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 7579c64f0..000000000 --- a/pkg/proto/wrapperspb/wrapperspb.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 wrapperspb - -import ( - "encoding/base64" - "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 { - 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 -} - -func (m *StringValue) MarshalJSON() ([]byte, error) { - return []byte(`"` + m.Value + `"`), nil -} - -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 c3648a050..d4116e9f9 100644 --- a/pkg/rpcclient/conversation.go +++ b/pkg/rpcclient/conversation.go @@ -18,11 +18,12 @@ import ( "context" "fmt" - "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" "google.golang.org/grpc" + + pbConversation "github.com/OpenIMSDK/protocol/conversation" + "github.com/OpenIMSDK/tools/config" + "github.com/OpenIMSDK/tools/discoveryregistry" + "github.com/OpenIMSDK/tools/errs" ) type Conversation struct { @@ -71,6 +72,7 @@ func (c *ConversationRpcClient) SetConversationMaxSeq(ctx context.Context, owner _, err := c.Client.SetConversationMaxSeq(ctx, &pbConversation.SetConversationMaxSeqReq{OwnerUserID: ownerUserIDs, ConversationID: conversationID, MaxSeq: maxSeq}) return err } + func (c *ConversationRpcClient) SetConversations(ctx context.Context, userIDs []string, conversation *pbConversation.ConversationReq) error { _, err := c.Client.SetConversations(ctx, &pbConversation.SetConversationsReq{UserIDs: userIDs, Conversation: conversation}) return err diff --git a/pkg/rpcclient/friend.go b/pkg/rpcclient/friend.go index 51b63700c..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 { @@ -61,14 +61,13 @@ func (f *FriendRpcClient) GetFriendsInfo( return } -// possibleFriendUserID是否在userID的好友中 +// possibleFriendUserID是否在userID的好友中. func (f *FriendRpcClient) IsFriend(ctx context.Context, possibleFriendUserID, userID string) (bool, error) { resp, err := f.Client.IsFriend(ctx, &friend.IsFriendReq{UserID1: userID, UserID2: possibleFriendUserID}) if err != nil { return false, err } return resp.InUser1Friends, nil - } func (f *FriendRpcClient) GetFriendIDs(ctx context.Context, ownerUserID string) (friendIDs []string, err error) { 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 09e44884f..bfc7bf73f 100644 --- a/pkg/rpcclient/msg.go +++ b/pkg/rpcclient/msg.go @@ -18,16 +18,17 @@ import ( "context" "encoding/json" - "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" "google.golang.org/grpc" "google.golang.org/protobuf/proto" - // "google.golang.org/protobuf/proto" + + "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". ) func newContentTypeConf() map[int32]config.NotificationConf { @@ -70,8 +71,9 @@ func newContentTypeConf() map[int32]config.NotificationConf { constant.ConversationUnreadNotification: config.Config.Notification.ConversationChanged, constant.ConversationPrivateChatNotification: config.Config.Notification.ConversationSetPrivate, // msg - constant.MsgRevokeNotification: {IsSendMsg: false, ReliabilityLevel: constant.ReliableNotificationNoMsg}, - constant.HasReadReceipt: {IsSendMsg: false, ReliabilityLevel: constant.ReliableNotificationNoMsg}, + constant.MsgRevokeNotification: {IsSendMsg: false, ReliabilityLevel: constant.ReliableNotificationNoMsg}, + constant.HasReadReceipt: {IsSendMsg: false, ReliabilityLevel: constant.ReliableNotificationNoMsg}, + constant.DeleteMsgsNotification: {IsSendMsg: false, ReliabilityLevel: constant.ReliableNotificationNoMsg}, } } @@ -115,7 +117,7 @@ func newSessionTypeConf() map[int32]int32 { constant.ConversationUnreadNotification: constant.SingleChatType, constant.ConversationPrivateChatNotification: constant.SingleChatType, // delete - constant.MsgDeleteNotification: constant.SingleChatType, + constant.DeleteMsgsNotification: constant.SingleChatType, } } diff --git a/pkg/rpcclient/notification/conevrsation.go b/pkg/rpcclient/notification/conevrsation.go index 12e851375..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 { @@ -30,7 +30,7 @@ func NewConversationNotificationSender(msgRpcClient *rpcclient.MessageRpcClient) return &ConversationNotificationSender{rpcclient.NewNotificationSender(rpcclient.WithRpcClient(msgRpcClient))} } -// SetPrivate调用 +// SetPrivate调用. func (c *ConversationNotificationSender) ConversationSetPrivateNotification( ctx context.Context, sendID, recvID string, @@ -44,7 +44,7 @@ func (c *ConversationNotificationSender) ConversationSetPrivateNotification( return c.Notification(ctx, sendID, recvID, constant.ConversationPrivateChatNotification, tips) } -// 会话改变 +// 会话改变. func (c *ConversationNotificationSender) ConversationChangeNotification(ctx context.Context, userID string) error { tips := &sdkws.ConversationUpdateTips{ UserID: userID, @@ -52,7 +52,7 @@ func (c *ConversationNotificationSender) ConversationChangeNotification(ctx cont return c.Notification(ctx, userID, userID, constant.ConversationChangeNotification, tips) } -// 会话未读数同步 +// 会话未读数同步. func (c *ConversationNotificationSender) ConversationUnreadChangeNotification( ctx context.Context, userID, conversationID string, 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 3f312c241..e70bf38e1 100644 --- a/pkg/rpcclient/notification/group.go +++ b/pkg/rpcclient/notification/group.go @@ -18,19 +18,24 @@ 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(db controller.GroupDatabase, msgRpcClient *rpcclient.MessageRpcClient, userRpcClient *rpcclient.UserRpcClient, fn func(ctx context.Context, userIDs []string) ([]CommonUser, error)) *GroupNotificationSender { +func NewGroupNotificationSender( + db controller.GroupDatabase, + msgRpcClient *rpcclient.MessageRpcClient, + userRpcClient *rpcclient.UserRpcClient, + fn func(ctx context.Context, userIDs []string) ([]CommonUser, error), +) *GroupNotificationSender { return &GroupNotificationSender{ NotificationSender: rpcclient.NewNotificationSender(rpcclient.WithRpcClient(msgRpcClient), rpcclient.WithUserRpcClient(userRpcClient)), getUsersInfo: fn, @@ -442,8 +447,10 @@ func (g *GroupNotificationSender) GroupMemberMutedNotification(ctx context.Conte if err != nil { return err } - tips := &sdkws.GroupMemberMutedTips{Group: group, MutedSeconds: mutedSeconds, - OpUser: user[mcontext.GetOpUserID(ctx)], MutedUser: user[groupMemberUserID]} + tips := &sdkws.GroupMemberMutedTips{ + Group: group, MutedSeconds: mutedSeconds, + OpUser: user[mcontext.GetOpUserID(ctx)], MutedUser: user[groupMemberUserID], + } if err := g.fillOpUser(ctx, &tips.OpUser, tips.Group.GroupID); err != nil { return err } diff --git a/pkg/rpcclient/notification/msg.go b/pkg/rpcclient/notification/msg.go index c475291d2..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 { @@ -36,7 +36,7 @@ func (m *MsgNotificationSender) UserDeleteMsgsNotification(ctx context.Context, ConversationID: conversationID, Seqs: seqs, } - return m.Notification(ctx, userID, userID, constant.MsgDeleteNotification, &tips) + return m.Notification(ctx, userID, userID, constant.DeleteMsgsNotification, &tips) } func (m *MsgNotificationSender) MarkAsReadNotification(ctx context.Context, conversationID string, sesstionType int32, sendID, recvID string, seqs []int64, hasReadSeq int64) error { 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 578586ca3..9822f48fa 100644 --- a/pkg/rpcclient/third.go +++ b/pkg/rpcclient/third.go @@ -16,15 +16,16 @@ package rpcclient import ( "context" + "net/url" + "github.com/minio/minio-go/v7" "github.com/minio/minio-go/v7/pkg/credentials" - "net/url" "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 { @@ -54,7 +55,7 @@ func minioInit() (*minio.Client, error) { } opts := &minio.Options{ Creds: credentials.NewStaticV4(config.Config.Object.Minio.AccessKeyID, config.Config.Object.Minio.SecretAccessKey, ""), - //Region: config.Config.Credential.Minio.Location, + // Region: config.Config.Credential.Minio.Location, } if minioUrl.Scheme == "http" { opts.Secure = false diff --git a/pkg/rpcclient/user.go b/pkg/rpcclient/user.go index a88c061e2..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 { @@ -46,6 +46,11 @@ func NewUser(discov discoveryregistry.SvcDiscoveryRegistry) *User { type UserRpcClient User +func NewUserRpcClientByUser(user *User) *UserRpcClient { + rpc := UserRpcClient(*user) + return &rpc +} + func NewUserRpcClient(client discoveryregistry.SvcDiscoveryRegistry) UserRpcClient { return UserRpcClient(*NewUser(client)) } @@ -141,3 +146,11 @@ func (u *UserRpcClient) Access(ctx context.Context, ownerUserID string) error { } return tokenverify.CheckAccessV3(ctx, ownerUserID) } + +func (u *UserRpcClient) GetAllUserIDs(ctx context.Context, pageNumber, showNumber int32) ([]string, error) { + resp, err := u.Client.GetAllUserID(ctx, &user.GetAllUserIDReq{Pagination: &sdkws.RequestPagination{PageNumber: pageNumber, ShowNumber: showNumber}}) + if err != nil { + return nil, err + } + return resp.UserIDs, nil +} 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 418e65d34..000000000 --- a/pkg/utils/utils.go +++ /dev/null @@ -1,389 +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 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) - -} diff --git a/scripts/batch_build_all_service.sh b/scripts/batch_build_all_service.sh deleted file mode 100755 index f3bd791cf..000000000 --- a/scripts/batch_build_all_service.sh +++ /dev/null @@ -1,80 +0,0 @@ -#!/usr/bin/env 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. - -#Include shell font styles and some basic information -OPENIM_ROOT=$(dirname "${BASH_SOURCE[0]}")/.. - -# Include necessary files -source "$(dirname "${BASH_SOURCE[0]}")/../scripts.sh" - -# Include specific functions and variables -source "$(dirname "${BASH_SOURCE[0]}")/../scripts/style_info.sh" \ - "$OPENIM_ROOT/scripts/path_info.sh" - -bin_dir="$BIN_DIR" -logs_dir="$OPENIM_ROOT/logs" -sdk_db_dir="$OPENIM_ROOT/sdk/db/" - -#Automatically created when there is no bin, logs folder -if [ ! -d $bin_dir ]; then - mkdir -p $bin_dir -fi -if [ ! -d $logs_dir ]; then - mkdir -p $logs_dir -fi -if [ ! -d $sdk_db_dir ]; then - mkdir -p $sdk_db_dir -fi - -#begin path -begin_path=$PWD - - -build_pid_array=() - -for ((i = 0; i < ${#service_source_root[*]}; i++)); do - cd $begin_path - service_path=${service_source_root[$i]} - cd $service_path - make install > /dev/null & - build_pid=$! - build_pid_array[i]=$build_pid -done - - -echo "wait all build finish....." - -success_num=0 -for ((i = 0; i < ${#service_source_root[*]}; i++)); do - echo "wait pid: " ${build_pid_array[i]} ${service_names[$i]} - wait ${build_pid_array[i]} - stat=$? - echo ${service_names[$i]} "pid: " ${build_pid_array[i]} "stat: " $stat - if [ $stat == 0 ] - then - echo -e "${GREEN_PREFIX}${service_names[$i]} successfully be built ${COLOR_SUFFIX}\n" - let success_num=$success_num+1 - - else - echo -e "${RED_PREFIX}${service_names[$i]} build failed ${COLOR_SUFFIX}\n" - exit -1 - fi -done - -echo "success_num" $success_num "service num:" ${#service_source_root[*]} -if [ $success_num == ${#service_source_root[*]} ] -then - echo -e ${BACKGROUND_GREEN}"all services build success"${COLOR_SUFFIX} -fi diff --git a/scripts/build.cmd b/scripts/build.cmd new file mode 100644 index 000000000..f3c086a32 --- /dev/null +++ b/scripts/build.cmd @@ -0,0 +1,12 @@ +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/docker_check_service.sh b/scripts/docker_check_service.sh index 4acbde407..14ec81974 100755 --- a/scripts/docker_check_service.sh +++ b/scripts/docker_check_service.sh @@ -13,21 +13,96 @@ # See the License for the specific language governing permissions and # limitations under the License. -echo "docker-compose ps..........................." -cd .. +# Include shell font styles and some basic information +SCRIPTS_ROOT=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) +OPENIM_ROOT=$(dirname "${BASH_SOURCE[0]}")/.. -if command -v docker-compose &> /dev/null -then +source "$SCRIPTS_ROOT/style_info.sh" + +echo -e "${GREEN_PREFIX}=========> Check docker-compose status ${COLOR_SUFFIX} \n" + +trap 'onCtrlC' INT + +function onCtrlC() { + kill -9 "${do_sth_pid}" "${progress_pid}" "${countdown_pid}" + echo + echo 'Ctrl+C is captured' + exit 1 +} + +cd "$OPENIM_ROOT" + +if command -v docker-compose &> /dev/null; then docker-compose ps else docker compose ps fi +progress() { + local _main_pid="$1" + local _length=20 + local _ratio=1 + local _colors=("31" "32" "33" "34" "35" "36" "37") + local _wave=("▁" "▂" "▃" "▄" "▅" "▆" "▇" "█" "▇" "▆" "▅" "▄" "▃" "▂") + + while pgrep -P "$_main_pid" &> /dev/null; do + local _mark='>' + local _progress_bar= + for ((i = 1; i <= _length; i++)); do + if ((i > _ratio)); then + _mark='-' + fi + _progress_bar="${_progress_bar}${_mark}" + done + + local _color_idx=$((_ratio % ${#_colors[@]})) + local _color_prefix="\033[${_colors[_color_idx]}m" + local _reset_suffix="\033[0m" + + local _wave_idx=$((_ratio % ${#_wave[@]})) + local _wave_progress=${_wave[_wave_idx]} + + printf "Progress: ${_color_prefix}${_progress_bar}${_reset_suffix} ${_wave_progress} Countdown: %2ds \r" "$_countdown" + ((_ratio++)) + ((_ratio > _length)) && _ratio=1 + sleep 0.1 + done +} + +countdown() { + local _duration="$1" + + for ((i = _duration; i >= 1; i--)); do + printf "\rCountdown: %2ds \r" "$i" + sleep 1 + done + printf "\rCountdown: %2ds \r" "$_duration" +} + +do_sth() { + echo "++++++++++++++++++++++++" + progress $$ & + local _progress_pid=$! + local _countdown=30 + + countdown "$_countdown" & + local _countdown_pid=$! + + sleep 30 + + kill "$_progress_pid" "$_countdown_pid" + + "${SCRIPTS_ROOT}/check_all.sh" + echo -e "${PURPLE_PREFIX}=========> Check docker-compose status ${COLOR_SUFFIX} \n" +} +set -e -cd scripts -echo "check OpenIM................................" +do_sth & +do_sth_pid=$(jobs -p | tail -1) -sleep 30 -./check_all.sh +progress "${do_sth_pid}" & +progress_pid=$(jobs -p | tail -1) +wait "${do_sth_pid}" +printf "Progress: done \n" diff --git a/scripts/env_check.sh b/scripts/env_check.sh index 8c84567b7..35f918d80 100755 --- a/scripts/env_check.sh +++ b/scripts/env_check.sh @@ -13,7 +13,16 @@ # See the License for the specific language governing permissions and # limitations under the License. -source ./style_info.sh +#Include shell font styles and some basic information +SCRIPTS_ROOT=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) +OPENIM_ROOT=$(dirname "${SCRIPTS_ROOT}")/.. + +#Include shell font styles and some basic information +source $SCRIPTS_ROOT/style_info.sh +source $SCRIPTS_ROOT/path_info.sh +source $SCRIPTS_ROOT/function.sh + +cd $SCRIPTS_ROOT echo -e "check time synchronize.................................." t=`curl http://time.akamai.com/?iso -s` @@ -27,7 +36,6 @@ else fi - echo -e "check login user........................................" user=`whoami` if [ $user == "root" ] ; then @@ -36,8 +44,6 @@ else echo -e ${RED_PREFIX}"Warning: The current user is not root "${COLOR_SUFFIX} fi - - echo -e "check docker............................................" docker_running=`systemctl status docker | grep running | grep active | wc -l` 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/init_pwd.sh b/scripts/init_pwd.sh index a3ce6048a..f33c9b3dc 100755 --- a/scripts/init_pwd.sh +++ b/scripts/init_pwd.sh @@ -14,7 +14,18 @@ # See the License for the specific language governing permissions and # limitations under the License. -source ../.env +#Include shell font styles and some basic information +SCRIPTS_ROOT=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) +OPENIM_ROOT=$(dirname "${SCRIPTS_ROOT}")/.. + +#Include shell font styles and some basic information +source $SCRIPTS_ROOT/style_info.sh +source $SCRIPTS_ROOT/path_info.sh +source $SCRIPTS_ROOT/function.sh + +cd $SCRIPTS_ROOT + +source $OPENIM_ROOT/.env # Check if PASSWORD only contains letters and numbers if [[ "$PASSWORD" =~ ^[a-zA-Z0-9]+$ ]] @@ -25,16 +36,18 @@ else exit fi -echo "your user is:$USER" -echo "your password is:$PASSWORD" -echo "your minio endPoint is:$MINIO_ENDPOINT" -echo "your data dir is $DATA_DIR" +echo "" +echo -e "===> ${PURPLE_PREFIX} you user is:$USER ${COLOR_SUFFIX}" +echo -e "===> ${PURPLE_PREFIX} you password is:$PASSWORD ${COLOR_SUFFIX}" +echo -e "===> ${PURPLE_PREFIX} you minio endpoint is:$MINIO_ENDPOINT ${COLOR_SUFFIX}" +echo -e "===> ${PURPLE_PREFIX} you api url is:$API_URL ${COLOR_SUFFIX}" +echo "" # Specify the config file -config_file='../config/config.yaml' +config_file=${OPENIM_ROOT}/config/config.yaml # Load variables from .env file -source ../.env +source ${OPENIM_ROOT}/.env # Replace the password and username field for mysql sed -i "/mysql:/,/database:/ s/password:.*/password: $PASSWORD/" $config_file diff --git a/scripts/install_im_compose.sh b/scripts/install_im_compose.sh new file mode 100755 index 000000000..00191334a --- /dev/null +++ b/scripts/install_im_compose.sh @@ -0,0 +1,122 @@ +# 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. + + +#Include shell font styles and some basic information +SCRIPTS_ROOT=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) +OPENIM_ROOT=$(dirname "${BASH_SOURCE[0]}")/.. + +# docker-compose.yaml file name +docker_compose_file_name="docker-compose.yaml" + +trap 'onCtrlC' INT +function onCtrlC () { + #Capture CTRL+C, terminate the background process of the program when the script is terminated in the form of ctrl+c + kill -9 ${do_sth_pid} ${progress_pid} + echo + echo 'Ctrl+C is captured' + exit 1 +} + +do_sth() { + #Main program to run + echo "++++++++++++++++++++++++" + sleep 5 + echo "++++++++++++++++++++++++" + + sleep 10 +} + +#Import environment variables +source .env + +#Get the public IP address of the local machine +internet_ip=$(curl ifconfig.me -s) +echo -e "\033[1;34mCurrent public IP address: ${internet_ip}\033[0m\n" + +#If MINIO_ENDPOINT is "http://127.0.0.1:10005", replace it with the current public IP address +if [[ $MINIO_ENDPOINT == "http://127.0.0.1:10005" ]]; then + sed -i "s/127.0.0.1/${internet_ip}/" .env +fi + +do_progress_bar() { + local duration=${1} + local max_progress=20 + local current_progress=0 + + while true; do + ((current_progress++)) + if [[ $current_progress -gt $max_progress ]]; then + break + fi + sleep "$duration" + echo "=====> Progress: [${current_progress}/${max_progress}]" + done +} + +#Start Docker containers +start_docker_containers() { + if command -v docker-compose >/dev/null 2>&1; then + echo -e "\033[1;34mFound docker-compose command, starting docker containers...\033[0m\n" + docker-compose -f ${OPENIM_ROOT}/${docker_compose_file_name} up -d + else + if command -v docker >/dev/null 2>&1; then + echo -e "\033[1;34mFound docker command, starting docker containers...\033[0m\n" + docker compose -f ${OPENIM_ROOT}/${docker_compose_file_name} up -d + else + echo -e "\033[1;31mFailed to find docker-compose or docker command, please make sure they are installed and configured correctly.\033[0m" + return 1 + fi + fi +} + +#Execute scripts +setup_script() { + chmod +x ${SCRIPTS_ROOT}/*.sh + echo -e "\033[1;34m============>Executing init_pwd.sh script...\033[0m\n" + ${SCRIPTS_ROOT}/init_pwd.sh + echo -e "\033[1;34m============>Executing env_check.sh script...\033[0m\n" + ${SCRIPTS_ROOT}/env_check.sh +} + +setup_script & + +#Start Docker containers (timeout 10 seconds) +start_docker_containers + +docker_pid=$! +timeout 10s tail --pid=${docker_pid} -f /dev/null +docker_exit_code=$? + +if [ $docker_exit_code -eq 0 ]; then + echo -e "\033[1;32m============>Docker containers started successfully!\033[0m\n" +else + echo -e "\033[1;31m============>Failed to start Docker containers, please check the environment configuration and dependencies.\033[0m\n" + exit 1 +fi + +echo -e "\033[1;34m============>Executing docker_check_service.sh script...\033[0m\n" + +#View running Docker containers +echo -e "\033[1;34m============>Viewing running Docker containers...\033[0m\n" +echo "" +docker ps + +#Replace the progress bar section with the pv command +echo -e "\033[1;34m============>Starting progress bar...\033[0m\n" +do_progress_bar 0.5 | pv -l -s 20 > /dev/null +echo -e "\033[1;34m============>Progress bar completed.\033[0m\n" + +#Execute the main program +do_sth diff --git a/scripts/install_im_server.sh b/scripts/install_im_server.sh new file mode 100755 index 000000000..33f5f241a --- /dev/null +++ b/scripts/install_im_server.sh @@ -0,0 +1,82 @@ +#!/usr/bin/env 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. + + +# Common utilities, variables and checks for all build scripts. +set -o errexit +set -o nounset +set -o pipefail + +#Include shell font styles and some basic information +SCRIPTS_ROOT=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) +OPENIM_ROOT=$(dirname "${BASH_SOURCE[0]}")/.. + +source $SCRIPTS_ROOT/style_info.sh + +# docker-compose.yaml file name +docker_compose_file_name="docker-compose.yaml" + +trap 'onCtrlC' INT +function onCtrlC () { + #Capture CTRL+C, terminate the background process of the program when the script is terminated in the form of ctrl+c + kill -9 ${do_sth_pid} ${progress_pid} + echo + echo 'Ctrl+C is captured' + exit 1 +} + +# 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 + +echo -e "${PURPLE_PREFIX}=========> Your minio endpoint is ${MINIO_ENDPOINT} ${COLOR_SUFFIX} \n" + +# Change directory to scripts folder + +chmod +x ${SCRIPTS_ROOT}/*.sh + +# Execute necessary scripts +echo -e "${PURPLE_PREFIX}=========> init_pwd.sh ${COLOR_SUFFIX} \n" + +${SCRIPTS_ROOT}/init_pwd.sh + +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} + +# Check if docker-compose command is available +if command -v docker-compose &> /dev/null +then + docker-compose up -d +else + docker compose up -d +fi + +${SCRIPTS_ROOT}/docker_check_service.sh \ No newline at end of file diff --git a/scripts/make-rules/golang.mk b/scripts/make-rules/golang.mk index 2a6fd7f0d..cf07f0cda 100644 --- a/scripts/make-rules/golang.mk +++ b/scripts/make-rules/golang.mk @@ -57,10 +57,18 @@ ifeq (${BINS},) $(error Could not determine BINS, set ROOT_DIR or run in source dir) endif -ifeq (${COMMANDS},) +ifeq ($(OS),Windows_NT) + NULL := + SPACE := $(NULL) $(NULL) + ROOT_DIR := $(subst $(SPACE),\$(SPACE),$(shell cd)) +else + ROOT_DIR := $(shell pwd) +endif + +ifeq ($(strip $(COMMANDS)),) $(error Could not determine COMMANDS, set ROOT_DIR or run in source dir) endif -ifeq (${BINS},) +ifeq ($(strip $(BINS)),) $(error Could not determine BINS, set ROOT_DIR or run in source dir) endif @@ -123,6 +131,12 @@ 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.multiarch: Build multi-arch binaries .PHONY: go.build.multiarch go.build.multiarch: go.build.verify $(foreach p,$(PLATFORMS),$(addprefix go.build., $(addprefix $(p)., $(BINS)))) @@ -161,7 +175,7 @@ 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=120 --reformat-tags --shorten-comments --ignore-generated . + @$(FIND) -type f -name '*.go' | $(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 @@ -184,4 +198,4 @@ go.clean: ## copyright.help: Show copyright help .PHONY: go.help go.help: scripts/make-rules/golang.mk - $(call smallhelp) + $(call smallhelp) \ No newline at end of file diff --git a/scripts/make-rules/image.mk b/scripts/make-rules/image.mk index 326507d83..1b94e92bc 100644 --- a/scripts/make-rules/image.mk +++ b/scripts/make-rules/image.mk @@ -18,41 +18,15 @@ # ============================================================================== # Path: scripts/make-rules/image.mk # docker registry: registry.example.com/namespace/image:tag as: registry.hub.docker.com/cubxxw/: +# https://docs.docker.com/build/building/multi-platform/ # -# # If you wish built the manager image targeting other platforms you can use the --platform flag. -# # (i.e. docker build --platform linux/arm64 ). However, you must enable docker buildKit for it. -# # More info: https://docs.docker.com/develop/develop-images/build_enhancements/ -# .PHONY: docker-build -# docker-build: test ## Build docker image with the manager. -# docker build -t ${IMG} . - -# .PHONY: docker-push -# docker-push: ## Push docker image with the manager. -# docker push ${IMG} - -# # PLATFORMS defines the target platforms for the manager image be build to provide support to multiple -# # architectures. (i.e. make docker-buildx IMG=myregistry/mypoperator:0.0.1). To use this option you need to: -# # - able to use docker buildx . More info: https://docs.docker.com/build/buildx/ -# # - have enable BuildKit, More info: https://docs.docker.com/develop/develop-images/build_enhancements/ -# # - be able to push the image for your registry (i.e. if you do not inform a valid value via IMG=> then the export will fail) -# # To properly provided solutions that supports more than one platform you should use this option. -# PLATFORMS ?= linux/arm64,linux/amd64,linux/s390x,linux/ppc64le -# .PHONY: docker-buildx -# docker-buildx: test ## Build and push docker image for the manager for cross-platform support -# # copy existing Dockerfile and insert --platform=${BUILDPLATFORM} into Dockerfile.cross, and preserve the original Dockerfile -# sed -e '1 s/\(^FROM\)/FROM --platform=\$$\{BUILDPLATFORM\}/; t' -e ' 1,// s//FROM --platform=\$$\{BUILDPLATFORM\}/' Dockerfile > Dockerfile.cross -# - docker buildx create --name project-v3-builder -# docker buildx use project-v3-builder -# - docker buildx build --push --platform=$(PLATFORMS) --tag ${IMG} -f Dockerfile.cross . -# - docker buildx rm project-v3-builder -# rm Dockerfile.cross - DOCKER := docker DOCKER_SUPPORTED_API_VERSION ?= 1.32|1.40|1.41 -REGISTRY_PREFIX ?= cubxxw -BASE_IMAGE = centos:centos8 +REGISTRY_PREFIX ?= ghcr.io/OpenIMSDK +IMAGES ?= lvscare +IMAGE_PLAT ?= $(subst $(SPACE),$(COMMA),$(subst _,/,$(PLATFORMS))) EXTRA_ARGS ?= --no-cache _DOCKER_BUILD_EXTRA_ARGS := @@ -70,14 +44,32 @@ IMAGES_DIR ?= $(wildcard ${ROOT_DIR}/build/docker/*) # Determine images names by stripping out the dir names IMAGES ?= $(filter-out tools,$(foreach image,${IMAGES_DIR},$(notdir ${image}))) -# ifeq (${IMAGES},) -# $(error Could not determine IMAGES, set ROOT_DIR or run in source dir) -# endif +ifeq (${IMAGES},) + $(error Could not determine IMAGES, set ROOT_DIR or run in source dir) +endif # ============================================================================== # Image targets # ============================================================================== +# PLATFORMS defines the target platforms for the manager image be build to provide support to multiple +# architectures. (i.e. make docker-buildx IMG=myregistry/mypoperator:0.0.1). To use this option you need to: +# - able to use docker buildx . More info: https://docs.docker.com/build/buildx/ +# - have enable BuildKit, More info: https://docs.docker.com/develop/develop-images/build_enhancements/ +# - be able to push the image for your registry (i.e. if you do not inform a valid value via IMG=> then the export will fail) +# To properly provided solutions that supports more than one platform you should use this option. +## Build and push docker image for the manager for cross-platform support +PLATFORMS ?= linux/arm64,linux/amd64,linux/s390x,linux/ppc64le +# copy existing Dockerfile and insert --platform=${BUILDPLATFORM} into Dockerfile.cross, and preserve the original Dockerfile +.PHONY: docker-buildx +docker-buildx: + sed -e '1 s/\(^FROM\)/FROM --platform=\$$\{BUILDPLATFORM\}/; t' -e ' 1,// s//FROM --platform=\$$\{BUILDPLATFORM\}/' Dockerfile > Dockerfile.cross + - $(CONTAINER_TOOL) buildx create --name project-v3-builder + $(CONTAINER_TOOL) buildx use project-v3-builder + - $(CONTAINER_TOOL) buildx build --push --platform=$(PLATFORMS) --tag ${IMAGES} -f Dockerfile.cross . + - $(CONTAINER_TOOL) buildx rm project-v3-builder + rm Dockerfile.cross + ## image.verify: Verify docker version .PHONY: image.verify image.verify: @@ -98,34 +90,40 @@ image.daemon.verify: exit 1; \ fi +# If you wish built the manager image targeting other platforms you can use the --platform flag. +# (i.e. docker build --platform linux/arm64 ). However, you must enable docker buildKit for it. +# More info: https://docs.docker.com/develop/develop-images/build_enhancements/ ## image.build: Build docker images .PHONY: image.build -image.build: image.verify go.build.verify $(addprefix image.build., $(addprefix $(IMAGE_PLAT)., $(IMAGES))) +image.build: image.verify $(addprefix image.build., $(addprefix $(PLATFORM)., $(IMAGES))) -## image.build.multiarch: Build docker images for all platforms .PHONY: image.build.multiarch -image.build.multiarch: image.verify go.build.verify $(foreach p,$(PLATFORMS),$(addprefix image.build., $(addprefix $(p)., $(IMAGES)))) +image.build.multiarch: image.verify $(foreach p,$(PLATFORMS),$(addprefix image.build., $(addprefix $(p)., $(IMAGES)))) ## image.build.%: Build docker image for a specific platform .PHONY: image.build.% -image.build.%: go.build.% +image.build.%: go.bin.% $(eval IMAGE := $(COMMAND)) $(eval IMAGE_PLAT := $(subst _,/,$(PLATFORM))) - @echo "===========> Building docker image $(IMAGE) $(VERSION) for $(IMAGE_PLAT)" - @mkdir -p $(TMP_DIR)/$(IMAGE) - @cat $(ROOT_DIR)/build/docker/$(IMAGE)/Dockerfile\ - | sed "s#BASE_IMAGE#$(BASE_IMAGE)#g" >$(TMP_DIR)/$(IMAGE)/Dockerfile - @cp $(OUTPUT_DIR)/platforms/$(IMAGE_PLAT)/$(IMAGE) $(TMP_DIR)/$(IMAGE)/ - @DST_DIR=$(TMP_DIR)/$(IMAGE) $(ROOT_DIR)/build/docker/$(IMAGE)/build.sh 2>/dev/null || true - $(eval BUILD_SUFFIX := $(_DOCKER_BUILD_EXTRA_ARGS) --pull -t $(REGISTRY_PREFIX)/$(IMAGE)-$(ARCH):$(VERSION) $(TMP_DIR)/$(IMAGE)) - @if [ $(shell $(GO) env GOARCH) != $(ARCH) ] ; then \ - $(MAKE) image.daemon.verify ;\ - $(DOCKER) build --platform $(IMAGE_PLAT) $(BUILD_SUFFIX) ; \ + $(eval ARCH := $(word 2,$(subst _, ,$(PLATFORM)))) + @echo "===========> Building LOCAL docker image $(IMAGE) $(VERSION) for $(IMAGE_PLAT)" + @mkdir -p $(TMP_DIR)/$(IMAGE)/$(PLATFORM) + @cat $(ROOT_DIR)/docker/$(IMAGE)/Dockerfile\ + >$(TMP_DIR)/$(IMAGE)/Dockerfile + @cp $(BIN_DIR)/$(PLATFORM)/$(IMAGE) $(TMP_DIR)/$(IMAGE)/$(PLATFORM) + + $(eval BUILD_SUFFIX := --load --pull -t $(REGISTRY_PREFIX)/$(IMAGE):$(VERSION) $(TMP_DIR)/$(IMAGE)) + $(eval BUILD_SUFFIX_ARM := --load --pull -t $(REGISTRY_PREFIX)/$(IMAGE).$(ARCH):$(VERSION) $(TMP_DIR)/$(IMAGE)) + @if [ "$(ARCH)" == "amd64" ]; then \ + echo "===========> Creating LOCAL docker image tag $(REGISTRY_PREFIX)/$(IMAGE):$(VERSION) for $(ARCH)"; \ + $(DOCKER) buildx build --platform $(IMAGE_PLAT) $(BUILD_SUFFIX); \ else \ - $(DOCKER) build $(BUILD_SUFFIX) ; \ + echo "===========> Creating LOCAL docker image tag $(REGISTRY_PREFIX)/$(IMAGE).$(ARCH):$(VERSION) for $(ARCH)"; \ + $(DOCKER) buildx build --platform $(IMAGE_PLAT) $(BUILD_SUFFIX_ARM); \ fi - @rm -rf $(TMP_DIR)/$(IMAGE) +# https://docs.docker.com/build/building/multi-platform/ +# busybox image supports amd64, arm32v5, arm32v6, arm32v7, arm64v8, i386, ppc64le, and s390x ## image.buildx.%: Build docker images with buildx .PHONY: image.buildx.% image.buildx.%: diff --git a/scripts/make-rules/tools.mk b/scripts/make-rules/tools.mk index e268cb264..7fe7305fb 100644 --- a/scripts/make-rules/tools.mk +++ b/scripts/make-rules/tools.mk @@ -130,6 +130,11 @@ install.gsemver: install.git-chglog: @$(GO) install github.com/git-chglog/git-chglog/cmd/git-chglog@latest +## install.ko: Install ko, used to build go program into container images +.PHONY: install.ko +install.ko: + @$(GO) install github.com/google/ko@latest + ## install.github-release: Install github-release, used to create github release .PHONY: install.github-release install.github-release: @@ -149,6 +154,11 @@ install.coscli: install.coscmd: @if which pip &>/dev/null; then pip install coscmd; else pip3 install coscmd; fi +## install.minio: Install minio, used to upload files to minio +.PHONY: install.minio +install.minio: + @$(GO) install github.com/minio/minio@latest + ## install.delve: Install delve, used to debug go program .PHONY: install.delve install.delve: diff --git a/scripts/push_start.sh b/scripts/push_start.sh index 79d877c79..74b9aedc9 100755 --- a/scripts/push_start.sh +++ b/scripts/push_start.sh @@ -13,6 +13,8 @@ # See the License for the specific language governing permissions and # limitations under the License. +# Common utilities, variables and checks for all build scripts. + #Include shell font styles and some basic information SCRIPTS_ROOT=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) OPENIM_ROOT=$(dirname "${BASH_SOURCE[0]}")/.. 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/" diff --git a/test/common.sh b/test/common.sh index f1f641af1..904608894 100644 --- a/test/common.sh +++ b/test/common.sh @@ -1 +1,15 @@ #!/usr/bin/env 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. +