diff --git a/.env b/.env index 2f2766ef6..4f684ad77 100644 --- a/.env +++ b/.env @@ -227,7 +227,6 @@ OPENIM_WEB_PORT=11001 # Default: OPENIM_WEB_ADDRESS=172.28.0.1 OPENIM_WEB_ADDRESS=172.28.0.8 - # ====================================== # ========= OpenIM Server ============== # ====================================== diff --git a/.github/workflows/auto-assign-issue.yml b/.github/workflows/auto-assign-issue.yml index d87a571dc..d92fc968c 100644 --- a/.github/workflows/auto-assign-issue.yml +++ b/.github/workflows/auto-assign-issue.yml @@ -27,7 +27,7 @@ jobs: issues: write steps: - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Assign the issue run: | diff --git a/.github/workflows/auto-gh-pr.yml b/.github/workflows/auto-gh-pr.yml index 98e4d83ff..767e35fe6 100644 --- a/.github/workflows/auto-gh-pr.yml +++ b/.github/workflows/auto-gh-pr.yml @@ -30,7 +30,7 @@ jobs: # && github.event.pull_request.merged == true steps: - name: Check out code - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 0 diff --git a/.github/workflows/auto-tag.yml b/.github/workflows/auto-tag.yml index d6dd56139..96c06c4ce 100644 --- a/.github/workflows/auto-tag.yml +++ b/.github/workflows/auto-tag.yml @@ -26,7 +26,7 @@ jobs: if: startsWith(github.event.comment.body, '/create tag') steps: - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Validate version number and get comment id: validate diff --git a/.github/workflows/bot-cherry-pick.yml b/.github/workflows/bot-cherry-pick.yml index 2e69e0d0a..ab8993540 100644 --- a/.github/workflows/bot-cherry-pick.yml +++ b/.github/workflows/bot-cherry-pick.yml @@ -23,7 +23,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout the latest code - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: token: ${{ secrets.BOT_GITHUB_TOKEN }} fetch-depth: 0 # otherwise, you will fail to push refs to dest repo diff --git a/.github/workflows/build-docker-image.yml b/.github/workflows/build-docker-image.yml index f9fb42500..735c160df 100644 --- a/.github/workflows/build-docker-image.yml +++ b/.github/workflows/build-docker-image.yml @@ -15,6 +15,8 @@ name: Publish Docker image on: + schedule: + - cron: '30 2 * * *' push: branches: - main @@ -32,16 +34,16 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Set up QEMU - uses: docker/setup-qemu-action@v2 + uses: docker/setup-qemu-action@v3 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 + uses: docker/setup-buildx-action@v3 # docker.io/openim/openim-server:latest - name: Extract metadata (tags, labels) for Docker id: meta - uses: docker/metadata-action@v4.6.0 + uses: docker/metadata-action@v5.0.0 with: images: openim/openim-server # generate Docker tags based on the following events/attributes @@ -55,13 +57,13 @@ jobs: type=sha - name: Log in to Docker Hub - uses: docker/login-action@v2 + uses: docker/login-action@v3 with: username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_PASSWORD }} - name: Build and push Docker image - uses: docker/build-push-action@v4 + uses: docker/build-push-action@v5 with: context: . # linux/ppc64le,linux/s390x @@ -74,27 +76,27 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Set up QEMU - uses: docker/setup-qemu-action@v2 + uses: docker/setup-qemu-action@v3 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 + uses: docker/setup-buildx-action@v3 # registry.cn-hangzhou.aliyuncs.com/openimsdk/openim-server:latest - name: Extract metadata (tags, labels) for Docker id: meta2 - uses: docker/metadata-action@v4.6.0 + uses: docker/metadata-action@v5.0.0 with: images: registry.cn-hangzhou.aliyuncs.com/openimsdk/openim-server - name: Log in to AliYun Docker Hub - uses: docker/login-action@v2 + uses: docker/login-action@v3 with: registry: registry.cn-hangzhou.aliyuncs.com username: ${{ secrets.ALIREGISTRY_USERNAME }} password: ${{ secrets.ALIREGISTRY_TOKEN }} - name: Build and push Docker image - uses: docker/build-push-action@v4 + uses: docker/build-push-action@v5 with: context: . # linux/ppc64le,linux/s390x @@ -107,27 +109,27 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Set up QEMU - uses: docker/setup-qemu-action@v2 + uses: docker/setup-qemu-action@v3 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 + uses: docker/setup-buildx-action@v3 # ghcr.io/openimsdk/openim-server:latest - name: Extract metadata (tags, labels) for Docker id: meta3 - uses: docker/metadata-action@v4.6.0 + uses: docker/metadata-action@v5.0.0 with: images: ghcr.io/openimsdk/openim-server - name: Log in to GitHub Container Registry - uses: docker/login-action@v2 + uses: docker/login-action@v3 with: registry: ghcr.io username: ${{ github.repository_owner }} password: ${{ secrets.GITHUB_TOKEN }} - name: Build and push Docker image - uses: docker/build-push-action@v4 + uses: docker/build-push-action@v5 with: context: . # linux/ppc64le,linux/s390x diff --git a/.github/workflows/build-openim-web-image.yml b/.github/workflows/build-openim-web-image.yml index 6e8e7d823..800500af6 100644 --- a/.github/workflows/build-openim-web-image.yml +++ b/.github/workflows/build-openim-web-image.yml @@ -15,6 +15,8 @@ name: Build OpenIM Web Docker image on: + schedule: + - cron: '30 3 * * *' push: branches: - main @@ -28,130 +30,22 @@ env: GO_VERSION: "1.20" jobs: - build-dockerhub: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v3 - - name: Set up QEMU - uses: docker/setup-qemu-action@v2 - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 - -# docker.io/openim/openim-server:latest - - name: Extract metadata (tags, labels) for Docker - id: meta - uses: docker/metadata-action@v4.6.0 - with: - images: openim/openim-server - # generate Docker tags based on the following events/attributes - tags: | - type=schedule - type=ref,event=branch - type=ref,event=pr - type=semver,pattern={{version}} - type=semver,pattern={{major}}.{{minor}} - type=semver,pattern={{major}} - type=sha - - - name: Log in to Docker Hub - uses: docker/login-action@v2 - with: - username: ${{ secrets.DOCKER_USERNAME }} - password: ${{ secrets.DOCKER_PASSWORD }} - - - name: Build and push Docker image - uses: docker/build-push-action@v4 - with: - context: . - # linux/ppc64le,linux/s390x - platforms: linux/amd64,linux/arm64 - push: ${{ github.event_name != 'pull_request' }} - tags: ${{ steps.meta.outputs.tags }} - labels: ${{ steps.meta.outputs.labels }} - - build-aliyun: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v3 - - name: Set up QEMU - uses: docker/setup-qemu-action@v2 - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 -# registry.cn-hangzhou.aliyuncs.com/openimsdk/openim-server:latest - - name: Extract metadata (tags, labels) for Docker - id: meta2 - uses: docker/metadata-action@v4.6.0 - with: - images: registry.cn-hangzhou.aliyuncs.com/openimsdk/openim-web - - - name: Log in to AliYun Docker Hub - uses: docker/login-action@v2 - with: - registry: registry.cn-hangzhou.aliyuncs.com - username: ${{ secrets.ALIREGISTRY_USERNAME }} - password: ${{ secrets.ALIREGISTRY_TOKEN }} - - - name: Build and push Docker image - uses: docker/build-push-action@v4 - with: - context: . - # linux/ppc64le,linux/s390x - platforms: linux/amd64,linux/arm64 - push: ${{ github.event_name != 'pull_request' }} - tags: ${{ steps.meta2.outputs.tags }} - labels: ${{ steps.meta2.outputs.labels }} - - build-ghcr: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v3 - - name: Set up QEMU - uses: docker/setup-qemu-action@v2 - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 -# ghcr.io/openimsdk/openim-server:latest - - name: Extract metadata (tags, labels) for Docker - id: meta3 - uses: docker/metadata-action@v4.6.0 - with: - images: ghcr.io/openimsdk/openim-web - - - name: Log in to GitHub Container Registry - uses: docker/login-action@v2 - with: - registry: ghcr.io - username: ${{ github.repository_owner }} - password: ${{ secrets.GITHUB_TOKEN }} - - - name: Build and push Docker image - uses: docker/build-push-action@v4 - with: - context: . - # linux/ppc64le,linux/s390x - platforms: linux/amd64,linux/arm64 - push: ${{ github.event_name != 'pull_request' }} - tags: ${{ steps.meta3.outputs.tags }} - labels: ${{ steps.meta3.outputs.labels }} - build-openim-web-dockerhub: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Set up QEMU - uses: docker/setup-qemu-action@v2 + uses: docker/setup-qemu-action@v3 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 + uses: docker/setup-buildx-action@v3 -# docker.io/openim/openim-server:latest +# docker.io/openim/openim-web:latest - name: Extract metadata (tags, labels) for Docker id: meta - uses: docker/metadata-action@v4.6.0 + uses: docker/metadata-action@v5.0.0 with: - images: openim/openim-server + images: openim/openim-web # generate Docker tags based on the following events/attributes tags: | type=schedule @@ -163,13 +57,13 @@ jobs: type=sha - name: Log in to Docker Hub - uses: docker/login-action@v2 + uses: docker/login-action@v3 with: username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_PASSWORD }} - name: Build and push Docker image - uses: docker/build-push-action@v4 + uses: docker/build-push-action@v5 with: context: . file: ./build/images/openim-tools/openim-web/Dockerfile @@ -182,27 +76,27 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Set up QEMU - uses: docker/setup-qemu-action@v2 + uses: docker/setup-qemu-action@v3 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 -# registry.cn-hangzhou.aliyuncs.com/openimsdk/openim-server:latest + uses: docker/setup-buildx-action@v3 +# registry.cn-hangzhou.aliyuncs.com/openimsdk/openim-web:latest - name: Extract metadata (tags, labels) for Docker id: meta2 - uses: docker/metadata-action@v4.6.0 + uses: docker/metadata-action@v5.0.0 with: - images: registry.cn-hangzhou.aliyuncs.com/openimsdk/openim-server + images: registry.cn-hangzhou.aliyuncs.com/openimsdk/openim-web - name: Log in to AliYun Docker Hub - uses: docker/login-action@v2 + uses: docker/login-action@v3 with: registry: registry.cn-hangzhou.aliyuncs.com username: ${{ secrets.ALIREGISTRY_USERNAME }} password: ${{ secrets.ALIREGISTRY_TOKEN }} - name: Build and push Docker image - uses: docker/build-push-action@v4 + uses: docker/build-push-action@v5 with: context: . file: ./build/images/openim-tools/openim-web/Dockerfile @@ -215,11 +109,11 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Set up QEMU - uses: docker/setup-qemu-action@v2 + uses: docker/setup-qemu-action@v3 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 + uses: docker/setup-buildx-action@v3 with: install: true - name: Cache Docker layers @@ -231,7 +125,7 @@ jobs: ${{ runner.os }}-buildx- - name: Log in to GitHub Container Registry - uses: docker/login-action@v2 + uses: docker/login-action@v3 with: registry: ghcr.io username: ${{ github.repository_owner }} @@ -239,12 +133,12 @@ jobs: - name: Extract metadata (tags, labels) for Docker openim-web id: meta1 - uses: docker/metadata-action@v4.6.0 + uses: docker/metadata-action@v5.0.0 with: images: ghcr.io/openimsdk/openim-web - name: Build and push Docker image for openim-web - uses: docker/build-push-action@v4 + uses: docker/build-push-action@v5 with: context: . file: ./build/images/openim-tools/openim-web/Dockerfile @@ -257,12 +151,12 @@ jobs: - name: Extract metadata (tags, labels) for Docker openim-web id: meta2 - uses: docker/metadata-action@v4.6.0 + uses: docker/metadata-action@v5.0.0 with: images: ghcr.io/openimsdk/component - name: Build and push Docker image for component - uses: docker/build-push-action@v4 + uses: docker/build-push-action@v5 with: context: . file: ./build/images/openim-tools/component/Dockerfile diff --git a/.github/workflows/check-coverage.yml b/.github/workflows/check-coverage.yml index 7080ef7be..c875b7a9f 100644 --- a/.github/workflows/check-coverage.yml +++ b/.github/workflows/check-coverage.yml @@ -41,7 +41,7 @@ jobs: runs-on: ubuntu-20.04 steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Setup Golang with cache uses: magnetikonline/action-golang-cache@v4 diff --git a/.github/workflows/cla.yml b/.github/workflows/cla.yml index 3f658284a..4d2a16056 100644 --- a/.github/workflows/cla.yml +++ b/.github/workflows/cla.yml @@ -41,7 +41,7 @@ jobs: 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 + uses: contributor-assistant/github-action@v2.3.1 env: GITHUB_TOKEN: ${{ secrets.BOT_GITHUB_TOKEN }} PERSONAL_ACCESS_TOKEN: ${{ secrets.REDBOT_GITHUB_TOKEN }} diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index a76979ab9..d6ff39371 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -47,7 +47,7 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL diff --git a/.github/workflows/create_branch_on_tag.yml b/.github/workflows/create_branch_on_tag.yml index 67ab11173..26d5ed888 100644 --- a/.github/workflows/create_branch_on_tag.yml +++ b/.github/workflows/create_branch_on_tag.yml @@ -24,7 +24,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Check out code - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 0 diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index e16297c4f..1fe1bb169 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -31,7 +31,7 @@ jobs: deploy-dev: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: executing remote ssh commands using password uses: appleboy/ssh-action@v1.0.0 env: diff --git a/.github/workflows/depsreview.yaml b/.github/workflows/depsreview.yaml index c95afb845..7b70595ad 100644 --- a/.github/workflows/depsreview.yaml +++ b/.github/workflows/depsreview.yaml @@ -13,6 +13,6 @@ jobs: runs-on: ubuntu-latest steps: - name: 'Checkout Repository' - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: 'Dependency Review' uses: actions/dependency-review-action@v3 \ No newline at end of file diff --git a/.github/workflows/docker-buildx.yml b/.github/workflows/docker-buildx.yml index ae52fa242..366317b1c 100644 --- a/.github/workflows/docker-buildx.yml +++ b/.github/workflows/docker-buildx.yml @@ -29,13 +29,13 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Set up QEMU - uses: docker/setup-qemu-action@v2 + uses: docker/setup-qemu-action@v3 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 + uses: docker/setup-buildx-action@v3 with: install: true @@ -48,7 +48,7 @@ jobs: ${{ runner.os }}-buildx- - name: Log in to GitHub Container Registry - uses: docker/login-action@v2 + uses: docker/login-action@v3 with: registry: ghcr.io username: ${{ github.repository_owner }} @@ -87,12 +87,12 @@ jobs: - name: Extract metadata (tags, labels) for Docker openim-api id: meta1 - uses: docker/metadata-action@v4.6.0 + uses: docker/metadata-action@v5.0.0 with: images: ghcr.io/openimsdk/openim-api - name: Build and push Docker image for openim-api - uses: docker/build-push-action@v4 + uses: docker/build-push-action@v5 with: context: . file: ./build/images/openim-api/Dockerfile @@ -105,12 +105,12 @@ jobs: - name: Extract metadata (tags, labels) for Docker openim-cmdutils id: meta2 - uses: docker/metadata-action@v4.6.0 + uses: docker/metadata-action@v5.0.0 with: images: ghcr.io/openimsdk/openim-cmdutils - name: Build and push Docker image for openim-cmdutils - uses: docker/build-push-action@v4 + uses: docker/build-push-action@v5 with: context: . file: ./build/images/openim-cmdutils/Dockerfile @@ -123,12 +123,12 @@ jobs: - name: Extract metadata (tags, labels) for Docker openim-crontask id: meta3 - uses: docker/metadata-action@v4.6.0 + uses: docker/metadata-action@v5.0.0 with: images: ghcr.io/openimsdk/openim-crontask - name: Build and push Docker image for openim-crontask - uses: docker/build-push-action@v4 + uses: docker/build-push-action@v5 with: context: . file: ./build/images/openim-crontask/Dockerfile @@ -141,12 +141,12 @@ jobs: - name: Extract metadata (tags, labels) for Docker openim-msggateway id: meta4 - uses: docker/metadata-action@v4.6.0 + uses: docker/metadata-action@v5.0.0 with: images: ghcr.io/openimsdk/openim-msggateway - name: Build and push Docker image for openim-msggateway - uses: docker/build-push-action@v4 + uses: docker/build-push-action@v5 with: context: . file: ./build/images/openim-msggateway/Dockerfile @@ -159,12 +159,12 @@ jobs: - name: Extract metadata (tags, labels) for Docker openim-msgtransfer id: meta5 - uses: docker/metadata-action@v4.6.0 + uses: docker/metadata-action@v5.0.0 with: images: ghcr.io/openimsdk/openim-msgtransfer - name: Build and push Docker image for openim-msgtransfer - uses: docker/build-push-action@v4 + uses: docker/build-push-action@v5 with: context: . file: ./build/images/openim-msgtransfer/Dockerfile @@ -177,12 +177,12 @@ jobs: - name: Extract metadata (tags, labels) for Docker openim-push id: meta6 - uses: docker/metadata-action@v4.6.0 + uses: docker/metadata-action@v5.0.0 with: images: ghcr.io/openimsdk/openim-push - name: Build and push Docker image for openim-push - uses: docker/build-push-action@v4 + uses: docker/build-push-action@v5 with: context: . file: ./build/images/openim-push/Dockerfile @@ -195,12 +195,12 @@ jobs: - name: Extract metadata (tags, labels) for Docker openim-rpc-auth id: meta7 - uses: docker/metadata-action@v4.6.0 + uses: docker/metadata-action@v5.0.0 with: images: ghcr.io/openimsdk/openim-rpc-auth - name: Build and push Docker image for openim-rpc-auth - uses: docker/build-push-action@v4 + uses: docker/build-push-action@v5 with: context: . file: ./build/images/openim-rpc-auth/Dockerfile @@ -213,12 +213,12 @@ jobs: - name: Extract metadata (tags, labels) for Docker openim-rpc-conversation id: meta8 - uses: docker/metadata-action@v4.6.0 + uses: docker/metadata-action@v5.0.0 with: images: ghcr.io/openimsdk/openim-rpc-conversation - name: Build and push Docker image for openim-rpc-conversation - uses: docker/build-push-action@v4 + uses: docker/build-push-action@v5 with: context: . file: ./build/images/openim-rpc-conversation/Dockerfile @@ -231,12 +231,12 @@ jobs: - name: Extract metadata (tags, labels) for Docker openim-rpc-friend id: meta9 - uses: docker/metadata-action@v4.6.0 + uses: docker/metadata-action@v5.0.0 with: images: ghcr.io/openimsdk/openim-rpc-friend - name: Build and push Docker image for openim-rpc-friend - uses: docker/build-push-action@v4 + uses: docker/build-push-action@v5 with: context: . file: ./build/images/openim-rpc-friend/Dockerfile @@ -249,12 +249,12 @@ jobs: - name: Extract metadata (tags, labels) for Docker openim-rpc-group id: meta10 - uses: docker/metadata-action@v4.6.0 + uses: docker/metadata-action@v5.0.0 with: images: ghcr.io/openimsdk/openim-rpc-group - name: Build and push Docker image for openim-rpc-group - uses: docker/build-push-action@v4 + uses: docker/build-push-action@v5 with: context: . file: ./build/images/openim-rpc-group/Dockerfile @@ -267,12 +267,12 @@ jobs: - name: Extract metadata (tags, labels) for Docker openim-rpc-msg id: meta11 - uses: docker/metadata-action@v4.6.0 + uses: docker/metadata-action@v5.0.0 with: images: ghcr.io/openimsdk/openim-rpc-msg - name: Build and push Docker image for openim-rpc-msg - uses: docker/build-push-action@v4 + uses: docker/build-push-action@v5 with: context: . file: ./build/images/openim-rpc-msg/Dockerfile @@ -285,12 +285,12 @@ jobs: - name: Extract metadata (tags, labels) for Docker openim-rpc-third id: meta12 - uses: docker/metadata-action@v4.6.0 + uses: docker/metadata-action@v5.0.0 with: images: ghcr.io/openimsdk/openim-rpc-third - name: Build and push Docker image for openim-rpc-third - uses: docker/build-push-action@v4 + uses: docker/build-push-action@v5 with: context: . file: ./build/images/openim-rpc-third/Dockerfile @@ -303,12 +303,12 @@ jobs: - name: Extract metadata (tags, labels) for Docker openim-rpc-user id: meta13 - uses: docker/metadata-action@v4.6.0 + uses: docker/metadata-action@v5.0.0 with: images: ghcr.io/openimsdk/openim-rpc-user - name: Build and push Docker image for openim-rpc-user - uses: docker/build-push-action@v4 + uses: docker/build-push-action@v5 with: context: . file: ./build/images/openim-rpc-user/Dockerfile diff --git a/.github/workflows/e2e-test.yml b/.github/workflows/e2e-test.yml index 3358fc31a..7028003c5 100644 --- a/.github/workflows/e2e-test.yml +++ b/.github/workflows/e2e-test.yml @@ -31,13 +31,13 @@ jobs: steps: - name: Set up Go 1.21 - uses: actions/setup-go@v2 + uses: actions/setup-go@v4 with: go-version: 1.21 id: go - name: Check out code into the Go module directory - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Create e2e test run: | diff --git a/.github/workflows/golangci-lint.yml b/.github/workflows/golangci-lint.yml index 7280a3d31..67dc5a6b8 100644 --- a/.github/workflows/golangci-lint.yml +++ b/.github/workflows/golangci-lint.yml @@ -23,7 +23,7 @@ jobs: name: lint runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: actions/setup-go@v4 with: go-version: '1.21' diff --git a/.github/workflows/gosec.yml b/.github/workflows/gosec.yml index 708eca4f8..b99330c05 100644 --- a/.github/workflows/gosec.yml +++ b/.github/workflows/gosec.yml @@ -37,7 +37,7 @@ jobs: GO111MODULE: on steps: - name: Check out code - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Run Gosec Security Scanner uses: securego/gosec@master with: diff --git a/.github/workflows/greetings.yml b/.github/workflows/greetings.yml index bed465cff..0b1106ece 100644 --- a/.github/workflows/greetings.yml +++ b/.github/workflows/greetings.yml @@ -25,8 +25,8 @@ jobs: check_for_first_interaction: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - uses: actions/first-interaction@v1.1.1 + - uses: actions/checkout@v4 + - uses: actions/first-interaction@v1.2.0 with: repo-token: ${{ secrets.BOT_GITHUB_TOKEN }} pr-message: | diff --git a/.github/workflows/link-pr.yml b/.github/workflows/link-pr.yml index 356394f94..c61dbe55c 100644 --- a/.github/workflows/link-pr.yml +++ b/.github/workflows/link-pr.yml @@ -23,7 +23,7 @@ jobs: linkChecker: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Link Checker id: lychee diff --git a/.github/workflows/opencommit.yml b/.github/workflows/opencommit.yml index a07b5b8b2..db244705c 100644 --- a/.github/workflows/opencommit.yml +++ b/.github/workflows/opencommit.yml @@ -30,7 +30,7 @@ jobs: uses: actions/setup-node@v3 with: node-version: '16' - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: fetch-depth: 0 - uses: di-sukharev/opencommit@github-action-v1.0.4 diff --git a/.github/workflows/openimci.yml b/.github/workflows/openimci.yml index 626841d3c..ec07c45ff 100644 --- a/.github/workflows/openimci.yml +++ b/.github/workflows/openimci.yml @@ -53,7 +53,7 @@ jobs: steps: - name: Setup - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Set up Go ${{ matrix.go_version }} uses: actions/setup-go@v4 @@ -118,7 +118,7 @@ jobs: os: ["ubuntu-latest"] steps: - name: Checkout and Install OpenIM - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Install Task uses: arduino/setup-task@v1 with: @@ -138,7 +138,7 @@ jobs: os: ["ubuntu-latest"] steps: - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Set up Go ${{ matrix.go_version }} uses: actions/setup-go@v4 @@ -151,7 +151,7 @@ jobs: version: 2.x - name: Docker Operations run: | - curl -o docker-compose.yaml https://raw.githubusercontent.com/OpenIMSDK/openim-docker/main/example/basic-openim-server-dependency.yml + curl -o docker-compose.yml https://raw.githubusercontent.com/OpenIMSDK/openim-docker/main/example/basic-openim-server-dependency.yml sudo docker compose up -d sudo sleep 60 diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index d3a35e65d..8094718c6 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -33,7 +33,7 @@ jobs: runs-on: ubuntu-latest steps: - name: checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 0 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c14db3699..f2147c865 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -29,7 +29,7 @@ jobs: goreleaser: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: fetch-depth: 0 - run: git fetch --force --tags @@ -38,7 +38,7 @@ jobs: go-version: stable # More assembly might be required: Docker logins, GPG, etc. It all depends # on your needs. - - uses: goreleaser/goreleaser-action@v4 + - uses: goreleaser/goreleaser-action@v5 with: # either 'goreleaser' (default) or 'goreleaser-pro': distribution: goreleaser @@ -63,14 +63,14 @@ jobs: matrix: format: [ deb, rpm, apk ] steps: - - uses: actions/checkout@v3 # v3 + - uses: actions/checkout@v4 # 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: docker/setup-qemu-action@326560df218a7ea9cf6ab49bbc88b8b306bb437e # v2 - uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3 with: path: | diff --git a/.github/workflows/scripts-verify.yml b/.github/workflows/scripts-verify.yml index 65d61d84b..db8a64757 100644 --- a/.github/workflows/scripts-verify.yml +++ b/.github/workflows/scripts-verify.yml @@ -52,7 +52,7 @@ jobs: steps: - name: Setup - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: In ${{ matrix.os }} Execute the script validation code uses: actions/setup-go@v4 diff --git a/.github/workflows/sync-release.yml b/.github/workflows/sync-release.yml index 839040aff..2a29f6218 100644 --- a/.github/workflows/sync-release.yml +++ b/.github/workflows/sync-release.yml @@ -19,7 +19,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Run GitHub File Sync uses: BetaHuhn/repo-file-sync-action@latest diff --git a/.github/workflows/sync.yml b/.github/workflows/sync.yml index d6e15bf23..6e5c79799 100644 --- a/.github/workflows/sync.yml +++ b/.github/workflows/sync.yml @@ -15,7 +15,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Run GitHub File Sync uses: BetaHuhn/repo-file-sync-action@latest diff --git a/.gitignore b/.gitignore index 2d8f1e002..92408fa56 100644 --- a/.gitignore +++ b/.gitignore @@ -160,7 +160,6 @@ flycheck_*.el # Dependency directories (remove the comment below to include it) vendor/ -tools/imctl # Go workspace file # go.work diff --git a/.golangci.yml b/.golangci.yml index d588695dd..3dad0af30 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -361,13 +361,17 @@ linters-settings: - gorm.io/gorm - gorm.io/driver/mysql - k8s.io/klog + - github.com/allowed/module + - go.mongodb.org/mongo-driver/mongo # - gopkg.in/yaml.v2 domains: # List of allowed module domains - google.golang.org - gopkg.in - golang.org - github.com + - go.mongodb.org - go.uber.org + - openim.io - go.etcd.io blocked: versions: diff --git a/CHANGELOG/CHANGELOG-3.1.md b/CHANGELOG/CHANGELOG-3.1.md index 8d64c5ef7..894432183 100644 --- a/CHANGELOG/CHANGELOG-3.1.md +++ b/CHANGELOG/CHANGELOG-3.1.md @@ -8,24 +8,6 @@ ## [Unreleased] - -## [v3.1.3-beta.1] - 2023-08-14 - - -## [v3.1.3] - 2023-08-14 - - -## [v3.1.2-beta.3] - 2023-08-09 - - -## [v3.1.2-beta.2] - 2023-08-09 - - -## [v3.1.2-beta.1] - 2023-08-09 - - -## [v3.1.2-beta.0] - 2023-08-08 - ## v3.1.0 - 2023-07-28 ### Reverts @@ -35,10 +17,4 @@ - Merge branch 'tuoyun' -[Unreleased]: https://github.com/openimsdk/open-im-server/compare/v3.1.3-beta.1...HEAD -[v3.1.3-beta.1]: https://github.com/openimsdk/open-im-server/compare/v3.1.3...v3.1.3-beta.1 -[v3.1.3]: https://github.com/openimsdk/open-im-server/compare/v3.1.2-beta.3...v3.1.3 -[v3.1.2-beta.3]: https://github.com/openimsdk/open-im-server/compare/v3.1.2-beta.2...v3.1.2-beta.3 -[v3.1.2-beta.2]: https://github.com/openimsdk/open-im-server/compare/v3.1.2-beta.1...v3.1.2-beta.2 -[v3.1.2-beta.1]: https://github.com/openimsdk/open-im-server/compare/v3.1.2-beta.0...v3.1.2-beta.1 -[v3.1.2-beta.0]: https://github.com/openimsdk/open-im-server/compare/v3.1.0...v3.1.2-beta.0 +[Unreleased]: https://github.com/openimsdk/open-im-server/compare/v3.1.0...HEAD diff --git a/CHANGELOG/CHANGELOG-3.2.md b/CHANGELOG/CHANGELOG-3.2.md index f7823d119..3f77a8273 100644 --- a/CHANGELOG/CHANGELOG-3.2.md +++ b/CHANGELOG/CHANGELOG-3.2.md @@ -8,39 +8,15 @@ ## [Unreleased] - -## [v3.2.2] - 2023-09-03 - - -## [v3.2.3] - 2023-09-03 - - -## [v3.2.1] - 2023-09-03 - - -## [v3.2.2-beta.4] - 2023-08-28 - ## [v3.2.2-alpha.0] - 2023-08-25 - -## [v3.2.2-beta.3] - 2023-08-22 - - -## [v3.2.2-beta.2] - 2023-08-21 - - -## [v3.2.2-beta.1] - 2023-08-19 - -## [v3.2.0] - 2023-08-18 +## [v3.2.0] - 2023-08-19 ## [v3.2.0-rc.0] - 2023-08-17 - -## [v3.2.2-beta.0] - 2023-08-17 - ## v3.2.0-alpha.0 - 2023-08-16 ### Reverts @@ -50,15 +26,7 @@ - Merge branch 'tuoyun' -[Unreleased]: https://github.com/openimsdk/open-im-server/compare/v3.2.2...HEAD -[v3.2.2]: https://github.com/openimsdk/open-im-server/compare/v3.2.3...v3.2.2 -[v3.2.3]: https://github.com/openimsdk/open-im-server/compare/v3.2.1...v3.2.3 -[v3.2.1]: https://github.com/openimsdk/open-im-server/compare/v3.2.2-beta.4...v3.2.1 -[v3.2.2-beta.4]: https://github.com/openimsdk/open-im-server/compare/v3.2.2-alpha.0...v3.2.2-beta.4 -[v3.2.2-alpha.0]: https://github.com/openimsdk/open-im-server/compare/v3.2.2-beta.3...v3.2.2-alpha.0 -[v3.2.2-beta.3]: https://github.com/openimsdk/open-im-server/compare/v3.2.2-beta.2...v3.2.2-beta.3 -[v3.2.2-beta.2]: https://github.com/openimsdk/open-im-server/compare/v3.2.2-beta.1...v3.2.2-beta.2 -[v3.2.2-beta.1]: https://github.com/openimsdk/open-im-server/compare/v3.2.0...v3.2.2-beta.1 +[Unreleased]: https://github.com/openimsdk/open-im-server/compare/v3.2.2-alpha.0...HEAD +[v3.2.2-alpha.0]: https://github.com/openimsdk/open-im-server/compare/v3.2.0...v3.2.2-alpha.0 [v3.2.0]: https://github.com/openimsdk/open-im-server/compare/v3.2.0-rc.0...v3.2.0 -[v3.2.0-rc.0]: https://github.com/openimsdk/open-im-server/compare/v3.2.2-beta.0...v3.2.0-rc.0 -[v3.2.2-beta.0]: https://github.com/openimsdk/open-im-server/compare/v3.2.0-alpha.0...v3.2.2-beta.0 +[v3.2.0-rc.0]: https://github.com/openimsdk/open-im-server/compare/v3.2.0-alpha.0...v3.2.0-rc.0 diff --git a/CHANGELOG/CHANGELOG-3.3.md b/CHANGELOG/CHANGELOG-3.3.md new file mode 100644 index 000000000..f7326691a --- /dev/null +++ b/CHANGELOG/CHANGELOG-3.3.md @@ -0,0 +1,40 @@ +# Version logging for OpenIM + + + + + + +## [Unreleased] + + + +## [v3.3.1] - 2023-09-13 + + +## [v3.3.1-beta.0] - 2023-09-11 + + +## [v3.3.0-rc.1] - 2023-09-11 + + +## [v3.3.0-rc.12] - 2023-09-11 + + +## [v3.3.0] - 2023-09-09 + + +## v3.3.0-rc.0 - 2023-09-07 +### Reverts +- update etcd to v3.5.2 ([#206](https://github.com/openimsdk/open-im-server/issues/206)) + +### Pull Requests +- Merge branch 'tuoyun' + + +[Unreleased]: https://github.com/openimsdk/open-im-server/compare/v3.3.1...HEAD +[v3.3.1]: https://github.com/openimsdk/open-im-server/compare/v3.3.1-beta.0...v3.3.1 +[v3.3.1-beta.0]: https://github.com/openimsdk/open-im-server/compare/v3.3.0-rc.1...v3.3.1-beta.0 +[v3.3.0-rc.1]: https://github.com/openimsdk/open-im-server/compare/v3.3.0-rc.12...v3.3.0-rc.1 +[v3.3.0-rc.12]: https://github.com/openimsdk/open-im-server/compare/v3.3.0...v3.3.0-rc.12 +[v3.3.0]: https://github.com/openimsdk/open-im-server/compare/v3.3.0-rc.0...v3.3.0 diff --git a/Makefile b/Makefile index ff7878108..1d01409a5 100644 --- a/Makefile +++ b/Makefile @@ -73,6 +73,11 @@ gen: demo: @$(MAKE) go.demo +## versionchecker: Check version of openim. ✨ +.PHONY: versionchecker +versionchecker: + @$(MAKE) go.versionchecker + ## build: Build binaries by default ✨ .PHONY: build build: diff --git a/README-zh_CN.md b/README-zh_CN.md index 37a4dd410..9234666f4 100644 --- a/README-zh_CN.md +++ b/README-zh_CN.md @@ -29,329 +29,106 @@

-## ✨ 关于 OpenIM +## Ⓜ️ 关于 OpenIM -Open-IM-Server 是使用纯 Golang 精心制作的强大的即时消息服务器。其通过 JSON over WebSocket 进行通信的独特方法将每次交互都视为消息。这简化了定制并消除了修改服务器代码的需求。通过利用微服务架构,服务器可以通过集群部署,保证出色的性能和可伸缩性。 +OpenIM 不仅仅是一个开源的即时消息组件,它是你的应用程序生态系统的一个不可或缺的部分。查看下面的图表,了解 AppServer、AppClient、OpenIMServer 和 OpenIMSDK 是如何交互的。 -Open-IM-Server 不仅仅是一个即时消息服务器;它是将实时网络集成到您的应用程序中的强大工具,定位为您集成的首选选择!🚀 +![App-OpenIM 关系](./docs/images/oepnim-design.png) -请注意,Open-IM-Server 不作为独立产品运行,也不提供内置的帐户注册或登录服务。为了简化您的实施过程,我们已开源了 [chat repository](https://github.com/OpenIMSDK/chat),其中包括这些功能。与 Open-IM-Server 一起部署此聊天业务服务器可加快全面的聊天产品的设置。👥 +## 🚀 关于 OpenIMSDK -为了进一步增强您的体验,我们还提供了 SDK 客户端,在其中实现了大多数复杂逻辑。可以在 [此链接](https://github.com/OpenIMSDK/openim-sdk-core) 找到 [SDK repository](https://github.com/OpenIMSDK/openim-sdk-core)。[chat repository](https://github.com/OpenIMSDK/chat) 是我们的业务服务器,而 'core' 代表 SDK 的高级封装,它们协同工作以提供卓越的结果。✨ +**OpenIMSDK** 无缝集成到您的应用中,提供丰富、实时的消息体验,无需复杂的 UI 集成。它提供: -## :star2: 为什么选择 OpenIM ++ **本地存储**:用于快速数据检索和消息同步。 ++ **监听器回调**:确保实时消息交互性。 ++ **API 封装**:简化开发流程。 ++ **连接管理**:保证可靠的消息传递。 -**🔍 功能截图显示** +它使用 Golang 构建,并支持跨平台部署,确保在所有平台上提供一致的消息体验。 -
+👉 **[探索 GO SDK](https://github.com/openimsdk/openim-sdk-core)** -| 💻🔄📱 多终端同步 🔄🖥️ | 📅⚡ 高效会议 🚀💼 | -| :----------------------------------------------------------: | :----------------------------------------------------------: | -| ![multiple-message](./assets/demo/multi-terminal-synchronization.png) | ![efficient-meetings](./assets/demo/efficient-meetings.png) | -| 📲🔄 **一对一和群聊** 👥🗣️ | 🎁💻 **特殊功能 - 自定义消息** ✉️🎨 | -| ![group-chat](./assets/demo/group-chat.png) | ![special-function](./assets/demo/special-function.png) | +## 🌐 关于 OpenIMServer -
+精心用 Golang 开发的 **OpenIMServer** 通过多重方式确保了卓越的即时消息服务器能力: -1. **全面的消息类型支持 :speech_balloon:** ++ **模块组成**:它由多个模块组成,例如网关和多个 RPC 服务,提供一个多功能的消息环境。 ++ **微服务架构**:支持集群模式,确保出色的性能和可伸缩性,以有效管理各个实例间的通信。 ++ **多样的部署选项**:适应你的操作偏好,通过源代码、Kubernetes 或 Docker 提供部署选项。 - ✅ 支持几乎所有类型的消息,包括文本、图片、表情符号、语音、视频、地理位置、文件、报价、名片、系统通知、自定义消息等 +### 增强的业务功能: - ✅ 支持一对一和多人音视频通话 ++ **REST API**:OpenIMServer 为业务系统提供 REST API,旨在通过后端接口为您的操作提供附加功能,如群组创建和消息推送。 ++ **回调**:为了扩展其在各种业务形式中的实用性,OpenIMServer 提供了回调能力。即,在事件发生之前或之后,它向业务服务器发送请求,比如发送消息,丰富通信过程中的交互和数据交换流。 - ✅ 为 iOS、Android、Flutter、uni-app、ReactNative、Electron、Web、H5 等多个平台提供终端支持 - -2. **随时随地的高效会议 :earth_americas:** - - ✅ 基于具有 100% 可靠强制信令功能的 IM (Instant Messaging),为与聊天应用程序深度集成的 IM 系统铺平了道路 - - ✅ 支持单次会议中的数百人,订阅人数达到数千,以及服务器端音视频录制 - -3. **适用于各种社交场景的一对一和群聊 :busts_in_silhouette:** - - ✅ OpenIM 有四种角色:应用程序管理员、群主、群管理员和普通成员 - - ✅ 强大的群特性,如静音、群公告、群验证、无限群成员和根据需要加载群消息 - -4. **独特的功能 :star2:** - - ✅ 支持读取并烧毁私人聊天,可自定义时长 - - ✅ 消息编辑功能扩大了社交场景,使即时通讯变得更加多样化和有趣 - -5. **开源 :open_hands:** - - ✅ OpenIM 的代码是开源的,数据自控,旨在构建一个全球领先的 IM 开源社区,包括客户端 SDK 和服务器 - - ✅ 基于开源服务器,已经开发了许多出色的开源项目,例如 [OpenKF](https://github.com/OpenIMSDK/OpenKF) (开源 AI 客户服务系统) - -6. **易于扩展 :wrench:** - - ✅ OpenIM 服务器是用 Golang 实现的,引入了创新的 "一切都是消息" 通信模型,简化了自定义消息和扩展功能的实现 - -7. **高性能 :racing_car:** - - ✅ OpenIM 支持集群中的分层治理架构,经过大量用户的测试,并抽象了在线消息、离线消息和历史消息的存储模型 - -8. **全平台支持 :tv:** - - ✅ 支持原生 iOS、Android;跨平台 Flutter、uni-app、ReactNative;主要的 Web 前端框架如 React、Vue;小程序和 Electron 支持的 PC 平台 - -9. **终极部署体验 🤖** - - ✅ 支持 [集群部署](https://github.com/openimsdk/open-im-server/edit/main/deployments/README.md) - - ✅ 支持多架构镜像,我们的 Docker 镜像不仅托管在 GitHub 上,而且还在阿里云和 Docker Hub 上支持多个架构。请访问 [我们的 GitHub packages](https://github.com/orgs/OpenIMSDK/packages?repo_name=Open-IM-Server) 并阅读我们的 [版本管理文档](https://github.com/openimsdk/open-im-server/blob/main/docs/conversions/version.md) 以获取更多信息。 - -10. **开源社区的大生态系统 🤲** - - ✅ 我们有数万用户和许多解决方案来解决问题。 - - ✅ 我们有一个大型的开源社区叫 [OpenIMSDK](https://github.com/OpenIMSDK),它运行核心模块,我们还有一个开源社区叫 [openim-sigs](https://github.com/openim-sigs) 以探索更多基于 IM 的基础设施产品。 +👉 **[了解更多](https://doc.rentsoft.cn/guides/introduction/product)** ## :rocket: 快速开始 -
使用 Docker Compose 部署 - -1. 克隆项目 - -``` -# 选择您需要的 -BRANCH=release-v3.1 -git clone -b $BRANCH https://github.com/openimsdk/open-im-server openim && export openim=$(pwd)/openim && cd $openim && make build -``` - -> **注意** 阅读我们的发布策略:https://github.com/openimsdk/open-im-server/blob/main/docs/conversions/version.md - -1. 修改 `.env` +你只需要一个简单的命令,就可以快速学习 OpenIM 的工程解决方案: ``` -USER=root #无需修改 -PASSWORD=openIM123 #8位或更多数字和字母的组合,此密码适用于redis、mysql、mongo,以及config/config.yaml中的accessSecret -ENDPOINT=http://127.0.0.1:10005 #minio的外部服务IP和端口,或使用域名storage.xx.xx,应用程序必须能够访问此IP和端口或域名, -API_URL=http://127.0.0.1:10002/object/ #应用程序必须能够访问此IP和端口或域名, -DATA_DIR=./ #指定大磁盘目录 -``` - -1. 部署并启动 - -> **注意** 此命令只能执行一次。它会基于 `.env` 中的 `PASSWORD` 变量修改 docker-compose 中的组件密码,并修改 `config/config.yaml` 中的组件密码。如果 `.env` 中的密码发生变化,您需要首先执行 `docker-compose down`;`rm components -rf` 然后执行此命令。 - -``` - -make install +bashCopy code +$ make demo ``` -1. 检查服务 - -``` - -make check -``` - -![https://github.com/openimsdk/open-im-server/blob/main/docs/images/docker_build.png](https://github.com/openimsdk/open-im-server/blob/main/docs/images/docker_build.png) - -
从源码编译 - -您需要 `Go 1.18` 或更高版本,以及 `make`。 - -版本详情:https://github.com/openimsdk/open-im-server/blob/main/docs/conversions/version.md - -``` -# 选择您需要的 -BRANCH=release-v3.1 -git clone -b $BRANCH https://github.com/openimsdk/open-im-server openim && export openim=$(pwd)/openim && cd $openim && make build -``` +🤲 为了方便用户体验,我们提供了多种部署解决方案,您可以根据下面的列表选择自己的部署方法: -阅读关于 [OpenIM 版本策略](https://github.com/openimsdk/open-im-server/blob/main/docs/conversions/version.md) ++ **[源代码部署指南](https://doc.rentsoft.cn/guides/gettingStarted/imSourceCodeDeployment)** ++ **[Docker 部署指南](https://doc.rentsoft.cn/guides/gettingStarted/dockerCompose)** ++ **[Kubernetes 部署指南](https://github.com/openimsdk/open-im-server/tree/main/deployments)** -使用 `make help` 来查看 OpenIM 支持的指令。 - -如图所示,所有服务已成功构建 - -![成功编译](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: - address: [ 127.0.0.1:13306 ] #地址 - username: root #用户名 - password: openIM123 #密码 - database: openIM_v2 #不建议修改 - maxOpenConn: 1000 #最大连接 - maxIdleConn: 100 #最大空闲连接 - maxLifeTime: 60 #连接可重用的最大时间(秒) - logLevel: 4 #日志级别 1=静音 2=错误 3=警告 4=信息 - slowThreshold: 500 #慢语句阈值(毫秒) - ``` - -- Mongo - - - 用于存储离线消息,支持 mongo 分片集群。 - - ``` - mongo: - uri: #如果不为空,则直接使用此值 - address: [ 127.0.0.1:37017 ] #地址 - database: openIM #默认 mongo 数据库 - username: root #用户名 - password: openIM123 #密码 - maxPoolSize: 100 #最大连接数 - ``` - -- Redis - - - 用于存储消息序列号、最新消息、用户令牌和 mysql 缓存,支持集群部署。 - - ``` - redis: - address: [ 127.0.0.1:16379 ] #地址 - username: #用户名 - password: openIM123 #密码 - ``` - -- 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 - ``` - -
启动和停止服务 - -启动服务 - -``` - -./scripts/start-all.sh; -``` - -检查服务 - -``` - -./scripts/check-all.sh -``` - -停止服务 - -``` - -./scripts/stop-all.sh -``` - -
- -
开放 IM 端口 - -| TCP 端口 | 描述 | 操作 | -| --------- | --------------------------------------------------- | --------------------------------------- | -| TCP:10001 | ws 协议,消息端口如消息发送、推送等,用于客户端 SDK | 端口释放或 nginx 反向代理,并关闭防火墙 | -| TCP:10002 | api 端口,如用户、朋友、组、消息接口。 | 端口释放或 nginx 反向代理,并关闭防火墙 | -| TCP:10005 | 选择 minio 存储时所需 (openIM 默认使用 minio 存储) | 端口释放或 nginx 反向代理,并关闭防火墙 | - -
开放聊天端口 - -- 聊天仓库: https://github.com/OpenIMSDK/chat - -| TCP 端口 | 描述 | 操作 | -| --------- | ------------------------ | --------------------------------------- | -| TCP:10008 | 业务系统,如注册、登录等 | 端口释放或 nginx 反向代理,并关闭防火墙 | -| TCP:10009 | 管理后台,如统计、封禁等 | 端口释放或 nginx 反向代理,并关闭防火墙 | - -
- -## :link: APP 和 OpenIM 之间的关系 - -OpenIM 不仅仅是一个开源的即时消息组件,它是您的应用程序生态系统的一个不可分割的部分。查看此图表以了解 AppServer、AppClient、Open-IM-Server 和 Open-IM-SDK 如何互动。 +## :hammer_and_wrench: 开始开发 OpenIM -![App-OpenIM 关系](https://github.com/openimsdk/open-im-server/blob/main/docs/images/open-im-server.png) +OpenIM 我们的目标是建立一个顶级的开源社区。我们有一套标准,在[社区仓库](https://github.com/OpenIMSDK/community)中。 -## :building_construction: 总体架构 +如果你想为这个 Open-IM-Server 仓库做贡献,请阅读我们的[贡献者文档](https://github.com/openimsdk/open-im-server/blob/main/CONTRIBUTING.md)。 -深入了解 Open-IM-Server 的功能与我们的架构图。 +在开始之前,请确保你的更改是有需求的。最好的方法是创建一个[新的讨论](https://github.com/openimsdk/open-im-server/discussions/new/choose) 或 [Slack 通信](https://join.slack.com/t/openimsdk/shared_invite/zt-22720d66b-o_FvKxMTGXtcnnnHiMqe9Q),或者如果你发现一个问题,首先[报告它](https://github.com/openimsdk/open-im-server/issues/new/choose)。 -![总体架构](https://github.com/openimsdk/open-im-server/blob/main/docs/images/Architecture.jpg) ++ [代码标准](https://github.com/openimsdk/open-im-server/blob/main/docs/conversions/go_code.md) -## :hammer_and_wrench: 开始开发 OpenIM ++ [Docker 镜像标准](https://github.com/openimsdk/open-im-server/blob/main/docs/conversions/images.md) -OpenIM 我们的目标是建立一个顶级的开源社区。我们有一套标准,在 [Community repository](https://github.com/OpenIMSDK/community) 中。 ++ [目录标准](https://github.com/openimsdk/open-im-server/blob/main/docs/conversions/directory.md) -如果您想为这个 Open-IM-Server 仓库做贡献,请阅读我们的 [贡献者文档](https://github.com/openimsdk/open-im-server/blob/main/CONTRIBUTING.md)。 ++ [提交标准](https://github.com/openimsdk/open-im-server/blob/main/docs/conversions/commit.md) -在您开始之前,请确保您的更改是需要的。最好的方法是创建一个 [新的讨论](https://github.com/openimsdk/open-im-server/discussions/new/choose) 或 [Slack 通讯](https://join.slack.com/t/openimsdk/shared_invite/zt-22720d66b-o_FvKxMTGXtcnnnHiMqe9Q),或者如果您发现一个问题,首先 [报告它](https://github.com/openimsdk/open-im-server/issues/new/choose)。 ++ [版本控制标准](https://github.com/openimsdk/open-im-server/blob/main/docs/conversions/version.md) -- [代码标准](https://github.com/openimsdk/open-im-server/blob/main/docs/conversions/go_code.md) -- [Docker 图像标准](https://github.com/openimsdk/open-im-server/blob/main/docs/conversions/images.md) -- [目录标准](https://github.com/openimsdk/open-im-server/blob/main/docs/conversions/directory.md) -- [提交标准](https://github.com/openimsdk/open-im-server/blob/main/docs/conversions/commit.md) -- [版本控制标准](https://github.com/openimsdk/open-im-server/blob/main/docs/conversions/version.md) -- [接口标准](https://github.com/openimsdk/open-im-server/blob/main/docs/conversions/api.md) -- [日志标准](https://github.com/openimsdk/open-im-server/blob/main/docs/conversions/) -- [错误代码标准](https://github.com/openimsdk/open-im-server/blob/main/docs/conversions/error_code.md) ++ [接口标准](https://github.com/openimsdk/open-im-server/blob/main/docs/conversions/interface.md) -## :busts_in_silhouette: 社区 +## :link: 链接 -- 📚 [OpenIM 社区](https://github.com/OpenIMSDK/community) -- 💕 [OpenIM 兴趣小组](https://github.com/Openim-sigs) -- 🚀 [加入我们的 Slack 社区](https://join.slack.com/t/openimsdk/shared_invite/zt-22720d66b-o_FvKxMTGXtcnnnHiMqe9Q) -- :eyes: [加入我们的微信群 (微信群)](https://openim-1253691595.cos.ap-nanjing.myqcloud.com/WechatIMG20.jpeg) + + **[完整文档](https://doc.rentsoft.cn/)** + + **[更新日志](https://github.com/openimsdk/open-im-server/blob/main/CHANGELOG.md)** + + **[FAQ](https://github.com/openimsdk/open-im-server/blob/main/FAQ.md)** + + **[代码示例](https://github.com/openimsdk/open-im-server/blob/main/examples)** -## :calendar: 社区会议 +## :handshake: 社区 -我们希望任何人都可以参与我们的社区并贡献代码,我们提供礼物和奖励,欢迎您每周四晚上加入我们。 + + **[GitHub Discussions](https://github.com/openimsdk/open-im-server/discussions)** + + **[Slack 通信](https://join.slack.com/t/openimsdk/shared_invite/zt-22720d66b-o_FvKxMTGXtcnnnHiMqe9Q)** + + **[GitHub Issues](https://github.com/openimsdk/open-im-server/issues)** -我们的会议在 [OpenIM Slack](https://join.slack.com/t/openimsdk/shared_invite/zt-22720d66b-o_FvKxMTGXtcnnnHiMqe9Q) 🎯,然后您可以搜索 Open-IM-Server 管道加入。 + 您可以加入这些平台,讨论问题,提出建议,或分享您的成功故事! -我们在 [GitHub 讨论](https://github.com/openimsdk/open-im-server/discussions/categories/meeting) 中记下每次 [双周会议](https://github.com/orgs/OpenIMSDK/discussions/categories/meeting) 的笔记,我们的历史会议记录以及会议回放都可在 [Google Docs :bookmark_tabs:](https://docs.google.com/document/d/1nx8MDpuG74NASx081JcCpxPgDITNTpIIos0DS6Vr9GU/edit?usp=sharing) 中找到。 +## :writing_hand: 贡献 -## :eyes: 谁在使用 OpenIM + 我们欢迎任何形式的贡献!请确保在提交 Pull Request 之前阅读我们的[贡献者文档](https://github.com/openimsdk/open-im-server/blob/main/CONTRIBUTING.md)。 -查看我们的 [用户案例研究](https://github.com/OpenIMSDK/community/blob/main/ADOPTERS.md) 页面以获取项目用户列表。不要犹豫,留下一个 [📝评论](https://github.com/openimsdk/open-im-server/issues/379) 并分享您的使用案例。 + + **[报告 Bug](https://github.com/openimsdk/open-im-server/issues/new?assignees=&labels=bug&template=bug_report.md&title=)** + + **[提出新特性](https://github.com/openimsdk/open-im-server/issues/new?assignees=&labels=enhancement&template=feature_request.md&title=)** + + **[提交 Pull Request](https://github.com/openimsdk/open-im-server/pulls)** -## :page_facing_up: 许可证 + 感谢您的贡献,我们一起打造一个强大的即时通信解决方案! -OpenIM 根据 Apache 2.0 许可证授权。请查看 [LICENSE](https://github.com/openimsdk/open-im-server/tree/main/LICENSE) 以获取完整的许可证文本。 +## :closed_book: 许可证 -OpenIM logo,包括其变体和动画版本,在此存储库 [OpenIM](https://github.com/openimsdk/open-im-server) 下的 [assets/logo](./assets/logo) 和 [assets/logo-gif](./assets/logo-gif) 目录中显示,受版权法保护。 + OpenIMSDK 在 Apache License 2.0 许可下可用。查看[LICENSE 文件](https://github.com/openimsdk/open-im-server/blob/main/LICENSE)了解更多信息。 -## 🔮 感谢我们的贡献者! +## 🔮 Thanks to our contributors! - \ No newline at end of file + + + diff --git a/README.md b/README.md index d1af632bf..d2482f59c 100644 --- a/README.md +++ b/README.md @@ -24,91 +24,79 @@

English 简体中文 • - Docs + Docs

-

-## ✨ About OpenIM - -Open-IM-Server, meticulously developed in pure Golang, is a powerful instant messaging server. Its distinct communication method, employing pb+websocket, views every interaction as a message, streamlining customization without altering server code. Built on a microservice architecture, it offers deployment through clusters for outstanding performance and scalability. - -Open-IM-Server is more than an instant messaging server; it's a powerful tool for incorporating real-time networking into your applications, positioning itself as your premier choice for integration! 🚀 - -Please be aware that Open-IM-Server does not function as a standalone product and does not offer built-in account registration or login services. To ease your implementation process, we've open-sourced the [chat repository](https://github.com/OpenIMSDK/chat), which comprises these features. Deploying this chat business server in conjunction with Open-IM-Server expedites the setup of a comprehensive chat product. 👥 - -Further enhancing your experience, we also provide an SDK client, wherein most complex logics are implemented. The [SDK repository](https://github.com/OpenIMSDK/openim-sdk-core) can be found at [this link](https://github.com/OpenIMSDK/openim-sdk-core). The [chat repository](https://github.com/OpenIMSDK/chat) is our business server while the 'core' represents the high-level encapsulation of the SDK, synergistically working together to deliver superior results. ✨ - -## :star2: Why OpenIM - -**🔍 Function screenshot display** - -
+## Ⓜ️ About OpenIM -| 💻🔄📱 Multi Terminal Synchronization 🔄🖥️ | 📅⚡ Efficient Meetings 🚀💼 | -| :----------------------------------------------------------: | :---------------------------------------------------------: | -| ![multiple-message](./assets/demo/multi-terminal-synchronization.png) | ![efficient-meetings](./assets/demo/efficient-meetings.png) | -| 📲🔄 **One-to-one and Group Chats** 👥🗣️ | 🎁💻 **Special Features - Custom Messages** ✉️🎨| -| ![group-chat](./assets/demo/group-chat.png) | ![special-function](./assets/demo/special-function.png) | - -
+OpenIM isn't just an open-source instant messaging component, it's an integral part of your application ecosystem. Check out this diagram to understand how AppServer, AppClient, OpenIMServer, and OpenIMSDK interact. -1. **Comprehensive Message Type Support :speech_balloon:** +![App-OpenIM Relationship](./docs/images/oepnim-design.png) - ✅ Supports almost all types of messages, including text, images, emojis, voice, video, geographical location, files, quotes, business cards, system notifications, custom messages and more +## 🚀 About OpenIMSDK - ✅ Supports one-on-one and multi-person audio and video calls +**OpenIMSDK** seamlessly integrates into your application, delivering a rich, real-time messaging experience without requiring intricate UI integration. It provides: - ✅ Provides terminal support for multiple platforms such as iOS, Android, Flutter, uni-app, ReactNative, Electron, Web, H5 ++ **Local Storage**: For quick data retrieval and message synchronization. ++ **Listener Callbacks**: Ensuring real-time message interactivity. ++ **API Encapsulation**: Streamlining development processes. ++ **Connection Management**: Guaranteeing reliable message delivery. -2. **Efficient Meetings Anytime, Anywhere :earth_americas:** +It's crafted in Golang and supports cross-platform deployment, ensuring a coherent messaging experience across all platforms. - ✅ Based on IM (Instant Messaging) with 100% reliable forced signaling capabilities, it paves the way for IM systems, deeply integrated with chat applications +👉 **[Explore GO SDK](https://github.com/openimsdk/openim-sdk-core)** - ✅ Supports hundreds of people in a single meeting, with subscription numbers reaching thousands, and server-side audio and video recording +## 🌐 About OpenIMServer -3. **One-on-one and Group Chats for Various Social Scenarios :busts_in_silhouette:** +**OpenIMServer**, meticulously developed in Golang, ensures a stellar instant messaging server capability with a multifold approach: - ✅ OpenIM has four roles: application administrator, group owner, group administrator, and regular member ++ **Modular Composition**: It's comprised of several modules, such as the gateway and multiple RPC services, offering a versatile messaging environment. ++ **Microservices Architecture**: Supporting cluster modes, it assures outstanding performance and scalability to manage communication effectively across various instances. ++ **Diverse Deployment Options**: Adapts to your operational preferences, offering deployment via source code, Kubernetes, or Docker. - ✅ Powerful group features such as muting, group announcements, group validation, unlimited group members, and loading group messages as needed +### Enhanced Business Functionalities: -4. **Unique Features :star2:** ++ **REST API**: OpenIMServer provides REST API for business systems, aiming to empower your operations with additional functionalities like group creation and message push via backend interfaces. ++ **Callbacks**: To expand its utility across varied business forms, OpenIMServer offers callback capabilities. That is, it sends a request to the business server before or after an event occurs, such as sending a message, enriching the interaction and data exchange flow in the communication processes. - ✅ Supports read-and-burn private chats, customizable duration +👉 **[Learn More](https://doc.rentsoft.cn/guides/introduction/product)** - ✅ Message editing function broadens social scenarios, making instant communication more diverse and interesting + - ✅ We have a large open source community called [OpenIMSDK](https://github.com/OpenIMSDK) that runs the core modules, we have an open source community called [openim-sigs](https://github.com/openim-sigs) to explore more IM-based infrastructure products. ## :rocket: Quick Start @@ -120,6 +108,7 @@ $ make demo 🤲 In order to facilitate the user experience, we have provided a variety of deployment solutions, you can choose your own deployment method according to the list below: + -
Open IM and Chat Ports - -+ oepnim-server warehouse: https://github.com/openimsdk/open-im-server - -| 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 | - - -+ chat warehouse: https://github.com/OpenIMSDK/chat - -| 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 | - -
- ++ **[Source Code Deployment Guide](https://doc.rentsoft.cn/guides/gettingStarted/imSourceCodeDeployment)** ++ **[Docker Deployment Guide](https://doc.rentsoft.cn/guides/gettingStarted/dockerCompose)** ++ **[Kubernetes Deployment Guide](https://github.com/openimsdk/open-im-server/tree/main/deployments)** -## :link: Relationship Between APP and OpenIM + ## :hammer_and_wrench: To start developing OpenIM diff --git a/build/README.md b/build/README.md index 8da6082d9..edd419ae5 100644 --- a/build/README.md +++ b/build/README.md @@ -49,17 +49,17 @@ While it is possible to build OpenIM using a local golang installation, we have ## Basic Flow -The scripts directly under [`build/`](.) are used to build and test. They will ensure that the `kube-build` Docker image is built (based on [`build/build-image/Dockerfile`](build-image/Dockerfile) and after base image's `KUBE_BUILD_IMAGE_CROSS_TAG` from Dockerfile is replaced with one of those actual tags of the base image, like `v1.13.9-2`) and then execute the appropriate command in that container. These scripts will both ensure that the right data is cached from run to run for incremental builds and will copy the results back out of the container. You can specify a different registry/name and version for `kube-cross` by setting `KUBE_CROSS_IMAGE` and `KUBE_CROSS_VERSION`, see [`common.sh`](common.sh) for more details. +The scripts directly under [`build/`](.) are used to build and test. They will ensure that the `openim-build` Docker image is built (based on [`build/build-image/Dockerfile`](../Dockerfile) and after base image's `OPENIM_BUILD_IMAGE_CROSS_TAG` from Dockerfile is replaced with one of those actual tags of the base image, like `v1.13.9-2`) and then execute the appropriate command in that container. These scripts will both ensure that the right data is cached from run to run for incremental builds and will copy the results back out of the container. You can specify a different registry/name and version for `openim-cross` by setting `OPENIM_CROSS_IMAGE` and `OPENIM_CROSS_VERSION`, see [`common.sh`](common.sh) for more details. -The `kube-build` container image is built by first creating a "context" directory in `_output/images/build-image`. It is done there instead of at the root of the OpenIM repo to minimize the amount of data we need to package up when building the image. +The `openim-build` container image is built by first creating a "context" directory in `_output/images/build-image`. It is done there instead of at the root of the OpenIM repo to minimize the amount of data we need to package up when building the image. There are 3 different containers instances that are run from this image. The first is a "data" container to store all data that needs to persist across to support incremental builds. Next there is an "rsync" container that is used to transfer data in and out to the data container. Lastly there is a "build" container that is used for actually doing build actions. The data container persists across runs while the rsync and build containers are deleted after each use. -`rsync` is used transparently behind the scenes to efficiently move data in and out of the container. This will use an ephemeral port picked by Docker. You can modify this by setting the `KUBE_RSYNC_PORT` env variable. +`rsync` is used transparently behind the scenes to efficiently move data in and out of the container. This will use an ephemeral port picked by Docker. You can modify this by setting the `OPENIM_RSYNC_PORT` env variable. All Docker names are suffixed with a hash derived from the file path (to allow concurrent usage on things like CI machines) and a version number. When the version number changes all state is cleared and clean build is started. This allows the build infrastructure to be changed and signal to CI systems that old artifacts need to be deleted. ## Build artifacts The build system output all its products to a top level directory in the source repository named `_output`. -These include the binary compiled packages (e.g. kubectl, kube-scheduler etc.) and archived Docker images. +These include the binary compiled packages (e.g. imctl, openim-api etc.) and archived Docker images. If you intend to run a component with a docker image you will need to import it from this directory with diff --git a/cmd/openim-api/main.go b/cmd/openim-api/main.go index 93f7252b7..3034d6645 100644 --- a/cmd/openim-api/main.go +++ b/cmd/openim-api/main.go @@ -62,11 +62,11 @@ func run(port int) error { if err != nil { return err } - if err := client.CreateRpcRootNodes(config.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.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") @@ -83,7 +83,9 @@ func run(port int) error { err = router.Run(address) if err != nil { log.ZError(context.Background(), "api run failed ", err, "address", address) + return err } + return nil } diff --git a/config/config.yaml b/config/config.yaml index 478722022..7d950efd9 100644 --- a/config/config.yaml +++ b/config/config.yaml @@ -135,7 +135,7 @@ api: # minio.signEndpoint is minio public network address object: enable: "minio" - apiURL: "http://http://127.0.0.1:10002" + apiURL: "http://127.0.0.1:10002" minio: bucket: "openim" endpoint: "http://172.28.0.1:10005" @@ -143,11 +143,13 @@ object: secretAccessKey: "openIM123" sessionToken: '' signEndpoint: "http://127.0.0.1:10005" + publicRead: false cos: bucketURL: https://temp-1252357374.cos.ap-chengdu.myqcloud.com secretID: '' secretKey: '' sessionToken: '' + publicRead: false oss: endpoint: "https://oss-cn-chengdu.aliyuncs.com" bucket: "demo-9999999" @@ -155,7 +157,7 @@ object: accessKeyID: '' accessKeySecret: '' sessionToken: '' - + publicRead: false ###################### RPC Port Configuration ###################### # RPC service ports @@ -197,7 +199,7 @@ rpcRegisterName: # Whether to output in json format # Whether to include stack trace in logs log: - storageLocation: /root/workspaces/openim/openim-server/logs/ + storageLocation: ../../logs/ rotationTime: 24 remainRotationCount: 2 remainLogLevel: 6 @@ -230,18 +232,18 @@ push: enable: getui geTui: pushUrl: "https://restapi.getui.com/v2/$appId" - masterSecret: "" - appKey: "" - intent: "" - channelID: "" - channelName: "" + masterSecret: '' + appKey: '' + intent: '' + channelID: '' + channelName: '' fcm: serviceAccount: "x.json" jpns: - appKey: - masterSecret: - pushUrl: - pushIntent: + appKey: '' + masterSecret: '' + pushUrl: '' + pushIntent: '' # App manager configuration # @@ -355,6 +357,10 @@ callback: enable: false timeout: 5 failedContinue: true + beforeUpdateUserInfo: + enable: false + timeout: 5 + failedContinue: true beforeCreateGroup: enable: false timeout: 5 diff --git a/deployments/README.md b/deployments/README.md index 1dfb87217..7065d45fa 100644 --- a/deployments/README.md +++ b/deployments/README.md @@ -73,7 +73,7 @@ $ SEALOS_VERSION=`curl -s https://api.github.com/repos/labring/sealos/releases/l ```bash $ export CLUSTER_USERNAME=ubuntu $ export CLUSTER_PASSWORD=123456 -$ sealos run labring/kubernetes:v1.25.0 labring/helm:v3.8.2 labring/calico:v3.24.1 \ +$ sudo sealos run labring/kubernetes:v1.25.0 labring/helm:v3.8.2 labring/calico:v3.24.1 \ --masters 10.0.0.9 \ --nodes 10.0.0.4,10.0.0.10 \ -u "$CLUSTER_USERNAME" \ diff --git a/deployments/openim-chat/LICENSE b/deployments/openim-chat/LICENSE new file mode 100644 index 000000000..261eeb9e9 --- /dev/null +++ b/deployments/openim-chat/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + 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. diff --git a/deployments/openim-server/Chart.yaml b/deployments/openim-server/Chart.yaml index d9d07eccb..22a95940a 100644 --- a/deployments/openim-server/Chart.yaml +++ b/deployments/openim-server/Chart.yaml @@ -35,4 +35,40 @@ version: 0.1.0 # incremented each time you make changes to the application. Versions are not expected to # follow Semantic Versioning. They should reflect the version the application is using. # It is recommended to use it with quotes. -appVersion: "1.16.0" +appVersion: "default" + +icon: https://raw.githubusercontent.com/openimsdk/open-im-server/main/assets/openim-logo-gradient.svg + +maintainers: + - name: "OpenIM" + url: "https://github.com/openimsdk" + +keywords: + - openim + - im + - chat + +sources: + - "https://github.com/openimsdk/open-im-server" + - "https://github.com/openimsdk/openim-sdk-core" + - "https://github.com/openimsdk/openim-docker" + +dependencies: + - name: mysql + version: 8.0.25 + repository: https://charts.bitnami.com/bitnami + - name: redis + version: 14.6.1 + repository: https://charts.bitnami.com/bitnami + - name: mongodb + version: 10.1.0 + repository: https://charts.bitnami.com/bitnami + - name: kafka + version: 14.1.0 + repository: https://charts.bitnami.com/bitnami + - name: minio + version: 8.1.2 + repository: https://charts.bitnami.com/bitnami + - name: zookeeper + version: 5.17.0 + repository: https://charts.bitnami.com/bitnami \ No newline at end of file diff --git a/deployments/openim-server/LICENSE b/deployments/openim-server/LICENSE new file mode 100644 index 000000000..261eeb9e9 --- /dev/null +++ b/deployments/openim-server/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + 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. diff --git a/deployments/openim-server/README.md b/deployments/openim-server/README.md new file mode 100644 index 000000000..dd6eb759a --- /dev/null +++ b/deployments/openim-server/README.md @@ -0,0 +1,15 @@ +# OpenIM Server Chat + +## 目录结构 + +```bash +openim-server/ + Chart.yaml # 包含了chart信息的YAML文件 + LICENSE # 包含OpenIM Chart许可证的纯文本文件 + README.md # OpenIM 可读的README文件 + values.yaml # chart 默认的配置值 + charts/ # 包含chart依赖的其他chart + crds/ # 自定义资源的定义 + templates/ # 模板目录, 当和values 结合时,可生成有效的Kubernetes manifest文件 + templates/NOTES.txt # 包含简要使用说明的纯文本文件 +``` \ No newline at end of file diff --git a/deployments/templates/env_template.yaml b/deployments/templates/env_template.yaml index c6a2d7465..afa67404e 100644 --- a/deployments/templates/env_template.yaml +++ b/deployments/templates/env_template.yaml @@ -36,6 +36,13 @@ API_URL=${API_URL} # Default: DATA_DIR=./ DATA_DIR=${DATA_DIR} +# Choose the appropriate image address, the default is GITHUB image, +# you can choose docker hub, for Chinese users can choose Ali Cloud +# export IMAGE_REGISTRY="ghcr.io/openimsdk" +# export IMAGE_REGISTRY="openim" +# export IMAGE_REGISTRY="registry.cn-hangzhou.aliyuncs.com/openimsdk" +IMAGE_REGISTRY=${IMAGE_REGISTRY} + # ====================================== # ========= Network Configuration ====== # ====================================== @@ -227,7 +234,6 @@ OPENIM_WEB_PORT=${OPENIM_WEB_PORT} # Default: OPENIM_WEB_ADDRESS=172.28.0.1 OPENIM_WEB_ADDRESS=${OPENIM_WEB_NETWORK_ADDRESS} - # ====================================== # ========= OpenIM Server ============== # ====================================== diff --git a/deployments/templates/openim.yaml b/deployments/templates/openim.yaml index 9465ea872..b029826a9 100644 --- a/deployments/templates/openim.yaml +++ b/deployments/templates/openim.yaml @@ -140,11 +140,13 @@ object: secretAccessKey: "${MINIO_SECRET_KEY}" sessionToken: ${MINIO_SESSION_TOKEN} signEndpoint: "${MINIO_SIGN_ENDPOINT}" + publicRead: ${MINIO_PUBLIC_READ} cos: bucketURL: ${COS_BUCKET_URL} secretID: ${COS_SECRET_ID} secretKey: ${COS_SECRET_KEY} sessionToken: ${COS_SESSION_TOKEN} + publicRead: ${COS_PUBLIC_READ} oss: endpoint: "${OSS_ENDPOINT}" bucket: "${OSS_BUCKET}" @@ -152,7 +154,7 @@ object: accessKeyID: ${OSS_ACCESS_KEY_ID} accessKeySecret: ${OSS_ACCESS_KEY_SECRET} sessionToken: ${OSS_SESSION_TOKEN} - + publicRead: ${OSS_PUBLIC_READ} ###################### RPC Port Configuration ###################### # RPC service ports @@ -226,18 +228,18 @@ push: enable: ${PUSH_ENABLE} geTui: pushUrl: "${GETUI_PUSH_URL}" - masterSecret: "" - appKey: "" - intent: "" - channelID: "" - channelName: "" + masterSecret: ${GETUI_MASTER_SECRET} + appKey: ${GETUI_APP_KEY} + intent: ${GETUI_INTENT} + channelID: ${GETUI_CHANNEL_ID} + channelName: ${GETUI_CHANNEL_NAME} fcm: serviceAccount: "${FCM_SERVICE_ACCOUNT}" jpns: - appKey: - masterSecret: - pushUrl: - pushIntent: + appKey: ${JPNS_APP_KEY} + masterSecret: ${JPNS_MASTER_SECRET} + pushUrl: ${JPNS_PUSH_URL} + pushIntent: ${JPNS_PUSH_INTENT} # App manager configuration # @@ -351,6 +353,10 @@ callback: enable: false timeout: 5 failedContinue: true + beforeUpdateUserInfo: + enable: false + timeout: 5 + failedContinue: true beforeCreateGroup: enable: false timeout: 5 diff --git a/docker-compose.yml b/docker-compose.yml index 543d5558f..4f8983660 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -127,9 +127,10 @@ services: ipv4_address: ${MINIO_NETWORK_ADDRESS} openim-web: - image: ghcr.io/openimsdk/openim-web:latest + # image: ghcr.io/openimsdk/openim-web:latest # image: registry.cn-hangzhou.aliyuncs.com/openimsdk/openim-web:latest # image: openim/openim-web:latest + image: ${IMAGE_REGISTRY}/openim-web:latest container_name: openim-web environment: - OPENIM_WEB_DIST_PATH=${OPENIM_WEB_DIST_PATH} @@ -142,9 +143,10 @@ services: ipv4_address: ${OPENIM_WEB_NETWORK_ADDRESS} # openim-server: -# image: ghcr.io/openimsdk/openim-server:main +# # image: ghcr.io/openimsdk/openim-server:main # # image: registry.cn-hangzhou.aliyuncs.com/openimsdk/openim-server:main # # image: openim/openim-server:main +# image: ${IMAGE_REGISTRY}/openim-server:main # # build: . # container_name: openim-server # ports: @@ -203,4 +205,4 @@ services: # - prometheus # networks: # openim-server: -# ipv4_address: ${GRAFANA_NETWORK_ADDRESS} \ No newline at end of file +# ipv4_address: ${GRAFANA_NETWORK_ADDRESS} diff --git a/docs/contrib/environment.md b/docs/contrib/environment.md index d539b961b..34959047a 100644 --- a/docs/contrib/environment.md +++ b/docs/contrib/environment.md @@ -1,215 +1,504 @@ # OpenIM enviroment - -## How to change the configuration - - -**Modify the configuration files:** - -Three ways to modify the configuration: - -#### **1. Recommended using environment variables:** + + +* 1. [OpenIM Deployment Guide](#OpenIMDeploymentGuide) + * 1.1. [Deployment Strategies](#DeploymentStrategies) + * 1.2. [Source Code Deployment](#SourceCodeDeployment) + * 1.3. [Docker Compose Deployment](#DockerComposeDeployment) + * 1.4. [Environment Variable Configuration](#EnvironmentVariableConfiguration) + * 1.4.1. [[1. Recommended using environment variables:](https://github.com/openimsdk/open-im-server/blob/main/docs/contrib/environment.md#1-recommended-using-environment-variables)](#1.Recommendedusingenvironmentvariables:https:github.comopenimsdkopen-im-serverblobmaindocscontribenvironment.md1-recommended-using-environment-variables) + * 1.4.2. [[Additional Configuration](https://github.com/openimsdk/open-im-server/blob/main/docs/contrib/environment.md#additional-configuration)](#AdditionalConfigurationhttps:github.comopenimsdkopen-im-serverblobmaindocscontribenvironment.mdadditional-configuration) + * 1.4.3. [[Security Considerations](https://github.com/openimsdk/open-im-server/blob/main/docs/contrib/environment.md#security-considerations)](#SecurityConsiderationshttps:github.comopenimsdkopen-im-serverblobmaindocscontribenvironment.mdsecurity-considerations) + * 1.4.4. [[Data Management](https://github.com/openimsdk/open-im-server/blob/main/docs/contrib/environment.md#data-management)](#DataManagementhttps:github.comopenimsdkopen-im-serverblobmaindocscontribenvironment.mddata-management) + * 1.4.5. [[Monitoring and Logging](https://github.com/openimsdk/open-im-server/blob/main/docs/contrib/environment.md#monitoring-and-logging)](#MonitoringandLogginghttps:github.comopenimsdkopen-im-serverblobmaindocscontribenvironment.mdmonitoring-and-logging) + * 1.4.6. [[Troubleshooting](https://github.com/openimsdk/open-im-server/blob/main/docs/contrib/environment.md#troubleshooting)](#Troubleshootinghttps:github.comopenimsdkopen-im-serverblobmaindocscontribenvironment.mdtroubleshooting) + * 1.4.7. [[Conclusion](https://github.com/openimsdk/open-im-server/blob/main/docs/contrib/environment.md#conclusion)](#Conclusionhttps:github.comopenimsdkopen-im-serverblobmaindocscontribenvironment.mdconclusion) + * 1.4.8. [[Additional Resources](https://github.com/openimsdk/open-im-server/blob/main/docs/contrib/environment.md#additional-resources)](#AdditionalResourceshttps:github.comopenimsdkopen-im-serverblobmaindocscontribenvironment.mdadditional-resources) +* 2. [Further Configuration](#FurtherConfiguration) + * 2.1. [Image Registry Configuration](#ImageRegistryConfiguration) + * 2.2. [OpenIM Docker Network Configuration](#OpenIMDockerNetworkConfiguration) + * 2.3. [OpenIM Configuration](#OpenIMConfiguration) + * 2.4. [OpenIM Chat Configuration](#OpenIMChatConfiguration) + * 2.5. [Zookeeper Configuration](#ZookeeperConfiguration) + * 2.6. [MySQL Configuration](#MySQLConfiguration) + * 2.7. [MongoDB Configuration](#MongoDBConfiguration) + * 2.8. [Tencent Cloud COS Configuration](#TencentCloudCOSConfiguration) + * 2.9. [Alibaba Cloud OSS Configuration](#AlibabaCloudOSSConfiguration) + * 2.10. [Redis Configuration](#RedisConfiguration) + * 2.11. [Kafka Configuration](#KafkaConfiguration) + * 2.12. [OpenIM Web Configuration](#OpenIMWebConfiguration) + * 2.13. [RPC Configuration](#RPCConfiguration) + * 2.14. [Prometheus Configuration](#PrometheusConfiguration) + * 2.15. [Grafana Configuration](#GrafanaConfiguration) + * 2.16. [RPC Port Configuration Variables](#RPCPortConfigurationVariables) + * 2.17. [RPC Register Name Configuration](#RPCRegisterNameConfiguration) + * 2.18. [Log Configuration](#LogConfiguration) + * 2.19. [Additional Configuration Variables](#AdditionalConfigurationVariables) + * 2.20. [Prometheus Configuration](#PrometheusConfiguration-1) + * 2.20.1. [General Configuration](#GeneralConfiguration) + * 2.20.2. [Service-Specific Prometheus Ports](#Service-SpecificPrometheusPorts) + + + + + +## 1. OpenIM Deployment Guide + +Welcome to the OpenIM Deployment Guide! OpenIM offers a versatile and robust instant messaging server, and deploying it can be achieved through various methods. This guide will walk you through the primary deployment strategies, ensuring you can set up OpenIM in a way that best suits your needs. + +### 1.1. Deployment Strategies + +OpenIM provides multiple deployment methods, each tailored to different use cases and technical preferences: + +1. **[Source Code Deployment Guide](https://doc.rentsoft.cn/guides/gettingStarted/imSourceCodeDeployment)** +2. **[Docker Deployment Guide](https://doc.rentsoft.cn/guides/gettingStarted/dockerCompose)** +3. **[Kubernetes Deployment Guide](https://github.com/openimsdk/open-im-server/tree/main/deployments)** + +While the first two methods will be our main focus, it's worth noting that the third method, Kubernetes deployment, is also viable and can be rendered via the `environment.sh` script variables. + +### 1.2. Source Code Deployment + +In the source code deployment method, the configuration generation process involves executing `make init`, which fundamentally runs the script `./scripts/init-config.sh`. This script utilizes variables defined in the [`environment.sh`](https://github.com/openimsdk/open-im-server/blob/main/scripts/install/environment.sh) script to render the [`openim.yaml`](https://github.com/openimsdk/open-im-server/blob/main/deployments/templates/openim.yaml) template file, subsequently generating the [`config.yaml`](https://github.com/openimsdk/open-im-server/blob/main/config/config.yaml) configuration file. + +### 1.3. Docker Compose Deployment + +Docker deployment offers a slightly more intricate template. Within the [openim-server](https://github.com/openimsdk/openim-docker/tree/main/openim-server) directory, multiple subdirectories correspond to various versions, each aligning with `openim-chat` as illustrated below: + +| openim-server | openim-chat | +| ------------------------------------------------------------ | ------------------------------------------------------------ | +| [main](https://github.com/openimsdk/openim-docker/tree/main/openim-server/main) | [main](https://github.com/openimsdk/openim-docker/tree/main/openim-chat/main) | +| [release-v3.2](https://github.com/openimsdk/openim-docker/tree/main/openim-server/release-v3.3) | [release-v3.2](https://github.com/openimsdk/openim-docker/tree/main/openim-chat/release-v1.3) | +| [release-v3.2](https://github.com/openimsdk/openim-docker/tree/main/openim-server/release-v3.2) | [release-v3.2](https://github.com/openimsdk/openim-docker/tree/main/openim-chat/release-v1.2) | + +Configuration file modifications can be made by specifying corresponding environment variables, for instance: ```bash -export PASSWORD="openIM123" # Set password -export USER="root" # Set username -# Choose chat version and server version https://github.com/openimsdk/open-im-server/blob/main/docs/conversions/images.md, eg: main, release-v*.* -export CHAT_BRANCH="main" -export SERVER_BRANCH="main" -#... Other environment variables -# MONGO_USERNAME: This sets the MongoDB username -# MONGO_PASSWORD: Set the MongoDB password -# MONGO_DATABASE: Sets the MongoDB database name -# MINIO_ENDPOINT: set the MinIO service address -# API_URL: under network environment, set OpenIM Server API address -export API_URL="http://127.0.0.1:10002" +export CHAT_BRANCH="main" +export SERVER_BRANCH="main" ``` -Next, update the configuration using `make init`: +These variables are stored within the [`environment.sh`](https://github.com/OpenIMSDK/openim-docker/blob/main/scripts/install/environment.sh) configuration: ```bash -make init +readonly CHAT_BRANCH=${CHAT_BRANCH:-'main'} +readonly SERVER_BRANCH=${SERVER_BRANCH:-'main'} ``` -#### **2. Modify the automation script:** +Setting a variable, e.g., `export CHAT_BRANCH="release-v1.3"`, will prioritize `CHAT_BRANCH="release-v1.3"` as the variable value. Ultimately, the chosen image version is determined, and rendering is achieved through `make init` (or `./scripts/init-config.sh`). -```bash -scripts/install/environment.sh -``` +> Note: Direct modifications to the `config.yaml` file are also permissible without utilizing `make init`. -Next, update the configuration using `make init`: +### 1.4. Environment Variable Configuration -```bash -make init -``` +For convenience, configuration through modifying environment variables is recommended: -#### 3. Modify `config.yaml` and `.env` files (but will be overwritten when using `make init` again). +#### 1.4.1. [1. Recommended using environment variables:](https://github.com/openimsdk/open-im-server/blob/main/docs/contrib/environment.md#1-recommended-using-environment-variables) -The `config/config.yaml` file has detailed configuration instructions for the storage components. ++ PASSWORD + + **Description**: Password for mysql, mongodb, redis, and minio. + + **Default**: `openIM123` + + Notes: + + Minimum password length: 8 characters. + + Special characters are not allowed. -The config file is available via [environment.sh](https://github.com/openimsdk/open-im-server/blob/main/scripts/install/environment.sh) configuration [openim.yaml](https://github.com/openimsdk/open-im-server/blob/main/deployments/templates/openim.yaml) template, and then through the `make init` to automatically generate a new configuration. + ```bash + export PASSWORD="openIM123" + ``` ++ USER -## Environment variable + + **Description**: Username for mysql, mongodb, redis, and minio. + + **Default**: `root` -By setting the environment variable below, You can then refresh the configuration using `make init` or `./scripts/init-config.sh` + ```bash + export USER="root" + ``` -##### MINIO ++ API_URL -+ [MINIO DOCS](https://min.io/docs/minio/kubernetes/upstream/index.html) + + **Description**: API address. + + **Note**: If the server has an external IP, it will be automatically obtained. For internal networks, set this variable to the IP serving internally. -apiURL is the address of the api, the access address of the app, use s3 must be configured + ``` + export API_URL="http://ip:10002" + ``` -#### Overview ++ DATA_DIR -MinIO is an object storage server that is API compatible with Amazon S3. It's best suited for storing unstructured data such as photos, videos, log files, backups, and container/VM images. In this guide, we'll walk through the process of configuring MinIO with custom settings. + + **Description**: Data mount directory for components. + + **Default**: `/data/openim` -#### Default Configuration + ```bash + export DATA_DIR="/data/openim" + ``` -Configuration can be achieved by modifying the default variables in the `./scripts/install/environment.sh` file. However, for more flexibility and dynamic adjustments, setting environment variables is recommended. +#### 1.4.2. [Additional Configuration](https://github.com/openimsdk/open-im-server/blob/main/docs/contrib/environment.md#additional-configuration) -#### Setting Up the Environment Variables +##### [MinIO Access and Secret Key](https://github.com/openimsdk/open-im-server/blob/main/docs/contrib/environment.md#minio-access-and-secret-key) -##### IP Configuration +To secure your MinIO server, you should set up an access key and secret key. These credentials are used to authenticate requests to your MinIO server. -By default, the system generates the public IP of the machine. To manually set a public or local IP address, use: +```bash +export MINIO_ACCESS_KEY="YourAccessKey" +export MINIO_SECRET_KEY="YourSecretKey" +``` + +##### [MinIO Browser](https://github.com/openimsdk/open-im-server/blob/main/docs/contrib/environment.md#minio-browser) + +MinIO comes with an embedded web-based object browser. You can control the availability of the MinIO browser by setting the `MINIO_BROWSER` environment variable. ```bash -export IP=127.0.0.1 +export MINIO_BROWSER="on" ``` -##### API URL +#### 1.4.3. [Security Considerations](https://github.com/openimsdk/open-im-server/blob/main/docs/contrib/environment.md#security-considerations) -This is the address your application uses to communicate with MinIO. By default, it uses the public IP. However, you can adjust it to a public domain or another IP. +##### [TLS/SSL Configuration](https://github.com/openimsdk/open-im-server/blob/main/docs/contrib/environment.md#tls-ssl-configuration) + +For secure communication, it's recommended to enable TLS/SSL for your MinIO server. You can do this by providing the path to the SSL certificate and key files. ```bash -export API_URL=127.0.0.1:10002 +export MINIO_CERTS_DIR="/path/to/certs/directory" ``` -##### MinIO Endpoint Configuration +#### 1.4.4. [Data Management](https://github.com/openimsdk/open-im-server/blob/main/docs/contrib/environment.md#data-management) + +##### [Data Retention Policy](https://github.com/openimsdk/open-im-server/blob/main/docs/contrib/environment.md#data-retention-policy) -This is the primary address MinIO uses for communications: +You may want to set up a data retention policy to automatically delete objects after a specified period. ```bash -export MINIO_ENDPOINT="127.0.0.1" +export MINIO_RETENTION_DAYS="30" ``` -##### MinIO Sign Endpoint +#### 1.4.5. [Monitoring and Logging](https://github.com/openimsdk/open-im-server/blob/main/docs/contrib/environment.md#monitoring-and-logging) -For direct external access to stored content: +##### [Audit Logging](https://github.com/openimsdk/open-im-server/blob/main/docs/contrib/environment.md#audit-logging) + +Enable audit logging to keep track of access and changes to your data. ```bash -export MINIO_SIGN_ENDPOINT=127.0.0.1:10005 +export MINIO_AUDIT="on" ``` -##### Modifying MinIO's Port +#### 1.4.6. [Troubleshooting](https://github.com/openimsdk/open-im-server/blob/main/docs/contrib/environment.md#troubleshooting) + +##### [Debug Mode](https://github.com/openimsdk/open-im-server/blob/main/docs/contrib/environment.md#debug-mode) -If you need to adjust MinIO's port from the default: +In case of issues, you may enable debug mode to get more detailed logs to assist in troubleshooting. ```bash -export MINIO_PORT="10005" +export MINIO_DEBUG="on" ``` -#### Applying the Configuration +#### 1.4.7. [Conclusion](https://github.com/openimsdk/open-im-server/blob/main/docs/contrib/environment.md#conclusion) -After setting your desired environment variables, restart the MinIO server to apply the changes. +With the environment variables configured as per your requirements, your MinIO server should be ready to securely store and manage your object data. Ensure to verify the setup and monitor the logs for any unusual activities or errors. Regularly update the MinIO server and review your configuration to adapt to any changes or improvements in the MinIO system. -#### Verification +#### 1.4.8. [Additional Resources](https://github.com/openimsdk/open-im-server/blob/main/docs/contrib/environment.md#additional-resources) -It's crucial to verify the configurations by checking the connectivity between your application and MinIO using the set API URL and ensuring that the data can be directly accessed using the `signEndpoint`. ++ [MinIO Client Quickstart Guide](https://docs.min.io/docs/minio-client-quickstart-guide) ++ [MinIO Admin Complete Guide](https://docs.min.io/docs/minio-admin-complete-guide) ++ [MinIO Docker Quickstart Guide](https://docs.min.io/docs/minio-docker-quickstart-guide) +Feel free to explore the MinIO documentation for more advanced configurations and usage scenarios. -## Configuration Details -###### Zookeeper -- **Purpose**: Used for RPC service discovery and registration, cluster support. - - ```bash - zookeeper: - schema: openim # Not recommended to modify - address: [ 127.0.0.1:2181 ] # Address - username: # Username - password: # Password - ``` +## 2. Further Configuration -###### MySQL +### 2.1. Image Registry Configuration -- **Purpose**: Used for storing users, relationships, and groups. Supports master-slave database. +**Description**: The image registry configuration allows users to select an image address for use. The default is set to use GITHUB images, but users can opt for Docker Hub or Ali Cloud, especially beneficial for Chinese users due to its local proximity. - ```bash - 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 # Max time a connection can be reused (seconds) - logLevel: 4 # Log level (1=silent, 2=error, 3=warn, 4=info) - slowThreshold: 500 # Slow statement threshold (milliseconds) - ``` +| Parameter | Default Value | Description | +| ---------------- | --------------------- | ------------------------------------------------------------ | +| `IMAGE_REGISTRY` | `"ghcr.io/openimsdk"` | The registry from which Docker images will be pulled. Other options include `"openim"` and `"registry.cn-hangzhou.aliyuncs.com/openimsdk"`. | -###### Mongo +### 2.2. OpenIM Docker Network Configuration -- **Purpose**: Used for storing offline messages. Supports mongo sharded clusters. +**Description**: This section configures the Docker network subnet and generates IP addresses for various services within the defined subnet. - ```bash - 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 - ``` +| Parameter | Example Value | Description | +| --------------------------- | ----------------- | ------------------------------------------------------------ | +| `DOCKER_BRIDGE_SUBNET` | `'172.28.0.0/16'` | The subnet for the Docker network. | +| `DOCKER_BRIDGE_GATEWAY` | Generated IP | The gateway IP address within the Docker subnet. | +| `[SERVICE]_NETWORK_ADDRESS` | Generated IP | The network IP address for a specific service (e.g., MYSQL, MONGO, REDIS, etc.) within the Docker subnet. | -###### Redis +### 2.3. OpenIM Configuration -- **Purpose**: Used for storing message sequence numbers, latest messages, user tokens, and MySQL cache. Supports cluster deployment. +**Description**: OpenIM configuration involves setting up directories for data, installation, configuration, and logs. It also involves configuring the OpenIM server address and ports for WebSocket and API. - ```bash - redis: - address: [ 127.0.0.1:16379 ] # Address - username: # Username - password: openIM123 # Password - ``` +| Parameter | Default Value | Description | +| ----------------------- | ------------------------ | ----------------------------------------- | +| `OPENIM_DATA_DIR` | `"/data/openim"` | Directory for OpenIM data. | +| `OPENIM_INSTALL_DIR` | `"/opt/openim"` | Directory where OpenIM is installed. | +| `OPENIM_CONFIG_DIR` | `"/etc/openim"` | Directory for OpenIM configuration files. | +| `OPENIM_LOG_DIR` | `"/var/log/openim"` | Directory for OpenIM logs. | +| `OPENIM_SERVER_ADDRESS` | Docker Bridge Gateway IP | OpenIM server address. | +| `OPENIM_WS_PORT` | `'10001'` | Port for OpenIM WebSocket. | +| `API_OPENIM_PORT` | `'10002'` | Port for OpenIM API. | -###### Kafka +### 2.4. OpenIM Chat Configuration -- **Purpose**: Used for message queues for decoupling. Supports cluster deployment. +**Description**: Configuration for OpenIM chat, including data directory, server address, and ports for API and chat functionalities. - ```bash - kafka: - username: # Username - password: # Password - addr: [ 127.0.0.1:9092 ] # Address - topics: - latestMsgToRedis: "latestMsgToRedis" - offlineMsgToMongo: "offlineMsgToMongoMysql" - msgToPush: "msgToPush" - msgToModify: "msgToModify" - consumerGroupID: - msgToRedis: redis - msgToMongo: mongo - msgToMySql: mysql - msgToPush: push - msgToModify: modify - ``` +| Parameter | Example Value | Description | +| ----------------------- | -------------------------- | ------------------------------- | +| `OPENIM_CHAT_DATA_DIR` | `"./openim-chat/[BRANCH]"` | Directory for OpenIM chat data. | +| `OPENIM_CHAT_ADDRESS` | Docker Bridge Gateway IP | OpenIM chat service address. | +| `OPENIM_CHAT_API_PORT` | `"10008"` | Port for OpenIM chat API. | +| `OPENIM_ADMIN_API_PORT` | `"10009"` | Port for OpenIM Admin API. | +| `OPENIM_ADMIN_PORT` | `"30200"` | Port for OpenIM chat Admin. | +| `OPENIM_CHAT_PORT` | `"30300"` | Port for OpenIM chat. | +### 2.5. Zookeeper Configuration +**Description**: Configuration for Zookeeper, including schema, port, address, and credentials. +| Parameter | Example Value | Description | +| -------------------- | ------------------------ | ----------------------- | +| `ZOOKEEPER_SCHEMA` | `"openim"` | Schema for Zookeeper. | +| `ZOOKEEPER_PORT` | `"12181"` | Port for Zookeeper. | +| `ZOOKEEPER_ADDRESS` | Docker Bridge Gateway IP | Address for Zookeeper. | +| `ZOOKEEPER_USERNAME` | `""` | Username for Zookeeper. | +| `ZOOKEEPER_PASSWORD` | `""` | Password for Zookeeper. | +### 2.6. MySQL Configuration -## Config options +**Description**: Configuration for MySQL, including port, address, and credentials. -... +| Parameter | Example Value | Description | +| ---------------- | ------------------------ | ------------------- | +| `MYSQL_PORT` | `"13306"` | Port for MySQL. | +| `MYSQL_ADDRESS` | Docker Bridge Gateway IP | Address for MySQL. | +| `MYSQL_USERNAME` | User-defined | Username for MySQL. | +| `MYSQL_PASSWORD` | User-defined | Password for MySQL. | -## Use the default values +Note: The configurations for other services (e.g., MONGO, REDIS, KAFKA, etc.) follow a similar pattern to MySQL and can be documented in a similar manner. -A method to revert to the default value: +### 2.7. MongoDB Configuration -```bash -export IP=127.0.0.1 -``` +This section involves setting up MongoDB, including its port, address, and credentials. + +| Parameter | Example Value | Description | +| -------------- | -------------- | ----------------------- | +| MONGO_PORT | "27017" | Port used by MongoDB. | +| MONGO_ADDRESS | [Generated IP] | IP address for MongoDB. | +| MONGO_USERNAME | [User Defined] | Username for MongoDB. | +| MONGO_PASSWORD | [User Defined] | Password for MongoDB. | + +### 2.8. Tencent Cloud COS Configuration + +This section involves setting up Tencent Cloud COS, including its bucket URL and credentials. + +| Parameter | Example Value | Description | +| ----------------- | ------------------------------------------------------------ | ------------------------------------ | +| COS_BUCKET_URL | "[https://temp-1252357374.cos.ap-chengdu.myqcloud.com](https://temp-1252357374.cos.ap-chengdu.myqcloud.com/)" | Tencent Cloud COS bucket URL. | +| COS_SECRET_ID | [User Defined] | Secret ID for Tencent Cloud COS. | +| COS_SECRET_KEY | [User Defined] | Secret key for Tencent Cloud COS. | +| COS_SESSION_TOKEN | [User Defined] | Session token for Tencent Cloud COS. | +| COS_PUBLIC_READ | "false" | Public read access. | + +### 2.9. Alibaba Cloud OSS Configuration + +This section involves setting up Alibaba Cloud OSS, including its endpoint, bucket name, and credentials. + +| Parameter | Example Value | Description | +| --------------------- | ------------------------------------------------------------ | ---------------------------------------- | +| OSS_ENDPOINT | "[https://oss-cn-chengdu.aliyuncs.com](https://oss-cn-chengdu.aliyuncs.com/)" | Endpoint URL for Alibaba Cloud OSS. | +| OSS_BUCKET | "demo-9999999" | Bucket name for Alibaba Cloud OSS. | +| OSS_BUCKET_URL | "[https://demo-9999999.oss-cn-chengdu.aliyuncs.com](https://demo-9999999.oss-cn-chengdu.aliyuncs.com/)" | Bucket URL for Alibaba Cloud OSS. | +| OSS_ACCESS_KEY_ID | [User Defined] | Access key ID for Alibaba Cloud OSS. | +| OSS_ACCESS_KEY_SECRET | [User Defined] | Access key secret for Alibaba Cloud OSS. | +| OSS_SESSION_TOKEN | [User Defined] | Session token for Alibaba Cloud OSS. | +| OSS_PUBLIC_READ | "false" | Public read access. | + +### 2.10. Redis Configuration + +This section involves setting up Redis, including its port, address, and credentials. + +| Parameter | Example Value | Description | +| -------------- | -------------------------- | --------------------- | +| REDIS_PORT | "16379" | Port used by Redis. | +| REDIS_ADDRESS | "${DOCKER_BRIDGE_GATEWAY}" | IP address for Redis. | +| REDIS_USERNAME | [User Defined] | Username for Redis. | +| REDIS_PASSWORD | "${PASSWORD}" | Password for Redis. | + +### 2.11. Kafka Configuration + +This section involves setting up Kafka, including its port, address, credentials, and topics. + +| Parameter | Example Value | Description | +| ---------------------------- | -------------------------- | ----------------------------------- | +| KAFKA_USERNAME | [User Defined] | Username for Kafka. | +| KAFKA_PASSWORD | [User Defined] | Password for Kafka. | +| KAFKA_PORT | "19094" | Port used by Kafka. | +| KAFKA_ADDRESS | "${DOCKER_BRIDGE_GATEWAY}" | IP address for Kafka. | +| KAFKA_LATESTMSG_REDIS_TOPIC | "latestMsgToRedis" | Topic for latest message to Redis. | +| KAFKA_OFFLINEMSG_MONGO_TOPIC | "offlineMsgToMongoMysql" | Topic for offline message to Mongo. | +| KAFKA_MSG_PUSH_TOPIC | "msgToPush" | Topic for message to push. | +| KAFKA_CONSUMERGROUPID_REDIS | "redis" | Consumer group ID to Redis. | +| KAFKA_CONSUMERGROUPID_MONGO | "mongo" | Consumer group ID to Mongo. | +| KAFKA_CONSUMERGROUPID_MYSQL | "mysql" | Consumer group ID to MySQL. | +| KAFKA_CONSUMERGROUPID_PUSH | "push" | Consumer group ID to push. | + +Note: Ensure to replace placeholder values (like [User Defined], `${DOCKER_BRIDGE_GATEWAY}`, and `${PASSWORD}`) with actual values before deploying the configuration. + + + +### 2.12. OpenIM Web Configuration + +This section involves setting up OpenIM Web, including its port, address, and dist path. + +| Parameter | Example Value | Description | +| -------------------- | -------------------------- | ------------------------- | +| OPENIM_WEB_PORT | "11001" | Port used by OpenIM Web. | +| OPENIM_WEB_ADDRESS | "${DOCKER_BRIDGE_GATEWAY}" | Address for OpenIM Web. | +| OPENIM_WEB_DIST_PATH | "/app/dist" | Dist path for OpenIM Web. | + +### 2.13. RPC Configuration + +Configuration for RPC, including the register and listen IP. + +| Parameter | Example Value | Description | +| --------------- | -------------- | -------------------- | +| RPC_REGISTER_IP | [User Defined] | Register IP for RPC. | +| RPC_LISTEN_IP | "0.0.0.0" | Listen IP for RPC. | + +### 2.14. Prometheus Configuration + +Setting up Prometheus, including its port and address. + +| Parameter | Example Value | Description | +| ------------------ | -------------------------- | ------------------------ | +| PROMETHEUS_PORT | "19090" | Port used by Prometheus. | +| PROMETHEUS_ADDRESS | "${DOCKER_BRIDGE_GATEWAY}" | Address for Prometheus. | + +### 2.15. Grafana Configuration + +Configuration for Grafana, including its port and address. + +| Parameter | Example Value | Description | +| --------------- | -------------------------- | --------------------- | +| GRAFANA_PORT | "3000" | Port used by Grafana. | +| GRAFANA_ADDRESS | "${DOCKER_BRIDGE_GATEWAY}" | Address for Grafana. | + +### 2.16. RPC Port Configuration Variables + +Configuration for various RPC ports. Note: For launching multiple programs, just fill in multiple ports separated by commas. Try not to have spaces. + +| Parameter | Example Value | Description | +| --------------------------- | ------------- | ----------------------------------- | +| OPENIM_USER_PORT | '10110' | OpenIM User Service Port. | +| OPENIM_FRIEND_PORT | '10120' | OpenIM Friend Service Port. | +| OPENIM_MESSAGE_PORT | '10130' | OpenIM Message Service Port. | +| OPENIM_MESSAGE_GATEWAY_PORT | '10140' | OpenIM Message Gateway Service Port | +| OPENIM_GROUP_PORT | '10150' | OpenIM Group Service Port. | +| OPENIM_AUTH_PORT | '10160' | OpenIM Authorization Service Port. | +| OPENIM_PUSH_PORT | '10170' | OpenIM Push Service Port. | +| OPENIM_CONVERSATION_PORT | '10180' | OpenIM Conversation Service Port. | +| OPENIM_THIRD_PORT | '10190' | OpenIM Third-Party Service Port. | + +### 2.17. RPC Register Name Configuration + +This section involves setting up the RPC Register Names for various OpenIM services. + +| Parameter | Example Value | Description | +| --------------------------- | ---------------- | ----------------------------------- | +| OPENIM_USER_NAME | "User" | OpenIM User Service Name | +| OPENIM_FRIEND_NAME | "Friend" | OpenIM Friend Service Name | +| OPENIM_MSG_NAME | "Msg" | OpenIM Message Service Name | +| OPENIM_PUSH_NAME | "Push" | OpenIM Push Service Name | +| OPENIM_MESSAGE_GATEWAY_NAME | "MessageGateway" | OpenIM Message Gateway Service Name | +| OPENIM_GROUP_NAME | "Group" | OpenIM Group Service Name | +| OPENIM_AUTH_NAME | "Auth" | OpenIM Authorization Service Name | +| OPENIM_CONVERSATION_NAME | "Conversation" | OpenIM Conversation Service Name | +| OPENIM_THIRD_NAME | "Third" | OpenIM Third-Party Service Name | + +### 2.18. Log Configuration + +This section involves configuring the log settings, including storage location, rotation time, and log level. + +| Parameter | Example Value | Description | +| ------------------------- | ------------------------ | --------------------------------- | +| LOG_STORAGE_LOCATION | ""${OPENIM_ROOT}"/logs/" | Location for storing logs | +| LOG_ROTATION_TIME | "24" | Log rotation time (in hours) | +| LOG_REMAIN_ROTATION_COUNT | "2" | Number of log rotations to retain | +| LOG_REMAIN_LOG_LEVEL | "6" | Log level to retain | +| LOG_IS_STDOUT | "false" | Output log to standard output | +| LOG_IS_JSON | "false" | Log in JSON format | +| LOG_WITH_STACK | "false" | Include stack info in logs | + +### 2.19. Additional Configuration Variables + +This section involves setting up additional configuration variables for Websocket, Push Notifications, and Chat. + +| Parameter | Example Value | Description | +| ----------------------- | ----------------- | ---------------------------------- | +| WEBSOCKET_MAX_CONN_NUM | "100000" | Maximum Websocket connections | +| WEBSOCKET_MAX_MSG_LEN | "4096" | Maximum Websocket message length | +| WEBSOCKET_TIMEOUT | "10" | Websocket timeout | +| PUSH_ENABLE | "getui" | Push notification enable status | +| GETUI_PUSH_URL | [Generated URL] | GeTui Push Notification URL | +| GETUI_MASTER_SECRET | [User Defined] | GeTui Master Secret | +| GETUI_APP_KEY | [User Defined] | GeTui Application Key | +| GETUI_INTENT | [User Defined] | GeTui Push Intent | +| GETUI_CHANNEL_ID | [User Defined] | GeTui Channel ID | +| GETUI_CHANNEL_NAME | [User Defined] | GeTui Channel Name | +| FCM_SERVICE_ACCOUNT | "x.json" | FCM Service Account | +| JPNS_APP_KEY | [User Defined] | JPNS Application Key | +| JPNS_MASTER_SECRET | [User Defined] | JPNS Master Secret | +| JPNS_PUSH_URL | [User Defined] | JPNS Push Notification URL | +| JPNS_PUSH_INTENT | [User Defined] | JPNS Push Intent | +| MANAGER_USERID_1 | "openIM123456" | Administrator ID 1 | +| MANAGER_USERID_2 | "openIM654321" | Administrator ID 2 | +| MANAGER_USERID_3 | "openIMAdmin" | Administrator ID 3 | +| NICKNAME_1 | "system1" | Nickname 1 | +| NICKNAME_2 | "system2" | Nickname 2 | +| NICKNAME_3 | "system3" | Nickname 3 | +| MULTILOGIN_POLICY | "1" | Multi-login Policy | +| CHAT_PERSISTENCE_MYSQL | "true" | Chat Persistence in MySQL | +| MSG_CACHE_TIMEOUT | "86400" | Message Cache Timeout | +| GROUP_MSG_READ_RECEIPT | "true" | Group Message Read Receipt Enable | +| SINGLE_MSG_READ_RECEIPT | "true" | Single Message Read Receipt Enable | +| RETAIN_CHAT_RECORDS | "365" | Retain Chat Records (in days) | +| CHAT_RECORDS_CLEAR_TIME | [Cron Expression] | Chat Records Clear Time | +| MSG_DESTRUCT_TIME | [Cron Expression] | Message Destruct Time | +| SECRET | "${PASSWORD}" | Secret Key | +| TOKEN_EXPIRE | "90" | Token Expiry Time | +| FRIEND_VERIFY | "false" | Friend Verification Enable | +| IOS_PUSH_SOUND | "xxx" | iOS | + + + +### 2.20. Prometheus Configuration + +This section involves configuring Prometheus, including enabling/disabling it and setting up ports for various services. + +#### 2.20.1. General Configuration + +| Parameter | Example Value | Description | +| ------------------- | ------------- | ----------------------------- | +| `PROMETHEUS_ENABLE` | "false" | Whether to enable Prometheus. | + +#### 2.20.2. Service-Specific Prometheus Ports + +| Service | Parameter | Default Port Value | Description | +| ------------------------ | ------------------------ | ---------------------------- | -------------------------------------------------- | +| User Service | `USER_PROM_PORT` | '20110' | Prometheus port for the User service. | +| Friend Service | `FRIEND_PROM_PORT` | '20120' | Prometheus port for the Friend service. | +| Message Service | `MESSAGE_PROM_PORT` | '20130' | Prometheus port for the Message service. | +| Message Gateway | `MSG_GATEWAY_PROM_PORT` | '20140' | Prometheus port for the Message Gateway. | +| Group Service | `GROUP_PROM_PORT` | '20150' | Prometheus port for the Group service. | +| Auth Service | `AUTH_PROM_PORT` | '20160' | Prometheus port for the Auth service. | +| Push Service | `PUSH_PROM_PORT` | '20170' | Prometheus port for the Push service. | +| Conversation Service | `CONVERSATION_PROM_PORT` | '20230' | Prometheus port for the Conversation service. | +| RTC Service | `RTC_PROM_PORT` | '21300' | Prometheus port for the RTC service. | +| Third Service | `THIRD_PROM_PORT` | '21301' | Prometheus port for the Third service. | +| Message Transfer Service | `MSG_TRANSFER_PROM_PORT` | '21400, 21401, 21402, 21403' | Prometheus ports for the Message Transfer service. | diff --git a/docs/contrib/install_docker.md b/docs/contrib/install_docker.md index d2aa27a42..ce04f8a8c 100644 --- a/docs/contrib/install_docker.md +++ b/docs/contrib/install_docker.md @@ -1,5 +1,13 @@ + + + + # Install Docker + The installation command is as follows: ```bash diff --git a/docs/images/oepnim-design.png b/docs/images/oepnim-design.png new file mode 100644 index 000000000..74cb79a31 Binary files /dev/null and b/docs/images/oepnim-design.png differ diff --git a/go.mod b/go.mod index 7e3af7de2..7413edd8c 100644 --- a/go.mod +++ b/go.mod @@ -7,7 +7,7 @@ require ( github.com/bwmarrin/snowflake v0.3.0 // indirect github.com/dtm-labs/rockscache v0.1.1 github.com/gin-gonic/gin v1.9.1 - github.com/go-playground/validator/v10 v10.15.3 + github.com/go-playground/validator/v10 v10.15.5 github.com/gogo/protobuf v1.3.2 github.com/golang-jwt/jwt/v4 v4.5.0 github.com/golang/protobuf v1.5.3 @@ -19,38 +19,38 @@ require ( github.com/mitchellh/mapstructure v1.5.0 github.com/nfnt/resize v0.0.0-20180221191011-83c6a9932646 // indirect github.com/pkg/errors v0.9.1 // indirect - github.com/prometheus/client_golang v1.16.0 + github.com/prometheus/client_golang v1.17.0 github.com/robfig/cron/v3 v3.0.1 github.com/sirupsen/logrus v1.9.3 // indirect github.com/stretchr/testify v1.8.4 go.mongodb.org/mongo-driver v1.12.1 golang.org/x/image v0.12.0 - google.golang.org/api v0.138.0 - google.golang.org/grpc v1.57.0 + google.golang.org/api v0.143.0 + google.golang.org/grpc v1.58.2 google.golang.org/protobuf v1.31.0 gopkg.in/yaml.v3 v3.0.1 gorm.io/driver/mysql v1.5.1 - gorm.io/gorm v1.25.4 + gorm.io/gorm v1.25.5 ) require github.com/google/uuid v1.3.1 require ( - github.com/IBM/sarama v1.41.1 - github.com/OpenIMSDK/protocol v0.0.21 + github.com/IBM/sarama v1.41.2 + github.com/OpenIMSDK/protocol v0.0.26 github.com/OpenIMSDK/tools v0.0.14 github.com/aliyun/aliyun-oss-go-sdk v2.2.9+incompatible github.com/go-redis/redis v6.15.9+incompatible github.com/go-sql-driver/mysql v1.7.1 - github.com/redis/go-redis/v9 v9.1.0 - github.com/tencentyun/cos-go-sdk-v5 v0.7.42 + github.com/redis/go-redis/v9 v9.2.1 + github.com/tencentyun/cos-go-sdk-v5 v0.7.44 ) require ( - cloud.google.com/go v0.110.6 // indirect + cloud.google.com/go v0.110.7 // indirect cloud.google.com/go/compute v1.23.0 // indirect cloud.google.com/go/compute/metadata v0.2.3 // indirect - cloud.google.com/go/firestore v1.11.0 // indirect + cloud.google.com/go/firestore v1.12.0 // indirect cloud.google.com/go/iam v1.1.1 // indirect cloud.google.com/go/longrunning v0.5.1 // indirect cloud.google.com/go/storage v1.30.1 // indirect @@ -73,8 +73,8 @@ require ( github.com/golang/snappy v0.0.4 // indirect github.com/google/go-cmp v0.5.9 // indirect github.com/google/go-querystring v1.1.0 // indirect - github.com/google/s2a-go v0.1.5 // indirect - github.com/googleapis/enterprise-certificate-proxy v0.2.5 // indirect + github.com/google/s2a-go v0.1.7 // indirect + github.com/googleapis/enterprise-certificate-proxy v0.3.1 // indirect github.com/googleapis/gax-go/v2 v2.12.0 // indirect github.com/hashicorp/errwrap v1.0.0 // indirect github.com/hashicorp/go-multierror v1.1.1 // indirect @@ -104,9 +104,9 @@ require ( github.com/pelletier/go-toml/v2 v2.0.8 // indirect github.com/pierrec/lz4/v4 v4.1.18 // indirect github.com/pmezard/go-difflib v1.0.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/prometheus/client_model v0.4.1-0.20230718164431-9a2bf3000d16 // indirect + github.com/prometheus/common v0.44.0 // indirect + github.com/prometheus/procfs v0.11.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 @@ -119,17 +119,17 @@ require ( go.uber.org/atomic v1.7.0 // indirect go.uber.org/multierr v1.6.0 // indirect golang.org/x/arch v0.3.0 // indirect - golang.org/x/net v0.14.0 // indirect - golang.org/x/oauth2 v0.11.0 // indirect + golang.org/x/net v0.17.0 // indirect + golang.org/x/oauth2 v0.12.0 // indirect golang.org/x/sync v0.3.0 // indirect - golang.org/x/sys v0.11.0 // indirect + golang.org/x/sys v0.13.0 // indirect golang.org/x/text v0.13.0 // indirect golang.org/x/time v0.3.0 // indirect golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect google.golang.org/appengine v1.6.7 // indirect - google.golang.org/genproto v0.0.0-20230803162519-f966b187b2e5 // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20230803162519-f966b187b2e5 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20230807174057-1744710a1577 // indirect + google.golang.org/genproto v0.0.0-20230913181813-007df8e322eb // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20230913181813-007df8e322eb // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20230920204549-e6e6cdab5c13 // indirect ) require ( @@ -140,6 +140,6 @@ require ( github.com/spf13/cobra v1.7.0 github.com/ugorji/go/codec v1.2.11 // indirect go.uber.org/zap v1.24.0 // indirect - golang.org/x/crypto v0.12.0 // indirect + golang.org/x/crypto v0.14.0 // indirect gopkg.in/ini.v1 v1.67.0 // indirect ) diff --git a/go.sum b/go.sum index 5b180156e..a72bd884a 100644 --- a/go.sum +++ b/go.sum @@ -1,13 +1,12 @@ 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.110.6 h1:8uYAkj3YHTP/1iwReuHPxLSbdcyc+dSBbzFMrVwDR6Q= -cloud.google.com/go v0.110.6/go.mod h1:+EYjdK8e5RME/VY/qLCAtuyALQ9q67dvuum8i+H5xsI= +cloud.google.com/go v0.110.7 h1:rJyC7nWRg2jWGZ4wSJ5nY65GTdYJkg0cd/uXb+ACI6o= +cloud.google.com/go v0.110.7/go.mod h1:+EYjdK8e5RME/VY/qLCAtuyALQ9q67dvuum8i+H5xsI= cloud.google.com/go/compute v1.23.0 h1:tP41Zoavr8ptEqaW6j+LQOnyBBhO7OkOMAGrgLopTwY= cloud.google.com/go/compute v1.23.0/go.mod h1:4tCnrn48xsqlwSAiLf1HXMQk8CONslYbdiEZc9FEIbM= cloud.google.com/go/compute/metadata v0.2.3 h1:mg4jlk7mCAj6xXp9UJ4fjI9VUI5rubuGBW5aJ7UnBMY= cloud.google.com/go/compute/metadata v0.2.3/go.mod h1:VAV5nSsACxMJvgaAuX6Pk2AawlZn8kiOGuCv6gTkwuA= -cloud.google.com/go/firestore v1.11.0 h1:PPgtwcYUOXV2jFe1bV3nda3RCrOa8cvBjTOn2MQVfW8= -cloud.google.com/go/firestore v1.11.0/go.mod h1:b38dKhgzlmNNGTNZZwe7ZRFEuRab1Hay3/DBsIGKKy4= +cloud.google.com/go/firestore v1.12.0 h1:aeEA/N7DW7+l2u5jtkO8I0qv0D95YwjggD8kUHrTHO4= +cloud.google.com/go/firestore v1.12.0/go.mod h1:b38dKhgzlmNNGTNZZwe7ZRFEuRab1Hay3/DBsIGKKy4= cloud.google.com/go/iam v1.1.1 h1:lW7fzj15aVIXYHREOqjRBV9PsH0Z6u8Y46a1YGvQP4Y= cloud.google.com/go/iam v1.1.1/go.mod h1:A5avdyVL2tCppe4unb0951eI9jreack+RJ0/d+KUZOU= cloud.google.com/go/longrunning v0.5.1 h1:Fr7TXftcqTudoyRJa113hyaqlGdiBQkp0Gq7tErFDWI= @@ -17,28 +16,26 @@ cloud.google.com/go/storage v1.30.1/go.mod h1:NfxhC0UJE1aXSx7CIIbCf7y9HKT7Biccwk firebase.google.com/go v3.13.0+incompatible h1:3TdYC3DDi6aHn20qoRkxwGqNgdjtblwVAyRLQwGn/+4= firebase.google.com/go v3.13.0+incompatible/go.mod h1:xlah6XbEyW6tbfSklcfe5FHJIwjt8toICdV5Wh9ptHs= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/IBM/sarama v1.41.1 h1:B4/TdHce/8Ipza+qrLIeNJ9D1AOxZVp/3uDv6H/dp2M= -github.com/IBM/sarama v1.41.1/go.mod h1:JFCPURVskaipJdKRFkiE/OZqQHw7jqliaJmRwXCmSSw= -github.com/OpenIMSDK/protocol v0.0.21 h1:5H6H+hJ9d/VgRqttvxD/zfK9Asd+4M8Eknk5swSbUVY= -github.com/OpenIMSDK/protocol v0.0.21/go.mod h1:F25dFrwrIx3lkNoiuf6FkCfxuwf8L4Z8UIsdTHP/r0Y= +github.com/IBM/sarama v1.41.2 h1:ZDBZfGPHAD4uuAtSv4U22fRZBgst0eEwGFzLj0fb85c= +github.com/IBM/sarama v1.41.2/go.mod h1:xdpu7sd6OE1uxNdjYTSKUfY8FaKkJES9/+EyjSgiGQk= +github.com/OpenIMSDK/protocol v0.0.26 h1:jzq7EemhkO8W5kvOOg2f0b7OAMzMPrIBUG0GVbSNhDA= +github.com/OpenIMSDK/protocol v0.0.26/go.mod h1:F25dFrwrIx3lkNoiuf6FkCfxuwf8L4Z8UIsdTHP/r0Y= github.com/OpenIMSDK/tools v0.0.14 h1:WLof/+WxyPyRST+QkoTKubYCiV73uCLiL8pgnpH/yKQ= github.com/OpenIMSDK/tools v0.0.14/go.mod h1:eg+q4A34Qmu73xkY0mt37FHGMCMfC6CtmOnm0kFEGFI= github.com/QcloudApi/qcloud_sign_golang v0.0.0-20141224014652-e4130a326409/go.mod h1:1pk82RBxDY/JZnPQrtqHlUFfCctgdorsd9M06fMynOM= github.com/aliyun/aliyun-oss-go-sdk v2.2.9+incompatible h1:Sg/2xHwDrioHpxTN6WMiwbXTpUEinBpHsN7mG21Rc2k= github.com/aliyun/aliyun-oss-go-sdk v2.2.9+incompatible/go.mod h1:T/Aws4fEfogEE9v+HPhhw+CntffsBHJ8nXQCwKr0/g8= -github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= github.com/benbjohnson/clock v1.1.0 h1:Q92kusRqC1XV2MjkWETPvjJVqKetz1OzxZB7mHJLju8= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= -github.com/bsm/ginkgo/v2 v2.9.5 h1:rtVBYPs3+TC5iLUVOis1B9tjLTup7Cj5IfzosKtvTJ0= -github.com/bsm/gomega v1.26.0 h1:LhQm+AFcgV2M0WyKroMASzAzCAJVpAxQXv4SaI9a69Y= +github.com/bsm/ginkgo/v2 v2.12.0 h1:Ny8MWAHyOepLGlLKYmXG4IEkioBysk6GpaRTLC8zwWs= +github.com/bsm/gomega v1.27.10 h1:yeMWxP2pV2fG3FgAODIY8EiRE3dy0aeFYt4l7wh6yKA= github.com/bwmarrin/snowflake v0.3.0 h1:xm67bEhkKh6ij1790JB83OujPR5CzNe8QuQqAgISZN0= github.com/bwmarrin/snowflake v0.3.0/go.mod h1:NdZxfVWX+oR6y2K0o6qAYv6gIOP9rjG0/E9WsDpxqwE= github.com/bytedance/sonic v1.5.0/go.mod h1:ED5hyg4y6t3/9Ku1R6dU/4KyJ48DZ4jPhfY1O2AihPM= github.com/bytedance/sonic v1.9.1 h1:6iJ6NqdoxCDr6mbY8h18oSO+cShGSMRGCEo7F2h0x8s= github.com/bytedance/sonic v1.9.1/go.mod h1:i736AoUSYt75HyZLoJW9ERYxcy6eaN6h4BZXU064P/U= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= -github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/chenzhuoyu/base64x v0.0.0-20211019084208-fb5309c8db06/go.mod h1:DH46F32mSOjUmXrMHnKwZdA8wcEefY7UVqBKYGjpdQY= @@ -51,11 +48,6 @@ github.com/clbanning/mxj v1.8.4 h1:HuhwZtbyvyOw+3Z1AowPkU87JkJUSv751ELWaiTpj8I= github.com/clbanning/mxj v1.8.4/go.mod h1:BVjHeAH+rl9rs6f+QIpeRl0tfu10SXn1pUSa5PVGJng= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= -github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= -github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI= -github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= @@ -75,8 +67,6 @@ github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFP github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= -github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= -github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/fortytw2/leaktest v1.3.0 h1:u8491cBMTQ8ft8aeV+adlcytMZylmA5nnwwkRZjI8vw= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= @@ -84,7 +74,6 @@ github.com/fsnotify/fsnotify v1.4.9 h1:hsms1Qyu0jgnwNXIxa+/V/PDsU6CfLf6CNO8H7IWo github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= github.com/gabriel-vasile/mimetype v1.4.2 h1:w5qFW6JKBz9Y393Y4q372O9A7cUSequkh1Q7OhCmWKU= github.com/gabriel-vasile/mimetype v1.4.2/go.mod h1:zApsH/mKG4w07erKIaJPFiX0Tsq9BFQgN3qGY5GnNgA= -github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/gin-contrib/sse v0.1.0 h1:Y/yl/+YNO8GZSjAhjMsSuLt29uWRFHdHYUb5lYOV9qE= github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI= github.com/gin-gonic/gin v1.9.1 h1:4idEAncQnU5cB7BeOkPtxjfCSye0AAm1R0RVIqJ+Jmg= @@ -94,8 +83,8 @@ github.com/go-playground/locales v0.14.1 h1:EWaQ/wswjilfKLTECiXz7Rh+3BjFhfDFKv/o github.com/go-playground/locales v0.14.1/go.mod h1:hxrqLVvrK65+Rwrd5Fc6F2O76J/NuW9t0sjnWqG1slY= github.com/go-playground/universal-translator v0.18.1 h1:Bcnm0ZwsGyWbCzImXv+pAJnYK9S473LQFuzCbDbfSFY= github.com/go-playground/universal-translator v0.18.1/go.mod h1:xekY+UJKNuX9WP91TpwSH2VMlDf28Uj24BCp08ZFTUY= -github.com/go-playground/validator/v10 v10.15.3 h1:S+sSpunYjNPDuXkWbK+x+bA7iXiW296KG4dL3X7xUZo= -github.com/go-playground/validator/v10 v10.15.3/go.mod h1:9iXMNT7sEkjXb0I+enO7QXmzG6QCsPWY4zveKFVRSyU= +github.com/go-playground/validator/v10 v10.15.5 h1:LEBecTWb/1j5TNY1YYG2RcOUN3R7NLylN+x8TTueE24= +github.com/go-playground/validator/v10 v10.15.5/go.mod h1:9iXMNT7sEkjXb0I+enO7QXmzG6QCsPWY4zveKFVRSyU= github.com/go-redis/redis v6.15.9+incompatible h1:K0pv1D7EQUjfyoMql+r/jZqCLizCGKFlFgcHWWmHQjg= github.com/go-redis/redis v6.15.9+incompatible/go.mod h1:NAIEuMOZ/fxfXJIrKDQDz8wamY7mA7PouImQ2Jvg6kA= github.com/go-sql-driver/mysql v1.7.0/go.mod h1:OXbVy3sEdcQ2Doequ6Z5BW6fXNQTmx+9S1MCJN5yJMI= @@ -118,8 +107,6 @@ github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfb github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= -github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk= github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= @@ -151,14 +138,14 @@ github.com/google/go-querystring v1.1.0/go.mod h1:Kcdr2DB4koayq7X8pmAG4sNG59So17 github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/martian/v3 v3.3.2 h1:IqNFLAmvJOgVlpdEBiQbDc2EwKW77amAycfTuWKdfvw= github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/s2a-go v0.1.5 h1:8IYp3w9nysqv3JH+NJgXJzGbDHzLOTj43BmSkp+O7qg= -github.com/google/s2a-go v0.1.5/go.mod h1:Ej+mSEMGRnqRzjc7VtF+jdBwYG5fuJfiZ8ELkjEwM0A= +github.com/google/s2a-go v0.1.7 h1:60BLSyTrOV4/haCDW4zb1guZItoSq8foHCXrAnjBo/o= +github.com/google/s2a-go v0.1.7/go.mod h1:50CgR4k1jNlWBu4UfS4AcfhVe1r6pdZPygJ3R8F0Qdw= 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.1 h1:KjJaJ9iWZ3jOFZIf1Lqf4laDRCasjl0BCmnEGxkdLb4= github.com/google/uuid v1.3.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/googleapis/enterprise-certificate-proxy v0.2.5 h1:UR4rDjcgpgEnqpIEvkiqTYKBCKLNmlge2eVjoZfySzM= -github.com/googleapis/enterprise-certificate-proxy v0.2.5/go.mod h1:RxW0N9901Cko1VOCW3SXCpWP+mlIEkk2tP7jnHy9a3w= +github.com/googleapis/enterprise-certificate-proxy v0.3.1 h1:SBWmZhjUDRorQxrN0nwzf+AHBxnbFjViHQS4P0yVpmQ= +github.com/googleapis/enterprise-certificate-proxy v0.3.1/go.mod h1:VLSiSSBs/ksPL8kq3OBOQ6WRI2QnaFynd1DCjZ62+V0= github.com/googleapis/gax-go/v2 v2.12.0 h1:A+gCJKdRfqXkr+BIRGtZLibNXf0m1f9E4HG56etFpas= github.com/googleapis/gax-go/v2 v2.12.0/go.mod h1:y+aIqrI5eb1YGMVJfuV3185Ts/D7qKpsEkdD5+I6QGU= github.com/gorilla/securecookie v1.1.1/go.mod h1:ra0sb63/xPlUeL+yeDciTfxMRAA+MP+HVt/4epWDjd4= @@ -167,7 +154,6 @@ github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWm github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 h1:Ovs26xHkKqVztRpIrF/92BcuyuQ/YW4NSIpoGtfXNho= github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= -github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= github.com/hashicorp/errwrap v1.0.0 h1:hLrqtEDnRye3+sgx6z4qVLNuviH3MR5aQ0ykNJa/UYA= github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+lD48awMYo= @@ -268,22 +254,21 @@ 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 v1.16.0 h1:yk/hx9hDbrGHovbci4BY+pRMfSuuat626eFsHb7tmT8= -github.com/prometheus/client_golang v1.16.0/go.mod h1:Zsulrv/L9oM40tJ7T815tM89lFEugiJ9HzIqaAx4LKc= +github.com/prometheus/client_golang v1.17.0 h1:rl2sfwZMtSthVU752MqfjQozy7blglC+1SOtjMAMh+Q= +github.com/prometheus/client_golang v1.17.0/go.mod h1:VeL+gMmOAxkS2IqfCq0ZmHSL+LjWfWDUmp1mBz9JgUY= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -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/prometheus/client_model v0.4.1-0.20230718164431-9a2bf3000d16 h1:v7DLqVdK4VrYkVD5diGdl4sxJurKJEMnODWRJlxV9oM= +github.com/prometheus/client_model v0.4.1-0.20230718164431-9a2bf3000d16/go.mod h1:oMQmHW1/JoDwqLtg57MGgP/Fb1CJEYF2imWWhWtMkYU= +github.com/prometheus/common v0.44.0 h1:+5BrQJwiBB9xsMygAB3TNvpQKOwlkc25LbISbrdOOfY= +github.com/prometheus/common v0.44.0/go.mod h1:ofAIvZbQ1e/nugmZGz4/qCb9Ap1VoSTIO7x0VV9VvuY= +github.com/prometheus/procfs v0.11.1 h1:xRC8Iq1yyca5ypa9n1EZnWZkt7dwcoRPQwX/5gwaUuI= +github.com/prometheus/procfs v0.11.1/go.mod h1:eesXgaPo1q7lBpVMoMy0ZOFTth9hBn4W/y0/p/ScXhY= 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.1.0 h1:137FnGdk+EQdCbye1FW+qOEcY5S+SpY9T0NiuqvtfMY= -github.com/redis/go-redis/v9 v9.1.0/go.mod h1:urWj3He21Dj5k4TK1y59xH8Uj6ATueP8AH1cY3lZl4c= +github.com/redis/go-redis/v9 v9.2.1 h1:WlYJg71ODF0dVspZZCpYmoF1+U1Jjk9Rwd7pq6QmlCg= +github.com/redis/go-redis/v9 v9.2.1/go.mod h1:hdY0cQFCN4fnSYT6TkisLufl/4W5UIXyv0b/CLO2V2M= github.com/robfig/cron/v3 v3.0.1 h1:WdRxkvbJztn8LMz/QEvLN5sBU+xKpSqwwUO1Pjr4qDs= github.com/robfig/cron/v3 v3.0.1/go.mod h1:eQICP3HwyT7UooqI/z+Ov+PtYAWygg1TEWWzGIFLtro= -github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M= github.com/rs/xid v1.5.0 h1:mKX4bl4iPYJtEIxp6CYiUuLQ/8DYMoz0PUdtGgMFRVc= github.com/rs/xid v1.5.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= @@ -310,8 +295,8 @@ github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcU github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.563/go.mod h1:7sCQWVkxcsR38nffDW057DRGk8mUjK1Ing/EFOK8s8Y= github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/kms v1.0.563/go.mod h1:uom4Nvi9W+Qkom0exYiJ9VWJjXwyxtPYTkKkaLMlfE0= -github.com/tencentyun/cos-go-sdk-v5 v0.7.42 h1:Up1704BJjI5orycXKjpVpvuOInt9GC5pqY4knyE9Uds= -github.com/tencentyun/cos-go-sdk-v5 v0.7.42/go.mod h1:LUFnaqRmGk6pEHOaRmdn2dCZR2j0cSsM5xowWFPTPao= +github.com/tencentyun/cos-go-sdk-v5 v0.7.44 h1:Vvz28KVdmSUrwTH2MWgAMlhzUAh+lQBSSAW1J7qJDW8= +github.com/tencentyun/cos-go-sdk-v5 v0.7.44/go.mod h1:LUFnaqRmGk6pEHOaRmdn2dCZR2j0cSsM5xowWFPTPao= github.com/twitchyliquid64/golang-asm v0.15.1 h1:SU5vSMR7hnwNxj24w34ZyCi/FmDZTkS4MhqMhdFk5YI= github.com/twitchyliquid64/golang-asm v0.15.1/go.mod h1:a1lVb/DtPvCB8fslRZhAngC2+aY1QWCk3Cedj/Gdt08= github.com/ugorji/go/codec v1.2.11 h1:BMaWp1Bb6fHwEtbplGBGJ498wD+LKlNSl25MjdZY4dU= @@ -331,7 +316,6 @@ go.mongodb.org/mongo-driver v1.12.1 h1:nLkghSU8fQNaK7oUmDhQFsnrtcoNy7Z6LVFKsEecq go.mongodb.org/mongo-driver v1.12.1/go.mod h1:/rGBTebI3XYboVmgz+Wv3Bcbl3aD0QF9zl6kDDw18rQ= go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0= go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= -go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= go.uber.org/atomic v1.7.0 h1:ADUqmZGgLDDfbSL9ZmPxKTybcoEYHgpYfELNoN+7hsw= go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/goleak v1.1.11 h1:wy28qYRKZgnJTxGxvye5/wgWr1EKjmUDGYox5mGlRlI= @@ -346,11 +330,10 @@ golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACk golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.0.0-20220314234659-1baeb1ce4c0b/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.6.0/go.mod h1:OFC/31mSvZgRz0V1QTNCzfAI1aIRzbiufJtkMIlEp58= -golang.org/x/crypto v0.12.0 h1:tFM/ta59kqch6LlvYnPa0yx5a83cL2nHflFhYKvv9Yk= -golang.org/x/crypto v0.12.0/go.mod h1:NF0Gs7EO5K4qLn+Ylc+fih8BSTeIjAP05siRnAh98yw= +golang.org/x/crypto v0.14.0 h1:wBqGXzWJW6m1XrIKlAH0Hs1JJ7+9KBwnIO8v66Q9cHc= +golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf4= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/image v0.12.0 h1:w13vZbU4o5rKOFFR8y7M+c4A5jXDC0uXTdHYRP8X2DQ= golang.org/x/image v0.12.0/go.mod h1:Lu90jvHG7GfemOIcldsh9A2hS01ocl6oNO7ype5mEnk= @@ -364,7 +347,6 @@ golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= @@ -373,7 +355,6 @@ golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= @@ -382,12 +363,11 @@ golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qx golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= -golang.org/x/net v0.14.0 h1:BONx9s002vGdD9umnlX1Po8vOZmrgH34qlHcD1MfK14= -golang.org/x/net v0.14.0/go.mod h1:PpSgVXXLK0OxS0F31C1/tv6XNguvCrnXIDrFMspZIUI= +golang.org/x/net v0.17.0 h1:pVaXccu2ozPjCXewfr1S7xza/zcXTity9cCdXQYSjIM= +golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= -golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.11.0 h1:vPL4xzxBM4niKCW6g9whtaWVXTJf1U5e4aZxxFx/gbU= -golang.org/x/oauth2 v0.11.0/go.mod h1:LdF7O/8bLR/qWK9DrpXmbHLTouvRHK0SgJl0GmDBchk= +golang.org/x/oauth2 v0.12.0 h1:smVPGxink+n1ZI5pkQa8y6fZT0RW0MgCO5bFpepy4B4= +golang.org/x/oauth2 v0.12.0/go.mod h1:A74bZ3aGXgCY0qaIC9Ahg6Lglin4AMAco8cIv9baba4= 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= @@ -418,8 +398,8 @@ golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBc 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.11.0 h1:eG7RXZHdqOJ1i+0lgLgCpSXAp6M3LYlAo6osgSi0xOM= -golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.13.0 h1:Af8nKPmuFypiUBjVoU9V20FiaFXOcuZI21p0ycVYYGE= +golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= @@ -451,32 +431,28 @@ golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 h1:H2TDz8ibqkAF6YGhCdN3jS9O0/s90v0rJh3X/OLHEUk= golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= -google.golang.org/api v0.138.0 h1:K/tVp05MxNVbHShRw9m7e9VJGdagNeTdMzqPH7AUqr0= -google.golang.org/api v0.138.0/go.mod h1:4xyob8CxC+0GChNBvEUAk8VBKNvYOTWM9T3v3UfRxuY= +google.golang.org/api v0.143.0 h1:o8cekTkqhywkbZT6p1UHJPZ9+9uuCAJs/KYomxZB8fA= +google.golang.org/api v0.143.0/go.mod h1:FoX9DO9hT7DLNn97OuoZAGSDuNAXdJRuGK98rSUgurk= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c= google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= -google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= -google.golang.org/genproto v0.0.0-20230803162519-f966b187b2e5 h1:L6iMMGrtzgHsWofoFcihmDEMYeDR9KN/ThbPWGrh++g= -google.golang.org/genproto v0.0.0-20230803162519-f966b187b2e5/go.mod h1:oH/ZOT02u4kWEp7oYBGYFFkCdKS/uYR9Z7+0/xuuFp8= -google.golang.org/genproto/googleapis/api v0.0.0-20230803162519-f966b187b2e5 h1:nIgk/EEq3/YlnmVVXVnm14rC2oxgs1o0ong4sD/rd44= -google.golang.org/genproto/googleapis/api v0.0.0-20230803162519-f966b187b2e5/go.mod h1:5DZzOUPCLYL3mNkQ0ms0F3EuUNZ7py1Bqeq6sxzI7/Q= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230807174057-1744710a1577 h1:wukfNtZmZUurLN/atp2hiIeTKn7QJWIQdHzqmsOnAOk= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230807174057-1744710a1577/go.mod h1:+Bk1OCOj40wS2hwAMA+aCW9ypzm63QTBBHp6lQ3p+9M= +google.golang.org/genproto v0.0.0-20230913181813-007df8e322eb h1:XFBgcDwm7irdHTbz4Zk2h7Mh+eis4nfJEFQFYzJzuIA= +google.golang.org/genproto v0.0.0-20230913181813-007df8e322eb/go.mod h1:yZTlhN0tQnXo3h00fuXNCxJdLdIdnVFVBaRJ5LWBbw4= +google.golang.org/genproto/googleapis/api v0.0.0-20230913181813-007df8e322eb h1:lK0oleSc7IQsUxO3U5TjL9DWlsxpEBemh+zpB7IqhWI= +google.golang.org/genproto/googleapis/api v0.0.0-20230913181813-007df8e322eb/go.mod h1:KjSP20unUpOx5kyQUFa7k4OJg0qeJ7DEZflGDu2p6Bk= +google.golang.org/genproto/googleapis/rpc v0.0.0-20230920204549-e6e6cdab5c13 h1:N3bU/SQDCDyD6R528GJ/PwW9KjYcJA3dgyH+MovAkIM= +google.golang.org/genproto/googleapis/rpc v0.0.0-20230920204549-e6e6cdab5c13/go.mod h1:KSqppvjFjtoCI+KGd4PELB0qLNxdJHRGqRI09mB6pQA= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= -google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= -google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11+0rQ= -google.golang.org/grpc v1.57.0 h1:kfzNeI/klCGD2YPMUlaGNT3pxvYfga7smW3Vth8Zsiw= -google.golang.org/grpc v1.57.0/go.mod h1:Sd+9RMTACXwmub0zcNY2c4arhtrbBYD1AUHI/dt16Mo= +google.golang.org/grpc v1.58.2 h1:SXUpjxeVF3FKrTYQI4f4KvbGD5u2xccdYdurwowix5I= +google.golang.org/grpc v1.58.2/go.mod h1:tgX3ZQDlNJGU96V6yHh1T/JeoBQ2TXdr43YbYSsCJk0= 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= @@ -498,7 +474,6 @@ gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= @@ -509,8 +484,8 @@ gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gorm.io/driver/mysql v1.5.1 h1:WUEH5VF9obL/lTtzjmML/5e6VfFR/788coz2uaVCAZw= gorm.io/driver/mysql v1.5.1/go.mod h1:Jo3Xu7mMhCyj8dlrb3WoCaRd1FhsVh+yMXb1jUInf5o= gorm.io/gorm v1.25.1/go.mod h1:L4uxeKpfBml98NYqVqwAdmV1a2nBtAec/cf3fpucW/k= -gorm.io/gorm v1.25.4 h1:iyNd8fNAe8W9dvtlgeRI5zSVZPsq3OpcTu37cYcpCmw= -gorm.io/gorm v1.25.4/go.mod h1:L4uxeKpfBml98NYqVqwAdmV1a2nBtAec/cf3fpucW/k= +gorm.io/gorm v1.25.5 h1:zR9lOiiYf09VNh5Q1gphfyia1JpiClIWG9hQaxB/mls= +gorm.io/gorm v1.25.5/go.mod h1:hbnx/Oo0ChWMn1BIhpy1oYozzpM15i4YPuHDmfYtwg8= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4= diff --git a/go.work b/go.work index f01eace52..6800fa496 100644 --- a/go.work +++ b/go.work @@ -4,7 +4,7 @@ use ( . ./test/typecheck ./tools/changelog - ./tools/imctl + //./tools/imctl ./tools/infra ./tools/ncpu ./tools/openim-web @@ -12,4 +12,5 @@ use ( ./tools/yamlfmt ./tools/component ./tools/url2im + ./tools/data-conversion ) diff --git a/internal/api/msg.go b/internal/api/msg.go index 2777d8855..b9b10e98e 100644 --- a/internal/api/msg.go +++ b/internal/api/msg.go @@ -58,7 +58,7 @@ func (m MessageApi) newUserSendMsgReq(c *gin.Context, params *apistruct.SendMsg) options := make(map[string]bool, 5) switch params.ContentType { case constant.Text: - newContent = params.Content["text"].(string) + fallthrough case constant.Picture: fallthrough case constant.Custom: @@ -100,6 +100,7 @@ func (m MessageApi) newUserSendMsgReq(c *gin.Context, params *apistruct.SendMsg) ContentType: params.ContentType, Content: []byte(newContent), CreateTime: utils.GetCurrentTimestampByMill(), + SendTime: params.SendTime, Options: options, OfflinePushInfo: params.OfflinePushInfo, }, @@ -207,7 +208,6 @@ func (m *MessageApi) SendMessage(c *gin.Context) { apiresp.GinError(c, errs.ErrArgs.WithDetail(err.Error()).Wrap()) return } - log.ZInfo(c, "SendMessage", "req", req) if !authverify.IsAppManagerUid(c) { apiresp.GinError(c, errs.ErrNoPermission.Wrap("only app manager can send message")) return @@ -224,6 +224,7 @@ func (m *MessageApi) SendMessage(c *gin.Context) { respPb, err := m.Client.SendMsg(c, sendMsgReq) if err != nil { status = constant.MsgSendFailed + log.ZError(c, "send message err", err) apiresp.GinError(c, err) return } diff --git a/internal/api/route.go b/internal/api/route.go index 221e180a1..9a639a2de 100644 --- a/internal/api/route.go +++ b/internal/api/route.go @@ -156,6 +156,11 @@ func NewGinRouter(discov discoveryregistry.SvcDiscoveryRegistry, rdb redis.Unive thirdGroup.POST("/fcm_update_token", t.FcmUpdateToken) thirdGroup.POST("/set_app_badge", t.SetAppBadge) + logs := thirdGroup.Group("/logs") + logs.POST("/upload", t.UploadLogs) + logs.POST("/delete", t.DeleteLogs) + logs.POST("/search", t.SearchLogs) + objectGroup := r.Group("/object", ParseToken) objectGroup.POST("/part_limit", t.PartLimit) diff --git a/internal/api/third.go b/internal/api/third.go index dfc82d316..cdb059cc0 100644 --- a/internal/api/third.go +++ b/internal/api/third.go @@ -105,3 +105,16 @@ func (o *ThirdApi) ObjectRedirect(c *gin.Context) { } c.Redirect(http.StatusFound, resp.Url) } + +// #################### logs ####################. +func (o *ThirdApi) UploadLogs(c *gin.Context) { + a2r.Call(third.ThirdClient.UploadLogs, o.Client, c) +} + +func (o *ThirdApi) DeleteLogs(c *gin.Context) { + a2r.Call(third.ThirdClient.DeleteLogs, o.Client, c) +} + +func (o *ThirdApi) SearchLogs(c *gin.Context) { + a2r.Call(third.ThirdClient.SearchLogs, o.Client, c) +} diff --git a/internal/msggateway/client.go b/internal/msggateway/client.go index 8121535ad..b1eaaf057 100644 --- a/internal/msggateway/client.go +++ b/internal/msggateway/client.go @@ -59,7 +59,7 @@ const ( PongMessage = 10 ) -type PongHandler func(string) error +type PingPongHandler func(string) error type Client struct { w *sync.Mutex @@ -107,8 +107,12 @@ func (c *Client) ResetClient( c.token = token } -func (c *Client) pongHandler(_ string) error { +func (c *Client) pingHandler(_ string) error { c.conn.SetReadDeadline(pongWait) + err := c.writePongMsg() + if err != nil { + return err + } return nil } @@ -122,10 +126,11 @@ func (c *Client) readMessage() { }() c.conn.SetReadLimit(maxMessageSize) _ = c.conn.SetReadDeadline(pongWait) - c.conn.SetPongHandler(c.pongHandler) + c.conn.SetPingHandler(c.pingHandler) for { messageType, message, returnErr := c.conn.ReadMessage() if returnErr != nil { + log.ZWarn(c.ctx, "readMessage", returnErr, "messageType", messageType) c.closedErr = returnErr return } @@ -202,8 +207,8 @@ func (c *Client) handleMessage(message []byte) error { binaryReq.ReqIdentifier, ) } - c.replyMessage(ctx, &binaryReq, messageErr, resp) - return nil + + return c.replyMessage(ctx, &binaryReq, messageErr, resp) } func (c *Client) setAppBackgroundStatus(ctx context.Context, req Req) ([]byte, error) { @@ -224,7 +229,7 @@ func (c *Client) close() { c.longConnServer.UnRegister(c) } -func (c *Client) replyMessage(ctx context.Context, binaryReq *Req, err error, resp []byte) { +func (c *Client) replyMessage(ctx context.Context, binaryReq *Req, err error, resp []byte) error { errResp := apiresp.ParseError(err) mReply := Resp{ ReqIdentifier: binaryReq.ReqIdentifier, @@ -239,6 +244,10 @@ func (c *Client) replyMessage(ctx context.Context, binaryReq *Req, err error, re if err != nil { log.ZWarn(ctx, "wireBinaryMsg replyMessage", err, "resp", mReply.String()) } + if binaryReq.ReqIdentifier == WsLogoutMsg { + return errors.New("user logout") + } + return nil } func (c *Client) PushMessage(ctx context.Context, msgData *sdkws.MsgData) error { diff --git a/internal/msggateway/long_conn.go b/internal/msggateway/long_conn.go index 59e4d5b45..604619eb5 100644 --- a/internal/msggateway/long_conn.go +++ b/internal/msggateway/long_conn.go @@ -41,7 +41,8 @@ type LongConn interface { SetConnNil() // SetReadLimit sets the maximum size for a message read from the peer.bytes SetReadLimit(limit int64) - SetPongHandler(handler PongHandler) + SetPongHandler(handler PingPongHandler) + SetPingHandler(handler PingPongHandler) // GenerateLongConn Check the connection of the current and when it was sent are the same GenerateLongConn(w http.ResponseWriter, r *http.Request) error } @@ -116,10 +117,14 @@ func (d *GWebSocket) SetReadLimit(limit int64) { d.conn.SetReadLimit(limit) } -func (d *GWebSocket) SetPongHandler(handler PongHandler) { +func (d *GWebSocket) SetPongHandler(handler PingPongHandler) { d.conn.SetPongHandler(handler) } +func (d *GWebSocket) SetPingHandler(handler PingPongHandler) { + d.conn.SetPingHandler(handler) +} + //func (d *GWebSocket) CheckSendConnDiffNow() bool { // return d.conn == d.sendConn //} diff --git a/internal/rpc/conversation/conversaion.go b/internal/rpc/conversation/conversaion.go index 4b5b43fe8..e76f83008 100644 --- a/internal/rpc/conversation/conversaion.go +++ b/internal/rpc/conversation/conversaion.go @@ -204,10 +204,8 @@ func (c *conversationServer) SetConversations(ctx context.Context, req *pbconver if err := c.conversationDatabase.SyncPeerUserPrivateConversationTx(ctx, conversations); err != nil { return nil, err } - if len(req.UserIDs) != 1 || unequal > 0 { - for _, userID := range req.UserIDs { - c.conversationNotificationSender.ConversationSetPrivateNotification(ctx, userID, req.Conversation.UserID, req.Conversation.IsPrivateChat.Value, req.Conversation.ConversationID) - } + for _, userID := range req.UserIDs { + c.conversationNotificationSender.ConversationSetPrivateNotification(ctx, userID, req.Conversation.UserID, req.Conversation.IsPrivateChat.Value, req.Conversation.ConversationID) } } if req.Conversation.BurnDuration != nil { @@ -219,7 +217,7 @@ func (c *conversationServer) SetConversations(ctx context.Context, req *pbconver if err := c.conversationDatabase.SetUsersConversationFiledTx(ctx, req.UserIDs, &conversation, m); err != nil { return nil, err } - if len(req.UserIDs) != 1 || unequal > 0 { + if unequal > 0 { for _, v := range req.UserIDs { c.conversationNotificationSender.ConversationChangeNotification(ctx, v, []string{req.Conversation.ConversationID}) } diff --git a/internal/rpc/group/callback.go b/internal/rpc/group/callback.go index 6d92cfde2..38174738b 100644 --- a/internal/rpc/group/callback.go +++ b/internal/rpc/group/callback.go @@ -51,7 +51,7 @@ func CallbackBeforeCreateGroup(ctx context.Context, req *group.CreateGroupReq) ( RoleLevel: constant.GroupAdmin, }) } - for _, userID := range req.AdminUserIDs { + for _, userID := range req.MemberUserIDs { cbReq.InitMemberList = append(cbReq.InitMemberList, &apistruct.GroupAddMemberInfo{ UserID: userID, RoleLevel: constant.GroupOrdinaryUsers, diff --git a/internal/rpc/group/group.go b/internal/rpc/group/group.go index 507d83d81..8d529584a 100644 --- a/internal/rpc/group/group.go +++ b/internal/rpc/group/group.go @@ -121,14 +121,23 @@ func (s *groupServer) NotificationUserInfoUpdate(ctx context.Context, req *pbgro if err != nil { return nil, err } + groupIDs := make([]string, 0, len(members)) for _, member := range members { if member.Nickname != "" && member.FaceURL != "" { continue } - if err := s.Notification.GroupMemberInfoSetNotification(ctx, member.GroupID, member.UserID); err != nil { - log.ZError(ctx, "setGroupMemberInfo notification failed", err, "member", member.UserID, "groupID", member.GroupID) + groupIDs = append(groupIDs, member.GroupID) + } + log.ZInfo(ctx, "NotificationUserInfoUpdate", "joinGroupNum", len(members), "updateNum", len(groupIDs), "updateGroupIDs", groupIDs) + for _, groupID := range groupIDs { + if err := s.Notification.GroupMemberInfoSetNotification(ctx, groupID, req.UserID); err != nil { + log.ZError(ctx, "NotificationUserInfoUpdate setGroupMemberInfo notification failed", err, "groupID", groupID) } } + if err := s.GroupDatabase.DeleteGroupMemberHash(ctx, groupIDs); err != nil { + log.ZError(ctx, "NotificationUserInfoUpdate DeleteGroupMemberHash", err, "groupID", groupIDs) + } + return &pbgroup.NotificationUserInfoUpdateResp{}, nil } @@ -225,15 +234,16 @@ func (s *groupServer) CreateGroup(ctx context.Context, req *pbgroup.CreateGroupR return nil, err } joinGroup := func(userID string, roleLevel int32) error { - groupMember := convert.Pb2DbGroupMember(userMap[userID]) - groupMember.Nickname = "" - groupMember.GroupID = group.GroupID - groupMember.RoleLevel = roleLevel - groupMember.OperatorUserID = mcontext.GetOpUserID(ctx) - groupMember.JoinSource = constant.JoinByInvitation - groupMember.InviterUserID = mcontext.GetOpUserID(ctx) - groupMember.JoinTime = time.Now() - groupMember.MuteEndTime = time.Unix(0, 0) + groupMember := &relationtb.GroupMemberModel{ + GroupID: group.GroupID, + UserID: userID, + RoleLevel: roleLevel, + OperatorUserID: opUserID, + JoinSource: constant.JoinByInvitation, + InviterUserID: opUserID, + JoinTime: time.Now(), + MuteEndTime: time.UnixMilli(0), + } if err := CallbackBeforeMemberJoinGroup(ctx, groupMember, group.Ex); err != nil { return err } @@ -359,6 +369,9 @@ func (s *groupServer) InviteUserToGroup(ctx context.Context, req *pbgroup.Invite if err != nil { return nil, err } + if len(userMap) != len(req.InvitedUserIDs) { + return nil, errs.ErrRecordNotFound.Wrap("user not found") + } var groupMember *relationtb.GroupMemberModel var opUserID string if !authverify.IsAppManagerUid(ctx) { @@ -416,15 +429,16 @@ func (s *groupServer) InviteUserToGroup(ctx context.Context, req *pbgroup.Invite opUserID := mcontext.GetOpUserID(ctx) var groupMembers []*relationtb.GroupMemberModel for _, userID := range req.InvitedUserIDs { - member := convert.Pb2DbGroupMember(userMap[userID]) - member.Nickname = "" - member.GroupID = req.GroupID - member.RoleLevel = constant.GroupOrdinaryUsers - member.OperatorUserID = opUserID - member.InviterUserID = opUserID - member.JoinSource = constant.JoinByInvitation - member.JoinTime = time.Now() - member.MuteEndTime = time.Unix(0, 0) + member := &relationtb.GroupMemberModel{ + GroupID: req.GroupID, + UserID: userID, + RoleLevel: constant.GroupOrdinaryUsers, + OperatorUserID: opUserID, + InviterUserID: opUserID, + JoinSource: constant.JoinByInvitation, + JoinTime: time.Now(), + MuteEndTime: time.UnixMilli(0), + } if err := CallbackBeforeMemberJoinGroup(ctx, member, group.Ex); err != nil { return nil, err } @@ -800,14 +814,15 @@ func (s *groupServer) JoinGroup(ctx context.Context, req *pbgroup.JoinGroupReq) if group.GroupType == constant.SuperGroup { return nil, errs.ErrGroupTypeNotSupport.Wrap() } - groupMember := convert.Pb2DbGroupMember(user) - groupMember.GroupID = group.GroupID - groupMember.RoleLevel = constant.GroupOrdinaryUsers - groupMember.OperatorUserID = mcontext.GetOpUserID(ctx) - groupMember.JoinSource = constant.JoinByInvitation - groupMember.InviterUserID = req.InviterUserID - groupMember.JoinTime = time.Now() - groupMember.MuteEndTime = time.Unix(0, 0) + groupMember := &relationtb.GroupMemberModel{ + GroupID: group.GroupID, + UserID: user.UserID, + RoleLevel: constant.GroupOrdinaryUsers, + OperatorUserID: mcontext.GetOpUserID(ctx), + InviterUserID: req.InviterUserID, + JoinTime: time.Now(), + MuteEndTime: time.UnixMilli(0), + } if err := CallbackBeforeMemberJoinGroup(ctx, groupMember, group.Ex); err != nil { return nil, err } @@ -1272,6 +1287,9 @@ func (s *groupServer) SetGroupMemberInfo(ctx context.Context, req *pbgroup.SetGr if len(req.Members) == 0 { return nil, errs.ErrArgs.Wrap("members empty") } + for i := range req.Members { + req.Members[i].FaceURL = nil + } duplicateMap := make(map[[2]string]struct{}) userIDMap := make(map[string]struct{}) groupIDMap := make(map[string]struct{}) diff --git a/internal/rpc/msg/as_read.go b/internal/rpc/msg/as_read.go index 656849d1c..c31cd02dd 100644 --- a/internal/rpc/msg/as_read.go +++ b/internal/rpc/msg/as_read.go @@ -81,7 +81,8 @@ func (m *msgServer) SetConversationHasReadSeq( if err := m.MsgDatabase.SetHasReadSeq(ctx, req.UserID, req.ConversationID, req.HasReadSeq); err != nil { return nil, err } - if err = m.sendMarkAsReadNotification(ctx, req.ConversationID, constant.SingleChatType, req.UserID, req.UserID, nil, req.HasReadSeq); err != nil { + if err = m.sendMarkAsReadNotification(ctx, req.ConversationID, constant.SingleChatType, req.UserID, + req.UserID, nil, req.HasReadSeq); err != nil { return } return &msg.SetConversationHasReadSeqResp{}, nil @@ -119,7 +120,8 @@ func (m *msgServer) MarkMsgsAsRead( return } } - if err = m.sendMarkAsReadNotification(ctx, req.ConversationID, conversation.ConversationType, req.UserID, m.conversationAndGetRecvID(conversation, req.UserID), req.Seqs, hasReadSeq); err != nil { + if err = m.sendMarkAsReadNotification(ctx, req.ConversationID, conversation.ConversationType, req.UserID, + m.conversationAndGetRecvID(conversation, req.UserID), req.Seqs, hasReadSeq); err != nil { return } return &msg.MarkMsgsAsReadResp{}, nil @@ -131,44 +133,61 @@ func (m *msgServer) MarkConversationAsRead( ) (resp *msg.MarkConversationAsReadResp, err error) { conversation, err := m.Conversation.GetConversation(ctx, req.UserID, req.ConversationID) if err != nil { - return + return nil, err } hasReadSeq, err := m.MsgDatabase.GetHasReadSeq(ctx, req.UserID, req.ConversationID) if err != nil && errs.Unwrap(err) != redis.Nil { - return + return nil, err } - log.ZDebug(ctx, "MarkConversationAsRead", "hasReadSeq", hasReadSeq, "req.HasReadSeq", req.HasReadSeq) var seqs []int64 - if len(req.Seqs) == 0 { + + log.ZDebug(ctx, "MarkConversationAsRead", "hasReadSeq", hasReadSeq, + "req.HasReadSeq", req.HasReadSeq) + if conversation.ConversationType == constant.SingleChatType { for i := hasReadSeq + 1; i <= req.HasReadSeq; i++ { seqs = append(seqs, i) } - } else { - seqs = req.Seqs - } - if len(seqs) > 0 { - log.ZDebug(ctx, "MarkConversationAsRead", "seqs", seqs, "conversationID", req.ConversationID) - if err = m.MsgDatabase.MarkSingleChatMsgsAsRead(ctx, req.UserID, req.ConversationID, seqs); err != nil { - return + + if len(seqs) > 0 { + log.ZDebug(ctx, "MarkConversationAsRead", "seqs", seqs, "conversationID", req.ConversationID) + if err = m.MsgDatabase.MarkSingleChatMsgsAsRead(ctx, req.UserID, req.ConversationID, seqs); err != nil { + return nil, err + } } - } - if req.HasReadSeq > hasReadSeq { - err = m.MsgDatabase.SetHasReadSeq(ctx, req.UserID, req.ConversationID, req.HasReadSeq) - if err != nil { - return + if req.HasReadSeq > hasReadSeq { + err = m.MsgDatabase.SetHasReadSeq(ctx, req.UserID, req.ConversationID, req.HasReadSeq) + if err != nil { + return nil, err + } + hasReadSeq = req.HasReadSeq } - hasReadSeq = req.HasReadSeq - } - if err = m.sendMarkAsReadNotification(ctx, req.ConversationID, conversation.ConversationType, req.UserID, m.conversationAndGetRecvID(conversation, req.UserID), seqs, hasReadSeq); err != nil { - return + if err = m.sendMarkAsReadNotification(ctx, req.ConversationID, conversation.ConversationType, req.UserID, + m.conversationAndGetRecvID(conversation, req.UserID), seqs, hasReadSeq); err != nil { + return nil, err + } + + } else if conversation.ConversationType == constant.SuperGroupChatType { + if req.HasReadSeq > hasReadSeq { + err = m.MsgDatabase.SetHasReadSeq(ctx, req.UserID, req.ConversationID, req.HasReadSeq) + if err != nil { + return nil, err + } + hasReadSeq = req.HasReadSeq + } + if err = m.sendMarkAsReadNotification(ctx, req.ConversationID, constant.SingleChatType, req.UserID, + req.UserID, seqs, hasReadSeq); err != nil { + return nil, err + } + } + return &msg.MarkConversationAsReadResp{}, nil } func (m *msgServer) sendMarkAsReadNotification( ctx context.Context, conversationID string, - sesstionType int32, + sessionType int32, sendID, recvID string, seqs []int64, hasReadSeq int64, @@ -179,6 +198,9 @@ func (m *msgServer) sendMarkAsReadNotification( Seqs: seqs, HasReadSeq: hasReadSeq, } - m.notificationSender.NotificationWithSesstionType(ctx, sendID, recvID, constant.HasReadReceipt, sesstionType, tips) + err := m.notificationSender.NotificationWithSesstionType(ctx, sendID, recvID, constant.HasReadReceipt, sessionType, tips) + if err != nil { + log.ZWarn(ctx, "send has read Receipt err", err) + } return nil } diff --git a/internal/rpc/third/log.go b/internal/rpc/third/log.go new file mode 100644 index 000000000..aa83f58f7 --- /dev/null +++ b/internal/rpc/third/log.go @@ -0,0 +1,145 @@ +package third + +import ( + "context" + "crypto/rand" + "fmt" + "time" + + "github.com/OpenIMSDK/protocol/constant" + "github.com/OpenIMSDK/protocol/third" + "github.com/OpenIMSDK/tools/errs" + "github.com/OpenIMSDK/tools/utils" + utils2 "github.com/OpenIMSDK/tools/utils" + + "github.com/openimsdk/open-im-server/v3/pkg/authverify" + relationtb "github.com/openimsdk/open-im-server/v3/pkg/common/db/table/relation" +) + +func genLogID() string { + const dataLen = 10 + data := make([]byte, dataLen) + rand.Read(data) + chars := []byte("0123456789") + for i := 0; i < len(data); i++ { + if i == 0 { + data[i] = chars[1:][data[i]%9] + } else { + data[i] = chars[data[i]%10] + } + } + return string(data) +} + +func (t *thirdServer) UploadLogs(ctx context.Context, req *third.UploadLogsReq) (*third.UploadLogsResp, error) { + var DBlogs []*relationtb.Log + userID := ctx.Value(constant.OpUserID).(string) + platform := constant.PlatformID2Name[int(req.Platform)] + for _, fileURL := range req.FileURLs { + log := relationtb.Log{ + Version: req.Version, + SystemType: req.SystemType, + Platform: platform, + UserID: userID, + CreateTime: time.Now(), + Url: fileURL.URL, + FileName: fileURL.Filename, + } + for i := 0; i < 20; i++ { + id := genLogID() + logs, err := t.thirdDatabase.GetLogs(ctx, []string{id}, "") + if err != nil { + return nil, err + } + if len(logs) == 0 { + log.LogID = id + break + } + } + if log.LogID == "" { + return nil, errs.ErrData.Wrap("Log id gen error") + } + DBlogs = append(DBlogs, &log) + } + err := t.thirdDatabase.UploadLogs(ctx, DBlogs) + if err != nil { + return nil, err + } + return &third.UploadLogsResp{}, nil +} + +func (t *thirdServer) DeleteLogs(ctx context.Context, req *third.DeleteLogsReq) (*third.DeleteLogsResp, error) { + if err := authverify.CheckAdmin(ctx); err != nil { + return nil, err + } + userID := "" + logs, err := t.thirdDatabase.GetLogs(ctx, req.LogIDs, userID) + if err != nil { + return nil, err + } + var logIDs []string + for _, log := range logs { + logIDs = append(logIDs, log.LogID) + } + if ids := utils2.Single(req.LogIDs, logIDs); len(ids) > 0 { + return nil, errs.ErrRecordNotFound.Wrap(fmt.Sprintf("logIDs not found%#v", ids)) + } + err = t.thirdDatabase.DeleteLogs(ctx, req.LogIDs, userID) + if err != nil { + return nil, err + } + + return &third.DeleteLogsResp{}, nil +} + +func dbToPbLogInfos(logs []*relationtb.Log) []*third.LogInfo { + db2pbForLogInfo := func(log *relationtb.Log) *third.LogInfo { + return &third.LogInfo{ + Filename: log.FileName, + UserID: log.UserID, + Platform: utils.StringToInt32(log.Platform), + Url: log.Url, + CreateTime: log.CreateTime.UnixMilli(), + LogID: log.LogID, + SystemType: log.SystemType, + Version: log.Version, + Ex: log.Ex, + } + } + return utils.Slice(logs, db2pbForLogInfo) +} + +func (t *thirdServer) SearchLogs(ctx context.Context, req *third.SearchLogsReq) (*third.SearchLogsResp, error) { + if err := authverify.CheckAdmin(ctx); err != nil { + return nil, err + } + var ( + resp third.SearchLogsResp + userIDs []string + ) + if req.StartTime > req.EndTime { + return nil, errs.ErrArgs.Wrap("startTime>endTime") + } + total, logs, err := t.thirdDatabase.SearchLogs(ctx, req.Keyword, time.UnixMilli(req.StartTime), time.UnixMilli(req.EndTime), req.Pagination.PageNumber, req.Pagination.ShowNumber) + if err != nil { + return nil, err + } + pbLogs := dbToPbLogInfos(logs) + for _, log := range logs { + userIDs = append(userIDs, log.UserID) + } + users, err := t.thirdDatabase.FindUsers(ctx, userIDs) + if err != nil { + return nil, err + } + IDtoName := make(map[string]string) + for _, user := range users { + IDtoName[user.UserID] = user.Nickname + } + for _, pbLog := range pbLogs { + pbLog.Nickname = IDtoName[pbLog.UserID] + } + resp.LogsInfos = pbLogs + resp.Total = total + return &resp, nil +} diff --git a/internal/rpc/third/third.go b/internal/rpc/third/third.go index 221004bd5..ae32a1f40 100644 --- a/internal/rpc/third/third.go +++ b/internal/rpc/third/third.go @@ -35,6 +35,7 @@ import ( "github.com/openimsdk/open-im-server/v3/pkg/common/db/controller" "github.com/openimsdk/open-im-server/v3/pkg/common/db/relation" relationtb "github.com/openimsdk/open-im-server/v3/pkg/common/db/table/relation" + "github.com/openimsdk/open-im-server/v3/pkg/rpcclient" ) @@ -79,7 +80,7 @@ func Start(client discoveryregistry.SvcDiscoveryRegistry, server *grpc.Server) e } third.RegisterThirdServer(server, &thirdServer{ apiURL: apiURL, - thirdDatabase: controller.NewThirdDatabase(cache.NewMsgCacheModel(rdb)), + thirdDatabase: controller.NewThirdDatabase(cache.NewMsgCacheModel(rdb), db), userRpcClient: rpcclient.NewUserRpcClient(client), s3dataBase: controller.NewS3Database(o, relation.NewObjectInfo(db)), defaultExpire: time.Hour * 24 * 7, diff --git a/internal/rpc/user/callback.go b/internal/rpc/user/callback.go new file mode 100644 index 000000000..8f6ceef23 --- /dev/null +++ b/internal/rpc/user/callback.go @@ -0,0 +1,53 @@ +// 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 ( + "context" + + "github.com/OpenIMSDK/protocol/constant" + pbuser "github.com/OpenIMSDK/protocol/user" + "github.com/OpenIMSDK/tools/errs" + "github.com/OpenIMSDK/tools/mcontext" + "github.com/OpenIMSDK/tools/utils" + + cbapi "github.com/openimsdk/open-im-server/v3/pkg/callbackstruct" + "github.com/openimsdk/open-im-server/v3/pkg/common/config" + "github.com/openimsdk/open-im-server/v3/pkg/common/http" +) + +func CallbackBeforeUpdateUserInfo(ctx context.Context, req *pbuser.UpdateUserInfoReq) error { + if !config.Config.Callback.CallbackBeforeUpdateUserInfo.Enable { + return nil + } + cbReq := &cbapi.CallbackBeforeUpdateUserInfoReq{ + CallbackCommand: constant.CallbackBeforeUpdateUserInfoCommand, + OperationID: mcontext.GetOperationID(ctx), + UserID: req.UserInfo.UserID, + FaceURL: &req.UserInfo.FaceURL, + Nickname: &req.UserInfo.Nickname, + } + resp := &cbapi.CallbackBeforeUpdateUserInfoResp{} + if err := http.CallBackPostReturn(ctx, config.Config.Callback.CallbackUrl, cbReq, resp, config.Config.Callback.CallbackBeforeUpdateUserInfo); err != nil { + if err == errs.ErrCallbackContinue { + return nil + } + return err + } + utils.NotNilReplace(&req.UserInfo.FaceURL, resp.FaceURL) + utils.NotNilReplace(&req.UserInfo.Ex, resp.Ex) + utils.NotNilReplace(&req.UserInfo.Nickname, resp.Nickname) + return nil +} diff --git a/internal/rpc/user/user.go b/internal/rpc/user/user.go index 443f70cae..f2ceb3beb 100644 --- a/internal/rpc/user/user.go +++ b/internal/rpc/user/user.go @@ -115,6 +115,9 @@ func (s *userServer) UpdateUserInfo(ctx context.Context, req *pbuser.UpdateUserI if err != nil { return nil, err } + if err := CallbackBeforeUpdateUserInfo(ctx, req); err != nil { + return nil, err + } user := convert.UserPb2DB(req.UserInfo) if err != nil { return nil, err @@ -136,6 +139,9 @@ func (s *userServer) UpdateUserInfo(ctx context.Context, req *pbuser.UpdateUserI for _, friendID := range friends { s.friendNotificationSender.FriendInfoUpdatedNotification(ctx, req.UserInfo.UserID, friendID) } + if err := s.groupRpcClient.NotificationUserInfoUpdate(ctx, req.UserInfo.UserID); err != nil { + log.ZError(ctx, "NotificationUserInfoUpdate", err, "userID", req.UserInfo.UserID) + } return resp, nil } @@ -283,7 +289,8 @@ func (s *userServer) SubscribeOrCancelUsersStatus(ctx context.Context, req *pbus } // GetUserStatus Get the online status of the user. -func (s *userServer) GetUserStatus(ctx context.Context, req *pbuser.GetUserStatusReq) (resp *pbuser.GetUserStatusResp, err error) { +func (s *userServer) GetUserStatus(ctx context.Context, req *pbuser.GetUserStatusReq) (resp *pbuser.GetUserStatusResp, + err error) { onlineStatusList, err := s.UserDatabase.GetUserStatus(ctx, req.UserIDs) if err != nil { return nil, err @@ -292,31 +299,32 @@ func (s *userServer) GetUserStatus(ctx context.Context, req *pbuser.GetUserStatu } // SetUserStatus Synchronize user's online status. -func (s *userServer) SetUserStatus(ctx context.Context, req *pbuser.SetUserStatusReq) (resp *pbuser.SetUserStatusResp, err error) { - err = s.UserDatabase.SetUserStatus(ctx, req.StatusList) +func (s *userServer) SetUserStatus(ctx context.Context, req *pbuser.SetUserStatusReq) (resp *pbuser.SetUserStatusResp, + err error) { + err = s.UserDatabase.SetUserStatus(ctx, req.UserID, req.Status, req.PlatformID) if err != nil { return nil, err } - for _, value := range req.StatusList { - list, err := s.UserDatabase.GetSubscribedList(ctx, value.UserID) - if err != nil { - return nil, err - } - for _, userID := range list { - tips := &sdkws.UserStatusChangeTips{ - FromUserID: value.UserID, - ToUserID: userID, - Status: value.Status, - PlatformID: value.PlatformIDs[0], - } - s.userNotificationSender.UserStatusChangeNotification(ctx, tips) + list, err := s.UserDatabase.GetSubscribedList(ctx, req.UserID) + if err != nil { + return nil, err + } + for _, userID := range list { + tips := &sdkws.UserStatusChangeTips{ + FromUserID: req.UserID, + ToUserID: userID, + Status: req.Status, + PlatformID: req.PlatformID, } + s.userNotificationSender.UserStatusChangeNotification(ctx, tips) } + return &pbuser.SetUserStatusResp{}, nil } // GetSubscribeUsersStatus Get the online status of subscribers. -func (s *userServer) GetSubscribeUsersStatus(ctx context.Context, req *pbuser.GetSubscribeUsersStatusReq) (*pbuser.GetSubscribeUsersStatusResp, error) { +func (s *userServer) GetSubscribeUsersStatus(ctx context.Context, + req *pbuser.GetSubscribeUsersStatusReq) (*pbuser.GetSubscribeUsersStatusResp, error) { userList, err := s.UserDatabase.GetAllSubscribeList(ctx, req.UserID) if err != nil { return nil, err diff --git a/pkg/apistruct/manage.go b/pkg/apistruct/manage.go index eef38e403..7d30d2151 100644 --- a/pkg/apistruct/manage.go +++ b/pkg/apistruct/manage.go @@ -29,6 +29,7 @@ type SendMsg struct { SessionType int32 `json:"sessionType" binding:"required"` IsOnlineOnly bool `json:"isOnlineOnly"` NotOfflinePush bool `json:"notOfflinePush"` + SendTime int64 `json:"sendTime"` OfflinePushInfo *sdkws.OfflinePushInfo `json:"offlinePushInfo"` } diff --git a/pkg/callbackstruct/user.go b/pkg/callbackstruct/user.go new file mode 100644 index 000000000..f01f4ca8a --- /dev/null +++ b/pkg/callbackstruct/user.go @@ -0,0 +1,30 @@ +// 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 callbackstruct + +type CallbackBeforeUpdateUserInfoReq struct { + CallbackCommand `json:"callbackCommand"` + OperationID string `json:"operationID"` + UserID string `json:"userID"` + Nickname *string `json:"nickName"` + FaceURL *string `json:"faceURL"` + Ex *string `json:"ex"` +} +type CallbackBeforeUpdateUserInfoResp struct { + CommonCallbackResp + Nickname *string `json:"nickName"` + FaceURL *string `json:"faceURL"` + Ex *string `json:"ex"` +} diff --git a/pkg/common/config/config.go b/pkg/common/config/config.go index 60e0085fe..95f4a864e 100644 --- a/pkg/common/config/config.go +++ b/pkg/common/config/config.go @@ -78,9 +78,10 @@ type configStruct struct { } `yaml:"mongo"` Redis struct { - Address []string `yaml:"address"` - Username string `yaml:"username"` - Password string `yaml:"password"` + ClusterMode bool `yaml:"clusterMode"` + Address []string `yaml:"address"` + Username string `yaml:"username"` + Password string `yaml:"password"` } `yaml:"redis"` Kafka struct { @@ -131,12 +132,14 @@ type configStruct struct { SecretAccessKey string `yaml:"secretAccessKey"` SessionToken string `yaml:"sessionToken"` SignEndpoint string `yaml:"signEndpoint"` + PublicRead bool `yaml:"publicRead"` } `yaml:"minio"` Cos struct { BucketURL string `yaml:"bucketURL"` SecretID string `yaml:"secretID"` SecretKey string `yaml:"secretKey"` SessionToken string `yaml:"sessionToken"` + PublicRead bool `yaml:"publicRead"` } `yaml:"cos"` Oss struct { Endpoint string `yaml:"endpoint"` @@ -145,6 +148,7 @@ type configStruct struct { AccessKeyID string `yaml:"accessKeyID"` AccessKeySecret string `yaml:"accessKeySecret"` SessionToken string `yaml:"sessionToken"` + PublicRead bool `yaml:"publicRead"` } `yaml:"oss"` } `yaml:"object"` @@ -251,6 +255,7 @@ type configStruct struct { CallbackOnlinePush CallBackConfig `yaml:"onlinePush"` CallbackBeforeSuperGroupOnlinePush CallBackConfig `yaml:"superGroupOnlinePush"` CallbackBeforeAddFriend CallBackConfig `yaml:"beforeAddFriend"` + CallbackBeforeUpdateUserInfo CallBackConfig `yaml:"beforeUpdateUserInfo"` CallbackBeforeCreateGroup CallBackConfig `yaml:"beforeCreateGroup"` CallbackBeforeMemberJoinGroup CallBackConfig `yaml:"beforeMemberJoinGroup"` CallbackBeforeSetGroupMemberInfo CallBackConfig `yaml:"beforeSetGroupMemberInfo"` diff --git a/pkg/common/convert/group.go b/pkg/common/convert/group.go index c13016b7e..18940f518 100644 --- a/pkg/common/convert/group.go +++ b/pkg/common/convert/group.go @@ -138,11 +138,11 @@ func Pb2DBGroupInfo(m *sdkws.GroupInfo) *relation.GroupModel { } } -func Pb2DbGroupMember(m *sdkws.UserInfo) *relation.GroupMemberModel { - return &relation.GroupMemberModel{ - UserID: m.UserID, - Nickname: m.Nickname, - FaceURL: m.FaceURL, - Ex: m.Ex, - } -} +//func Pb2DbGroupMember(m *sdkws.UserInfo) *relation.GroupMemberModel { +// return &relation.GroupMemberModel{ +// UserID: m.UserID, +// Nickname: m.Nickname, +// FaceURL: m.FaceURL, +// Ex: m.Ex, +// } +//} diff --git a/pkg/common/db/cache/conversation.go b/pkg/common/db/cache/conversation.go index 083cf6d0b..d755de645 100644 --- a/pkg/common/db/cache/conversation.go +++ b/pkg/common/db/cache/conversation.go @@ -59,11 +59,8 @@ type ConversationCache interface { DelConversations(ownerUserID string, conversationIDs ...string) ConversationCache DelUsersConversation(conversationID string, ownerUserIDs ...string) ConversationCache // get one conversation from msgCache - GetConversations( - ctx context.Context, - ownerUserID string, - conversationIDs []string, - ) ([]*relationtb.ConversationModel, error) + GetConversations(ctx context.Context, ownerUserID string, + conversationIDs []string) ([]*relationtb.ConversationModel, error) // get one user's all conversations from msgCache GetUserAllConversations(ctx context.Context, ownerUserID string) ([]*relationtb.ConversationModel, error) // get user conversation recv msg from msgCache @@ -79,10 +76,8 @@ type ConversationCache interface { GetUserAllHasReadSeqs(ctx context.Context, ownerUserID string) (map[string]int64, error) DelUserAllHasReadSeqs(ownerUserID string, conversationIDs ...string) ConversationCache - GetConversationsByConversationID( - ctx context.Context, - conversationIDs []string, - ) ([]*relationtb.ConversationModel, error) + GetConversationsByConversationID(ctx context.Context, + conversationIDs []string) ([]*relationtb.ConversationModel, error) DelConversationByConversationID(conversationIDs ...string) ConversationCache GetConversationNotReceiveMessageUserIDs(ctx context.Context, conversationID string) ([]string, error) DelConversationNotReceiveMessageUserIDs(conversationIDs ...string) ConversationCache @@ -418,8 +413,7 @@ func (c *ConversationRedisCache) GetUserAllHasReadSeqs( ) } -func (c *ConversationRedisCache) DelUserAllHasReadSeqs( - ownerUserID string, +func (c *ConversationRedisCache) DelUserAllHasReadSeqs(ownerUserID string, conversationIDs ...string, ) ConversationCache { cache := c.NewCache() diff --git a/pkg/common/db/cache/init_redis.go b/pkg/common/db/cache/init_redis.go index fd0aff4a7..1a5507f89 100644 --- a/pkg/common/db/cache/init_redis.go +++ b/pkg/common/db/cache/init_redis.go @@ -39,7 +39,7 @@ func NewRedis() (redis.UniversalClient, error) { } specialerror.AddReplace(redis.Nil, errs.ErrRecordNotFound) var rdb redis.UniversalClient - if len(config.Config.Redis.Address) > 1 { + if len(config.Config.Redis.Address) > 1 || config.Config.Redis.ClusterMode { rdb = redis.NewClusterClient(&redis.ClusterOptions{ Addrs: config.Config.Redis.Address, Username: config.Config.Redis.Username, @@ -58,12 +58,13 @@ func NewRedis() (redis.UniversalClient, error) { }) } - var err error = nil + var err error ctx, cancel := context.WithTimeout(context.Background(), time.Second*10) defer cancel() err = rdb.Ping(ctx).Err() if err != nil { return nil, fmt.Errorf("redis ping %w", err) } + return rdb, err } diff --git a/pkg/common/db/cache/user.go b/pkg/common/db/cache/user.go index 8c270c6e4..5fb0fdde6 100644 --- a/pkg/common/db/cache/user.go +++ b/pkg/common/db/cache/user.go @@ -21,6 +21,8 @@ import ( "strconv" "time" + "github.com/OpenIMSDK/tools/log" + "github.com/OpenIMSDK/protocol/constant" "github.com/OpenIMSDK/protocol/user" @@ -51,7 +53,7 @@ type UserCache interface { GetUserGlobalRecvMsgOpt(ctx context.Context, userID string) (opt int, err error) DelUsersGlobalRecvMsgOpt(userIDs ...string) UserCache GetUserStatus(ctx context.Context, userIDs []string) ([]*user.OnlineStatus, error) - SetUserStatus(ctx context.Context, list []*user.OnlineStatus) error + SetUserStatus(ctx context.Context, userID string, status, platformID int32) error } type UserCacheRedis struct { @@ -198,95 +200,107 @@ func (u *UserCacheRedis) GetUserStatus(ctx context.Context, userIDs []string) ([ return nil, errs.Wrap(err) } onlineStatus.UserID = userID + onlineStatus.Status = constant.Online res = append(res, &onlineStatus) } return res, nil } // SetUserStatus Set the user status and save it in redis. -func (u *UserCacheRedis) SetUserStatus(ctx context.Context, list []*user.OnlineStatus) error { - for _, status := range list { - var isNewKey int64 - UserIDNum := crc32.ChecksumIEEE([]byte(status.UserID)) - modKey := strconv.Itoa(int(UserIDNum % statusMod)) - key := olineStatusKey + modKey - jsonData, err := json.Marshal(status) - if err != nil { +func (u *UserCacheRedis) SetUserStatus(ctx context.Context, userID string, status, platformID int32) error { + UserIDNum := crc32.ChecksumIEEE([]byte(userID)) + modKey := strconv.Itoa(int(UserIDNum % statusMod)) + key := olineStatusKey + modKey + log.ZDebug(ctx, "SetUserStatus args", "userID", userID, "status", status, + "platformID", platformID, "modKey", modKey, "key", key) + isNewKey, err := u.rdb.Exists(ctx, key).Result() + if err != nil { + return errs.Wrap(err) + } + if isNewKey == 0 { + if status == constant.Online { + onlineStatus := user.OnlineStatus{ + UserID: userID, + Status: constant.Online, + PlatformIDs: []int32{platformID}, + } + jsonData, err := json.Marshal(onlineStatus) + if err != nil { + return errs.Wrap(err) + } + _, err = u.rdb.HSet(ctx, key, userID, string(jsonData)).Result() + if err != nil { + return errs.Wrap(err) + } + u.rdb.Expire(ctx, key, userOlineStatusExpireTime) + return nil + } + } + + isNil := false + result, err := u.rdb.HGet(ctx, key, userID).Result() + if err != nil { + if err == redis.Nil { + isNil = true + } else { return errs.Wrap(err) } - isNewKey, err = u.rdb.Exists(ctx, key).Result() + } + + if status == constant.Offline { + if isNil { + log.ZWarn(ctx, "this user not online,maybe trigger order not right", + err, "userStatus", status) + return nil + } + var onlineStatus user.OnlineStatus + err = json.Unmarshal([]byte(result), &onlineStatus) if err != nil { return errs.Wrap(err) } - if isNewKey == 0 { - _, err = u.rdb.HSet(ctx, key, status.UserID, string(jsonData)).Result() + var newPlatformIDs []int32 + for _, val := range onlineStatus.PlatformIDs { + if val != platformID { + newPlatformIDs = append(newPlatformIDs, val) + } + } + if newPlatformIDs == nil { + _, err = u.rdb.HDel(ctx, key, userID).Result() if err != nil { return errs.Wrap(err) } - u.rdb.Expire(ctx, key, userOlineStatusExpireTime) } else { - result, err := u.rdb.HGet(ctx, key, status.UserID).Result() + onlineStatus.PlatformIDs = newPlatformIDs + newjsonData, err := json.Marshal(&onlineStatus) if err != nil { return errs.Wrap(err) } - var onlineStatus user.OnlineStatus - err = json.Unmarshal([]byte(result), &onlineStatus) + _, err = u.rdb.HSet(ctx, key, userID, string(newjsonData)).Result() if err != nil { return errs.Wrap(err) } - onlineStatus.UserID = status.UserID - if status.Status == constant.Offline { - var newPlatformIDs []int32 - for _, val := range onlineStatus.PlatformIDs { - if val != status.PlatformIDs[0] { - newPlatformIDs = append(newPlatformIDs, val) - } - } - if newPlatformIDs == nil { - onlineStatus.Status = constant.Offline - onlineStatus.PlatformIDs = []int32{} - newjsonData, err := json.Marshal(&onlineStatus) - if err != nil { - return errs.Wrap(err) - } - _, err = u.rdb.HSet(ctx, key, status.UserID, string(newjsonData)).Result() - if err != nil { - return errs.Wrap(err) - } - } else { - onlineStatus.PlatformIDs = newPlatformIDs - newjsonData, err := json.Marshal(&onlineStatus) - if err != nil { - return errs.Wrap(err) - } - _, err = u.rdb.HSet(ctx, key, status.UserID, string(newjsonData)).Result() - if err != nil { - return errs.Wrap(err) - } - } - } else { - onlineStatus.Status = constant.Online - // Judging whether to be kicked out. - flag := false - for _, val := range onlineStatus.PlatformIDs { - if val == status.PlatformIDs[0] { - flag = true - break - } - } - if !flag { - onlineStatus.PlatformIDs = append(onlineStatus.PlatformIDs, status.PlatformIDs[0]) - } - newjsonData, err := json.Marshal(&onlineStatus) - if err != nil { - return errs.Wrap(err) - } - _, err = u.rdb.HSet(ctx, key, status.UserID, string(newjsonData)).Result() - if err != nil { - return errs.Wrap(err) - } + } + } else { + var onlineStatus user.OnlineStatus + if !isNil { + err = json.Unmarshal([]byte(result), &onlineStatus) + if err != nil { + return errs.Wrap(err) } } + onlineStatus.Status = constant.Online + onlineStatus.UserID = userID + onlineStatus.PlatformIDs = append(onlineStatus.PlatformIDs, platformID) + newjsonData, err := json.Marshal(&onlineStatus) + if err != nil { + return errs.Wrap(err) + } + _, err = u.rdb.HSet(ctx, key, userID, string(newjsonData)).Result() + if err != nil { + return errs.Wrap(err) + } + } + return nil } diff --git a/pkg/common/db/controller/group.go b/pkg/common/db/controller/group.go index f7ded8a2e..194f3e8b2 100644 --- a/pkg/common/db/controller/group.go +++ b/pkg/common/db/controller/group.go @@ -81,6 +81,7 @@ type GroupDatabase interface { CountTotal(ctx context.Context, before *time.Time) (count int64, err error) // 获取范围内群增量 CountRangeEverydayTotal(ctx context.Context, start time.Time, end time.Time) (map[string]int64, error) + DeleteGroupMemberHash(ctx context.Context, groupIDs []string) error } func NewGroupDatabase( @@ -556,3 +557,15 @@ func (g *groupDatabase) FindGroupRequests(ctx context.Context, groupID string, u func (g *groupDatabase) FindNotDismissedGroup(ctx context.Context, groupIDs []string) (groups []*relationtb.GroupModel, err error) { return g.groupDB.FindNotDismissedGroup(ctx, groupIDs) } + +func (g *groupDatabase) DeleteGroupMemberHash(ctx context.Context, groupIDs []string) error { + if len(groupIDs) == 0 { + return nil + } + c := g.cache.NewCache() + for _, groupID := range groupIDs { + c = c.DelGroupMembersHash(groupID) + } + + return c.ExecDel(ctx) +} diff --git a/pkg/common/db/controller/third.go b/pkg/common/db/controller/third.go index c5476e490..971719b1f 100644 --- a/pkg/common/db/controller/third.go +++ b/pkg/common/db/controller/third.go @@ -16,21 +16,59 @@ package controller import ( "context" + "time" + + "gorm.io/gorm" "github.com/openimsdk/open-im-server/v3/pkg/common/db/cache" + dbimpl "github.com/openimsdk/open-im-server/v3/pkg/common/db/relation" + "github.com/openimsdk/open-im-server/v3/pkg/common/db/table/relation" ) type ThirdDatabase interface { FcmUpdateToken(ctx context.Context, account string, platformID int, fcmToken string, expireTime int64) error SetAppBadge(ctx context.Context, userID string, value int) error + // about log for debug + UploadLogs(ctx context.Context, logs []*relation.Log) error + DeleteLogs(ctx context.Context, logID []string, userID string) error + SearchLogs(ctx context.Context, keyword string, start time.Time, end time.Time, pageNumber int32, showNumber int32) (uint32, []*relation.Log, error) + GetLogs(ctx context.Context, LogIDs []string, userID string) ([]*relation.Log, error) + FindUsers(ctx context.Context, userIDs []string) ([]*relation.UserModel, error) } type thirdDatabase struct { - cache cache.MsgModel + cache cache.MsgModel + logdb relation.LogInterface + userdb relation.UserModelInterface +} + +// FindUsers implements ThirdDatabase. +func (t *thirdDatabase) FindUsers(ctx context.Context, userIDs []string) ([]*relation.UserModel, error) { + return t.userdb.Find(ctx, userIDs) +} + +// DeleteLogs implements ThirdDatabase. +func (t *thirdDatabase) DeleteLogs(ctx context.Context, logID []string, userID string) error { + return t.logdb.Delete(ctx, logID, userID) +} + +// GetLogs implements ThirdDatabase. +func (t *thirdDatabase) GetLogs(ctx context.Context, LogIDs []string, userID string) ([]*relation.Log, error) { + return t.logdb.Get(ctx, LogIDs, userID) +} + +// SearchLogs implements ThirdDatabase. +func (t *thirdDatabase) SearchLogs(ctx context.Context, keyword string, start time.Time, end time.Time, pageNumber int32, showNumber int32) (uint32, []*relation.Log, error) { + return t.logdb.Search(ctx, keyword, start, end, pageNumber, showNumber) +} + +// UploadLogs implements ThirdDatabase. +func (t *thirdDatabase) UploadLogs(ctx context.Context, logs []*relation.Log) error { + return t.logdb.Create(ctx, logs) } -func NewThirdDatabase(cache cache.MsgModel) ThirdDatabase { - return &thirdDatabase{cache: cache} +func NewThirdDatabase(cache cache.MsgModel, db *gorm.DB) ThirdDatabase { + return &thirdDatabase{cache: cache, logdb: dbimpl.NewLogGorm(db), userdb: dbimpl.NewUserGorm(db)} } func (t *thirdDatabase) FcmUpdateToken( diff --git a/pkg/common/db/controller/user.go b/pkg/common/db/controller/user.go index ab86cfd27..9c6fdc5c4 100644 --- a/pkg/common/db/controller/user.go +++ b/pkg/common/db/controller/user.go @@ -64,7 +64,7 @@ type UserDatabase interface { // GetUserStatus Get the online status of the user GetUserStatus(ctx context.Context, userIDs []string) ([]*user.OnlineStatus, error) // SetUserStatus Set the user status and store the user status in redis - SetUserStatus(ctx context.Context, list []*user.OnlineStatus) error + SetUserStatus(ctx context.Context, userID string, status, platformID int32) error } type userDatabase struct { @@ -217,6 +217,6 @@ func (u *userDatabase) GetUserStatus(ctx context.Context, userIDs []string) ([]* } // SetUserStatus Set the user status and save it in redis. -func (u *userDatabase) SetUserStatus(ctx context.Context, list []*user.OnlineStatus) error { - return u.cache.SetUserStatus(ctx, list) +func (u *userDatabase) SetUserStatus(ctx context.Context, userID string, status, platformID int32) error { + return u.cache.SetUserStatus(ctx, userID, status, platformID) } diff --git a/pkg/common/db/localcache/group.go b/pkg/common/db/localcache/group.go index 2e90d28bd..4958d91ee 100644 --- a/pkg/common/db/localcache/group.go +++ b/pkg/common/db/localcache/group.go @@ -52,18 +52,24 @@ func (g *GroupLocalCache) GetGroupMemberIDs(ctx context.Context, groupID string) if len(resp.GroupAbstractInfos) < 1 { return nil, errs.ErrGroupIDNotFound } + g.lock.Lock() - defer g.lock.Unlock() localHashInfo, ok := g.cache[groupID] if ok && localHashInfo.memberListHash == resp.GroupAbstractInfos[0].GroupMemberListHash { + g.lock.Unlock() return localHashInfo.userIDs, nil } + g.lock.Unlock() + groupMembersResp, err := g.client.Client.GetGroupMemberUserIDs(ctx, &group.GetGroupMemberUserIDsReq{ GroupID: groupID, }) if err != nil { return nil, err } + + g.lock.Lock() + defer g.lock.Unlock() g.cache[groupID] = GroupMemberIDsHash{ memberListHash: resp.GroupAbstractInfos[0].GroupMemberListHash, userIDs: groupMembersResp.UserIDs, diff --git a/pkg/common/db/relation/log_model.go b/pkg/common/db/relation/log_model.go new file mode 100644 index 000000000..bf39512e8 --- /dev/null +++ b/pkg/common/db/relation/log_model.go @@ -0,0 +1,48 @@ +package relation + +import ( + "context" + "time" + + "github.com/OpenIMSDK/tools/errs" + "github.com/OpenIMSDK/tools/ormutil" + "gorm.io/gorm" + + relationtb "github.com/openimsdk/open-im-server/v3/pkg/common/db/table/relation" +) + +type LogGorm struct { + db *gorm.DB +} + +func (l *LogGorm) Create(ctx context.Context, log []*relationtb.Log) error { + return errs.Wrap(l.db.WithContext(ctx).Create(log).Error) +} + +func (l *LogGorm) Search(ctx context.Context, keyword string, start time.Time, end time.Time, pageNumber int32, showNumber int32) (uint32, []*relationtb.Log, error) { + db := l.db.WithContext(ctx).Where("create_time >= ?", start) + if end.UnixMilli() != 0 { + db = l.db.WithContext(ctx).Where("create_time <= ?", end) + } + return ormutil.GormSearch[relationtb.Log](db, []string{"user_id"}, keyword, pageNumber, showNumber) +} + +func (l *LogGorm) Delete(ctx context.Context, logIDs []string, userID string) error { + if userID == "" { + return errs.Wrap(l.db.WithContext(ctx).Where("log_id in ?", logIDs).Delete(&relationtb.Log{}).Error) + } + return errs.Wrap(l.db.WithContext(ctx).Where("log_id in ? and user_id=?", logIDs, userID).Delete(&relationtb.Log{}).Error) +} + +func (l *LogGorm) Get(ctx context.Context, logIDs []string, userID string) ([]*relationtb.Log, error) { + var logs []*relationtb.Log + if userID == "" { + return logs, errs.Wrap(l.db.WithContext(ctx).Where("log_id in ?", logIDs).Find(&logs).Error) + } + return logs, errs.Wrap(l.db.WithContext(ctx).Where("log_id in ? and user_id=?", logIDs, userID).Find(&logs).Error) +} + +func NewLogGorm(db *gorm.DB) relationtb.LogInterface { + db.AutoMigrate(&relationtb.Log{}) + return &LogGorm{db: db} +} diff --git a/pkg/common/db/s3/cos/cos.go b/pkg/common/db/s3/cos/cos.go index 57a205cbe..7add88487 100644 --- a/pkg/common/db/s3/cos/cos.go +++ b/pkg/common/db/s3/cos/cos.go @@ -288,7 +288,7 @@ func (c *Cos) AccessURL(ctx context.Context, name string, expire time.Duration, style = append(style, "format/"+opt.Image.Format) } if len(style) > 0 { - imageMogr = "&imageMogr2/thumbnail/" + strings.Join(style, "/") + "/ignore-error/1" + imageMogr = "imageMogr2/thumbnail/" + strings.Join(style, "/") + "/ignore-error/1" } } if opt.ContentType != "" { @@ -306,13 +306,23 @@ func (c *Cos) AccessURL(ctx context.Context, name string, expire time.Duration, } 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, &option) + rawURL, err := c.getPresignedURL(ctx, name, expire, &option) if err != nil { return "", err } - urlStr := rawURL.String() if imageMogr != "" { - urlStr += imageMogr + if rawURL.RawQuery == "" { + rawURL.RawQuery = imageMogr + } else { + rawURL.RawQuery = rawURL.RawQuery + "&" + imageMogr + } + } + return rawURL.String(), nil +} + +func (c *Cos) getPresignedURL(ctx context.Context, name string, expire time.Duration, opt *cos.PresignedURLOptions) (*url.URL, error) { + if !config.Config.Object.Cos.PublicRead { + return c.client.Object.GetPresignedURL(ctx, http.MethodGet, name, c.credential.SecretID, c.credential.SecretKey, expire, opt) } - return urlStr, nil + return c.client.Object.GetObjectURL(name), nil } diff --git a/pkg/common/db/s3/cos/doc.go b/pkg/common/db/s3/cos/doc.go deleted file mode 100644 index 592f90ee2..000000000 --- a/pkg/common/db/s3/cos/doc.go +++ /dev/null @@ -1,15 +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 cos // import "github.com/openimsdk/open-im-server/v3/pkg/common/db/s3/cos" diff --git a/pkg/common/db/s3/cos/internal.go b/pkg/common/db/s3/cos/internal.go new file mode 100644 index 000000000..0e58a851c --- /dev/null +++ b/pkg/common/db/s3/cos/internal.go @@ -0,0 +1,13 @@ +package cos + +import ( + "context" + "net/http" + "net/url" + _ "unsafe" + + "github.com/tencentyun/cos-go-sdk-v5" +) + +//go:linkname newRequest github.com/tencentyun/cos-go-sdk-v5.(*Client).newRequest +func newRequest(c *cos.Client, ctx context.Context, baseURL *url.URL, uri, method string, body interface{}, optQuery interface{}, optHeader interface{}) (req *http.Request, err error) diff --git a/pkg/common/db/s3/minio/doc.go b/pkg/common/db/s3/minio/doc.go deleted file mode 100644 index 42e898c15..000000000 --- a/pkg/common/db/s3/minio/doc.go +++ /dev/null @@ -1,15 +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 minio // import "github.com/openimsdk/open-im-server/v3/pkg/common/db/s3/minio" diff --git a/pkg/common/db/s3/minio/internal.go b/pkg/common/db/s3/minio/internal.go new file mode 100644 index 000000000..41129ce31 --- /dev/null +++ b/pkg/common/db/s3/minio/internal.go @@ -0,0 +1,11 @@ +package minio + +import ( + "net/url" + _ "unsafe" + + "github.com/minio/minio-go/v7" +) + +//go:linkname makeTargetURL github.com/minio/minio-go/v7.(*Client).makeTargetURL +func makeTargetURL(client *minio.Client, bucketName, objectName, bucketLocation string, isVirtualHostStyle bool, queryValues url.Values) (*url.URL, error) diff --git a/pkg/common/db/s3/minio/minio.go b/pkg/common/db/s3/minio/minio.go index 937b9f78a..037c933bb 100644 --- a/pkg/common/db/s3/minio/minio.go +++ b/pkg/common/db/s3/minio/minio.go @@ -139,6 +139,15 @@ func (m *Minio) initMinio(ctx context.Context) error { return fmt.Errorf("make bucket error: %w", err) } } + if conf.PublicRead { + policy := fmt.Sprintf( + `{"Version": "2012-10-17","Statement": [{"Action": ["s3:GetObject","s3:PutObject"],"Effect": "Allow","Principal": {"AWS": ["*"]},"Resource": ["arn:aws:s3:::%s/*"],"Sid": ""}]}`, + conf.Bucket, + ) + if err := m.core.Client.SetBucketPolicy(ctx, conf.Bucket, policy); err != nil { + return err + } + } m.location, err = m.core.Client.GetBucketLocation(ctx, conf.Bucket) if err != nil { return err @@ -375,7 +384,15 @@ func (m *Minio) presignedGetObject(ctx context.Context, name string, expire time } else if expire < time.Second { expire = time.Second } - rawURL, err := m.sign.PresignedGetObject(ctx, m.bucket, name, expire, query) + var ( + rawURL *url.URL + err error + ) + if config.Config.Object.Minio.PublicRead { + rawURL, err = makeTargetURL(m.sign, m.bucket, name, m.location, false, query) + } else { + rawURL, err = m.sign.PresignedGetObject(ctx, m.bucket, name, expire, query) + } if err != nil { return "", err } diff --git a/pkg/common/db/s3/oss/internal.go b/pkg/common/db/s3/oss/internal.go new file mode 100644 index 000000000..4ca1acc47 --- /dev/null +++ b/pkg/common/db/s3/oss/internal.go @@ -0,0 +1,39 @@ +// 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 oss + +import ( + "net/http" + "net/url" + _ "unsafe" + + "github.com/aliyun/aliyun-oss-go-sdk/oss" +) + +//go:linkname signHeader github.com/aliyun/aliyun-oss-go-sdk/oss.Conn.signHeader +func signHeader(c oss.Conn, req *http.Request, canonicalizedResource string) + +//go:linkname getURLParams github.com/aliyun/aliyun-oss-go-sdk/oss.Conn.getURLParams +func getURLParams(c oss.Conn, params map[string]interface{}) string + +//go:linkname getURL github.com/aliyun/aliyun-oss-go-sdk/oss.urlMaker.getURL +func getURL(um urlMaker, bucket, object, params string) *url.URL + +type urlMaker struct { + Scheme string + NetLoc string + Type int + IsProxy bool +} diff --git a/pkg/common/db/s3/oss/oss.go b/pkg/common/db/s3/oss/oss.go index 384ce8093..6a728127b 100644 --- a/pkg/common/db/s3/oss/oss.go +++ b/pkg/common/db/s3/oss/oss.go @@ -20,6 +20,7 @@ import ( "fmt" "net/http" "net/url" + "reflect" "strconv" "strings" "time" @@ -69,6 +70,7 @@ func NewOSS() (s3.Interface, error) { bucketURL: conf.BucketURL, bucket: bucket, credentials: client.Config.GetCredentials(), + um: *(*urlMaker)(reflect.ValueOf(bucket.Client.Conn).Elem().FieldByName("url").UnsafePointer()), }, nil } @@ -76,6 +78,7 @@ type OSS struct { bucketURL string bucket *oss.Bucket credentials oss.Credentials + um urlMaker } func (o *OSS) Engine() string { @@ -163,7 +166,7 @@ func (o *OSS) AuthSign(ctx context.Context, uploadID string, name string, expire request.Header.Set(oss.HTTPHeaderHost, request.Host) request.Header.Set(oss.HTTPHeaderDate, now) request.Header.Set(oss.HttpHeaderOssDate, now) - ossSignHeader(o.bucket.Client.Conn, request, fmt.Sprintf(`/%s/%s?partNumber=%d&uploadId=%s`, o.bucket.BucketName, name, partNumber, uploadID)) + signHeader(*o.bucket.Client.Conn, request, fmt.Sprintf(`/%s/%s?partNumber=%d&uploadId=%s`, o.bucket.BucketName, name, partNumber, uploadID)) delete(request.Header, oss.HTTPHeaderDate) result.Parts[i] = s3.SignPart{ PartNumber: partNumber, @@ -272,6 +275,7 @@ 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) { + publicRead := config.Config.Object.Oss.PublicRead var opts []oss.Option if opt != nil { if opt.Image != nil { @@ -299,11 +303,13 @@ func (o *OSS) AccessURL(ctx context.Context, name string, expire time.Duration, process += ",format," + format opts = append(opts, oss.Process(process)) } - if opt.ContentType != "" { - opts = append(opts, oss.ResponseContentType(opt.ContentType)) - } - if opt.Filename != "" { - opts = append(opts, oss.ResponseContentDisposition(`attachment; filename=`+strconv.Quote(opt.Filename))) + if !publicRead { + if opt.ContentType != "" { + opts = append(opts, oss.ResponseContentType(opt.ContentType)) + } + if opt.Filename != "" { + opts = append(opts, oss.ResponseContentDisposition(`attachment; filename=`+strconv.Quote(opt.Filename))) + } } } if expire <= 0 { @@ -311,5 +317,13 @@ func (o *OSS) AccessURL(ctx context.Context, name string, expire time.Duration, } else if expire < time.Second { expire = time.Second } - return o.bucket.SignURL(name, http.MethodGet, int64(expire/time.Second), opts...) + if !publicRead { + return o.bucket.SignURL(name, http.MethodGet, int64(expire/time.Second), opts...) + } + rawParams, err := oss.GetRawParams(opts) + if err != nil { + return "", err + } + params := getURLParams(*o.bucket.Client.Conn, rawParams) + return getURL(o.um, o.bucket.BucketName, name, params).String(), nil } diff --git a/pkg/common/db/table/relation/log.go b/pkg/common/db/table/relation/log.go new file mode 100644 index 000000000..72d0fa64e --- /dev/null +++ b/pkg/common/db/table/relation/log.go @@ -0,0 +1,25 @@ +package relation + +import ( + "context" + "time" +) + +type Log struct { + LogID string `gorm:"column:log_id;primary_key;type:char(64)"` + Platform string `gorm:"column:platform;type:varchar(32)"` + UserID string `gorm:"column:user_id;type:char(64)"` + CreateTime time.Time `gorm:"index:,sort:desc"` + Url string `gorm:"column:url;type varchar(255)"` + FileName string `gorm:"column:filename;type varchar(255)"` + SystemType string `gorm:"column:system_type;type varchar(255)"` + Version string `gorm:"column:version;type varchar(255)"` + Ex string `gorm:"column:ex;type varchar(255)"` +} + +type LogInterface interface { + Create(ctx context.Context, log []*Log) error + Search(ctx context.Context, keyword string, start time.Time, end time.Time, pageNumber int32, showNumber int32) (uint32, []*Log, error) + Delete(ctx context.Context, logID []string, userID string) error + Get(ctx context.Context, logIDs []string, userID string) ([]*Log, error) +} diff --git a/pkg/common/db/unrelation/user.go b/pkg/common/db/unrelation/user.go index 777f27386..4b4a78c79 100644 --- a/pkg/common/db/unrelation/user.go +++ b/pkg/common/db/unrelation/user.go @@ -163,7 +163,11 @@ func (u *UserMongoDriver) GetAllSubscribeList(ctx context.Context, userID string bson.M{"user_id": SubscriptionPrefix + userID}) err = cursor.Decode(&user) if err != nil { - return nil, errs.Wrap(err) + if err == mongo.ErrNoDocuments { + return []string{}, nil + } else { + return nil, errs.Wrap(err) + } } return user.UserIDList, nil } @@ -176,7 +180,11 @@ func (u *UserMongoDriver) GetSubscribedList(ctx context.Context, userID string) bson.M{"user_id": SubscribedPrefix + userID}) err = cursor.Decode(&user) if err != nil { - return nil, errs.Wrap(err) + if err == mongo.ErrNoDocuments { + return []string{}, nil + } else { + return nil, errs.Wrap(err) + } } return user.UserIDList, nil } diff --git a/pkg/rpcclient/user.go b/pkg/rpcclient/user.go index 6929b4fd9..c40d95727 100644 --- a/pkg/rpcclient/user.go +++ b/pkg/rpcclient/user.go @@ -173,6 +173,9 @@ func (u *UserRpcClient) GetAllUserIDs(ctx context.Context, pageNumber, showNumbe // SetUserStatus sets the status for a user based on the provided user ID, status, and platform ID. func (u *UserRpcClient) SetUserStatus(ctx context.Context, userID string, status int32, platformID int) error { - _, err := u.Client.SetUserStatus(ctx, &user.SetUserStatusReq{StatusList: []*user.OnlineStatus{{UserID: userID, Status: status, PlatformIDs: []int32{int32(platformID)}}}}) + _, err := u.Client.SetUserStatus(ctx, &user.SetUserStatusReq{ + UserID: userID, + Status: status, PlatformID: int32(platformID), + }) return err } diff --git a/scripts/check-all.sh b/scripts/check-all.sh index defc030f8..f1d72c41c 100755 --- a/scripts/check-all.sh +++ b/scripts/check-all.sh @@ -62,6 +62,7 @@ echo "+++ The port being checked: ${OPENIM_DEPENDENCY_PORT_LISTARIES[@]}" set +e +# Later, after discarding Docker, the Docker keyword is unreliable, and Kubepods is used if grep -qE 'docker|kubepods' /proc/1/cgroup || [ -f /.dockerenv ]; then openim::color::echo ${COLOR_BLUE} "Environment in the interior of the container" else diff --git a/scripts/install-im-server.sh b/scripts/install-im-server.sh index b542385b6..76d5120fe 100755 --- a/scripts/install-im-server.sh +++ b/scripts/install-im-server.sh @@ -25,7 +25,6 @@ source "${OPENIM_ROOT}/scripts/lib/init.sh" trap 'openim::util::onCtrlC' INT chmod +x "${OPENIM_ROOT}"/scripts/*.sh -"${OPENIM_ROOT}"/scripts/init-config.sh openim::util::ensure_docker_daemon_connectivity @@ -40,10 +39,12 @@ else fi pushd "${OPENIM_ROOT}" - -${DOCKER_COMPOSE_COMMAND} up -d +${DOCKER_COMPOSE_COMMAND} stop +curl https://gitee.com/openimsdk/openim-docker/raw/main/example/full-openim-server-and-chat.yml -o docker-compose.yml && make init && docker compose up -d +"${OPENIM_ROOT}"/scripts/init-config.sh +${DOCKER_COMPOSE_COMMAND} up --remove-orphans -d sleep 60 -${DOCKER_COMPOSE_COMMAND} logs +${DOCKER_COMPOSE_COMMAND} logs openim-server ${DOCKER_COMPOSE_COMMAND} ps popd diff --git a/scripts/install/environment.sh b/scripts/install/environment.sh index b17570be5..ce8eb56ec 100755 --- a/scripts/install/environment.sh +++ b/scripts/install/environment.sh @@ -69,6 +69,15 @@ def "ENV_FILE" ""${OPENIM_ROOT}"/scripts/install/environment.sh" def "CHAT_BRANCH" "main" def "SERVER_BRANCH" "main" +# Choose the appropriate image address, the default is GITHUB image, +# you can choose docker hub, for Chinese users can choose Ali Cloud +# export IMAGE_REGISTRY="ghcr.io/openimsdk" +# export IMAGE_REGISTRY="openim" +# export IMAGE_REGISTRY="registry.cn-hangzhou.aliyuncs.com/openimsdk" +def "IMAGE_REGISTRY" "ghcr.io/openimsdk" +# def "IMAGE_REGISTRY" "openim" +# def "IMAGE_REGISTRY" "registry.cn-hangzhou.aliyuncs.com/openimsdk" + ###################### OpenIM Docker Network ###################### # 设置 Docker 网络的网段 readonly DOCKER_BRIDGE_SUBNET=${DOCKER_BRIDGE_SUBNET:-'172.28.0.0/16'} @@ -186,17 +195,21 @@ def "MINIO_ACCESS_KEY" "${USER}" def "MINIO_SECRET_KEY" "${PASSWORD}" # MinIO的密钥 def "MINIO_SESSION_TOKEN" # MinIO的会话令牌 readonly MINIO_SIGN_ENDPOINT=${MINIO_SIGN_ENDPOINT:-"http://${IP}:${MINIO_PORT}"} # signEndpoint为minio公网地址 +def "MINIO_PUBLIC_READ" "false" # 公有读 + # 腾讯云COS的存储桶URL def "COS_BUCKET_URL" "https://temp-1252357374.cos.ap-chengdu.myqcloud.com" def "COS_SECRET_ID" # 腾讯云COS的密钥ID def "COS_SECRET_KEY" # 腾讯云COS的密钥 def "COS_SESSION_TOKEN" # 腾讯云COS的会话令牌 +def "COS_PUBLIC_READ" "false" # 公有读 def "OSS_ENDPOINT" "https://oss-cn-chengdu.aliyuncs.com" # 阿里云OSS的端点URL def "OSS_BUCKET" "demo-9999999" # 阿里云OSS的存储桶名称 def "OSS_BUCKET_URL" "https://demo-9999999.oss-cn-chengdu.aliyuncs.com" # 阿里云OSS的存储桶URL def "OSS_ACCESS_KEY_ID" # 阿里云OSS的访问密钥ID def "OSS_ACCESS_KEY_SECRET" # 阿里云OSS的密钥 def "OSS_SESSION_TOKEN" # 阿里云OSS的会话令牌 +def "OSS_PUBLIC_READ" "false" # 公有读 ###################### Redis 配置信息 ###################### def "REDIS_PORT" "16379" # Redis的端口 @@ -285,11 +298,16 @@ def "WEBSOCKET_TIMEOUT" "10" # Websocket超时 def "PUSH_ENABLE" "getui" # 推送是否启用 # GeTui推送URL readonly GETUI_PUSH_URL=${GETUI_PUSH_URL:-'https://restapi.getui.com/v2/$appId'} +def "GETUI_MASTER_SECRET" "" # GeTui主密钥 +def "GETUI_APP_KEY" "" # GeTui应用密钥 +def "GETUI_INTENT" "" # GeTui推送意图 +def "GETUI_CHANNEL_ID" "" # GeTui渠道ID +def "GETUI_CHANNEL_NAME" "" # GeTui渠道名称 def "FCM_SERVICE_ACCOUNT" "x.json" # FCM服务账户 -def "JPNS_APP_KEY" # JPNS应用密钥 -def "JPNS_MASTER_SECRET" # JPNS主密钥 -def "JPNS_PUSH_URL" # JPNS推送URL -def "JPNS_PUSH_INTENT" # JPNS推送意图 +def "JPNS_APP_KEY" "" # JPNS应用密钥 +def "JPNS_MASTER_SECRET" "" # JPNS主密钥 +def "JPNS_PUSH_URL" "" # JPNS推送URL +def "JPNS_PUSH_INTENT" "" # JPNS推送意图 def "MANAGER_USERID_1" "openIM123456" # 管理员ID 1 def "MANAGER_USERID_2" "openIM654321" # 管理员ID 2 def "MANAGER_USERID_3" "openIMAdmin" # 管理员ID 3 diff --git a/scripts/install/openim-crontask.sh b/scripts/install/openim-crontask.sh index 1f6cf5ffe..455dafa8b 100755 --- a/scripts/install/openim-crontask.sh +++ b/scripts/install/openim-crontask.sh @@ -48,7 +48,7 @@ function openim::crontask::start() openim::log::info "Start OpenIM Cron, binary root: ${SERVER_NAME}" openim::log::status "Start OpenIM Cron, path: ${OPENIM_CRONTASK_BINARY}" - openim::util::stop_services_with_name ${SERVER_NAME} + openim::util::stop_services_with_name ${OPENIM_CRONTASK_BINARY} openim::log::status "start cron_task process, path: ${OPENIM_CRONTASK_BINARY}" nohup ${OPENIM_CRONTASK_BINARY} >> ${LOG_FILE} 2>&1 & diff --git a/scripts/install/openim-msggateway.sh b/scripts/install/openim-msggateway.sh index c51c20646..612b7ae16 100755 --- a/scripts/install/openim-msggateway.sh +++ b/scripts/install/openim-msggateway.sh @@ -18,11 +18,11 @@ set -o errexit set +o nounset set -o pipefail -ulimit -n 200000 - OPENIM_ROOT=$(cd "$(dirname "${BASH_SOURCE[0]}")"/../.. && pwd -P) [[ -z ${COMMON_SOURCED} ]] && source "${OPENIM_ROOT}"/scripts/install/common.sh +openim::util::set_max_fd 200000 + SERVER_NAME="openim-msggateway" function openim::msggateway::start() diff --git a/scripts/install/openim-msgtransfer.sh b/scripts/install/openim-msgtransfer.sh index 428f6b64e..51ac78850 100755 --- a/scripts/install/openim-msgtransfer.sh +++ b/scripts/install/openim-msgtransfer.sh @@ -18,11 +18,11 @@ set -o errexit set +o nounset set -o pipefail -ulimit -n 200000 - OPENIM_ROOT=$(cd "$(dirname "${BASH_SOURCE[0]}")"/../.. && pwd -P) [[ -z ${COMMON_SOURCED} ]] && source "${OPENIM_ROOT}"/scripts/install/common.sh +openim::util::set_max_fd 200000 + SERVER_NAME="openim-msgtransfer" function openim::msgtransfer::start() diff --git a/scripts/install/openim-push.sh b/scripts/install/openim-push.sh index aa5ebe7d4..9b1d4d53f 100755 --- a/scripts/install/openim-push.sh +++ b/scripts/install/openim-push.sh @@ -54,14 +54,14 @@ function openim::push::start() openim::log::status "Start OpenIM Push, binary root: ${SERVER_NAME}" openim::log::info "Start OpenIM Push, path: ${OPENIM_PUSH_BINARY}" - openim::util::stop_services_with_name ${SERVER_NAME} - openim::log::status "prepare start push process, path: ${OPENIM_PUSH_BINARY}" openim::log::status "prepare start push process, port: ${OPENIM_PUSH_PORT}, prometheus port: ${PUSH_PROM_PORT}" OPENIM_PUSH_PORTS_ARRAY=$(openim::util::list-to-string ${OPENIM_PUSH_PORT} ) PUSH_PROM_PORTS_ARRAY=$(openim::util::list-to-string ${PUSH_PROM_PORT} ) + openim::util::stop_services_with_name ${SERVER_NAME} + openim::log::status "push port list: ${OPENIM_PUSH_PORTS_ARRAY[@]}" openim::log::status "prometheus port list: ${PUSH_PROM_PORTS_ARRAY[@]}" @@ -94,7 +94,7 @@ function openim::push::install() # 1. Build openim-push make build BINS=${SERVER_NAME} - openim::common::sudo "cp ${OPENIM_OUTPUT_HOSTBIN}/${SERVER_NAME} ${OPENIM_INSTALL_DIR}/bin" + openim::common::sudo "cp -r ${OPENIM_OUTPUT_HOSTBIN}/${SERVER_NAME} ${OPENIM_INSTALL_DIR}/bin" openim::log::status "${SERVER_NAME} binary: ${OPENIM_INSTALL_DIR}/bin/${SERVER_NAME}" @@ -150,4 +150,4 @@ function openim::push::status() if [[ "$*" =~ openim::push:: ]];then eval $* -fi \ No newline at end of file +fi diff --git a/scripts/install/openim-tools.sh b/scripts/install/openim-tools.sh index 1dacf68a8..fd95dc00d 100755 --- a/scripts/install/openim-tools.sh +++ b/scripts/install/openim-tools.sh @@ -129,7 +129,7 @@ function openim::tools::post-start() { openim::log::info "Post-start actions for OpenIM Tools..." for tool in "${OPENIM_TOOLS_POST_START_NAME_LISTARIES[@]}"; do openim::log::info "Starting ${tool}..." - # openim::tools::start_service ${tool} + openim::tools::start_service ${tool} sleep 0.2 done } diff --git a/scripts/lib/color.sh b/scripts/lib/color.sh index ee6792290..2e53ae5ae 100755 --- a/scripts/lib/color.sh +++ b/scripts/lib/color.sh @@ -20,7 +20,7 @@ ################################################################################ # shellcheck disable=SC2034 -if [[ ! -v COLOR_OPEN ]]; then +if [ -z "${COLOR_OPEN+x}" ]; then COLOR_OPEN=1 fi diff --git a/scripts/lib/util.sh b/scripts/lib/util.sh index 2455f91dc..0ad386e1a 100755 --- a/scripts/lib/util.sh +++ b/scripts/lib/util.sh @@ -1250,6 +1250,38 @@ function openim::util::gencpu() { echo $cpu_count } +function openim::util::set_max_fd() { + local desired_fd=$1 + local max_fd_limit + + # Check if we're not on cygwin or darwin. + if [ "$(uname -s | tr '[:upper:]' '[:lower:]')" != "cygwin" ] && [ "$(uname -s | tr '[:upper:]' '[:lower:]')" != "darwin" ]; then + # Try to get the hard limit. + max_fd_limit=$(ulimit -H -n) + if [ $? -eq 0 ]; then + # If desired_fd is 'maximum' or 'max', set it to the hard limit. + if [ "$desired_fd" = "maximum" ] || [ "$desired_fd" = "max" ]; then + desired_fd="$max_fd_limit" + fi + + # Check if desired_fd is less than or equal to max_fd_limit. + if [ "$desired_fd" -le "$max_fd_limit" ]; then + ulimit -n "$desired_fd" + if [ $? -ne 0 ]; then + echo "Warning: Could not set maximum file descriptor limit to $desired_fd" + fi + else + echo "Warning: Desired file descriptor limit ($desired_fd) is greater than the hard limit ($max_fd_limit)" + fi + else + echo "Warning: Could not query the maximum file descriptor hard limit." + fi + else + echo "Warning: Not attempting to modify file descriptor limit on Cygwin or Darwin." + fi +} + + function openim::util::gen_os_arch() { # Get the current operating system and architecture OS=$(uname -s | tr '[:upper:]' '[:lower:]') diff --git a/scripts/make-rules/golang.mk b/scripts/make-rules/golang.mk index 0614bdf6f..742016cbd 100644 --- a/scripts/make-rules/golang.mk +++ b/scripts/make-rules/golang.mk @@ -17,7 +17,7 @@ # GO := go -GO_SUPPORTED_VERSIONS ?= 1.18|1.19|1.20|1.21 +GO_SUPPORTED_VERSIONS ?= 1.18|1.19|1.20|1.21|1.22 GO_LDFLAGS += -X $(VERSION_PACKAGE).gitVersion=$(GIT_TAG) \ -X $(VERSION_PACKAGE).gitCommit=$(GIT_COMMIT) \ @@ -125,6 +125,10 @@ go.check-component: @echo "===========> Checking openim component" @$(ROOT_DIR)/scripts/install/openim-tools.sh openim::tools::pre-start +## go.versionchecker: Design, detect some environment variables and versions +go.versionchecker: + @$(ROOT_DIR)/scripts/install/openim-tools.sh openim::tools::post-start + ## go.build.verify: Verify that a suitable version of Go exists .PHONY: go.build.verify go.build.verify: diff --git a/scripts/make-rules/image.mk b/scripts/make-rules/image.mk index bb353034f..eea651d88 100644 --- a/scripts/make-rules/image.mk +++ b/scripts/make-rules/image.mk @@ -21,7 +21,7 @@ # DOCKER := docker -DOCKER_SUPPORTED_API_VERSION ?= 1.32|1.40|1.41 +DOCKER_SUPPORTED_API_VERSION ?= 1.32|1.40|1.41|1.42 # read: https://github.com/openimsdk/open-im-server/blob/main/docs/conversions/images.md REGISTRY_PREFIX ?= ghcr.io/openimsdk diff --git a/test/data-conversion/kafka-conversation.go b/test/data-conversion/kafka-conversation.go deleted file mode 100644 index cb6976d67..000000000 --- a/test/data-conversion/kafka-conversation.go +++ /dev/null @@ -1,88 +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 data_conversion - -import ( - "fmt" - - "github.com/IBM/sarama" -) - -var ( - topic = "latestMsgToRedis" - addr = "127.0.0.1:9092" -) - -var ( - consumer sarama.Consumer - producer sarama.SyncProducer -) - -func init() { - // Producer - config := sarama.NewConfig() // Instantiate a sarama Config - config.Producer.Return.Successes = true // Whether to enable the successes channel to be notified after the message is sent successfully - config.Producer.Return.Errors = true - config.Producer.RequiredAcks = sarama.WaitForAll // Set producer Message Reply level 0 1 all - 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 - - client, err := sarama.NewSyncProducer([]string{addr}, config) - if err != nil { - fmt.Println("producer closed, err:", err) - } - producer = client - - // Consumer - consumerT, err := sarama.NewConsumer([]string{addr}, sarama.NewConfig()) - if err != nil { - fmt.Printf("fail to start consumer, err:%v\n", err) - } - consumer = consumerT -} - -func SendMessage() { - // construct a message - msg := &sarama.ProducerMessage{} - msg.Topic = topic - msg.Value = sarama.StringEncoder("this is a test log") - - // Send a message - pid, offset, err := producer.SendMessage(msg) - if err != nil { - fmt.Println("send msg failed, err:", err) - } - fmt.Printf("pid:%v offset:%v\n", pid, offset) -} - -func GetMessage() { - partitionList, err := consumer.Partitions(topic) // Get all partitions according to topic - if err != nil { - fmt.Printf("fail to get list of partition:err%v\n", err) - } - fmt.Println(partitionList) - for partition := range partitionList { // iterate over all partitions - // Create a corresponding partition consumer for each partition - pc, err := consumer.ConsumePartition(topic, int32(partition), sarama.OffsetNewest) - if err != nil { - fmt.Printf("failed to start consumer for partition %d,err:%v\n", partition, err) - } - // Asynchronously consume information from each partition - go func(sarama.PartitionConsumer) { - for msg := range pc.Messages() { - fmt.Printf("Partition:%d Offset:%d Key:%v Value:%v", msg.Partition, msg.Offset, msg.Key, msg.Value) - } - }(pc) - } -} diff --git a/test/data-conversion/mongodb-conversion.go b/test/data-conversion/mongodb-conversion.go deleted file mode 100644 index 975b28ead..000000000 --- a/test/data-conversion/mongodb-conversion.go +++ /dev/null @@ -1,15 +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 data_conversion diff --git a/test/data-conversion/mysql-conversion.go b/test/data-conversion/mysql-conversion.go deleted file mode 100644 index 468f5f11d..000000000 --- a/test/data-conversion/mysql-conversion.go +++ /dev/null @@ -1,228 +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 data_conversion - -import ( - "context" - "fmt" - "time" - - "github.com/OpenIMSDK/tools/log" - "gorm.io/driver/mysql" - "gorm.io/gorm" - - "github.com/openimsdk/open-im-server/v3/pkg/common/db/table/relation" -) - -var ( - MysqlDb_v2 *gorm.DB - MysqlDb_v3 *gorm.DB -) - -const ( - username_v2 = "root" - password_v2 = "123456" - ip_v2 = "127.0.0.1:3306" - database_v2 = "openim_v2" -) - -const ( - username_v3 = "root" - password_v3 = "123456" - ip_v3 = "127.0.0.1:3306" - database_v3 = "openim_v3" -) - -func init() { - dsn := fmt.Sprintf("%s:%s@tcp(%s)/%s?charset=utf8mb4&parseTime=True&loc=Local", - username_v2, - password_v2, - ip_v2, - database_v2, - ) - db, err := gorm.Open(mysql.Open(dsn), &gorm.Config{}) - MysqlDb_v2 = db - if err != nil { - log.ZDebug(context.Background(), "err", err) - } - - dsn_v3 := fmt.Sprintf("%s:%s@tcp(%s)/%s?charset=utf8mb4&parseTime=True&loc=Local", - username_v3, - password_v3, - ip_v3, - database_v3, - ) - db_v3, err := gorm.Open(mysql.Open(dsn_v3), &gorm.Config{}) - MysqlDb_v3 = db_v3 - if err != nil { - log.ZDebug(context.Background(), "err", err) - } -} - -func UserConversion() { - var count int64 - var user relation.UserModel - MysqlDb_v2.Model(&user).Count(&count) - batchSize := 100 - offset := 0 - - for int64(offset) < count { - var results []relation.UserModel - MysqlDb_v2.Limit(batchSize).Offset(offset).Find(&results) - // Process query results - fmt.Println("============================batch data===================", offset, batchSize) - fmt.Println(results) - MysqlDb_v3.Create(results) - fmt.Println("======================================================") - offset += batchSize - } -} - -func FriendConversion() { - var count int64 - var friend relation.FriendModel - MysqlDb_v2.Model(&friend).Count(&count) - batchSize := 100 - offset := 0 - - for int64(offset) < count { - var results []relation.FriendModel - MysqlDb_v2.Limit(batchSize).Offset(offset).Find(&results) - // Process query results - fmt.Println("============================batch data===================", offset, batchSize) - fmt.Println(results) - MysqlDb_v3.Create(results) - fmt.Println("======================================================") - offset += batchSize - } -} - -func RequestConversion() { - var count int64 - var friendRequest relation.FriendRequestModel - MysqlDb_v2.Model(&friendRequest).Count(&count) - batchSize := 100 - offset := 0 - - for int64(offset) < count { - var results []relation.FriendRequestModel - MysqlDb_v2.Limit(batchSize).Offset(offset).Find(&results) - // Process query results - fmt.Println("============================batch data===================", offset, batchSize) - fmt.Println(results) - MysqlDb_v3.Create(results) - fmt.Println("======================================================") - offset += batchSize - } - - var groupRequest relation.GroupRequestModel - MysqlDb_v2.Model(&groupRequest).Count(&count) - batchSize = 100 - offset = 0 - - for int64(offset) < count { - var results []relation.GroupRequestModel - MysqlDb_v2.Limit(batchSize).Offset(offset).Find(&results) - // Process query results - fmt.Println("============================batch data===================", offset, batchSize) - fmt.Println(results) - MysqlDb_v3.Create(results) - fmt.Println("======================================================") - offset += batchSize - } -} - -func GroupConversion() { - var count int64 - var group relation.GroupModel - MysqlDb_v2.Model(&group).Count(&count) - batchSize := 100 - offset := 0 - - for int64(offset) < count { - var results []relation.GroupModel - MysqlDb_v2.Limit(batchSize).Offset(offset).Find(&results) - for i, val := range results { - temp := time.Date(1, time.January, 1, 0, 0, 0, 0, time.UTC) - if val.NotificationUpdateTime.Equal(temp) { - results[i].NotificationUpdateTime = time.Now() - // fmt.Println(val.NotificationUpdateTime) - } - } - // Process query results - fmt.Println("============================batch data===================", offset, batchSize) - fmt.Println(results) - MysqlDb_v3.Create(results) - fmt.Println("======================================================") - offset += batchSize - } -} - -func GroupMemberConversion() { - var count int64 - var groupMember relation.GroupMemberModel - MysqlDb_v2.Model(&groupMember).Count(&count) - batchSize := 100 - offset := 0 - - for int64(offset) < count { - var results []relation.GroupMemberModel - MysqlDb_v2.Limit(batchSize).Offset(offset).Find(&results) - // Process query results - fmt.Println("============================batch data===================", offset, batchSize) - fmt.Println(results) - MysqlDb_v3.Create(results) - fmt.Println("======================================================") - offset += batchSize - } -} - -func BlacksConversion() { - var count int64 - var black relation.BlackModel - MysqlDb_v2.Model(&black).Count(&count) - batchSize := 100 - offset := 0 - - for int64(offset) < count { - var results []relation.BlackModel - MysqlDb_v2.Limit(batchSize).Offset(offset).Find(&results) - // Process query results - fmt.Println("============================batch data===================", offset, batchSize) - fmt.Println(results) - MysqlDb_v3.Create(results) - fmt.Println("======================================================") - offset += batchSize - } -} - -func ChatLogsConversion() { - var count int64 - var chat relation.ChatLogModel - MysqlDb_v2.Model(&chat).Count(&count) - batchSize := 100 - offset := 0 - - for int64(offset) < count { - var results []relation.ChatLogModel - MysqlDb_v2.Limit(batchSize).Offset(offset).Find(&results) - // Process query results - fmt.Println("============================batch data===================", offset, batchSize) - // fmt.Println(results) - MysqlDb_v3.Create(results) - fmt.Println("======================================================") - offset += batchSize - } -} diff --git a/test/data-conversion/mysql_test.go b/test/data-conversion/mysql_test.go deleted file mode 100644 index 3e3f3ad06..000000000 --- a/test/data-conversion/mysql_test.go +++ /dev/null @@ -1,49 +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 data_conversion - -import "testing" - -// pass -func TestUserConversion(t *testing.T) { - UserConversion() -} - -// pass -func TestFriendConversion(t *testing.T) { - FriendConversion() -} - -// pass -func TestGroupConversion(t *testing.T) { - GroupConversion() - GroupMemberConversion() -} - -// pass -func TestBlacksConversion(t *testing.T) { - BlacksConversion() -} - -// pass -func TestRequestConversion(t *testing.T) { - RequestConversion() -} - -// pass -func TestChatLogsConversion(t *testing.T) { - // If the printed result is too long, the console will not display it, but it can run normally - ChatLogsConversion() -} diff --git a/test/data-conversion/redis-conversion.go b/test/data-conversion/redis-conversion.go deleted file mode 100644 index 975b28ead..000000000 --- a/test/data-conversion/redis-conversion.go +++ /dev/null @@ -1,15 +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 data_conversion diff --git a/tools/component/component.go b/tools/component/component.go index 04c6ba9a5..c995da5f1 100644 --- a/tools/component/component.go +++ b/tools/component/component.go @@ -46,7 +46,7 @@ import ( ) const ( - // defaultCfgPath is the default path of the configuration file + // defaultCfgPath is the default path of the configuration file. defaultCfgPath = "../../../../../config/config.yaml" minioHealthCheckDuration = 1 maxRetry = 100 @@ -66,6 +66,7 @@ func initCfg() error { if err != nil { return err } + return yaml.Unmarshal(data, &config.Config) } @@ -79,6 +80,7 @@ func main() { if err := initCfg(); err != nil { fmt.Printf("Read config failed: %v\n", err) + return } @@ -111,6 +113,7 @@ func main() { if allSuccess { successPrint("All components started successfully!") + return } } @@ -126,6 +129,7 @@ func exactIP(urll string) string { if strings.HasSuffix(host, ":") { host = host[0 : len(host)-1] } + return host } @@ -148,6 +152,7 @@ func checkMysql() error { return errs.Wrap(err) } } + return nil } @@ -177,6 +182,7 @@ func checkMongo() error { return errs.Wrap(err) } } + return nil } @@ -209,6 +215,7 @@ func checkMinio() error { return ErrConfig.Wrap("apiURL or Minio SignEndpoint endpoint contain 127.0.0.1") } } + return nil } @@ -236,6 +243,7 @@ func checkRedis() error { if err != nil { return errs.Wrap(err) } + return nil } @@ -260,6 +268,7 @@ func checkZookeeper() error { return errs.Wrap(err) } } + return nil } @@ -295,6 +304,7 @@ func checkKafka() error { return ErrComponentStart.Wrap(fmt.Sprintf("kafka doesn't contain topic:%v", config.Config.Kafka.LatestMsgToRedis.Topic)) } } + return nil } diff --git a/tools/data-conversion/chat/chat.go b/tools/data-conversion/chat/chat.go new file mode 100644 index 000000000..77c62ee1f --- /dev/null +++ b/tools/data-conversion/chat/chat.go @@ -0,0 +1,63 @@ +package main + +import ( + "fmt" + "log" + + "gorm.io/driver/mysql" + "gorm.io/gorm" + "gorm.io/gorm/logger" + + "github.com/openimsdk/open-im-server/v3/tools/data-conversion/chat/conversion" + "github.com/openimsdk/open-im-server/v3/tools/data-conversion/utils" +) + +func main() { + var ( + usernameV2 = "root" // v2版本mysql用户名 + passwordV2 = "openIM" // v2版本mysql密码 + addrV2 = "127.0.0.1:13306" // v2版本mysql地址 + databaseV2 = "admin_chat" // v2版本mysql数据库名字 + ) + + var ( + usernameV3 = "root" // v3版本mysql用户名 + passwordV3 = "openIM123" // v3版本mysql密码 + addrV3 = "127.0.0.1:13306" // v3版本mysql地址 + databaseV3 = "openim_enterprise" // v3版本mysql数据库名字 + ) + + var concurrency = 1 // 并发数量 + + log.SetFlags(log.LstdFlags | log.Llongfile) + dsnV2 := fmt.Sprintf("%s:%s@tcp(%s)/%s?charset=utf8mb4&parseTime=True&loc=Local", usernameV2, passwordV2, addrV2, databaseV2) + dsnV3 := fmt.Sprintf("%s:%s@tcp(%s)/%s?charset=utf8mb4&parseTime=True&loc=Local", usernameV3, passwordV3, addrV3, databaseV3) + dbV2, err := gorm.Open(mysql.Open(dsnV2), &gorm.Config{Logger: logger.Discard}) + if err != nil { + log.Println("open v2 db failed", err) + return + } + dbV3, err := gorm.Open(mysql.Open(dsnV3), &gorm.Config{Logger: logger.Discard}) + if err != nil { + log.Println("open v3 db failed", err) + return + } + + var tasks utils.TakeList + + tasks.Append(func() (string, error) { return utils.FindAndInsert(dbV2, dbV3, conversion.Account) }) + tasks.Append(func() (string, error) { return utils.FindAndInsert(dbV2, dbV3, conversion.Attribute) }) + tasks.Append(func() (string, error) { return utils.FindAndInsert(dbV2, dbV3, conversion.Register) }) + tasks.Append(func() (string, error) { return utils.FindAndInsert(dbV2, dbV3, conversion.UserLoginRecord) }) + tasks.Append(func() (string, error) { return utils.FindAndInsert(dbV2, dbV3, conversion.Admin) }) + tasks.Append(func() (string, error) { return utils.FindAndInsert(dbV2, dbV3, conversion.Applet) }) + tasks.Append(func() (string, error) { return utils.FindAndInsert(dbV2, dbV3, conversion.ForbiddenAccount) }) + tasks.Append(func() (string, error) { return utils.FindAndInsert(dbV2, dbV3, conversion.InvitationRegister) }) + tasks.Append(func() (string, error) { return utils.FindAndInsert(dbV2, dbV3, conversion.IPForbidden) }) + tasks.Append(func() (string, error) { return utils.FindAndInsert(dbV2, dbV3, conversion.LimitUserLoginIP) }) + tasks.Append(func() (string, error) { return utils.FindAndInsert(dbV2, dbV3, conversion.RegisterAddFriend) }) + tasks.Append(func() (string, error) { return utils.FindAndInsert(dbV2, dbV3, conversion.RegisterAddGroup) }) + + utils.RunTask(concurrency, tasks) + +} diff --git a/tools/data-conversion/chat/conversion/conversion.go b/tools/data-conversion/chat/conversion/conversion.go new file mode 100644 index 000000000..6032a4569 --- /dev/null +++ b/tools/data-conversion/chat/conversion/conversion.go @@ -0,0 +1,153 @@ +package conversion + +import ( + v2 "github.com/openimsdk/open-im-server/v3/tools/data-conversion/chat/v2" + "github.com/openimsdk/open-im-server/v3/tools/data-conversion/chat/v3/admin" + "github.com/openimsdk/open-im-server/v3/tools/data-conversion/chat/v3/chat" + "github.com/openimsdk/open-im-server/v3/tools/data-conversion/utils" +) + +// ########## chat ########## + +func Account(v v2.Account) (chat.Account, bool) { + utils.InitTime(&v.CreateTime, &v.ChangeTime) + return chat.Account{ + UserID: v.UserID, + Password: v.Password, + CreateTime: v.CreateTime, + ChangeTime: v.ChangeTime, + OperatorUserID: v.OperatorUserID, + }, true +} + +func Attribute(v v2.Attribute) (chat.Attribute, bool) { + utils.InitTime(&v.CreateTime, &v.ChangeTime, &v.BirthTime) + return chat.Attribute{ + UserID: v.UserID, + Account: v.Account, + PhoneNumber: v.PhoneNumber, + AreaCode: v.AreaCode, + Email: v.Email, + Nickname: v.Nickname, + FaceURL: v.FaceURL, + Gender: v.Gender, + CreateTime: v.CreateTime, + ChangeTime: v.ChangeTime, + BirthTime: v.BirthTime, + Level: v.Level, + AllowVibration: v.AllowVibration, + AllowBeep: v.AllowBeep, + AllowAddFriend: v.AllowAddFriend, + GlobalRecvMsgOpt: 0, + }, true +} + +func Register(v v2.Register) (chat.Register, bool) { + utils.InitTime(&v.CreateTime) + return chat.Register{ + UserID: v.UserID, + DeviceID: v.DeviceID, + IP: v.IP, + Platform: v.Platform, + AccountType: v.AccountType, + Mode: v.Mode, + CreateTime: v.CreateTime, + }, true +} + +func UserLoginRecord(v v2.UserLoginRecord) (chat.UserLoginRecord, bool) { + utils.InitTime(&v.LoginTime) + return chat.UserLoginRecord{ + UserID: v.UserID, + LoginTime: v.LoginTime, + IP: v.IP, + DeviceID: v.DeviceID, + Platform: v.Platform, + }, true +} + +// ########## admin ########## + +func Admin(v v2.Admin) (admin.Admin, bool) { + utils.InitTime(&v.CreateTime) + return admin.Admin{ + Account: v.Account, + Password: v.Password, + FaceURL: v.FaceURL, + Nickname: v.Nickname, + UserID: v.UserID, + Level: v.Level, + CreateTime: v.CreateTime, + }, true +} + +func Applet(v v2.Applet) (admin.Applet, bool) { + utils.InitTime(&v.CreateTime) + return admin.Applet{ + ID: v.ID, + Name: v.Name, + AppID: v.AppID, + Icon: v.Icon, + URL: v.URL, + MD5: v.MD5, + Size: v.Size, + Version: v.Version, + Priority: v.Priority, + Status: v.Status, + CreateTime: v.CreateTime, + }, true +} + +func ForbiddenAccount(v v2.ForbiddenAccount) (admin.ForbiddenAccount, bool) { + utils.InitTime(&v.CreateTime) + return admin.ForbiddenAccount{ + UserID: v.UserID, + Reason: v.Reason, + OperatorUserID: v.OperatorUserID, + CreateTime: v.CreateTime, + }, true +} + +func InvitationRegister(v v2.InvitationRegister) (admin.InvitationRegister, bool) { + utils.InitTime(&v.CreateTime) + return admin.InvitationRegister{ + InvitationCode: v.InvitationCode, + UsedByUserID: v.UsedByUserID, + CreateTime: v.CreateTime, + }, true +} + +func IPForbidden(v v2.IPForbidden) (admin.IPForbidden, bool) { + utils.InitTime(&v.CreateTime) + return admin.IPForbidden{ + IP: v.IP, + LimitRegister: v.LimitRegister > 0, + LimitLogin: v.LimitLogin > 0, + CreateTime: v.CreateTime, + }, true +} + +func LimitUserLoginIP(v v2.LimitUserLoginIP) (admin.LimitUserLoginIP, bool) { + utils.InitTime(&v.CreateTime) + return admin.LimitUserLoginIP{ + UserID: v.UserID, + IP: v.IP, + CreateTime: v.CreateTime, + }, true +} + +func RegisterAddFriend(v v2.RegisterAddFriend) (admin.RegisterAddFriend, bool) { + utils.InitTime(&v.CreateTime) + return admin.RegisterAddFriend{ + UserID: v.UserID, + CreateTime: v.CreateTime, + }, true +} + +func RegisterAddGroup(v v2.RegisterAddGroup) (admin.RegisterAddGroup, bool) { + utils.InitTime(&v.CreateTime) + return admin.RegisterAddGroup{ + GroupID: v.GroupID, + CreateTime: v.CreateTime, + }, true +} diff --git a/tools/data-conversion/chat/v2/admin.go b/tools/data-conversion/chat/v2/admin.go new file mode 100644 index 000000000..7bc1b6c1b --- /dev/null +++ b/tools/data-conversion/chat/v2/admin.go @@ -0,0 +1,63 @@ +package v2 + +import ( + "time" +) + +// AppVersion pc端版本管理 +type AppVersion struct { + Version string `gorm:"column:version;size:64" json:"version"` + Type int `gorm:"column:type;primary_key" json:"type"` + UpdateTime int `gorm:"column:update_time" json:"update_time"` + ForceUpdate bool `gorm:"column:force_update" json:"force_update"` + FileName string `gorm:"column:file_name" json:"file_name"` + YamlName string `gorm:"column:yaml_name" json:"yaml_name"` + UpdateLog string `gorm:"column:update_log" json:"update_log"` +} + +// Admin 后台管理员 +type Admin struct { + Account string `gorm:"column:account;primary_key;type:char(64)" json:"account"` + Password string `gorm:"column:Password;type:char(64)" json:"password"` + FaceURL string `gorm:"column:FaceURL;type:char(64)" json:"faceURL"` + Nickname string `gorm:"column:Nickname;type:char(64)" json:"nickname"` + UserID string `gorm:"column:UserID;type:char(64)" json:"userID"` //openIM userID + Level int32 `gorm:"column:level;default:1" json:"level"` + CreateTime time.Time `gorm:"column:create_time" json:"createTime"` +} + +// RegisterAddFriend 注册时默认好友 +type RegisterAddFriend struct { + UserID string `gorm:"column:user_id;primary_key;type:char(64)" json:"userID"` + CreateTime time.Time `gorm:"column:create_time" json:"createTime"` +} + +// RegisterAddGroup 注册时默认群组 +type RegisterAddGroup struct { + GroupID string `gorm:"column:group_id;primary_key;type:char(64)" json:"userID"` + CreateTime time.Time `gorm:"column:create_time" json:"createTime"` +} + +// ClientInitConfig 系统相关配置项 +type ClientInitConfig struct { + DiscoverPageURL string `gorm:"column:discover_page_url;size:128" json:"discoverPageURL"` + OrdinaryUserAddFriend int32 `gorm:"column:ordinary_user_add_friend; default:1" json:"ordinaryUserAddFriend"` + BossUserID string `gorm:"column:boss_user_id;type:char(64)" json:"bossUserID"` + AdminURL string `gorm:"column:admin_url;type:char(128)" json:"adminURL"` + AllowSendMsgNotFriend int32 `gorm:"column:allow_send_msg_not_friend;default:1" json:"allowSendMsgNotFriend"` + NeedInvitationCodeRegister int32 `gorm:"column:need_invitation_code_register;default:0" json:"needInvitationCodeRegister"` +} + +type Applet struct { + ID string `gorm:"column:id;primary_key;size:64"` + Name string `gorm:"column:name;uniqueIndex;size:64"` + AppID string `gorm:"column:app_id;uniqueIndex;size:255"` + Icon string `gorm:"column:icon;size:255"` + URL string `gorm:"column:url;size:255"` + MD5 string `gorm:"column:md5;size:255"` + Size int64 `gorm:"column:size"` + Version string `gorm:"column:version;size:64"` + Priority uint32 `gorm:"column:priority;size:64"` + Status uint8 `gorm:"column:status"` + CreateTime time.Time `gorm:"column:create_time;autoCreateTime;size:64"` +} diff --git a/tools/data-conversion/chat/v2/chat.go b/tools/data-conversion/chat/v2/chat.go new file mode 100644 index 000000000..6690e110b --- /dev/null +++ b/tools/data-conversion/chat/v2/chat.go @@ -0,0 +1,95 @@ +package v2 + +import ( + "time" +) + +// Register 注册信息表 +type Register struct { + UserID string `gorm:"column:user_id;primary_key;type:char(64)" json:"userID"` + DeviceID string `gorm:"column:device_id;type:varchar(255)" json:"deviceID"` + IP string `gorm:"column:ip;type:varchar(32)" json:"ip"` + Platform string `gorm:"column:platform;type:varchar(32)" json:"platform"` + AccountType string `gorm:"column:account_type;type:varchar(32)" json:"accountType"` //email phone account + Mode string `gorm:"column:mode;type:varchar(32)"` //user admin + CreateTime time.Time `gorm:"column:create_time" json:"createTime"` +} + +// Account 账号密码表 +type Account struct { + UserID string `gorm:"column:user_id;primary_key;type:char(64)" json:"userID"` + Password string `gorm:"column:password;type:varchar(255)" json:"password"` + CreateTime time.Time `gorm:"column:create_time" json:"createTime"` + ChangeTime time.Time `gorm:"column:change_time" json:"changeTime"` + OperatorUserID string `gorm:"column:operator_user_id;type:varchar(64)" json:"operatorUserID"` +} + +// Attribute 用户属性表 +type Attribute struct { + UserID string `gorm:"column:user_id;primary_key;type:char(64)" json:"userID"` + Account string `gorm:"column:account;type:char(64)" json:"account"` + PhoneNumber string `gorm:"column:phone_number;type:varchar(32)" json:"phoneNumber"` + AreaCode string `gorm:"column:area_code;type:varchar(8)" json:"areaCode"` + Email string `gorm:"column:email;type:varchar(64)" json:"email"` + Nickname string `gorm:"column:nickname;type:varchar(64)" json:"nickname"` + FaceURL string `gorm:"column:face_url;type:varchar(255)" json:"faceURL"` + Gender int32 `gorm:"column:gender" json:"gender"` + Birth uint32 `gorm:"column:birth" json:"birth"` + CreateTime time.Time `gorm:"column:create_time" json:"createTime"` + ChangeTime time.Time `gorm:"column:change_time" json:"changeTime"` + BirthTime time.Time `gorm:"column:birth_time" json:"birthTime"` + Level int32 `gorm:"column:level;default:1" json:"level"` + AllowVibration int32 `gorm:"column:allow_vibration;default:1" json:"allowVibration"` + AllowBeep int32 `gorm:"column:allow_beep;default:1" json:"allowBeep"` + AllowAddFriend int32 `gorm:"column:allow_add_friend;default:1" json:"allowAddFriend"` +} + +// 封号表 +type ForbiddenAccount struct { + UserID string `gorm:"column:user_id;index:userID;primary_key;type:char(64)" json:"userID"` + CreateTime time.Time `gorm:"column:create_time" json:"createTime"` + Reason string `gorm:"column:reason;type:varchar(255)" json:"reason"` + OperatorUserID string `gorm:"column:operator_user_id;type:varchar(255)" json:"operatorUserID"` +} + +// 用户登录信息表 +type UserLoginRecord struct { + UserID string `gorm:"column:user_id;size:64" json:"userID"` + LoginTime time.Time `gorm:"column:login_time" json:"loginTime"` + IP string `gorm:"column:ip;type:varchar(32)" json:"ip"` + DeviceID string `gorm:"column:device_id;type:varchar(255)" json:"deviceID"` + Platform string `gorm:"column:platform;type:varchar(32)" json:"platform"` +} + +// 禁止ip登录 注册 +type IPForbidden struct { + IP string `gorm:"column:ip;primary_key;type:char(32)" json:"ip"` + LimitRegister int32 `gorm:"column:limit_register" json:"limitRegister"` + LimitLogin int32 `gorm:"column:limit_login" json:"limitLogin"` + CreateTime time.Time `gorm:"column:create_time" json:"createTime"` +} + +// 限制userID只能在某些ip登录 +type LimitUserLoginIP struct { + UserID string `gorm:"column:user_id;primary_key;type:char(64)" json:"userID"` + IP string `gorm:"column:ip;primary_key;type:char(32)" json:"ip"` + CreateTime time.Time `gorm:"column:create_time" json:"createTime"` +} + +// 邀请码被注册使用 +type InvitationRegister struct { + InvitationCode string `gorm:"column:invitation_code;primary_key;type:char(32)" json:"invitationCode"` + CreateTime time.Time `gorm:"column:create_time" json:"createTime"` + UsedByUserID string `gorm:"column:user_id;index:userID;type:char(64)" json:"usedByUserID"` +} + +type SignalRecord struct { + FileName string `gorm:"column:file_name;primary_key;type:char(128)" json:"fileName"` + MediaType string `gorm:"column:media_type;type:char(64);index:media_type_index" json:"mediaType"` + RoomType string `gorm:"column:room_type;type:char(20)" json:"roomType"` + SenderID string `gorm:"column:sender_id;type:char(64);index:sender_id_index" json:"senderID"` + RecvID string `gorm:"column:recv_id;type:char(64);index:recv_id_index" json:"recvID"` + GroupID string `gorm:"column:group_id;type:char(64)" json:"groupID"` + DownloadURL string `gorm:"column:download_url;type:text" json:"downloadURL"` + CreateTime time.Time `gorm:"create_time;index:create_time_index" json:"createTime"` +} diff --git a/tools/data-conversion/chat/v3/admin/admin.go b/tools/data-conversion/chat/v3/admin/admin.go new file mode 100644 index 000000000..22a81a068 --- /dev/null +++ b/tools/data-conversion/chat/v3/admin/admin.go @@ -0,0 +1,34 @@ +// 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. + +package admin + +import ( + "time" +) + +// Admin 后台管理员. +type Admin struct { + Account string `gorm:"column:account;primary_key;type:varchar(64)"` + Password string `gorm:"column:password;type:varchar(64)"` + FaceURL string `gorm:"column:face_url;type:varchar(255)"` + Nickname string `gorm:"column:nickname;type:varchar(64)"` + UserID string `gorm:"column:user_id;type:varchar(64)"` // openIM userID + Level int32 `gorm:"column:level;default:1" ` + CreateTime time.Time `gorm:"column:create_time"` +} + +func (Admin) TableName() string { + return "admins" +} diff --git a/tools/data-conversion/chat/v3/admin/applet.go b/tools/data-conversion/chat/v3/admin/applet.go new file mode 100644 index 000000000..5f97cf365 --- /dev/null +++ b/tools/data-conversion/chat/v3/admin/applet.go @@ -0,0 +1,37 @@ +// 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. + +package admin + +import ( + "time" +) + +type Applet struct { + ID string `gorm:"column:id;primary_key;size:64"` + Name string `gorm:"column:name;size:64"` + AppID string `gorm:"column:app_id;uniqueIndex;size:255"` + Icon string `gorm:"column:icon;size:255"` + URL string `gorm:"column:url;size:255"` + MD5 string `gorm:"column:md5;size:255"` + Size int64 `gorm:"column:size"` + Version string `gorm:"column:version;size:64"` + Priority uint32 `gorm:"column:priority;size:64"` + Status uint8 `gorm:"column:status"` + CreateTime time.Time `gorm:"column:create_time;autoCreateTime;size:64"` +} + +func (Applet) TableName() string { + return "applets" +} diff --git a/tools/imctl/cmd/imctl/imctl.go b/tools/data-conversion/chat/v3/admin/client_config.go similarity index 62% rename from tools/imctl/cmd/imctl/imctl.go rename to tools/data-conversion/chat/v3/admin/client_config.go index 04032c64c..ceccd5105 100644 --- a/tools/imctl/cmd/imctl/imctl.go +++ b/tools/data-conversion/chat/v3/admin/client_config.go @@ -1,4 +1,4 @@ -// Copyright © 2023 OpenIM. All rights reserved. +// 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. @@ -12,18 +12,14 @@ // See the License for the specific language governing permissions and // limitations under the License. -// iactl is the command line tool for openim platform. -package main +package admin -import ( - "os" - - "github.com/openimsdk/open-im-server/v3/tools/imctl/internal/imctl/cmd" -) +// ClientConfig 客户端相关配置项. +type ClientConfig struct { + Key string `gorm:"column:key;primary_key;type:varchar(255)"` + Value string `gorm:"column:value;not null;type:text"` +} -func main() { - command := cmd.NewDefaultIMCtlCommand() - if err := command.Execute(); err != nil { - os.Exit(1) - } +func (ClientConfig) TableName() string { + return "client_config" } diff --git a/tools/data-conversion/chat/v3/admin/forbidden_account.go b/tools/data-conversion/chat/v3/admin/forbidden_account.go new file mode 100644 index 000000000..104e793b0 --- /dev/null +++ b/tools/data-conversion/chat/v3/admin/forbidden_account.go @@ -0,0 +1,31 @@ +// 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. + +package admin + +import ( + "time" +) + +// ForbiddenAccount 封号表. +type ForbiddenAccount struct { + UserID string `gorm:"column:user_id;index:userID;primary_key;type:char(64)"` + Reason string `gorm:"column:reason;type:varchar(255)" ` + OperatorUserID string `gorm:"column:operator_user_id;type:varchar(255)"` + CreateTime time.Time `gorm:"column:create_time" ` +} + +func (ForbiddenAccount) TableName() string { + return "forbidden_accounts" +} diff --git a/tools/data-conversion/chat/v3/admin/invitation_register.go b/tools/data-conversion/chat/v3/admin/invitation_register.go new file mode 100644 index 000000000..60f9067e2 --- /dev/null +++ b/tools/data-conversion/chat/v3/admin/invitation_register.go @@ -0,0 +1,30 @@ +// 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. + +package admin + +import ( + "time" +) + +// 邀请码被注册使用. +type InvitationRegister struct { + InvitationCode string `gorm:"column:invitation_code;primary_key;type:char(32)"` + UsedByUserID string `gorm:"column:user_id;index:userID;type:char(64)"` + CreateTime time.Time `gorm:"column:create_time"` +} + +func (InvitationRegister) TableName() string { + return "invitation_registers" +} diff --git a/tools/data-conversion/chat/v3/admin/ip_forbidden.go b/tools/data-conversion/chat/v3/admin/ip_forbidden.go new file mode 100644 index 000000000..40c9257ef --- /dev/null +++ b/tools/data-conversion/chat/v3/admin/ip_forbidden.go @@ -0,0 +1,31 @@ +// 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. + +package admin + +import ( + "time" +) + +// 禁止ip登录 注册. +type IPForbidden struct { + IP string `gorm:"column:ip;primary_key;type:char(32)"` + LimitRegister bool `gorm:"column:limit_register"` + LimitLogin bool `gorm:"column:limit_login"` + CreateTime time.Time `gorm:"column:create_time"` +} + +func (IPForbidden) TableName() string { + return "ip_forbiddens" +} diff --git a/tools/data-conversion/chat/v3/admin/limit_user_login_ip.go b/tools/data-conversion/chat/v3/admin/limit_user_login_ip.go new file mode 100644 index 000000000..8427eaf80 --- /dev/null +++ b/tools/data-conversion/chat/v3/admin/limit_user_login_ip.go @@ -0,0 +1,30 @@ +// 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. + +package admin + +import ( + "time" +) + +// 限制userID只能在某些ip登录. +type LimitUserLoginIP struct { + UserID string `gorm:"column:user_id;primary_key;type:char(64)"` + IP string `gorm:"column:ip;primary_key;type:char(32)"` + CreateTime time.Time `gorm:"column:create_time" ` +} + +func (LimitUserLoginIP) TableName() string { + return "limit_user_login_ips" +} diff --git a/pkg/common/db/s3/oss/doc.go b/tools/data-conversion/chat/v3/admin/register_add_friend.go similarity index 59% rename from pkg/common/db/s3/oss/doc.go rename to tools/data-conversion/chat/v3/admin/register_add_friend.go index d2e2c91af..e21896d90 100644 --- a/pkg/common/db/s3/oss/doc.go +++ b/tools/data-conversion/chat/v3/admin/register_add_friend.go @@ -1,4 +1,4 @@ -// Copyright © 2023 OpenIM. All rights reserved. +// 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. @@ -12,4 +12,18 @@ // See the License for the specific language governing permissions and // limitations under the License. -package oss // import "github.com/openimsdk/open-im-server/v3/pkg/common/db/s3/oss" +package admin + +import ( + "time" +) + +// RegisterAddFriend 注册时默认好友. +type RegisterAddFriend struct { + UserID string `gorm:"column:user_id;primary_key;type:char(64)"` + CreateTime time.Time `gorm:"column:create_time"` +} + +func (RegisterAddFriend) TableName() string { + return "register_add_friends" +} diff --git a/pkg/common/db/s3/oss/sign.go b/tools/data-conversion/chat/v3/admin/register_add_group.go similarity index 60% rename from pkg/common/db/s3/oss/sign.go rename to tools/data-conversion/chat/v3/admin/register_add_group.go index 1bff18f4d..e9c1317b9 100644 --- a/pkg/common/db/s3/oss/sign.go +++ b/tools/data-conversion/chat/v3/admin/register_add_group.go @@ -1,4 +1,4 @@ -// Copyright © 2023 OpenIM. All rights reserved. +// 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. @@ -12,14 +12,18 @@ // See the License for the specific language governing permissions and // limitations under the License. -package oss +package admin import ( - "net/http" - _ "unsafe" - - "github.com/aliyun/aliyun-oss-go-sdk/oss" + "time" ) -//go:linkname ossSignHeader github.com/aliyun/aliyun-oss-go-sdk/oss.(*Conn).signHeader -func ossSignHeader(c *oss.Conn, req *http.Request, canonicalizedResource string) +// RegisterAddGroup 注册时默认群组. +type RegisterAddGroup struct { + GroupID string `gorm:"column:group_id;primary_key;type:char(64)"` + CreateTime time.Time `gorm:"column:create_time"` +} + +func (RegisterAddGroup) TableName() string { + return "register_add_groups" +} diff --git a/tools/data-conversion/chat/v3/chat/account.go b/tools/data-conversion/chat/v3/chat/account.go new file mode 100644 index 000000000..d2117e7ca --- /dev/null +++ b/tools/data-conversion/chat/v3/chat/account.go @@ -0,0 +1,32 @@ +// 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. + +package chat + +import ( + "time" +) + +// Account 账号密码表. +type Account struct { + UserID string `gorm:"column:user_id;primary_key;type:char(64)"` + Password string `gorm:"column:password;type:varchar(32)"` + CreateTime time.Time `gorm:"column:create_time;autoCreateTime"` + ChangeTime time.Time `gorm:"column:change_time;autoUpdateTime"` + OperatorUserID string `gorm:"column:operator_user_id;type:varchar(64)"` +} + +func (Account) TableName() string { + return "accounts" +} diff --git a/tools/data-conversion/chat/v3/chat/attribute.go b/tools/data-conversion/chat/v3/chat/attribute.go new file mode 100644 index 000000000..6a6f975d1 --- /dev/null +++ b/tools/data-conversion/chat/v3/chat/attribute.go @@ -0,0 +1,43 @@ +// 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. + +package chat + +import ( + "time" +) + +// Attribute 用户属性表. +type Attribute struct { + UserID string `gorm:"column:user_id;primary_key;type:char(64)"` + Account string `gorm:"column:account;type:char(64)"` + PhoneNumber string `gorm:"column:phone_number;type:varchar(32)"` + AreaCode string `gorm:"column:area_code;type:varchar(8)"` + Email string `gorm:"column:email;type:varchar(64)" ` + Nickname string `gorm:"column:nickname;type:varchar(64)" ` + FaceURL string `gorm:"column:face_url;type:varchar(255)" ` + Gender int32 `gorm:"column:gender"` + CreateTime time.Time `gorm:"column:create_time"` + ChangeTime time.Time `gorm:"column:change_time"` + BirthTime time.Time `gorm:"column:birth_time"` + Level int32 `gorm:"column:level;default:1"` + AllowVibration int32 `gorm:"column:allow_vibration;default:1"` + AllowBeep int32 `gorm:"column:allow_beep;default:1"` + AllowAddFriend int32 `gorm:"column:allow_add_friend;default:1"` + GlobalRecvMsgOpt int32 `gorm:"column:global_recv_msg_opt;default:0"` +} + +func (Attribute) TableName() string { + return "attributes" +} diff --git a/tools/data-conversion/chat/v3/chat/register.go b/tools/data-conversion/chat/v3/chat/register.go new file mode 100644 index 000000000..740159436 --- /dev/null +++ b/tools/data-conversion/chat/v3/chat/register.go @@ -0,0 +1,34 @@ +// 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. + +package chat + +import ( + "time" +) + +// Register 注册信息表. +type Register struct { + UserID string `gorm:"column:user_id;primary_key;type:char(64)"` + DeviceID string `gorm:"column:device_id;type:varchar(255)"` + IP string `gorm:"column:ip;type:varchar(64)"` + Platform string `gorm:"column:platform;type:varchar(32)"` + AccountType string `gorm:"column:account_type;type:varchar(32)"` // email phone account + Mode string `gorm:"column:mode;type:varchar(32)"` // user admin + CreateTime time.Time `gorm:"column:create_time"` +} + +func (Register) TableName() string { + return "registers" +} diff --git a/tools/data-conversion/chat/v3/chat/user_login_record.go b/tools/data-conversion/chat/v3/chat/user_login_record.go new file mode 100644 index 000000000..8db3699d6 --- /dev/null +++ b/tools/data-conversion/chat/v3/chat/user_login_record.go @@ -0,0 +1,32 @@ +// 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. + +package chat + +import ( + "time" +) + +// 用户登录信息表. +type UserLoginRecord struct { + UserID string `gorm:"column:user_id;size:64"` + LoginTime time.Time `gorm:"column:login_time"` + IP string `gorm:"column:ip;type:varchar(32)"` + DeviceID string `gorm:"column:device_id;type:varchar(255)"` + Platform string `gorm:"column:platform;type:varchar(32)"` +} + +func (UserLoginRecord) TableName() string { + return "user_login_records" +} diff --git a/tools/data-conversion/go.mod b/tools/data-conversion/go.mod new file mode 100644 index 000000000..51cc32f2e --- /dev/null +++ b/tools/data-conversion/go.mod @@ -0,0 +1,72 @@ +module github.com/openimsdk/open-im-server/v3/tools/data-conversion + +go 1.18 + +require ( + github.com/IBM/sarama v1.41.2 + github.com/OpenIMSDK/protocol v0.0.23 + github.com/OpenIMSDK/tools v0.0.14 + github.com/golang/protobuf v1.5.3 + github.com/openimsdk/open-im-server/v3 v3.3.2 + golang.org/x/net v0.17.0 + google.golang.org/grpc v1.57.0 + google.golang.org/protobuf v1.31.0 + gorm.io/driver/mysql v1.5.1 + gorm.io/gorm v1.25.4 +) + +require ( + github.com/bwmarrin/snowflake v0.3.0 // indirect + github.com/bytedance/sonic v1.9.1 // indirect + github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311 // indirect + github.com/davecgh/go-spew v1.1.1 // indirect + github.com/eapache/go-resiliency v1.4.0 // indirect + github.com/eapache/go-xerial-snappy v0.0.0-20230731223053-c322873962e3 // indirect + github.com/eapache/queue v1.1.0 // indirect + github.com/gabriel-vasile/mimetype v1.4.2 // indirect + github.com/gin-contrib/sse v0.1.0 // indirect + github.com/gin-gonic/gin v1.9.1 // indirect + github.com/go-playground/locales v0.14.1 // indirect + github.com/go-playground/universal-translator v0.18.1 // indirect + github.com/go-playground/validator/v10 v10.15.3 // indirect + github.com/go-sql-driver/mysql v1.7.1 // indirect + github.com/goccy/go-json v0.10.2 // indirect + github.com/golang/snappy v0.0.4 // indirect + github.com/hashicorp/errwrap v1.0.0 // indirect + github.com/hashicorp/go-multierror v1.1.1 // indirect + github.com/hashicorp/go-uuid v1.0.3 // indirect + github.com/jcmturner/aescts/v2 v2.0.0 // indirect + github.com/jcmturner/dnsutils/v2 v2.0.0 // indirect + github.com/jcmturner/gofork v1.7.6 // indirect + github.com/jcmturner/gokrb5/v8 v8.4.4 // indirect + github.com/jcmturner/rpc/v2 v2.0.3 // indirect + github.com/jinzhu/copier v0.4.0 // indirect + github.com/jinzhu/inflection v1.0.0 // indirect + github.com/jinzhu/now v1.1.5 // indirect + github.com/json-iterator/go v1.1.12 // indirect + github.com/klauspost/compress v1.16.7 // indirect + github.com/klauspost/cpuid/v2 v2.2.5 // indirect + github.com/leodido/go-urn v1.2.4 // indirect + github.com/lestrrat-go/file-rotatelogs v2.4.0+incompatible // indirect + github.com/lestrrat-go/strftime v1.0.6 // indirect + github.com/mattn/go-isatty v0.0.19 // indirect + github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect + github.com/modern-go/reflect2 v1.0.2 // indirect + github.com/nfnt/resize v0.0.0-20180221191011-83c6a9932646 // indirect + github.com/pelletier/go-toml/v2 v2.0.8 // indirect + github.com/pierrec/lz4/v4 v4.1.18 // indirect + github.com/pkg/errors v0.9.1 // indirect + github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect + github.com/twitchyliquid64/golang-asm v0.15.1 // indirect + github.com/ugorji/go/codec v1.2.11 // indirect + go.uber.org/atomic v1.7.0 // indirect + go.uber.org/multierr v1.6.0 // indirect + go.uber.org/zap v1.24.0 // indirect + golang.org/x/arch v0.3.0 // indirect + golang.org/x/crypto v0.14.0 // indirect + golang.org/x/image v0.12.0 // indirect + golang.org/x/sys v0.13.0 // indirect + golang.org/x/text v0.13.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20230807174057-1744710a1577 // indirect + gopkg.in/yaml.v3 v3.0.1 // indirect +) diff --git a/tools/data-conversion/go.sum b/tools/data-conversion/go.sum new file mode 100644 index 000000000..9223f6e36 --- /dev/null +++ b/tools/data-conversion/go.sum @@ -0,0 +1,210 @@ +github.com/IBM/sarama v1.41.2 h1:ZDBZfGPHAD4uuAtSv4U22fRZBgst0eEwGFzLj0fb85c= +github.com/IBM/sarama v1.41.2/go.mod h1:xdpu7sd6OE1uxNdjYTSKUfY8FaKkJES9/+EyjSgiGQk= +github.com/OpenIMSDK/protocol v0.0.23 h1:L545aRQez6Ro+AaJB1Z6Mz7ojnDtp41WqASxYveCkcE= +github.com/OpenIMSDK/protocol v0.0.23/go.mod h1:F25dFrwrIx3lkNoiuf6FkCfxuwf8L4Z8UIsdTHP/r0Y= +github.com/OpenIMSDK/tools v0.0.14 h1:WLof/+WxyPyRST+QkoTKubYCiV73uCLiL8pgnpH/yKQ= +github.com/OpenIMSDK/tools v0.0.14/go.mod h1:eg+q4A34Qmu73xkY0mt37FHGMCMfC6CtmOnm0kFEGFI= +github.com/benbjohnson/clock v1.1.0 h1:Q92kusRqC1XV2MjkWETPvjJVqKetz1OzxZB7mHJLju8= +github.com/bwmarrin/snowflake v0.3.0 h1:xm67bEhkKh6ij1790JB83OujPR5CzNe8QuQqAgISZN0= +github.com/bwmarrin/snowflake v0.3.0/go.mod h1:NdZxfVWX+oR6y2K0o6qAYv6gIOP9rjG0/E9WsDpxqwE= +github.com/bytedance/sonic v1.5.0/go.mod h1:ED5hyg4y6t3/9Ku1R6dU/4KyJ48DZ4jPhfY1O2AihPM= +github.com/bytedance/sonic v1.9.1 h1:6iJ6NqdoxCDr6mbY8h18oSO+cShGSMRGCEo7F2h0x8s= +github.com/bytedance/sonic v1.9.1/go.mod h1:i736AoUSYt75HyZLoJW9ERYxcy6eaN6h4BZXU064P/U= +github.com/chenzhuoyu/base64x v0.0.0-20211019084208-fb5309c8db06/go.mod h1:DH46F32mSOjUmXrMHnKwZdA8wcEefY7UVqBKYGjpdQY= +github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311 h1:qSGYFH7+jGhDF8vLC+iwCD4WpbV1EBDSzWkJODFLams= +github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311/go.mod h1:b583jCggY9gE99b6G5LEC39OIiVsWj+R97kbl5odCEk= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/eapache/go-resiliency v1.4.0 h1:3OK9bWpPk5q6pbFAaYSEwD9CLUSHG8bnZuqX2yMt3B0= +github.com/eapache/go-resiliency v1.4.0/go.mod h1:5yPzW0MIvSe0JDsv0v+DvcjEv2FyD6iZYSs1ZI+iQho= +github.com/eapache/go-xerial-snappy v0.0.0-20230731223053-c322873962e3 h1:Oy0F4ALJ04o5Qqpdz8XLIpNA3WM/iSIXqxtqo7UGVws= +github.com/eapache/go-xerial-snappy v0.0.0-20230731223053-c322873962e3/go.mod h1:YvSRo5mw33fLEx1+DlK6L2VV43tJt5Eyel9n9XBcR+0= +github.com/eapache/queue v1.1.0 h1:YOEu7KNc61ntiQlcEeUIoDTJ2o8mQznoNvUhiigpIqc= +github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I= +github.com/fortytw2/leaktest v1.3.0 h1:u8491cBMTQ8ft8aeV+adlcytMZylmA5nnwwkRZjI8vw= +github.com/gabriel-vasile/mimetype v1.4.2 h1:w5qFW6JKBz9Y393Y4q372O9A7cUSequkh1Q7OhCmWKU= +github.com/gabriel-vasile/mimetype v1.4.2/go.mod h1:zApsH/mKG4w07erKIaJPFiX0Tsq9BFQgN3qGY5GnNgA= +github.com/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-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= +github.com/go-playground/universal-translator v0.18.1 h1:Bcnm0ZwsGyWbCzImXv+pAJnYK9S473LQFuzCbDbfSFY= +github.com/go-playground/universal-translator v0.18.1/go.mod h1:xekY+UJKNuX9WP91TpwSH2VMlDf28Uj24BCp08ZFTUY= +github.com/go-playground/validator/v10 v10.15.3 h1:S+sSpunYjNPDuXkWbK+x+bA7iXiW296KG4dL3X7xUZo= +github.com/go-playground/validator/v10 v10.15.3/go.mod h1:9iXMNT7sEkjXb0I+enO7QXmzG6QCsPWY4zveKFVRSyU= +github.com/go-sql-driver/mysql v1.7.0/go.mod h1:OXbVy3sEdcQ2Doequ6Z5BW6fXNQTmx+9S1MCJN5yJMI= +github.com/go-sql-driver/mysql v1.7.1 h1:lUIinVbN1DY0xBg0eMOzmmtGoHwWBbvnWubQUrtU8EI= +github.com/go-sql-driver/mysql v1.7.1/go.mod h1:OXbVy3sEdcQ2Doequ6Z5BW6fXNQTmx+9S1MCJN5yJMI= +github.com/goccy/go-json v0.10.2 h1:CrxCmQqYDkv1z7lO7Wbh2HN93uovUHgrECaO5ZrCXAU= +github.com/goccy/go-json v0.10.2/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I= +github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= +github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= +github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= +github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= +github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/gorilla/securecookie v1.1.1/go.mod h1:ra0sb63/xPlUeL+yeDciTfxMRAA+MP+HVt/4epWDjd4= +github.com/gorilla/sessions v1.2.1/go.mod h1:dk2InVEVJ0sfLlnXv9EAgkf6ecYs/i80K/zI+bUmuGM= +github.com/hashicorp/errwrap v1.0.0 h1:hLrqtEDnRye3+sgx6z4qVLNuviH3MR5aQ0ykNJa/UYA= +github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= +github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+lD48awMYo= +github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM= +github.com/hashicorp/go-uuid v1.0.2/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= +github.com/hashicorp/go-uuid v1.0.3 h1:2gKiV6YVmrJ1i2CKKa9obLvRieoRGviZFL26PcT/Co8= +github.com/hashicorp/go-uuid v1.0.3/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= +github.com/jcmturner/aescts/v2 v2.0.0 h1:9YKLH6ey7H4eDBXW8khjYslgyqG2xZikXP0EQFKrle8= +github.com/jcmturner/aescts/v2 v2.0.0/go.mod h1:AiaICIRyfYg35RUkr8yESTqvSy7csK90qZ5xfvvsoNs= +github.com/jcmturner/dnsutils/v2 v2.0.0 h1:lltnkeZGL0wILNvrNiVCR6Ro5PGU/SeBvVO/8c/iPbo= +github.com/jcmturner/dnsutils/v2 v2.0.0/go.mod h1:b0TnjGOvI/n42bZa+hmXL+kFJZsFT7G4t3HTlQ184QM= +github.com/jcmturner/gofork v1.7.6 h1:QH0l3hzAU1tfT3rZCnW5zXl+orbkNMMRGJfdJjHVETg= +github.com/jcmturner/gofork v1.7.6/go.mod h1:1622LH6i/EZqLloHfE7IeZ0uEJwMSUyQ/nDd82IeqRo= +github.com/jcmturner/goidentity/v6 v6.0.1 h1:VKnZd2oEIMorCTsFBnJWbExfNN7yZr3EhJAxwOkZg6o= +github.com/jcmturner/goidentity/v6 v6.0.1/go.mod h1:X1YW3bgtvwAXju7V3LCIMpY0Gbxyjn/mY9zx4tFonSg= +github.com/jcmturner/gokrb5/v8 v8.4.4 h1:x1Sv4HaTpepFkXbt2IkL29DXRf8sOfZXo8eRKh687T8= +github.com/jcmturner/gokrb5/v8 v8.4.4/go.mod h1:1btQEpgT6k+unzCwX1KdWMEwPPkkgBtP+F6aCACiMrs= +github.com/jcmturner/rpc/v2 v2.0.3 h1:7FXXj8Ti1IaVFpSAziCZWNzbNuZmnvw/i6CqLNdWfZY= +github.com/jcmturner/rpc/v2 v2.0.3/go.mod h1:VUJYCIDm3PVOEHw8sgt091/20OJjskO/YJki3ELg/Hc= +github.com/jinzhu/copier v0.4.0 h1:w3ciUoD19shMCRargcpm0cm91ytaBhDvuRpz1ODO/U8= +github.com/jinzhu/copier v0.4.0/go.mod h1:DfbEm0FYsaqBcKcFuvmOZb218JkPGtvSHsKg8S8hyyg= +github.com/jinzhu/inflection v1.0.0 h1:K317FqzuhWc8YvSVlFMCCUb36O/S9MCKRDI7QkRKD/E= +github.com/jinzhu/inflection v1.0.0/go.mod h1:h+uFLlag+Qp1Va5pdKtLDYj+kHp5pxUVkryuEj+Srlc= +github.com/jinzhu/now v1.1.5 h1:/o9tlHleP7gOFmsnYNz3RGnqzefHA47wQpKrrdTIwXQ= +github.com/jinzhu/now v1.1.5/go.mod h1:d3SSVoowX0Lcu0IBviAWJpolVfI5UJVZZ7cO71lE/z8= +github.com/jonboulle/clockwork v0.4.0 h1:p4Cf1aMWXnXAUh8lVfewRBx1zaTSYKrKMF2g3ST4RZ4= +github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= +github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= +github.com/klauspost/compress v1.16.7 h1:2mk3MPGNzKyxErAw8YaohYh69+pa4sIQSC0fPGCFR9I= +github.com/klauspost/compress v1.16.7/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= +github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= +github.com/klauspost/cpuid/v2 v2.2.5 h1:0E5MSMDEoAulmXNFquVs//DdoomxaoTY1kUhbc/qbZg= +github.com/klauspost/cpuid/v2 v2.2.5/go.mod h1:Lcz8mBdAVJIBVzewtcLocK12l3Y+JytZYpaMropDUws= +github.com/kr/pretty v0.3.0 h1:WgNl7dwNpEZ6jJ9k1snq4pZsg7DOEN8hP9Xw0Tsjwk0= +github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/leodido/go-urn v1.2.4 h1:XlAE/cm/ms7TE/VMVoduSpNBoyc2dOxHs5MZSwAN63Q= +github.com/leodido/go-urn v1.2.4/go.mod h1:7ZrI8mTSeBSHl/UaRyKQW1qZeMgak41ANeCNaVckg+4= +github.com/lestrrat-go/envload v0.0.0-20180220234015-a3eb8ddeffcc h1:RKf14vYWi2ttpEmkA4aQ3j4u9dStX2t4M8UM6qqNsG8= +github.com/lestrrat-go/envload v0.0.0-20180220234015-a3eb8ddeffcc/go.mod h1:kopuH9ugFRkIXf3YoqHKyrJ9YfUFsckUU9S7B+XP+is= +github.com/lestrrat-go/file-rotatelogs v2.4.0+incompatible h1:Y6sqxHMyB1D2YSzWkLibYKgg+SwmyFU9dF2hn6MdTj4= +github.com/lestrrat-go/file-rotatelogs v2.4.0+incompatible/go.mod h1:ZQnN8lSECaebrkQytbHj4xNgtg8CR7RYXnPok8e0EHA= +github.com/lestrrat-go/strftime v1.0.6 h1:CFGsDEt1pOpFNU+TJB0nhz9jl+K0hZSLE205AhTIGQQ= +github.com/lestrrat-go/strftime v1.0.6/go.mod h1:f7jQKgV5nnJpYgdEasS+/y7EsTb8ykN2z68n3TtcTaw= +github.com/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/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 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= +github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= +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/openimsdk/open-im-server/v3 v3.3.2 h1:uK6glaidrnWlYXFSwzOEq7fXS6jT1OyesUJENZJeptI= +github.com/openimsdk/open-im-server/v3 v3.3.2/go.mod h1:rqKiCkjav5P7tQmyqaixnMJcayWlM4XtXmwG+cZNw78= +github.com/pelletier/go-toml/v2 v2.0.8 h1:0ctb6s9mE31h0/lhu+J6OPmVeDxJn+kYnJc2jZR9tGQ= +github.com/pelletier/go-toml/v2 v2.0.8/go.mod h1:vuYfssBdrU2XDZ9bYydBu6t+6a6PYNcZljzZR9VXg+4= +github.com/pierrec/lz4/v4 v4.1.18 h1:xaKrnTkyoqfh1YItXl56+6KJNVYWlEEPuAQW9xsplYQ= +github.com/pierrec/lz4/v4 v4.1.18/go.mod h1:gZWDp/Ze/IJXGXf23ltt2EXimqmTUXEy0GFuRQyBid4= +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/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/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M= +github.com/stretchr/objx v0.1.0/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.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= +github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= +github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= +github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= +github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= +github.com/stretchr/testify v1.8.3/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= +github.com/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/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= +go.uber.org/atomic v1.7.0 h1:ADUqmZGgLDDfbSL9ZmPxKTybcoEYHgpYfELNoN+7hsw= +go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= +go.uber.org/goleak v1.1.11 h1:wy28qYRKZgnJTxGxvye5/wgWr1EKjmUDGYox5mGlRlI= +go.uber.org/multierr v1.6.0 h1:y6IPFStTAIT5Ytl7/XYmHvzXQ7S3g/IeZW9hyZ5thw4= +go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= +go.uber.org/zap v1.24.0 h1:FiJd5l1UOLj0wCgbSE0rwwXHzEdAZS6hiiSnxJN/D60= +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-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/crypto v0.6.0/go.mod h1:OFC/31mSvZgRz0V1QTNCzfAI1aIRzbiufJtkMIlEp58= +golang.org/x/crypto v0.14.0 h1:wBqGXzWJW6m1XrIKlAH0Hs1JJ7+9KBwnIO8v66Q9cHc= +golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf4= +golang.org/x/image v0.12.0 h1:w13vZbU4o5rKOFFR8y7M+c4A5jXDC0uXTdHYRP8X2DQ= +golang.org/x/image v0.12.0/go.mod h1:Lu90jvHG7GfemOIcldsh9A2hS01ocl6oNO7ype5mEnk= +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-20190620200207-3b0461eec859/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-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= +golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= +golang.org/x/net v0.17.0 h1:pVaXccu2ozPjCXewfr1S7xza/zcXTity9cCdXQYSjIM= +golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= +golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.3.0 h1:ftCYgMx6zT/asHUrPw8BLLscYtGznsLAnjq5RH9P66E= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +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.13.0 h1:Af8nKPmuFypiUBjVoU9V20FiaFXOcuZI21p0ycVYYGE= +golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= +golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= +golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= +golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= +golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k= +golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= +golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +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-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +google.golang.org/genproto/googleapis/rpc v0.0.0-20230807174057-1744710a1577 h1:wukfNtZmZUurLN/atp2hiIeTKn7QJWIQdHzqmsOnAOk= +google.golang.org/genproto/googleapis/rpc v0.0.0-20230807174057-1744710a1577/go.mod h1:+Bk1OCOj40wS2hwAMA+aCW9ypzm63QTBBHp6lQ3p+9M= +google.golang.org/grpc v1.57.0 h1:kfzNeI/klCGD2YPMUlaGNT3pxvYfga7smW3Vth8Zsiw= +google.golang.org/grpc v1.57.0/go.mod h1:Sd+9RMTACXwmub0zcNY2c4arhtrbBYD1AUHI/dt16Mo= +google.golang.org/protobuf 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/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= +gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= +gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gorm.io/driver/mysql v1.5.1 h1:WUEH5VF9obL/lTtzjmML/5e6VfFR/788coz2uaVCAZw= +gorm.io/driver/mysql v1.5.1/go.mod h1:Jo3Xu7mMhCyj8dlrb3WoCaRd1FhsVh+yMXb1jUInf5o= +gorm.io/gorm v1.25.1/go.mod h1:L4uxeKpfBml98NYqVqwAdmV1a2nBtAec/cf3fpucW/k= +gorm.io/gorm v1.25.4 h1:iyNd8fNAe8W9dvtlgeRI5zSVZPsq3OpcTu37cYcpCmw= +gorm.io/gorm v1.25.4/go.mod h1:L4uxeKpfBml98NYqVqwAdmV1a2nBtAec/cf3fpucW/k= +rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4= diff --git a/tools/data-conversion/info.md b/tools/data-conversion/info.md new file mode 100644 index 000000000..600b1d09c --- /dev/null +++ b/tools/data-conversion/info.md @@ -0,0 +1,68 @@ +# v2数据迁移工具 + +### 转换前请做好数据备份!!! + +### 转换OPENIM MYSQL数据 + - open-im-server/v3/tools/data-conversion/openim/mysql.go + - 配置mysql.go数据库信息 + - 需要手动创建v3版本数据库,字符集`utf8mb4` + +```go +var ( + usernameV2 = "root" // v2版本mysql用户名 + passwordV2 = "openIM" // v2版本mysql密码 + addrV2 = "127.0.0.1:13306" // v2版本mysql地址 + databaseV2 = "openIM_v2" // v2版本mysql数据库名字 +) + +var ( + usernameV3 = "root" // v3版本mysql用户名 + passwordV3 = "openIM123" // v3版本mysql密码 + addrV3 = "127.0.0.1:13306" // v3版本mysql地址 + databaseV3 = "openIM_v3" // v3版本mysql数据库名字 +) +``` +```shell +go run mysql.go +``` + +### 转换聊天消息(可选) +- 目前只支持转换kafka中的消息 +- open-im-server/v3/tools/data-conversion/openim/msg.go +- 配置msg.go数据库信息 +```go +var ( + topic = "ws2ms_chat" // v2版本配置文件kafka.topic.ws2ms_chat + kafkaAddr = "127.0.0.1:9092" // v2版本配置文件kafka.topic.addr + rpcAddr = "127.0.0.1:10130" // v3版本配置文件rpcPort.openImMessagePort + adminUserID = "openIM123456" // v3版本管理员userID + concurrency = 4 // 并发数量 +) +``` +```shell +go run msg.go +``` + +### 转换业务服务器数据(使用官方业务服务器需要转换) +- 目前只支持转换kafka中的消息 +- open-im-server/v3/tools/data-conversion/chat/chat.go +- 需要手动创建v3版本数据库,字符集`utf8mb4` +- main.go数据库信息 +```go +var ( + usernameV2 = "root" // v2版本mysql用户名 + passwordV2 = "openIM" // v2版本mysql密码 + addrV2 = "127.0.0.1:13306" // v2版本mysql地址 + databaseV2 = "admin_chat" // v2版本mysql数据库名字 +) + +var ( + usernameV3 = "root" // v3版本mysql用户名 + passwordV3 = "openIM123" // v3版本mysql密码 + addrV3 = "127.0.0.1:13306" // v3版本mysql地址 + databaseV3 = "openim_enterprise" // v3版本mysql数据库名字 +) +``` +```shell +go run chat.go +``` \ No newline at end of file diff --git a/tools/data-conversion/openim/common/config.go b/tools/data-conversion/openim/common/config.go new file mode 100644 index 000000000..e2bd14a05 --- /dev/null +++ b/tools/data-conversion/openim/common/config.go @@ -0,0 +1,65 @@ +// 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 common + +// =================================== V2 ===================================== +// MySQL +// V2. +const ( + UsernameV2 = "root" + PasswordV2 = "openIM" + IpV2 = "121.5.182.23:13306" + DatabaseV2 = "openIM_v2" +) + +// V2 chat. +const ( + ChatUsernameV2 = "root" + ChatPasswordV2 = "openIM" + ChatIpV2 = "121.5.182.23:13306" + ChatDatabaseV2 = "admin_chat" +) + +// Kafka. +const ( + Topic = "ws2ms_chat" + KafkaAddr = "121.5.182.23:9092" +) + +// =================================== V3 ===================================== +// V3. +const ( + UsernameV3 = "root" + PasswordV3 = "openIM123" + IpV3 = "43.134.63.160:13306" + DatabaseV3 = "openIM_v3" +) + +// V3 chat. +const ( + ChatUsernameV3 = "root" + ChatPasswordV3 = "openIM123" + ChatIpV3 = "43.134.63.160:13306" + ChatDatabaseV3 = "openim_enterprise" +) + +// Zookeeper. +const ( + ZkAddr = "43.134.63.160:12181" + ZKSchema = "openim" + ZKUsername = "" + ZKPassword = "" + MsgRpcName = "Msg" +) diff --git a/test/data-conversion/kafka_test.go b/tools/data-conversion/openim/common/console.go similarity index 70% rename from test/data-conversion/kafka_test.go rename to tools/data-conversion/openim/common/console.go index e926c4541..b739a8c4c 100644 --- a/test/data-conversion/kafka_test.go +++ b/tools/data-conversion/openim/common/console.go @@ -12,14 +12,18 @@ // See the License for the specific language governing permissions and // limitations under the License. -package data_conversion +package common -import "testing" +import "fmt" -func TestGetMessage(t *testing.T) { - GetMessage() +func ErrorPrint(s string) { + fmt.Printf("\x1b[%dm%v\x1b[0m\n", 31, s) } -func TestSendMessage(t *testing.T) { - SendMessage() +func SuccessPrint(s string) { + fmt.Printf("\x1b[%dm%v\x1b[0m\n", 32, s) +} + +func WarningPrint(s string) { + fmt.Printf("\x1b[%dmWarning: But %v\x1b[0m\n", 33, s) } diff --git a/tools/data-conversion/openim/msg.go b/tools/data-conversion/openim/msg.go new file mode 100644 index 000000000..338fbf111 --- /dev/null +++ b/tools/data-conversion/openim/msg.go @@ -0,0 +1,204 @@ +package main + +import ( + "context" + "encoding/json" + "log" + "sync" + "sync/atomic" + "time" + + "github.com/IBM/sarama" + "github.com/OpenIMSDK/protocol/constant" + "github.com/OpenIMSDK/protocol/msg" + "github.com/OpenIMSDK/protocol/sdkws" + "github.com/OpenIMSDK/tools/mw" + "github.com/golang/protobuf/proto" + "google.golang.org/grpc" + "google.golang.org/grpc/credentials/insecure" + + "github.com/openimsdk/open-im-server/v3/pkg/apistruct" + pbmsg "github.com/openimsdk/open-im-server/v3/tools/data-conversion/openim/proto/msg" +) + +func main() { + + var ( + topic = "ws2ms_chat" // v2版本配置文件kafka.topic.ws2ms_chat + kafkaAddr = "127.0.0.1:9092" // v2版本配置文件kafka.topic.addr + rpcAddr = "127.0.0.1:10130" // v3版本配置文件rpcPort.openImMessagePort + adminUserID = "openIM123456" // v3版本管理员userID + concurrency = 1 // 并发数量 + ) + + getRpcConn := func() (*grpc.ClientConn, error) { + ctx, cancel := context.WithTimeout(context.Background(), time.Second*10) + defer cancel() + return grpc.DialContext(ctx, rpcAddr, grpc.WithTransportCredentials(insecure.NewCredentials()), mw.GrpcClient()) + } + conn, err := getRpcConn() + if err != nil { + log.Println("get rpc conn", err) + return + } + defer conn.Close() + + msgClient := msg.NewMsgClient(conn) + + conf := sarama.NewConfig() + conf.Consumer.Offsets.Initial = sarama.OffsetOldest + + consumer, err := sarama.NewConsumer([]string{kafkaAddr}, conf) + if err != nil { + log.Println("kafka consumer conn", err) + return + } + partitions, err := consumer.Partitions(topic) // Get all partitions according to topic + if err != nil { + log.Println("kafka partitions", err) + return + } + + if len(partitions) == 0 { + log.Println("kafka partitions is empty") + return + } + log.Println("kafka partitions", partitions) + + msgCh := make(chan *pbmsg.MsgDataToMQ, concurrency*2) + + var kfkWg sync.WaitGroup + + distinct := make(map[string]struct{}) + var lock sync.Mutex + + for _, partition := range partitions { + kfkWg.Add(1) + go func(partition int32) { + defer kfkWg.Done() + pc, err := consumer.ConsumePartition(topic, partition, sarama.OffsetOldest) + if err != nil { + log.Printf("kafka Consume Partition %d failed %s\n", partition, err) + return + } + defer pc.Close() + ch := pc.Messages() + for { + select { + case <-time.After(time.Second * 10): // 10s读取不到就关闭 + return + case message, ok := <-ch: + if !ok { + return + } + msgFromMQV2 := pbmsg.MsgDataToMQ{} + err := proto.Unmarshal(message.Value, &msgFromMQV2) + if err != nil { + log.Printf("kafka msg partition %d offset %d unmarshal failed %s\n", message.Partition, message.Offset, message.Value) + continue + } + if msgFromMQV2.MsgData == nil || msgFromMQV2.OperationID == "" { + continue + } + if msgFromMQV2.MsgData.ContentType < constant.ContentTypeBegin || msgFromMQV2.MsgData.ContentType > constant.AdvancedText { + continue + } + lock.Lock() + _, exist := distinct[msgFromMQV2.MsgData.ClientMsgID] + if !exist { + distinct[msgFromMQV2.MsgData.ClientMsgID] = struct{}{} + } + lock.Unlock() + if exist { + continue + } + msgCh <- &msgFromMQV2 + } + } + }(partition) + } + + go func() { + kfkWg.Wait() + close(msgCh) + }() + + var msgWg sync.WaitGroup + + var ( + success int64 + failed int64 + ) + for i := 0; i < concurrency; i++ { + msgWg.Add(1) + go func() { + defer msgWg.Done() + for message := range msgCh { + HandlerV2Msg(msgClient, adminUserID, message, &success, &failed) + } + }() + } + + msgWg.Wait() + log.Printf("total %d success %d failed %d\n", success+failed, success, failed) +} + +func HandlerV2Msg(msgClient msg.MsgClient, adminUserID string, msgFromMQV2 *pbmsg.MsgDataToMQ, success *int64, failed *int64) { + msgData := &sdkws.MsgData{ + SendID: msgFromMQV2.MsgData.SendID, + RecvID: msgFromMQV2.MsgData.RecvID, + GroupID: msgFromMQV2.MsgData.GroupID, + ClientMsgID: msgFromMQV2.MsgData.ClientMsgID, + ServerMsgID: msgFromMQV2.MsgData.ServerMsgID, + SenderPlatformID: msgFromMQV2.MsgData.SenderPlatformID, + SenderNickname: msgFromMQV2.MsgData.SenderNickname, + SenderFaceURL: msgFromMQV2.MsgData.SenderFaceURL, + SessionType: msgFromMQV2.MsgData.SessionType, + MsgFrom: msgFromMQV2.MsgData.MsgFrom, + ContentType: msgFromMQV2.MsgData.ContentType, + SendTime: msgFromMQV2.MsgData.SendTime, + CreateTime: msgFromMQV2.MsgData.CreateTime, + Status: msgFromMQV2.MsgData.Status, + IsRead: false, + Options: msgFromMQV2.MsgData.Options, + AtUserIDList: msgFromMQV2.MsgData.AtUserIDList, + AttachedInfo: msgFromMQV2.MsgData.AttachedInfo, + Ex: msgFromMQV2.MsgData.Ex, + } + + if msgFromMQV2.MsgData.OfflinePushInfo != nil { + msgData.OfflinePushInfo = &sdkws.OfflinePushInfo{ + Title: msgFromMQV2.MsgData.OfflinePushInfo.Title, + Desc: msgFromMQV2.MsgData.OfflinePushInfo.Desc, + Ex: msgFromMQV2.MsgData.OfflinePushInfo.Ex, + IOSPushSound: msgFromMQV2.MsgData.OfflinePushInfo.IOSPushSound, + IOSBadgeCount: msgFromMQV2.MsgData.OfflinePushInfo.IOSBadgeCount, + SignalInfo: "", + } + } + switch msgData.ContentType { + case constant.Text: + data, err := json.Marshal(apistruct.TextElem{ + Content: string(msgFromMQV2.MsgData.Content), + }) + if err != nil { + return + } + msgData.Content = data + default: + msgData.Content = msgFromMQV2.MsgData.Content + } + ctx, cancel := context.WithTimeout(context.Background(), time.Second*10) + defer cancel() + ctx = context.WithValue(context.Background(), constant.OperationID, msgFromMQV2.OperationID) + ctx = context.WithValue(ctx, constant.OpUserID, adminUserID) + + resp, err := msgClient.SendMsg(ctx, &msg.SendMsgReq{MsgData: msgData}) + if err != nil { + atomic.AddInt64(failed, 1) + log.Printf("send msg %+v failed %s\n", msgData, err) + return + } + atomic.AddInt64(success, 1) + log.Printf("send msg success %+v resp %+v\n", msgData, resp) +} diff --git a/tools/data-conversion/openim/mysql.go b/tools/data-conversion/openim/mysql.go new file mode 100644 index 000000000..8992e12c4 --- /dev/null +++ b/tools/data-conversion/openim/mysql.go @@ -0,0 +1,71 @@ +// 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 main + +import ( + "fmt" + "log" + + "gorm.io/driver/mysql" + "gorm.io/gorm" + "gorm.io/gorm/logger" + + "github.com/openimsdk/open-im-server/v3/tools/data-conversion/openim/mysql/conversion" + "github.com/openimsdk/open-im-server/v3/tools/data-conversion/utils" +) + +func main() { + var ( + usernameV2 = "root" // v2版本mysql用户名 + passwordV2 = "openIM" // v2版本mysql密码 + addrV2 = "127.0.0.1:13306" // v2版本mysql地址 + databaseV2 = "openIM_v2" // v2版本mysql数据库名字 + ) + + var ( + usernameV3 = "root" // v3版本mysql用户名 + passwordV3 = "openIM123" // v3版本mysql密码 + addrV3 = "127.0.0.1:13306" // v3版本mysql地址 + databaseV3 = "openIM_v3" // v3版本mysql数据库名字 + ) + + var concurrency = 1 // 并发数量 + + log.SetFlags(log.LstdFlags | log.Llongfile) + dsnV2 := fmt.Sprintf("%s:%s@tcp(%s)/%s?charset=utf8mb4&parseTime=True&loc=Local", usernameV2, passwordV2, addrV2, databaseV2) + dsnV3 := fmt.Sprintf("%s:%s@tcp(%s)/%s?charset=utf8mb4&parseTime=True&loc=Local", usernameV3, passwordV3, addrV3, databaseV3) + dbV2, err := gorm.Open(mysql.Open(dsnV2), &gorm.Config{Logger: logger.Discard}) + if err != nil { + log.Println("open v2 db failed", err) + return + } + dbV3, err := gorm.Open(mysql.Open(dsnV3), &gorm.Config{Logger: logger.Discard}) + if err != nil { + log.Println("open v3 db failed", err) + return + } + + var tasks utils.TakeList + + tasks.Append(func() (string, error) { return utils.FindAndInsert(dbV2, dbV3, conversion.Friend) }) + tasks.Append(func() (string, error) { return utils.FindAndInsert(dbV2, dbV3, conversion.FriendRequest) }) + tasks.Append(func() (string, error) { return utils.FindAndInsert(dbV2, dbV3, conversion.Group) }) + tasks.Append(func() (string, error) { return utils.FindAndInsert(dbV2, dbV3, conversion.GroupMember) }) + tasks.Append(func() (string, error) { return utils.FindAndInsert(dbV2, dbV3, conversion.GroupRequest) }) + tasks.Append(func() (string, error) { return utils.FindAndInsert(dbV2, dbV3, conversion.User) }) + + utils.RunTask(concurrency, tasks) + +} diff --git a/tools/data-conversion/openim/mysql/cmd.go b/tools/data-conversion/openim/mysql/cmd.go new file mode 100644 index 000000000..924b0a206 --- /dev/null +++ b/tools/data-conversion/openim/mysql/cmd.go @@ -0,0 +1,54 @@ +package mysql + +import ( + "fmt" + "log" + + "gorm.io/driver/mysql" + "gorm.io/gorm" + "gorm.io/gorm/logger" + + "github.com/openimsdk/open-im-server/v3/tools/data-conversion/openim/mysql/conversion" + "github.com/openimsdk/open-im-server/v3/tools/data-conversion/utils" +) + +func Cmd() { + var ( + usernameV2 = "root" + passwordV2 = "openIM" + addrV2 = "121.5.182.23:13306" + databaseV2 = "openIM_v2" + ) + + var ( + usernameV3 = "root" + passwordV3 = "openIM123" + addrV3 = "203.56.175.233:13306" + databaseV3 = "openIM_v3" + ) + log.SetFlags(log.LstdFlags | log.Llongfile) + dsnV2 := fmt.Sprintf("%s:%s@tcp(%s)/%s?charset=utf8mb4&parseTime=True&loc=Local", usernameV2, passwordV2, addrV2, databaseV2) + dsnV3 := fmt.Sprintf("%s:%s@tcp(%s)/%s?charset=utf8mb4&parseTime=True&loc=Local", usernameV3, passwordV3, addrV3, databaseV3) + dbV2, err := gorm.Open(mysql.Open(dsnV2), &gorm.Config{Logger: logger.Discard}) + if err != nil { + log.Println("open v2 db failed", err) + return + } + dbV3, err := gorm.Open(mysql.Open(dsnV3), &gorm.Config{Logger: logger.Discard}) + if err != nil { + log.Println("open v3 db failed", err) + return + } + + var tasks utils.TakeList + + tasks.Append(func() (string, error) { return utils.FindAndInsert(dbV2, dbV3, conversion.Friend) }) + tasks.Append(func() (string, error) { return utils.FindAndInsert(dbV2, dbV3, conversion.FriendRequest) }) + tasks.Append(func() (string, error) { return utils.FindAndInsert(dbV2, dbV3, conversion.Group) }) + tasks.Append(func() (string, error) { return utils.FindAndInsert(dbV2, dbV3, conversion.GroupMember) }) + tasks.Append(func() (string, error) { return utils.FindAndInsert(dbV2, dbV3, conversion.GroupRequest) }) + tasks.Append(func() (string, error) { return utils.FindAndInsert(dbV2, dbV3, conversion.User) }) + + utils.RunTask(4, tasks) + +} diff --git a/tools/data-conversion/openim/mysql/conversion/conversion.go b/tools/data-conversion/openim/mysql/conversion/conversion.go new file mode 100644 index 000000000..298eefb50 --- /dev/null +++ b/tools/data-conversion/openim/mysql/conversion/conversion.go @@ -0,0 +1,111 @@ +package conversion + +import ( + "github.com/OpenIMSDK/protocol/constant" + + v3 "github.com/openimsdk/open-im-server/v3/pkg/common/db/table/relation" + v2 "github.com/openimsdk/open-im-server/v3/tools/data-conversion/openim/mysql/v2" + "github.com/openimsdk/open-im-server/v3/tools/data-conversion/utils" +) + +func Friend(v v2.Friend) (v3.FriendModel, bool) { + utils.InitTime(&v.CreateTime) + return v3.FriendModel{ + OwnerUserID: v.OwnerUserID, + FriendUserID: v.FriendUserID, + Remark: v.Remark, + CreateTime: v.CreateTime, + AddSource: v.AddSource, + OperatorUserID: v.OperatorUserID, + Ex: v.Ex, + }, true +} + +func FriendRequest(v v2.FriendRequest) (v3.FriendRequestModel, bool) { + utils.InitTime(&v.CreateTime, &v.HandleTime) + return v3.FriendRequestModel{ + FromUserID: v.FromUserID, + ToUserID: v.ToUserID, + HandleResult: v.HandleResult, + ReqMsg: v.ReqMsg, + CreateTime: v.CreateTime, + HandlerUserID: v.HandlerUserID, + HandleMsg: v.HandleMsg, + HandleTime: v.HandleTime, + Ex: v.Ex, + }, true +} + +func Group(v v2.Group) (v3.GroupModel, bool) { + switch v.GroupType { + case constant.WorkingGroup, constant.NormalGroup: + v.GroupType = constant.WorkingGroup + default: + return v3.GroupModel{}, false + } + utils.InitTime(&v.CreateTime, &v.NotificationUpdateTime) + return v3.GroupModel{ + GroupID: v.GroupID, + GroupName: v.GroupName, + Notification: v.Notification, + Introduction: v.Introduction, + FaceURL: v.FaceURL, + CreateTime: v.CreateTime, + Ex: v.Ex, + Status: v.Status, + CreatorUserID: v.CreatorUserID, + GroupType: v.GroupType, + NeedVerification: v.NeedVerification, + LookMemberInfo: v.LookMemberInfo, + ApplyMemberFriend: v.ApplyMemberFriend, + NotificationUpdateTime: v.NotificationUpdateTime, + NotificationUserID: v.NotificationUserID, + }, true +} + +func GroupMember(v v2.GroupMember) (v3.GroupMemberModel, bool) { + utils.InitTime(&v.JoinTime, &v.MuteEndTime) + return v3.GroupMemberModel{ + GroupID: v.GroupID, + UserID: v.UserID, + Nickname: v.Nickname, + FaceURL: v.FaceURL, + RoleLevel: v.RoleLevel, + JoinTime: v.JoinTime, + JoinSource: v.JoinSource, + InviterUserID: v.InviterUserID, + OperatorUserID: v.OperatorUserID, + MuteEndTime: v.MuteEndTime, + Ex: v.Ex, + }, true +} + +func GroupRequest(v v2.GroupRequest) (v3.GroupRequestModel, bool) { + utils.InitTime(&v.ReqTime, &v.HandledTime) + return v3.GroupRequestModel{ + UserID: v.UserID, + GroupID: v.GroupID, + HandleResult: v.HandleResult, + ReqMsg: v.ReqMsg, + HandledMsg: v.HandledMsg, + ReqTime: v.ReqTime, + HandleUserID: v.HandleUserID, + HandledTime: v.HandledTime, + JoinSource: v.JoinSource, + InviterUserID: v.InviterUserID, + Ex: v.Ex, + }, true +} + +func User(v v2.User) (v3.UserModel, bool) { + utils.InitTime(&v.CreateTime) + return v3.UserModel{ + UserID: v.UserID, + Nickname: v.Nickname, + FaceURL: v.FaceURL, + Ex: v.Ex, + CreateTime: v.CreateTime, + AppMangerLevel: v.AppMangerLevel, + GlobalRecvMsgOpt: v.GlobalRecvMsgOpt, + }, true +} diff --git a/tools/data-conversion/openim/mysql/v2/model_struct.go b/tools/data-conversion/openim/mysql/v2/model_struct.go new file mode 100644 index 000000000..9da33f2a5 --- /dev/null +++ b/tools/data-conversion/openim/mysql/v2/model_struct.go @@ -0,0 +1,91 @@ +package db + +import "time" + +type Friend struct { + OwnerUserID string `gorm:"column:owner_user_id;primary_key;size:64"` + FriendUserID string `gorm:"column:friend_user_id;primary_key;size:64"` + Remark string `gorm:"column:remark;size:255"` + CreateTime time.Time `gorm:"column:create_time"` + AddSource int32 `gorm:"column:add_source"` + OperatorUserID string `gorm:"column:operator_user_id;size:64"` + Ex string `gorm:"column:ex;size:1024"` +} + +type FriendRequest struct { + FromUserID string `gorm:"column:from_user_id;primary_key;size:64"` + ToUserID string `gorm:"column:to_user_id;primary_key;size:64"` + HandleResult int32 `gorm:"column:handle_result"` + ReqMsg string `gorm:"column:req_msg;size:255"` + CreateTime time.Time `gorm:"column:create_time"` + HandlerUserID string `gorm:"column:handler_user_id;size:64"` + HandleMsg string `gorm:"column:handle_msg;size:255"` + HandleTime time.Time `gorm:"column:handle_time"` + Ex string `gorm:"column:ex;size:1024"` +} + +func (FriendRequest) TableName() string { + return "friend_requests" +} + +type Group struct { + GroupID string `gorm:"column:group_id;primary_key;size:64" json:"groupID" binding:"required"` + GroupName string `gorm:"column:name;size:255" json:"groupName"` + Notification string `gorm:"column:notification;size:255" json:"notification"` + Introduction string `gorm:"column:introduction;size:255" json:"introduction"` + FaceURL string `gorm:"column:face_url;size:255" json:"faceURL"` + CreateTime time.Time `gorm:"column:create_time;index:create_time"` + Ex string `gorm:"column:ex" json:"ex;size:1024"` + Status int32 `gorm:"column:status"` + CreatorUserID string `gorm:"column:creator_user_id;size:64"` + GroupType int32 `gorm:"column:group_type"` + NeedVerification int32 `gorm:"column:need_verification"` + LookMemberInfo int32 `gorm:"column:look_member_info" json:"lookMemberInfo"` + ApplyMemberFriend int32 `gorm:"column:apply_member_friend" json:"applyMemberFriend"` + NotificationUpdateTime time.Time `gorm:"column:notification_update_time"` + NotificationUserID string `gorm:"column:notification_user_id;size:64"` +} + +type GroupMember struct { + GroupID string `gorm:"column:group_id;primary_key;size:64"` + UserID string `gorm:"column:user_id;primary_key;size:64"` + Nickname string `gorm:"column:nickname;size:255"` + FaceURL string `gorm:"column:user_group_face_url;size:255"` + RoleLevel int32 `gorm:"column:role_level"` + JoinTime time.Time `gorm:"column:join_time"` + JoinSource int32 `gorm:"column:join_source"` + InviterUserID string `gorm:"column:inviter_user_id;size:64"` + OperatorUserID string `gorm:"column:operator_user_id;size:64"` + MuteEndTime time.Time `gorm:"column:mute_end_time"` + Ex string `gorm:"column:ex;size:1024"` +} + +type GroupRequest struct { + UserID string `gorm:"column:user_id;primary_key;size:64"` + GroupID string `gorm:"column:group_id;primary_key;size:64"` + HandleResult int32 `gorm:"column:handle_result"` + ReqMsg string `gorm:"column:req_msg;size:1024"` + HandledMsg string `gorm:"column:handle_msg;size:1024"` + ReqTime time.Time `gorm:"column:req_time"` + HandleUserID string `gorm:"column:handle_user_id;size:64"` + HandledTime time.Time `gorm:"column:handle_time"` + JoinSource int32 `gorm:"column:join_source"` + InviterUserID string `gorm:"column:inviter_user_id;size:64"` + Ex string `gorm:"column:ex;size:1024"` +} + +type User struct { + UserID string `gorm:"column:user_id;primary_key;size:64"` + Nickname string `gorm:"column:name;size:255"` + FaceURL string `gorm:"column:face_url;size:255"` + Gender int32 `gorm:"column:gender"` + PhoneNumber string `gorm:"column:phone_number;size:32"` + Birth time.Time `gorm:"column:birth"` + Email string `gorm:"column:email;size:64"` + Ex string `gorm:"column:ex;size:1024"` + CreateTime time.Time `gorm:"column:create_time;index:create_time"` + AppMangerLevel int32 `gorm:"column:app_manger_level"` + GlobalRecvMsgOpt int32 `gorm:"column:global_recv_msg_opt"` + + status int32 `gorm:"column:status"` +} diff --git a/tools/data-conversion/openim/proto/msg/msg.pb.go b/tools/data-conversion/openim/proto/msg/msg.pb.go new file mode 100644 index 000000000..2954a3a76 --- /dev/null +++ b/tools/data-conversion/openim/proto/msg/msg.pb.go @@ -0,0 +1,3161 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// source: msg/msg.proto + +package msg // import "Open_IM/pkg/proto/msg" + +import ( + proto "github.com/golang/protobuf/proto" + sdk_ws "github.com/openimsdk/open-im-server/v3/tools/data-conversion/openim/proto/sdk_ws" +) +import fmt "fmt" +import math "math" +import wrapperspb "google.golang.org/protobuf/types/known/wrapperspb" + +import ( + context "golang.org/x/net/context" + grpc "google.golang.org/grpc" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package + +type MsgDataToMQ struct { + Token string `protobuf:"bytes,1,opt,name=token" json:"token,omitempty"` + OperationID string `protobuf:"bytes,2,opt,name=operationID" json:"operationID,omitempty"` + MsgData *sdk_ws.MsgData `protobuf:"bytes,3,opt,name=msgData" json:"msgData,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *MsgDataToMQ) Reset() { *m = MsgDataToMQ{} } +func (m *MsgDataToMQ) String() string { return proto.CompactTextString(m) } +func (*MsgDataToMQ) ProtoMessage() {} +func (*MsgDataToMQ) Descriptor() ([]byte, []int) { + return fileDescriptor_msg_53ecdffb017d9c40, []int{0} +} +func (m *MsgDataToMQ) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_MsgDataToMQ.Unmarshal(m, b) +} +func (m *MsgDataToMQ) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_MsgDataToMQ.Marshal(b, m, deterministic) +} +func (dst *MsgDataToMQ) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgDataToMQ.Merge(dst, src) +} +func (m *MsgDataToMQ) XXX_Size() int { + return xxx_messageInfo_MsgDataToMQ.Size(m) +} +func (m *MsgDataToMQ) XXX_DiscardUnknown() { + xxx_messageInfo_MsgDataToMQ.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgDataToMQ proto.InternalMessageInfo + +func (m *MsgDataToMQ) GetToken() string { + if m != nil { + return m.Token + } + return "" +} + +func (m *MsgDataToMQ) GetOperationID() string { + if m != nil { + return m.OperationID + } + return "" +} + +func (m *MsgDataToMQ) GetMsgData() *sdk_ws.MsgData { + if m != nil { + return m.MsgData + } + return nil +} + +type MsgDataToDB struct { + MsgData *sdk_ws.MsgData `protobuf:"bytes,1,opt,name=msgData" json:"msgData,omitempty"` + OperationID string `protobuf:"bytes,2,opt,name=operationID" json:"operationID,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *MsgDataToDB) Reset() { *m = MsgDataToDB{} } +func (m *MsgDataToDB) String() string { return proto.CompactTextString(m) } +func (*MsgDataToDB) ProtoMessage() {} +func (*MsgDataToDB) Descriptor() ([]byte, []int) { + return fileDescriptor_msg_53ecdffb017d9c40, []int{1} +} +func (m *MsgDataToDB) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_MsgDataToDB.Unmarshal(m, b) +} +func (m *MsgDataToDB) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_MsgDataToDB.Marshal(b, m, deterministic) +} +func (dst *MsgDataToDB) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgDataToDB.Merge(dst, src) +} +func (m *MsgDataToDB) XXX_Size() int { + return xxx_messageInfo_MsgDataToDB.Size(m) +} +func (m *MsgDataToDB) XXX_DiscardUnknown() { + xxx_messageInfo_MsgDataToDB.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgDataToDB proto.InternalMessageInfo + +func (m *MsgDataToDB) GetMsgData() *sdk_ws.MsgData { + if m != nil { + return m.MsgData + } + return nil +} + +func (m *MsgDataToDB) GetOperationID() string { + if m != nil { + return m.OperationID + } + return "" +} + +type PushMsgDataToMQ struct { + OperationID string `protobuf:"bytes,1,opt,name=OperationID" json:"OperationID,omitempty"` + MsgData *sdk_ws.MsgData `protobuf:"bytes,2,opt,name=msgData" json:"msgData,omitempty"` + PushToUserID string `protobuf:"bytes,3,opt,name=pushToUserID" json:"pushToUserID,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *PushMsgDataToMQ) Reset() { *m = PushMsgDataToMQ{} } +func (m *PushMsgDataToMQ) String() string { return proto.CompactTextString(m) } +func (*PushMsgDataToMQ) ProtoMessage() {} +func (*PushMsgDataToMQ) Descriptor() ([]byte, []int) { + return fileDescriptor_msg_53ecdffb017d9c40, []int{2} +} +func (m *PushMsgDataToMQ) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_PushMsgDataToMQ.Unmarshal(m, b) +} +func (m *PushMsgDataToMQ) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_PushMsgDataToMQ.Marshal(b, m, deterministic) +} +func (dst *PushMsgDataToMQ) XXX_Merge(src proto.Message) { + xxx_messageInfo_PushMsgDataToMQ.Merge(dst, src) +} +func (m *PushMsgDataToMQ) XXX_Size() int { + return xxx_messageInfo_PushMsgDataToMQ.Size(m) +} +func (m *PushMsgDataToMQ) XXX_DiscardUnknown() { + xxx_messageInfo_PushMsgDataToMQ.DiscardUnknown(m) +} + +var xxx_messageInfo_PushMsgDataToMQ proto.InternalMessageInfo + +func (m *PushMsgDataToMQ) GetOperationID() string { + if m != nil { + return m.OperationID + } + return "" +} + +func (m *PushMsgDataToMQ) GetMsgData() *sdk_ws.MsgData { + if m != nil { + return m.MsgData + } + return nil +} + +func (m *PushMsgDataToMQ) GetPushToUserID() string { + if m != nil { + return m.PushToUserID + } + return "" +} + +type MsgDataToMongoByMQ struct { + LastSeq uint64 `protobuf:"varint,1,opt,name=lastSeq" json:"lastSeq,omitempty"` + AggregationID string `protobuf:"bytes,2,opt,name=aggregationID" json:"aggregationID,omitempty"` + MessageList []*MsgDataToMQ `protobuf:"bytes,3,rep,name=messageList" json:"messageList,omitempty"` + TriggerID string `protobuf:"bytes,4,opt,name=triggerID" json:"triggerID,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *MsgDataToMongoByMQ) Reset() { *m = MsgDataToMongoByMQ{} } +func (m *MsgDataToMongoByMQ) String() string { return proto.CompactTextString(m) } +func (*MsgDataToMongoByMQ) ProtoMessage() {} +func (*MsgDataToMongoByMQ) Descriptor() ([]byte, []int) { + return fileDescriptor_msg_53ecdffb017d9c40, []int{3} +} +func (m *MsgDataToMongoByMQ) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_MsgDataToMongoByMQ.Unmarshal(m, b) +} +func (m *MsgDataToMongoByMQ) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_MsgDataToMongoByMQ.Marshal(b, m, deterministic) +} +func (dst *MsgDataToMongoByMQ) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgDataToMongoByMQ.Merge(dst, src) +} +func (m *MsgDataToMongoByMQ) XXX_Size() int { + return xxx_messageInfo_MsgDataToMongoByMQ.Size(m) +} +func (m *MsgDataToMongoByMQ) XXX_DiscardUnknown() { + xxx_messageInfo_MsgDataToMongoByMQ.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgDataToMongoByMQ proto.InternalMessageInfo + +func (m *MsgDataToMongoByMQ) GetLastSeq() uint64 { + if m != nil { + return m.LastSeq + } + return 0 +} + +func (m *MsgDataToMongoByMQ) GetAggregationID() string { + if m != nil { + return m.AggregationID + } + return "" +} + +func (m *MsgDataToMongoByMQ) GetMessageList() []*MsgDataToMQ { + if m != nil { + return m.MessageList + } + return nil +} + +func (m *MsgDataToMongoByMQ) GetTriggerID() string { + if m != nil { + return m.TriggerID + } + return "" +} + +// message PullMessageReq { +// string UserID = 1; +// int64 SeqBegin = 2; +// int64 SeqEnd = 3; +// string OperationID = 4; +// } +// +// message PullMessageResp { +// int32 ErrCode = 1; +// string ErrMsg = 2; +// int64 MaxSeq = 3; +// int64 MinSeq = 4; +// repeated GatherFormat SingleUserMsg = 5; +// repeated GatherFormat GroupUserMsg = 6; +// } +// +// message PullMessageBySeqListReq{ +// string UserID = 1; +// string OperationID = 2; +// repeated int64 seqList =3; +// } +type GetMaxAndMinSeqReq struct { + UserID string `protobuf:"bytes,1,opt,name=UserID" json:"UserID,omitempty"` + OperationID string `protobuf:"bytes,2,opt,name=OperationID" json:"OperationID,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GetMaxAndMinSeqReq) Reset() { *m = GetMaxAndMinSeqReq{} } +func (m *GetMaxAndMinSeqReq) String() string { return proto.CompactTextString(m) } +func (*GetMaxAndMinSeqReq) ProtoMessage() {} +func (*GetMaxAndMinSeqReq) Descriptor() ([]byte, []int) { + return fileDescriptor_msg_53ecdffb017d9c40, []int{4} +} +func (m *GetMaxAndMinSeqReq) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GetMaxAndMinSeqReq.Unmarshal(m, b) +} +func (m *GetMaxAndMinSeqReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GetMaxAndMinSeqReq.Marshal(b, m, deterministic) +} +func (dst *GetMaxAndMinSeqReq) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetMaxAndMinSeqReq.Merge(dst, src) +} +func (m *GetMaxAndMinSeqReq) XXX_Size() int { + return xxx_messageInfo_GetMaxAndMinSeqReq.Size(m) +} +func (m *GetMaxAndMinSeqReq) XXX_DiscardUnknown() { + xxx_messageInfo_GetMaxAndMinSeqReq.DiscardUnknown(m) +} + +var xxx_messageInfo_GetMaxAndMinSeqReq proto.InternalMessageInfo + +func (m *GetMaxAndMinSeqReq) GetUserID() string { + if m != nil { + return m.UserID + } + return "" +} + +func (m *GetMaxAndMinSeqReq) GetOperationID() string { + if m != nil { + return m.OperationID + } + return "" +} + +type GetMaxAndMinSeqResp struct { + ErrCode int32 `protobuf:"varint,1,opt,name=ErrCode" json:"ErrCode,omitempty"` + ErrMsg string `protobuf:"bytes,2,opt,name=ErrMsg" json:"ErrMsg,omitempty"` + MaxSeq uint32 `protobuf:"varint,3,opt,name=MaxSeq" json:"MaxSeq,omitempty"` + MinSeq uint32 `protobuf:"varint,4,opt,name=MinSeq" json:"MinSeq,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GetMaxAndMinSeqResp) Reset() { *m = GetMaxAndMinSeqResp{} } +func (m *GetMaxAndMinSeqResp) String() string { return proto.CompactTextString(m) } +func (*GetMaxAndMinSeqResp) ProtoMessage() {} +func (*GetMaxAndMinSeqResp) Descriptor() ([]byte, []int) { + return fileDescriptor_msg_53ecdffb017d9c40, []int{5} +} +func (m *GetMaxAndMinSeqResp) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GetMaxAndMinSeqResp.Unmarshal(m, b) +} +func (m *GetMaxAndMinSeqResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GetMaxAndMinSeqResp.Marshal(b, m, deterministic) +} +func (dst *GetMaxAndMinSeqResp) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetMaxAndMinSeqResp.Merge(dst, src) +} +func (m *GetMaxAndMinSeqResp) XXX_Size() int { + return xxx_messageInfo_GetMaxAndMinSeqResp.Size(m) +} +func (m *GetMaxAndMinSeqResp) XXX_DiscardUnknown() { + xxx_messageInfo_GetMaxAndMinSeqResp.DiscardUnknown(m) +} + +var xxx_messageInfo_GetMaxAndMinSeqResp proto.InternalMessageInfo + +func (m *GetMaxAndMinSeqResp) GetErrCode() int32 { + if m != nil { + return m.ErrCode + } + return 0 +} + +func (m *GetMaxAndMinSeqResp) GetErrMsg() string { + if m != nil { + return m.ErrMsg + } + return "" +} + +func (m *GetMaxAndMinSeqResp) GetMaxSeq() uint32 { + if m != nil { + return m.MaxSeq + } + return 0 +} + +func (m *GetMaxAndMinSeqResp) GetMinSeq() uint32 { + if m != nil { + return m.MinSeq + } + return 0 +} + +type SendMsgReq struct { + Token string `protobuf:"bytes,1,opt,name=token" json:"token,omitempty"` + OperationID string `protobuf:"bytes,2,opt,name=operationID" json:"operationID,omitempty"` + MsgData *sdk_ws.MsgData `protobuf:"bytes,3,opt,name=msgData" json:"msgData,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *SendMsgReq) Reset() { *m = SendMsgReq{} } +func (m *SendMsgReq) String() string { return proto.CompactTextString(m) } +func (*SendMsgReq) ProtoMessage() {} +func (*SendMsgReq) Descriptor() ([]byte, []int) { + return fileDescriptor_msg_53ecdffb017d9c40, []int{6} +} +func (m *SendMsgReq) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_SendMsgReq.Unmarshal(m, b) +} +func (m *SendMsgReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_SendMsgReq.Marshal(b, m, deterministic) +} +func (dst *SendMsgReq) XXX_Merge(src proto.Message) { + xxx_messageInfo_SendMsgReq.Merge(dst, src) +} +func (m *SendMsgReq) XXX_Size() int { + return xxx_messageInfo_SendMsgReq.Size(m) +} +func (m *SendMsgReq) XXX_DiscardUnknown() { + xxx_messageInfo_SendMsgReq.DiscardUnknown(m) +} + +var xxx_messageInfo_SendMsgReq proto.InternalMessageInfo + +func (m *SendMsgReq) GetToken() string { + if m != nil { + return m.Token + } + return "" +} + +func (m *SendMsgReq) GetOperationID() string { + if m != nil { + return m.OperationID + } + return "" +} + +func (m *SendMsgReq) GetMsgData() *sdk_ws.MsgData { + if m != nil { + return m.MsgData + } + return nil +} + +type SendMsgResp struct { + ErrCode int32 `protobuf:"varint,1,opt,name=errCode" json:"errCode,omitempty"` + ErrMsg string `protobuf:"bytes,2,opt,name=errMsg" json:"errMsg,omitempty"` + ServerMsgID string `protobuf:"bytes,4,opt,name=serverMsgID" json:"serverMsgID,omitempty"` + ClientMsgID string `protobuf:"bytes,5,opt,name=clientMsgID" json:"clientMsgID,omitempty"` + SendTime int64 `protobuf:"varint,6,opt,name=sendTime" json:"sendTime,omitempty"` + Ex string `protobuf:"bytes,7,opt,name=ex" json:"ex,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *SendMsgResp) Reset() { *m = SendMsgResp{} } +func (m *SendMsgResp) String() string { return proto.CompactTextString(m) } +func (*SendMsgResp) ProtoMessage() {} +func (*SendMsgResp) Descriptor() ([]byte, []int) { + return fileDescriptor_msg_53ecdffb017d9c40, []int{7} +} +func (m *SendMsgResp) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_SendMsgResp.Unmarshal(m, b) +} +func (m *SendMsgResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_SendMsgResp.Marshal(b, m, deterministic) +} +func (dst *SendMsgResp) XXX_Merge(src proto.Message) { + xxx_messageInfo_SendMsgResp.Merge(dst, src) +} +func (m *SendMsgResp) XXX_Size() int { + return xxx_messageInfo_SendMsgResp.Size(m) +} +func (m *SendMsgResp) XXX_DiscardUnknown() { + xxx_messageInfo_SendMsgResp.DiscardUnknown(m) +} + +var xxx_messageInfo_SendMsgResp proto.InternalMessageInfo + +func (m *SendMsgResp) GetErrCode() int32 { + if m != nil { + return m.ErrCode + } + return 0 +} + +func (m *SendMsgResp) GetErrMsg() string { + if m != nil { + return m.ErrMsg + } + return "" +} + +func (m *SendMsgResp) GetServerMsgID() string { + if m != nil { + return m.ServerMsgID + } + return "" +} + +func (m *SendMsgResp) GetClientMsgID() string { + if m != nil { + return m.ClientMsgID + } + return "" +} + +func (m *SendMsgResp) GetSendTime() int64 { + if m != nil { + return m.SendTime + } + return 0 +} + +func (m *SendMsgResp) GetEx() string { + if m != nil { + return m.Ex + } + return "" +} + +type ClearMsgReq struct { + UserID string `protobuf:"bytes,1,opt,name=userID" json:"userID,omitempty"` + OpUserID string `protobuf:"bytes,2,opt,name=opUserID" json:"opUserID,omitempty"` + OperationID string `protobuf:"bytes,3,opt,name=operationID" json:"operationID,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ClearMsgReq) Reset() { *m = ClearMsgReq{} } +func (m *ClearMsgReq) String() string { return proto.CompactTextString(m) } +func (*ClearMsgReq) ProtoMessage() {} +func (*ClearMsgReq) Descriptor() ([]byte, []int) { + return fileDescriptor_msg_53ecdffb017d9c40, []int{8} +} +func (m *ClearMsgReq) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_ClearMsgReq.Unmarshal(m, b) +} +func (m *ClearMsgReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_ClearMsgReq.Marshal(b, m, deterministic) +} +func (dst *ClearMsgReq) XXX_Merge(src proto.Message) { + xxx_messageInfo_ClearMsgReq.Merge(dst, src) +} +func (m *ClearMsgReq) XXX_Size() int { + return xxx_messageInfo_ClearMsgReq.Size(m) +} +func (m *ClearMsgReq) XXX_DiscardUnknown() { + xxx_messageInfo_ClearMsgReq.DiscardUnknown(m) +} + +var xxx_messageInfo_ClearMsgReq proto.InternalMessageInfo + +func (m *ClearMsgReq) GetUserID() string { + if m != nil { + return m.UserID + } + return "" +} + +func (m *ClearMsgReq) GetOpUserID() string { + if m != nil { + return m.OpUserID + } + return "" +} + +func (m *ClearMsgReq) GetOperationID() string { + if m != nil { + return m.OperationID + } + return "" +} + +type ClearMsgResp struct { + ErrCode int32 `protobuf:"varint,1,opt,name=errCode" json:"errCode,omitempty"` + ErrMsg string `protobuf:"bytes,2,opt,name=errMsg" json:"errMsg,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ClearMsgResp) Reset() { *m = ClearMsgResp{} } +func (m *ClearMsgResp) String() string { return proto.CompactTextString(m) } +func (*ClearMsgResp) ProtoMessage() {} +func (*ClearMsgResp) Descriptor() ([]byte, []int) { + return fileDescriptor_msg_53ecdffb017d9c40, []int{9} +} +func (m *ClearMsgResp) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_ClearMsgResp.Unmarshal(m, b) +} +func (m *ClearMsgResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_ClearMsgResp.Marshal(b, m, deterministic) +} +func (dst *ClearMsgResp) XXX_Merge(src proto.Message) { + xxx_messageInfo_ClearMsgResp.Merge(dst, src) +} +func (m *ClearMsgResp) XXX_Size() int { + return xxx_messageInfo_ClearMsgResp.Size(m) +} +func (m *ClearMsgResp) XXX_DiscardUnknown() { + xxx_messageInfo_ClearMsgResp.DiscardUnknown(m) +} + +var xxx_messageInfo_ClearMsgResp proto.InternalMessageInfo + +func (m *ClearMsgResp) GetErrCode() int32 { + if m != nil { + return m.ErrCode + } + return 0 +} + +func (m *ClearMsgResp) GetErrMsg() string { + if m != nil { + return m.ErrMsg + } + return "" +} + +type SetMsgMinSeqReq struct { + UserID string `protobuf:"bytes,1,opt,name=userID" json:"userID,omitempty"` + GroupID string `protobuf:"bytes,2,opt,name=groupID" json:"groupID,omitempty"` + MinSeq uint32 `protobuf:"varint,3,opt,name=minSeq" json:"minSeq,omitempty"` + OperationID string `protobuf:"bytes,4,opt,name=operationID" json:"operationID,omitempty"` + OpUserID string `protobuf:"bytes,5,opt,name=opUserID" json:"opUserID,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *SetMsgMinSeqReq) Reset() { *m = SetMsgMinSeqReq{} } +func (m *SetMsgMinSeqReq) String() string { return proto.CompactTextString(m) } +func (*SetMsgMinSeqReq) ProtoMessage() {} +func (*SetMsgMinSeqReq) Descriptor() ([]byte, []int) { + return fileDescriptor_msg_53ecdffb017d9c40, []int{10} +} +func (m *SetMsgMinSeqReq) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_SetMsgMinSeqReq.Unmarshal(m, b) +} +func (m *SetMsgMinSeqReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_SetMsgMinSeqReq.Marshal(b, m, deterministic) +} +func (dst *SetMsgMinSeqReq) XXX_Merge(src proto.Message) { + xxx_messageInfo_SetMsgMinSeqReq.Merge(dst, src) +} +func (m *SetMsgMinSeqReq) XXX_Size() int { + return xxx_messageInfo_SetMsgMinSeqReq.Size(m) +} +func (m *SetMsgMinSeqReq) XXX_DiscardUnknown() { + xxx_messageInfo_SetMsgMinSeqReq.DiscardUnknown(m) +} + +var xxx_messageInfo_SetMsgMinSeqReq proto.InternalMessageInfo + +func (m *SetMsgMinSeqReq) GetUserID() string { + if m != nil { + return m.UserID + } + return "" +} + +func (m *SetMsgMinSeqReq) GetGroupID() string { + if m != nil { + return m.GroupID + } + return "" +} + +func (m *SetMsgMinSeqReq) GetMinSeq() uint32 { + if m != nil { + return m.MinSeq + } + return 0 +} + +func (m *SetMsgMinSeqReq) GetOperationID() string { + if m != nil { + return m.OperationID + } + return "" +} + +func (m *SetMsgMinSeqReq) GetOpUserID() string { + if m != nil { + return m.OpUserID + } + return "" +} + +type SetMsgMinSeqResp struct { + ErrCode int32 `protobuf:"varint,1,opt,name=errCode" json:"errCode,omitempty"` + ErrMsg string `protobuf:"bytes,2,opt,name=errMsg" json:"errMsg,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *SetMsgMinSeqResp) Reset() { *m = SetMsgMinSeqResp{} } +func (m *SetMsgMinSeqResp) String() string { return proto.CompactTextString(m) } +func (*SetMsgMinSeqResp) ProtoMessage() {} +func (*SetMsgMinSeqResp) Descriptor() ([]byte, []int) { + return fileDescriptor_msg_53ecdffb017d9c40, []int{11} +} +func (m *SetMsgMinSeqResp) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_SetMsgMinSeqResp.Unmarshal(m, b) +} +func (m *SetMsgMinSeqResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_SetMsgMinSeqResp.Marshal(b, m, deterministic) +} +func (dst *SetMsgMinSeqResp) XXX_Merge(src proto.Message) { + xxx_messageInfo_SetMsgMinSeqResp.Merge(dst, src) +} +func (m *SetMsgMinSeqResp) XXX_Size() int { + return xxx_messageInfo_SetMsgMinSeqResp.Size(m) +} +func (m *SetMsgMinSeqResp) XXX_DiscardUnknown() { + xxx_messageInfo_SetMsgMinSeqResp.DiscardUnknown(m) +} + +var xxx_messageInfo_SetMsgMinSeqResp proto.InternalMessageInfo + +func (m *SetMsgMinSeqResp) GetErrCode() int32 { + if m != nil { + return m.ErrCode + } + return 0 +} + +func (m *SetMsgMinSeqResp) GetErrMsg() string { + if m != nil { + return m.ErrMsg + } + return "" +} + +type SetSendMsgStatusReq struct { + OperationID string `protobuf:"bytes,1,opt,name=operationID" json:"operationID,omitempty"` + Status int32 `protobuf:"varint,2,opt,name=status" json:"status,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *SetSendMsgStatusReq) Reset() { *m = SetSendMsgStatusReq{} } +func (m *SetSendMsgStatusReq) String() string { return proto.CompactTextString(m) } +func (*SetSendMsgStatusReq) ProtoMessage() {} +func (*SetSendMsgStatusReq) Descriptor() ([]byte, []int) { + return fileDescriptor_msg_53ecdffb017d9c40, []int{12} +} +func (m *SetSendMsgStatusReq) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_SetSendMsgStatusReq.Unmarshal(m, b) +} +func (m *SetSendMsgStatusReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_SetSendMsgStatusReq.Marshal(b, m, deterministic) +} +func (dst *SetSendMsgStatusReq) XXX_Merge(src proto.Message) { + xxx_messageInfo_SetSendMsgStatusReq.Merge(dst, src) +} +func (m *SetSendMsgStatusReq) XXX_Size() int { + return xxx_messageInfo_SetSendMsgStatusReq.Size(m) +} +func (m *SetSendMsgStatusReq) XXX_DiscardUnknown() { + xxx_messageInfo_SetSendMsgStatusReq.DiscardUnknown(m) +} + +var xxx_messageInfo_SetSendMsgStatusReq proto.InternalMessageInfo + +func (m *SetSendMsgStatusReq) GetOperationID() string { + if m != nil { + return m.OperationID + } + return "" +} + +func (m *SetSendMsgStatusReq) GetStatus() int32 { + if m != nil { + return m.Status + } + return 0 +} + +type SetSendMsgStatusResp struct { + ErrCode int32 `protobuf:"varint,1,opt,name=errCode" json:"errCode,omitempty"` + ErrMsg string `protobuf:"bytes,2,opt,name=errMsg" json:"errMsg,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *SetSendMsgStatusResp) Reset() { *m = SetSendMsgStatusResp{} } +func (m *SetSendMsgStatusResp) String() string { return proto.CompactTextString(m) } +func (*SetSendMsgStatusResp) ProtoMessage() {} +func (*SetSendMsgStatusResp) Descriptor() ([]byte, []int) { + return fileDescriptor_msg_53ecdffb017d9c40, []int{13} +} +func (m *SetSendMsgStatusResp) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_SetSendMsgStatusResp.Unmarshal(m, b) +} +func (m *SetSendMsgStatusResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_SetSendMsgStatusResp.Marshal(b, m, deterministic) +} +func (dst *SetSendMsgStatusResp) XXX_Merge(src proto.Message) { + xxx_messageInfo_SetSendMsgStatusResp.Merge(dst, src) +} +func (m *SetSendMsgStatusResp) XXX_Size() int { + return xxx_messageInfo_SetSendMsgStatusResp.Size(m) +} +func (m *SetSendMsgStatusResp) XXX_DiscardUnknown() { + xxx_messageInfo_SetSendMsgStatusResp.DiscardUnknown(m) +} + +var xxx_messageInfo_SetSendMsgStatusResp proto.InternalMessageInfo + +func (m *SetSendMsgStatusResp) GetErrCode() int32 { + if m != nil { + return m.ErrCode + } + return 0 +} + +func (m *SetSendMsgStatusResp) GetErrMsg() string { + if m != nil { + return m.ErrMsg + } + return "" +} + +type GetSendMsgStatusReq struct { + OperationID string `protobuf:"bytes,1,opt,name=operationID" json:"operationID,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GetSendMsgStatusReq) Reset() { *m = GetSendMsgStatusReq{} } +func (m *GetSendMsgStatusReq) String() string { return proto.CompactTextString(m) } +func (*GetSendMsgStatusReq) ProtoMessage() {} +func (*GetSendMsgStatusReq) Descriptor() ([]byte, []int) { + return fileDescriptor_msg_53ecdffb017d9c40, []int{14} +} +func (m *GetSendMsgStatusReq) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GetSendMsgStatusReq.Unmarshal(m, b) +} +func (m *GetSendMsgStatusReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GetSendMsgStatusReq.Marshal(b, m, deterministic) +} +func (dst *GetSendMsgStatusReq) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetSendMsgStatusReq.Merge(dst, src) +} +func (m *GetSendMsgStatusReq) XXX_Size() int { + return xxx_messageInfo_GetSendMsgStatusReq.Size(m) +} +func (m *GetSendMsgStatusReq) XXX_DiscardUnknown() { + xxx_messageInfo_GetSendMsgStatusReq.DiscardUnknown(m) +} + +var xxx_messageInfo_GetSendMsgStatusReq proto.InternalMessageInfo + +func (m *GetSendMsgStatusReq) GetOperationID() string { + if m != nil { + return m.OperationID + } + return "" +} + +type GetSendMsgStatusResp struct { + ErrCode int32 `protobuf:"varint,1,opt,name=errCode" json:"errCode,omitempty"` + ErrMsg string `protobuf:"bytes,2,opt,name=errMsg" json:"errMsg,omitempty"` + Status int32 `protobuf:"varint,3,opt,name=status" json:"status,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GetSendMsgStatusResp) Reset() { *m = GetSendMsgStatusResp{} } +func (m *GetSendMsgStatusResp) String() string { return proto.CompactTextString(m) } +func (*GetSendMsgStatusResp) ProtoMessage() {} +func (*GetSendMsgStatusResp) Descriptor() ([]byte, []int) { + return fileDescriptor_msg_53ecdffb017d9c40, []int{15} +} +func (m *GetSendMsgStatusResp) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GetSendMsgStatusResp.Unmarshal(m, b) +} +func (m *GetSendMsgStatusResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GetSendMsgStatusResp.Marshal(b, m, deterministic) +} +func (dst *GetSendMsgStatusResp) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetSendMsgStatusResp.Merge(dst, src) +} +func (m *GetSendMsgStatusResp) XXX_Size() int { + return xxx_messageInfo_GetSendMsgStatusResp.Size(m) +} +func (m *GetSendMsgStatusResp) XXX_DiscardUnknown() { + xxx_messageInfo_GetSendMsgStatusResp.DiscardUnknown(m) +} + +var xxx_messageInfo_GetSendMsgStatusResp proto.InternalMessageInfo + +func (m *GetSendMsgStatusResp) GetErrCode() int32 { + if m != nil { + return m.ErrCode + } + return 0 +} + +func (m *GetSendMsgStatusResp) GetErrMsg() string { + if m != nil { + return m.ErrMsg + } + return "" +} + +func (m *GetSendMsgStatusResp) GetStatus() int32 { + if m != nil { + return m.Status + } + return 0 +} + +type DelSuperGroupMsgReq struct { + OpUserID string `protobuf:"bytes,1,opt,name=opUserID" json:"opUserID,omitempty"` + UserID string `protobuf:"bytes,2,opt,name=userID" json:"userID,omitempty"` + GroupID string `protobuf:"bytes,3,opt,name=groupID" json:"groupID,omitempty"` + OperationID string `protobuf:"bytes,4,opt,name=operationID" json:"operationID,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *DelSuperGroupMsgReq) Reset() { *m = DelSuperGroupMsgReq{} } +func (m *DelSuperGroupMsgReq) String() string { return proto.CompactTextString(m) } +func (*DelSuperGroupMsgReq) ProtoMessage() {} +func (*DelSuperGroupMsgReq) Descriptor() ([]byte, []int) { + return fileDescriptor_msg_53ecdffb017d9c40, []int{16} +} +func (m *DelSuperGroupMsgReq) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_DelSuperGroupMsgReq.Unmarshal(m, b) +} +func (m *DelSuperGroupMsgReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_DelSuperGroupMsgReq.Marshal(b, m, deterministic) +} +func (dst *DelSuperGroupMsgReq) XXX_Merge(src proto.Message) { + xxx_messageInfo_DelSuperGroupMsgReq.Merge(dst, src) +} +func (m *DelSuperGroupMsgReq) XXX_Size() int { + return xxx_messageInfo_DelSuperGroupMsgReq.Size(m) +} +func (m *DelSuperGroupMsgReq) XXX_DiscardUnknown() { + xxx_messageInfo_DelSuperGroupMsgReq.DiscardUnknown(m) +} + +var xxx_messageInfo_DelSuperGroupMsgReq proto.InternalMessageInfo + +func (m *DelSuperGroupMsgReq) GetOpUserID() string { + if m != nil { + return m.OpUserID + } + return "" +} + +func (m *DelSuperGroupMsgReq) GetUserID() string { + if m != nil { + return m.UserID + } + return "" +} + +func (m *DelSuperGroupMsgReq) GetGroupID() string { + if m != nil { + return m.GroupID + } + return "" +} + +func (m *DelSuperGroupMsgReq) GetOperationID() string { + if m != nil { + return m.OperationID + } + return "" +} + +type DelSuperGroupMsgResp struct { + ErrCode int32 `protobuf:"varint,1,opt,name=errCode" json:"errCode,omitempty"` + ErrMsg string `protobuf:"bytes,2,opt,name=errMsg" json:"errMsg,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *DelSuperGroupMsgResp) Reset() { *m = DelSuperGroupMsgResp{} } +func (m *DelSuperGroupMsgResp) String() string { return proto.CompactTextString(m) } +func (*DelSuperGroupMsgResp) ProtoMessage() {} +func (*DelSuperGroupMsgResp) Descriptor() ([]byte, []int) { + return fileDescriptor_msg_53ecdffb017d9c40, []int{17} +} +func (m *DelSuperGroupMsgResp) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_DelSuperGroupMsgResp.Unmarshal(m, b) +} +func (m *DelSuperGroupMsgResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_DelSuperGroupMsgResp.Marshal(b, m, deterministic) +} +func (dst *DelSuperGroupMsgResp) XXX_Merge(src proto.Message) { + xxx_messageInfo_DelSuperGroupMsgResp.Merge(dst, src) +} +func (m *DelSuperGroupMsgResp) XXX_Size() int { + return xxx_messageInfo_DelSuperGroupMsgResp.Size(m) +} +func (m *DelSuperGroupMsgResp) XXX_DiscardUnknown() { + xxx_messageInfo_DelSuperGroupMsgResp.DiscardUnknown(m) +} + +var xxx_messageInfo_DelSuperGroupMsgResp proto.InternalMessageInfo + +func (m *DelSuperGroupMsgResp) GetErrCode() int32 { + if m != nil { + return m.ErrCode + } + return 0 +} + +func (m *DelSuperGroupMsgResp) GetErrMsg() string { + if m != nil { + return m.ErrMsg + } + return "" +} + +type GetSuperGroupMsgReq struct { + OperationID string `protobuf:"bytes,1,opt,name=operationID" json:"operationID,omitempty"` + Seq uint32 `protobuf:"varint,2,opt,name=Seq" json:"Seq,omitempty"` + GroupID string `protobuf:"bytes,3,opt,name=groupID" json:"groupID,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GetSuperGroupMsgReq) Reset() { *m = GetSuperGroupMsgReq{} } +func (m *GetSuperGroupMsgReq) String() string { return proto.CompactTextString(m) } +func (*GetSuperGroupMsgReq) ProtoMessage() {} +func (*GetSuperGroupMsgReq) Descriptor() ([]byte, []int) { + return fileDescriptor_msg_53ecdffb017d9c40, []int{18} +} +func (m *GetSuperGroupMsgReq) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GetSuperGroupMsgReq.Unmarshal(m, b) +} +func (m *GetSuperGroupMsgReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GetSuperGroupMsgReq.Marshal(b, m, deterministic) +} +func (dst *GetSuperGroupMsgReq) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetSuperGroupMsgReq.Merge(dst, src) +} +func (m *GetSuperGroupMsgReq) XXX_Size() int { + return xxx_messageInfo_GetSuperGroupMsgReq.Size(m) +} +func (m *GetSuperGroupMsgReq) XXX_DiscardUnknown() { + xxx_messageInfo_GetSuperGroupMsgReq.DiscardUnknown(m) +} + +var xxx_messageInfo_GetSuperGroupMsgReq proto.InternalMessageInfo + +func (m *GetSuperGroupMsgReq) GetOperationID() string { + if m != nil { + return m.OperationID + } + return "" +} + +func (m *GetSuperGroupMsgReq) GetSeq() uint32 { + if m != nil { + return m.Seq + } + return 0 +} + +func (m *GetSuperGroupMsgReq) GetGroupID() string { + if m != nil { + return m.GroupID + } + return "" +} + +type GetSuperGroupMsgResp struct { + ErrCode int32 `protobuf:"varint,1,opt,name=errCode" json:"errCode,omitempty"` + ErrMsg string `protobuf:"bytes,2,opt,name=errMsg" json:"errMsg,omitempty"` + MsgData *sdk_ws.MsgData `protobuf:"bytes,3,opt,name=msgData" json:"msgData,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GetSuperGroupMsgResp) Reset() { *m = GetSuperGroupMsgResp{} } +func (m *GetSuperGroupMsgResp) String() string { return proto.CompactTextString(m) } +func (*GetSuperGroupMsgResp) ProtoMessage() {} +func (*GetSuperGroupMsgResp) Descriptor() ([]byte, []int) { + return fileDescriptor_msg_53ecdffb017d9c40, []int{19} +} +func (m *GetSuperGroupMsgResp) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GetSuperGroupMsgResp.Unmarshal(m, b) +} +func (m *GetSuperGroupMsgResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GetSuperGroupMsgResp.Marshal(b, m, deterministic) +} +func (dst *GetSuperGroupMsgResp) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetSuperGroupMsgResp.Merge(dst, src) +} +func (m *GetSuperGroupMsgResp) XXX_Size() int { + return xxx_messageInfo_GetSuperGroupMsgResp.Size(m) +} +func (m *GetSuperGroupMsgResp) XXX_DiscardUnknown() { + xxx_messageInfo_GetSuperGroupMsgResp.DiscardUnknown(m) +} + +var xxx_messageInfo_GetSuperGroupMsgResp proto.InternalMessageInfo + +func (m *GetSuperGroupMsgResp) GetErrCode() int32 { + if m != nil { + return m.ErrCode + } + return 0 +} + +func (m *GetSuperGroupMsgResp) GetErrMsg() string { + if m != nil { + return m.ErrMsg + } + return "" +} + +func (m *GetSuperGroupMsgResp) GetMsgData() *sdk_ws.MsgData { + if m != nil { + return m.MsgData + } + return nil +} + +type GetWriteDiffMsgReq struct { + OperationID string `protobuf:"bytes,1,opt,name=operationID" json:"operationID,omitempty"` + Seq uint32 `protobuf:"varint,2,opt,name=Seq" json:"Seq,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GetWriteDiffMsgReq) Reset() { *m = GetWriteDiffMsgReq{} } +func (m *GetWriteDiffMsgReq) String() string { return proto.CompactTextString(m) } +func (*GetWriteDiffMsgReq) ProtoMessage() {} +func (*GetWriteDiffMsgReq) Descriptor() ([]byte, []int) { + return fileDescriptor_msg_53ecdffb017d9c40, []int{20} +} +func (m *GetWriteDiffMsgReq) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GetWriteDiffMsgReq.Unmarshal(m, b) +} +func (m *GetWriteDiffMsgReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GetWriteDiffMsgReq.Marshal(b, m, deterministic) +} +func (dst *GetWriteDiffMsgReq) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetWriteDiffMsgReq.Merge(dst, src) +} +func (m *GetWriteDiffMsgReq) XXX_Size() int { + return xxx_messageInfo_GetWriteDiffMsgReq.Size(m) +} +func (m *GetWriteDiffMsgReq) XXX_DiscardUnknown() { + xxx_messageInfo_GetWriteDiffMsgReq.DiscardUnknown(m) +} + +var xxx_messageInfo_GetWriteDiffMsgReq proto.InternalMessageInfo + +func (m *GetWriteDiffMsgReq) GetOperationID() string { + if m != nil { + return m.OperationID + } + return "" +} + +func (m *GetWriteDiffMsgReq) GetSeq() uint32 { + if m != nil { + return m.Seq + } + return 0 +} + +type GetWriteDiffMsgResp struct { + ErrCode int32 `protobuf:"varint,1,opt,name=errCode" json:"errCode,omitempty"` + ErrMsg string `protobuf:"bytes,2,opt,name=errMsg" json:"errMsg,omitempty"` + MsgData *sdk_ws.MsgData `protobuf:"bytes,3,opt,name=msgData" json:"msgData,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GetWriteDiffMsgResp) Reset() { *m = GetWriteDiffMsgResp{} } +func (m *GetWriteDiffMsgResp) String() string { return proto.CompactTextString(m) } +func (*GetWriteDiffMsgResp) ProtoMessage() {} +func (*GetWriteDiffMsgResp) Descriptor() ([]byte, []int) { + return fileDescriptor_msg_53ecdffb017d9c40, []int{21} +} +func (m *GetWriteDiffMsgResp) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GetWriteDiffMsgResp.Unmarshal(m, b) +} +func (m *GetWriteDiffMsgResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GetWriteDiffMsgResp.Marshal(b, m, deterministic) +} +func (dst *GetWriteDiffMsgResp) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetWriteDiffMsgResp.Merge(dst, src) +} +func (m *GetWriteDiffMsgResp) XXX_Size() int { + return xxx_messageInfo_GetWriteDiffMsgResp.Size(m) +} +func (m *GetWriteDiffMsgResp) XXX_DiscardUnknown() { + xxx_messageInfo_GetWriteDiffMsgResp.DiscardUnknown(m) +} + +var xxx_messageInfo_GetWriteDiffMsgResp proto.InternalMessageInfo + +func (m *GetWriteDiffMsgResp) GetErrCode() int32 { + if m != nil { + return m.ErrCode + } + return 0 +} + +func (m *GetWriteDiffMsgResp) GetErrMsg() string { + if m != nil { + return m.ErrMsg + } + return "" +} + +func (m *GetWriteDiffMsgResp) GetMsgData() *sdk_ws.MsgData { + if m != nil { + return m.MsgData + } + return nil +} + +type ModifyMessageReactionExtensionsReq struct { + OperationID string `protobuf:"bytes,1,opt,name=operationID" json:"operationID,omitempty"` + SourceID string `protobuf:"bytes,2,opt,name=sourceID" json:"sourceID,omitempty"` + OpUserID string `protobuf:"bytes,3,opt,name=opUserID" json:"opUserID,omitempty"` + SessionType int32 `protobuf:"varint,4,opt,name=sessionType" json:"sessionType,omitempty"` + ReactionExtensionList map[string]*sdk_ws.KeyValue `protobuf:"bytes,5,rep,name=reactionExtensionList" json:"reactionExtensionList,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + ClientMsgID string `protobuf:"bytes,6,opt,name=clientMsgID" json:"clientMsgID,omitempty"` + Ex *wrapperspb.StringValue `protobuf:"bytes,7,opt,name=ex" json:"ex,omitempty"` + AttachedInfo *wrapperspb.StringValue `protobuf:"bytes,8,opt,name=attachedInfo" json:"attachedInfo,omitempty"` + IsReact bool `protobuf:"varint,9,opt,name=isReact" json:"isReact,omitempty"` + IsExternalExtensions bool `protobuf:"varint,10,opt,name=isExternalExtensions" json:"isExternalExtensions,omitempty"` + MsgFirstModifyTime int64 `protobuf:"varint,11,opt,name=msgFirstModifyTime" json:"msgFirstModifyTime,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ModifyMessageReactionExtensionsReq) Reset() { *m = ModifyMessageReactionExtensionsReq{} } +func (m *ModifyMessageReactionExtensionsReq) String() string { return proto.CompactTextString(m) } +func (*ModifyMessageReactionExtensionsReq) ProtoMessage() {} +func (*ModifyMessageReactionExtensionsReq) Descriptor() ([]byte, []int) { + return fileDescriptor_msg_53ecdffb017d9c40, []int{22} +} +func (m *ModifyMessageReactionExtensionsReq) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_ModifyMessageReactionExtensionsReq.Unmarshal(m, b) +} +func (m *ModifyMessageReactionExtensionsReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_ModifyMessageReactionExtensionsReq.Marshal(b, m, deterministic) +} +func (dst *ModifyMessageReactionExtensionsReq) XXX_Merge(src proto.Message) { + xxx_messageInfo_ModifyMessageReactionExtensionsReq.Merge(dst, src) +} +func (m *ModifyMessageReactionExtensionsReq) XXX_Size() int { + return xxx_messageInfo_ModifyMessageReactionExtensionsReq.Size(m) +} +func (m *ModifyMessageReactionExtensionsReq) XXX_DiscardUnknown() { + xxx_messageInfo_ModifyMessageReactionExtensionsReq.DiscardUnknown(m) +} + +var xxx_messageInfo_ModifyMessageReactionExtensionsReq proto.InternalMessageInfo + +func (m *ModifyMessageReactionExtensionsReq) GetOperationID() string { + if m != nil { + return m.OperationID + } + return "" +} + +func (m *ModifyMessageReactionExtensionsReq) GetSourceID() string { + if m != nil { + return m.SourceID + } + return "" +} + +func (m *ModifyMessageReactionExtensionsReq) GetOpUserID() string { + if m != nil { + return m.OpUserID + } + return "" +} + +func (m *ModifyMessageReactionExtensionsReq) GetSessionType() int32 { + if m != nil { + return m.SessionType + } + return 0 +} + +func (m *ModifyMessageReactionExtensionsReq) GetReactionExtensionList() map[string]*sdk_ws.KeyValue { + if m != nil { + return m.ReactionExtensionList + } + return nil +} + +func (m *ModifyMessageReactionExtensionsReq) GetClientMsgID() string { + if m != nil { + return m.ClientMsgID + } + return "" +} + +func (m *ModifyMessageReactionExtensionsReq) GetEx() *wrapperspb.StringValue { + if m != nil { + return m.Ex + } + return nil +} + +func (m *ModifyMessageReactionExtensionsReq) GetAttachedInfo() *wrapperspb.StringValue { + if m != nil { + return m.AttachedInfo + } + return nil +} + +func (m *ModifyMessageReactionExtensionsReq) GetIsReact() bool { + if m != nil { + return m.IsReact + } + return false +} + +func (m *ModifyMessageReactionExtensionsReq) GetIsExternalExtensions() bool { + if m != nil { + return m.IsExternalExtensions + } + return false +} + +func (m *ModifyMessageReactionExtensionsReq) GetMsgFirstModifyTime() int64 { + if m != nil { + return m.MsgFirstModifyTime + } + return 0 +} + +type SetMessageReactionExtensionsReq struct { + OperationID string `protobuf:"bytes,1,opt,name=operationID" json:"operationID,omitempty"` + SourceID string `protobuf:"bytes,2,opt,name=sourceID" json:"sourceID,omitempty"` + OpUserID string `protobuf:"bytes,3,opt,name=opUserID" json:"opUserID,omitempty"` + OpUserIDPlatformID int32 `protobuf:"varint,4,opt,name=opUserIDPlatformID" json:"opUserIDPlatformID,omitempty"` + SessionType int32 `protobuf:"varint,5,opt,name=sessionType" json:"sessionType,omitempty"` + ReactionExtensionList map[string]*sdk_ws.KeyValue `protobuf:"bytes,6,rep,name=reactionExtensionList" json:"reactionExtensionList,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + ClientMsgID string `protobuf:"bytes,7,opt,name=clientMsgID" json:"clientMsgID,omitempty"` + Ex *wrapperspb.StringValue `protobuf:"bytes,8,opt,name=ex" json:"ex,omitempty"` + AttachedInfo *wrapperspb.StringValue `protobuf:"bytes,9,opt,name=attachedInfo" json:"attachedInfo,omitempty"` + IsReact bool `protobuf:"varint,10,opt,name=isReact" json:"isReact,omitempty"` + IsExternalExtensions bool `protobuf:"varint,11,opt,name=isExternalExtensions" json:"isExternalExtensions,omitempty"` + MsgFirstModifyTime int64 `protobuf:"varint,12,opt,name=msgFirstModifyTime" json:"msgFirstModifyTime,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *SetMessageReactionExtensionsReq) Reset() { *m = SetMessageReactionExtensionsReq{} } +func (m *SetMessageReactionExtensionsReq) String() string { return proto.CompactTextString(m) } +func (*SetMessageReactionExtensionsReq) ProtoMessage() {} +func (*SetMessageReactionExtensionsReq) Descriptor() ([]byte, []int) { + return fileDescriptor_msg_53ecdffb017d9c40, []int{23} +} +func (m *SetMessageReactionExtensionsReq) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_SetMessageReactionExtensionsReq.Unmarshal(m, b) +} +func (m *SetMessageReactionExtensionsReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_SetMessageReactionExtensionsReq.Marshal(b, m, deterministic) +} +func (dst *SetMessageReactionExtensionsReq) XXX_Merge(src proto.Message) { + xxx_messageInfo_SetMessageReactionExtensionsReq.Merge(dst, src) +} +func (m *SetMessageReactionExtensionsReq) XXX_Size() int { + return xxx_messageInfo_SetMessageReactionExtensionsReq.Size(m) +} +func (m *SetMessageReactionExtensionsReq) XXX_DiscardUnknown() { + xxx_messageInfo_SetMessageReactionExtensionsReq.DiscardUnknown(m) +} + +var xxx_messageInfo_SetMessageReactionExtensionsReq proto.InternalMessageInfo + +func (m *SetMessageReactionExtensionsReq) GetOperationID() string { + if m != nil { + return m.OperationID + } + return "" +} + +func (m *SetMessageReactionExtensionsReq) GetSourceID() string { + if m != nil { + return m.SourceID + } + return "" +} + +func (m *SetMessageReactionExtensionsReq) GetOpUserID() string { + if m != nil { + return m.OpUserID + } + return "" +} + +func (m *SetMessageReactionExtensionsReq) GetOpUserIDPlatformID() int32 { + if m != nil { + return m.OpUserIDPlatformID + } + return 0 +} + +func (m *SetMessageReactionExtensionsReq) GetSessionType() int32 { + if m != nil { + return m.SessionType + } + return 0 +} + +func (m *SetMessageReactionExtensionsReq) GetReactionExtensionList() map[string]*sdk_ws.KeyValue { + if m != nil { + return m.ReactionExtensionList + } + return nil +} + +func (m *SetMessageReactionExtensionsReq) GetClientMsgID() string { + if m != nil { + return m.ClientMsgID + } + return "" +} + +func (m *SetMessageReactionExtensionsReq) GetEx() *wrapperspb.StringValue { + if m != nil { + return m.Ex + } + return nil +} + +func (m *SetMessageReactionExtensionsReq) GetAttachedInfo() *wrapperspb.StringValue { + if m != nil { + return m.AttachedInfo + } + return nil +} + +func (m *SetMessageReactionExtensionsReq) GetIsReact() bool { + if m != nil { + return m.IsReact + } + return false +} + +func (m *SetMessageReactionExtensionsReq) GetIsExternalExtensions() bool { + if m != nil { + return m.IsExternalExtensions + } + return false +} + +func (m *SetMessageReactionExtensionsReq) GetMsgFirstModifyTime() int64 { + if m != nil { + return m.MsgFirstModifyTime + } + return 0 +} + +type SetMessageReactionExtensionsResp struct { + ErrCode int32 `protobuf:"varint,1,opt,name=errCode" json:"errCode,omitempty"` + ErrMsg string `protobuf:"bytes,2,opt,name=errMsg" json:"errMsg,omitempty"` + ClientMsgID string `protobuf:"bytes,3,opt,name=clientMsgID" json:"clientMsgID,omitempty"` + MsgFirstModifyTime int64 `protobuf:"varint,4,opt,name=msgFirstModifyTime" json:"msgFirstModifyTime,omitempty"` + IsReact bool `protobuf:"varint,5,opt,name=isReact" json:"isReact,omitempty"` + Result []*KeyValueResp `protobuf:"bytes,6,rep,name=result" json:"result,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *SetMessageReactionExtensionsResp) Reset() { *m = SetMessageReactionExtensionsResp{} } +func (m *SetMessageReactionExtensionsResp) String() string { return proto.CompactTextString(m) } +func (*SetMessageReactionExtensionsResp) ProtoMessage() {} +func (*SetMessageReactionExtensionsResp) Descriptor() ([]byte, []int) { + return fileDescriptor_msg_53ecdffb017d9c40, []int{24} +} +func (m *SetMessageReactionExtensionsResp) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_SetMessageReactionExtensionsResp.Unmarshal(m, b) +} +func (m *SetMessageReactionExtensionsResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_SetMessageReactionExtensionsResp.Marshal(b, m, deterministic) +} +func (dst *SetMessageReactionExtensionsResp) XXX_Merge(src proto.Message) { + xxx_messageInfo_SetMessageReactionExtensionsResp.Merge(dst, src) +} +func (m *SetMessageReactionExtensionsResp) XXX_Size() int { + return xxx_messageInfo_SetMessageReactionExtensionsResp.Size(m) +} +func (m *SetMessageReactionExtensionsResp) XXX_DiscardUnknown() { + xxx_messageInfo_SetMessageReactionExtensionsResp.DiscardUnknown(m) +} + +var xxx_messageInfo_SetMessageReactionExtensionsResp proto.InternalMessageInfo + +func (m *SetMessageReactionExtensionsResp) GetErrCode() int32 { + if m != nil { + return m.ErrCode + } + return 0 +} + +func (m *SetMessageReactionExtensionsResp) GetErrMsg() string { + if m != nil { + return m.ErrMsg + } + return "" +} + +func (m *SetMessageReactionExtensionsResp) GetClientMsgID() string { + if m != nil { + return m.ClientMsgID + } + return "" +} + +func (m *SetMessageReactionExtensionsResp) GetMsgFirstModifyTime() int64 { + if m != nil { + return m.MsgFirstModifyTime + } + return 0 +} + +func (m *SetMessageReactionExtensionsResp) GetIsReact() bool { + if m != nil { + return m.IsReact + } + return false +} + +func (m *SetMessageReactionExtensionsResp) GetResult() []*KeyValueResp { + if m != nil { + return m.Result + } + return nil +} + +type AddMessageReactionExtensionsReq struct { + OperationID string `protobuf:"bytes,1,opt,name=operationID" json:"operationID,omitempty"` + SourceID string `protobuf:"bytes,2,opt,name=sourceID" json:"sourceID,omitempty"` + OpUserID string `protobuf:"bytes,3,opt,name=opUserID" json:"opUserID,omitempty"` + OpUserIDPlatformID int32 `protobuf:"varint,4,opt,name=opUserIDPlatformID" json:"opUserIDPlatformID,omitempty"` + SessionType int32 `protobuf:"varint,5,opt,name=sessionType" json:"sessionType,omitempty"` + ReactionExtensionList map[string]*sdk_ws.KeyValue `protobuf:"bytes,6,rep,name=reactionExtensionList" json:"reactionExtensionList,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + ClientMsgID string `protobuf:"bytes,7,opt,name=clientMsgID" json:"clientMsgID,omitempty"` + Ex *wrapperspb.StringValue `protobuf:"bytes,8,opt,name=ex" json:"ex,omitempty"` + AttachedInfo *wrapperspb.StringValue `protobuf:"bytes,9,opt,name=attachedInfo" json:"attachedInfo,omitempty"` + IsReact bool `protobuf:"varint,10,opt,name=isReact" json:"isReact,omitempty"` + IsExternalExtensions bool `protobuf:"varint,11,opt,name=isExternalExtensions" json:"isExternalExtensions,omitempty"` + MsgFirstModifyTime int64 `protobuf:"varint,12,opt,name=msgFirstModifyTime" json:"msgFirstModifyTime,omitempty"` + Seq uint32 `protobuf:"varint,13,opt,name=seq" json:"seq,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *AddMessageReactionExtensionsReq) Reset() { *m = AddMessageReactionExtensionsReq{} } +func (m *AddMessageReactionExtensionsReq) String() string { return proto.CompactTextString(m) } +func (*AddMessageReactionExtensionsReq) ProtoMessage() {} +func (*AddMessageReactionExtensionsReq) Descriptor() ([]byte, []int) { + return fileDescriptor_msg_53ecdffb017d9c40, []int{25} +} +func (m *AddMessageReactionExtensionsReq) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_AddMessageReactionExtensionsReq.Unmarshal(m, b) +} +func (m *AddMessageReactionExtensionsReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_AddMessageReactionExtensionsReq.Marshal(b, m, deterministic) +} +func (dst *AddMessageReactionExtensionsReq) XXX_Merge(src proto.Message) { + xxx_messageInfo_AddMessageReactionExtensionsReq.Merge(dst, src) +} +func (m *AddMessageReactionExtensionsReq) XXX_Size() int { + return xxx_messageInfo_AddMessageReactionExtensionsReq.Size(m) +} +func (m *AddMessageReactionExtensionsReq) XXX_DiscardUnknown() { + xxx_messageInfo_AddMessageReactionExtensionsReq.DiscardUnknown(m) +} + +var xxx_messageInfo_AddMessageReactionExtensionsReq proto.InternalMessageInfo + +func (m *AddMessageReactionExtensionsReq) GetOperationID() string { + if m != nil { + return m.OperationID + } + return "" +} + +func (m *AddMessageReactionExtensionsReq) GetSourceID() string { + if m != nil { + return m.SourceID + } + return "" +} + +func (m *AddMessageReactionExtensionsReq) GetOpUserID() string { + if m != nil { + return m.OpUserID + } + return "" +} + +func (m *AddMessageReactionExtensionsReq) GetOpUserIDPlatformID() int32 { + if m != nil { + return m.OpUserIDPlatformID + } + return 0 +} + +func (m *AddMessageReactionExtensionsReq) GetSessionType() int32 { + if m != nil { + return m.SessionType + } + return 0 +} + +func (m *AddMessageReactionExtensionsReq) GetReactionExtensionList() map[string]*sdk_ws.KeyValue { + if m != nil { + return m.ReactionExtensionList + } + return nil +} + +func (m *AddMessageReactionExtensionsReq) GetClientMsgID() string { + if m != nil { + return m.ClientMsgID + } + return "" +} + +func (m *AddMessageReactionExtensionsReq) GetEx() *wrapperspb.StringValue { + if m != nil { + return m.Ex + } + return nil +} + +func (m *AddMessageReactionExtensionsReq) GetAttachedInfo() *wrapperspb.StringValue { + if m != nil { + return m.AttachedInfo + } + return nil +} + +func (m *AddMessageReactionExtensionsReq) GetIsReact() bool { + if m != nil { + return m.IsReact + } + return false +} + +func (m *AddMessageReactionExtensionsReq) GetIsExternalExtensions() bool { + if m != nil { + return m.IsExternalExtensions + } + return false +} + +func (m *AddMessageReactionExtensionsReq) GetMsgFirstModifyTime() int64 { + if m != nil { + return m.MsgFirstModifyTime + } + return 0 +} + +func (m *AddMessageReactionExtensionsReq) GetSeq() uint32 { + if m != nil { + return m.Seq + } + return 0 +} + +type AddMessageReactionExtensionsResp struct { + ErrCode int32 `protobuf:"varint,1,opt,name=errCode" json:"errCode,omitempty"` + ErrMsg string `protobuf:"bytes,2,opt,name=errMsg" json:"errMsg,omitempty"` + ClientMsgID string `protobuf:"bytes,3,opt,name=clientMsgID" json:"clientMsgID,omitempty"` + MsgFirstModifyTime int64 `protobuf:"varint,4,opt,name=msgFirstModifyTime" json:"msgFirstModifyTime,omitempty"` + IsReact bool `protobuf:"varint,5,opt,name=isReact" json:"isReact,omitempty"` + Result []*KeyValueResp `protobuf:"bytes,6,rep,name=result" json:"result,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *AddMessageReactionExtensionsResp) Reset() { *m = AddMessageReactionExtensionsResp{} } +func (m *AddMessageReactionExtensionsResp) String() string { return proto.CompactTextString(m) } +func (*AddMessageReactionExtensionsResp) ProtoMessage() {} +func (*AddMessageReactionExtensionsResp) Descriptor() ([]byte, []int) { + return fileDescriptor_msg_53ecdffb017d9c40, []int{26} +} +func (m *AddMessageReactionExtensionsResp) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_AddMessageReactionExtensionsResp.Unmarshal(m, b) +} +func (m *AddMessageReactionExtensionsResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_AddMessageReactionExtensionsResp.Marshal(b, m, deterministic) +} +func (dst *AddMessageReactionExtensionsResp) XXX_Merge(src proto.Message) { + xxx_messageInfo_AddMessageReactionExtensionsResp.Merge(dst, src) +} +func (m *AddMessageReactionExtensionsResp) XXX_Size() int { + return xxx_messageInfo_AddMessageReactionExtensionsResp.Size(m) +} +func (m *AddMessageReactionExtensionsResp) XXX_DiscardUnknown() { + xxx_messageInfo_AddMessageReactionExtensionsResp.DiscardUnknown(m) +} + +var xxx_messageInfo_AddMessageReactionExtensionsResp proto.InternalMessageInfo + +func (m *AddMessageReactionExtensionsResp) GetErrCode() int32 { + if m != nil { + return m.ErrCode + } + return 0 +} + +func (m *AddMessageReactionExtensionsResp) GetErrMsg() string { + if m != nil { + return m.ErrMsg + } + return "" +} + +func (m *AddMessageReactionExtensionsResp) GetClientMsgID() string { + if m != nil { + return m.ClientMsgID + } + return "" +} + +func (m *AddMessageReactionExtensionsResp) GetMsgFirstModifyTime() int64 { + if m != nil { + return m.MsgFirstModifyTime + } + return 0 +} + +func (m *AddMessageReactionExtensionsResp) GetIsReact() bool { + if m != nil { + return m.IsReact + } + return false +} + +func (m *AddMessageReactionExtensionsResp) GetResult() []*KeyValueResp { + if m != nil { + return m.Result + } + return nil +} + +type GetMessageListReactionExtensionsReq struct { + OperationID string `protobuf:"bytes,1,opt,name=operationID" json:"operationID,omitempty"` + OpUserID string `protobuf:"bytes,2,opt,name=opUserID" json:"opUserID,omitempty"` + SourceID string `protobuf:"bytes,3,opt,name=sourceID" json:"sourceID,omitempty"` + SessionType int32 `protobuf:"varint,4,opt,name=sessionType" json:"sessionType,omitempty"` + IsExternalExtensions bool `protobuf:"varint,5,opt,name=isExternalExtensions" json:"isExternalExtensions,omitempty"` + TypeKeyList []string `protobuf:"bytes,6,rep,name=typeKeyList" json:"typeKeyList,omitempty"` + MessageReactionKeyList []*GetMessageListReactionExtensionsReq_MessageReactionKey `protobuf:"bytes,7,rep,name=messageReactionKeyList" json:"messageReactionKeyList,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GetMessageListReactionExtensionsReq) Reset() { *m = GetMessageListReactionExtensionsReq{} } +func (m *GetMessageListReactionExtensionsReq) String() string { return proto.CompactTextString(m) } +func (*GetMessageListReactionExtensionsReq) ProtoMessage() {} +func (*GetMessageListReactionExtensionsReq) Descriptor() ([]byte, []int) { + return fileDescriptor_msg_53ecdffb017d9c40, []int{27} +} +func (m *GetMessageListReactionExtensionsReq) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GetMessageListReactionExtensionsReq.Unmarshal(m, b) +} +func (m *GetMessageListReactionExtensionsReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GetMessageListReactionExtensionsReq.Marshal(b, m, deterministic) +} +func (dst *GetMessageListReactionExtensionsReq) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetMessageListReactionExtensionsReq.Merge(dst, src) +} +func (m *GetMessageListReactionExtensionsReq) XXX_Size() int { + return xxx_messageInfo_GetMessageListReactionExtensionsReq.Size(m) +} +func (m *GetMessageListReactionExtensionsReq) XXX_DiscardUnknown() { + xxx_messageInfo_GetMessageListReactionExtensionsReq.DiscardUnknown(m) +} + +var xxx_messageInfo_GetMessageListReactionExtensionsReq proto.InternalMessageInfo + +func (m *GetMessageListReactionExtensionsReq) GetOperationID() string { + if m != nil { + return m.OperationID + } + return "" +} + +func (m *GetMessageListReactionExtensionsReq) GetOpUserID() string { + if m != nil { + return m.OpUserID + } + return "" +} + +func (m *GetMessageListReactionExtensionsReq) GetSourceID() string { + if m != nil { + return m.SourceID + } + return "" +} + +func (m *GetMessageListReactionExtensionsReq) GetSessionType() int32 { + if m != nil { + return m.SessionType + } + return 0 +} + +func (m *GetMessageListReactionExtensionsReq) GetIsExternalExtensions() bool { + if m != nil { + return m.IsExternalExtensions + } + return false +} + +func (m *GetMessageListReactionExtensionsReq) GetTypeKeyList() []string { + if m != nil { + return m.TypeKeyList + } + return nil +} + +func (m *GetMessageListReactionExtensionsReq) GetMessageReactionKeyList() []*GetMessageListReactionExtensionsReq_MessageReactionKey { + if m != nil { + return m.MessageReactionKeyList + } + return nil +} + +type GetMessageListReactionExtensionsReq_MessageReactionKey struct { + ClientMsgID string `protobuf:"bytes,1,opt,name=clientMsgID" json:"clientMsgID,omitempty"` + MsgFirstModifyTime int64 `protobuf:"varint,2,opt,name=msgFirstModifyTime" json:"msgFirstModifyTime,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GetMessageListReactionExtensionsReq_MessageReactionKey) Reset() { + *m = GetMessageListReactionExtensionsReq_MessageReactionKey{} +} +func (m *GetMessageListReactionExtensionsReq_MessageReactionKey) String() string { + return proto.CompactTextString(m) +} +func (*GetMessageListReactionExtensionsReq_MessageReactionKey) ProtoMessage() {} +func (*GetMessageListReactionExtensionsReq_MessageReactionKey) Descriptor() ([]byte, []int) { + return fileDescriptor_msg_53ecdffb017d9c40, []int{27, 0} +} +func (m *GetMessageListReactionExtensionsReq_MessageReactionKey) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GetMessageListReactionExtensionsReq_MessageReactionKey.Unmarshal(m, b) +} +func (m *GetMessageListReactionExtensionsReq_MessageReactionKey) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GetMessageListReactionExtensionsReq_MessageReactionKey.Marshal(b, m, deterministic) +} +func (dst *GetMessageListReactionExtensionsReq_MessageReactionKey) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetMessageListReactionExtensionsReq_MessageReactionKey.Merge(dst, src) +} +func (m *GetMessageListReactionExtensionsReq_MessageReactionKey) XXX_Size() int { + return xxx_messageInfo_GetMessageListReactionExtensionsReq_MessageReactionKey.Size(m) +} +func (m *GetMessageListReactionExtensionsReq_MessageReactionKey) XXX_DiscardUnknown() { + xxx_messageInfo_GetMessageListReactionExtensionsReq_MessageReactionKey.DiscardUnknown(m) +} + +var xxx_messageInfo_GetMessageListReactionExtensionsReq_MessageReactionKey proto.InternalMessageInfo + +func (m *GetMessageListReactionExtensionsReq_MessageReactionKey) GetClientMsgID() string { + if m != nil { + return m.ClientMsgID + } + return "" +} + +func (m *GetMessageListReactionExtensionsReq_MessageReactionKey) GetMsgFirstModifyTime() int64 { + if m != nil { + return m.MsgFirstModifyTime + } + return 0 +} + +type GetMessageListReactionExtensionsResp struct { + ErrCode int32 `protobuf:"varint,1,opt,name=errCode" json:"errCode,omitempty"` + ErrMsg string `protobuf:"bytes,2,opt,name=errMsg" json:"errMsg,omitempty"` + SingleMessageResult []*SingleMessageExtensionResult `protobuf:"bytes,3,rep,name=singleMessageResult" json:"singleMessageResult,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GetMessageListReactionExtensionsResp) Reset() { *m = GetMessageListReactionExtensionsResp{} } +func (m *GetMessageListReactionExtensionsResp) String() string { return proto.CompactTextString(m) } +func (*GetMessageListReactionExtensionsResp) ProtoMessage() {} +func (*GetMessageListReactionExtensionsResp) Descriptor() ([]byte, []int) { + return fileDescriptor_msg_53ecdffb017d9c40, []int{28} +} +func (m *GetMessageListReactionExtensionsResp) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GetMessageListReactionExtensionsResp.Unmarshal(m, b) +} +func (m *GetMessageListReactionExtensionsResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GetMessageListReactionExtensionsResp.Marshal(b, m, deterministic) +} +func (dst *GetMessageListReactionExtensionsResp) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetMessageListReactionExtensionsResp.Merge(dst, src) +} +func (m *GetMessageListReactionExtensionsResp) XXX_Size() int { + return xxx_messageInfo_GetMessageListReactionExtensionsResp.Size(m) +} +func (m *GetMessageListReactionExtensionsResp) XXX_DiscardUnknown() { + xxx_messageInfo_GetMessageListReactionExtensionsResp.DiscardUnknown(m) +} + +var xxx_messageInfo_GetMessageListReactionExtensionsResp proto.InternalMessageInfo + +func (m *GetMessageListReactionExtensionsResp) GetErrCode() int32 { + if m != nil { + return m.ErrCode + } + return 0 +} + +func (m *GetMessageListReactionExtensionsResp) GetErrMsg() string { + if m != nil { + return m.ErrMsg + } + return "" +} + +func (m *GetMessageListReactionExtensionsResp) GetSingleMessageResult() []*SingleMessageExtensionResult { + if m != nil { + return m.SingleMessageResult + } + return nil +} + +type SingleMessageExtensionResult struct { + ErrCode int32 `protobuf:"varint,1,opt,name=errCode" json:"errCode,omitempty"` + ErrMsg string `protobuf:"bytes,2,opt,name=errMsg" json:"errMsg,omitempty"` + ReactionExtensionList map[string]*sdk_ws.KeyValue `protobuf:"bytes,3,rep,name=reactionExtensionList" json:"reactionExtensionList,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + ClientMsgID string `protobuf:"bytes,4,opt,name=clientMsgID" json:"clientMsgID,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *SingleMessageExtensionResult) Reset() { *m = SingleMessageExtensionResult{} } +func (m *SingleMessageExtensionResult) String() string { return proto.CompactTextString(m) } +func (*SingleMessageExtensionResult) ProtoMessage() {} +func (*SingleMessageExtensionResult) Descriptor() ([]byte, []int) { + return fileDescriptor_msg_53ecdffb017d9c40, []int{29} +} +func (m *SingleMessageExtensionResult) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_SingleMessageExtensionResult.Unmarshal(m, b) +} +func (m *SingleMessageExtensionResult) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_SingleMessageExtensionResult.Marshal(b, m, deterministic) +} +func (dst *SingleMessageExtensionResult) XXX_Merge(src proto.Message) { + xxx_messageInfo_SingleMessageExtensionResult.Merge(dst, src) +} +func (m *SingleMessageExtensionResult) XXX_Size() int { + return xxx_messageInfo_SingleMessageExtensionResult.Size(m) +} +func (m *SingleMessageExtensionResult) XXX_DiscardUnknown() { + xxx_messageInfo_SingleMessageExtensionResult.DiscardUnknown(m) +} + +var xxx_messageInfo_SingleMessageExtensionResult proto.InternalMessageInfo + +func (m *SingleMessageExtensionResult) GetErrCode() int32 { + if m != nil { + return m.ErrCode + } + return 0 +} + +func (m *SingleMessageExtensionResult) GetErrMsg() string { + if m != nil { + return m.ErrMsg + } + return "" +} + +func (m *SingleMessageExtensionResult) GetReactionExtensionList() map[string]*sdk_ws.KeyValue { + if m != nil { + return m.ReactionExtensionList + } + return nil +} + +func (m *SingleMessageExtensionResult) GetClientMsgID() string { + if m != nil { + return m.ClientMsgID + } + return "" +} + +type ModifyMessageReactionExtensionsResp struct { + ErrCode int32 `protobuf:"varint,1,opt,name=errCode" json:"errCode,omitempty"` + ErrMsg string `protobuf:"bytes,2,opt,name=errMsg" json:"errMsg,omitempty"` + SuccessList []*ExtendMsgResp `protobuf:"bytes,3,rep,name=successList" json:"successList,omitempty"` + FailedList []*ExtendMsgResp `protobuf:"bytes,4,rep,name=failedList" json:"failedList,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ModifyMessageReactionExtensionsResp) Reset() { *m = ModifyMessageReactionExtensionsResp{} } +func (m *ModifyMessageReactionExtensionsResp) String() string { return proto.CompactTextString(m) } +func (*ModifyMessageReactionExtensionsResp) ProtoMessage() {} +func (*ModifyMessageReactionExtensionsResp) Descriptor() ([]byte, []int) { + return fileDescriptor_msg_53ecdffb017d9c40, []int{30} +} +func (m *ModifyMessageReactionExtensionsResp) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_ModifyMessageReactionExtensionsResp.Unmarshal(m, b) +} +func (m *ModifyMessageReactionExtensionsResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_ModifyMessageReactionExtensionsResp.Marshal(b, m, deterministic) +} +func (dst *ModifyMessageReactionExtensionsResp) XXX_Merge(src proto.Message) { + xxx_messageInfo_ModifyMessageReactionExtensionsResp.Merge(dst, src) +} +func (m *ModifyMessageReactionExtensionsResp) XXX_Size() int { + return xxx_messageInfo_ModifyMessageReactionExtensionsResp.Size(m) +} +func (m *ModifyMessageReactionExtensionsResp) XXX_DiscardUnknown() { + xxx_messageInfo_ModifyMessageReactionExtensionsResp.DiscardUnknown(m) +} + +var xxx_messageInfo_ModifyMessageReactionExtensionsResp proto.InternalMessageInfo + +func (m *ModifyMessageReactionExtensionsResp) GetErrCode() int32 { + if m != nil { + return m.ErrCode + } + return 0 +} + +func (m *ModifyMessageReactionExtensionsResp) GetErrMsg() string { + if m != nil { + return m.ErrMsg + } + return "" +} + +func (m *ModifyMessageReactionExtensionsResp) GetSuccessList() []*ExtendMsgResp { + if m != nil { + return m.SuccessList + } + return nil +} + +func (m *ModifyMessageReactionExtensionsResp) GetFailedList() []*ExtendMsgResp { + if m != nil { + return m.FailedList + } + return nil +} + +type DeleteMessageListReactionExtensionsReq struct { + OperationID string `protobuf:"bytes,1,opt,name=operationID" json:"operationID,omitempty"` + OpUserID string `protobuf:"bytes,2,opt,name=opUserID" json:"opUserID,omitempty"` + SourceID string `protobuf:"bytes,3,opt,name=sourceID" json:"sourceID,omitempty"` + OpUserIDPlatformID int32 `protobuf:"varint,4,opt,name=opUserIDPlatformID" json:"opUserIDPlatformID,omitempty"` + SessionType int32 `protobuf:"varint,5,opt,name=sessionType" json:"sessionType,omitempty"` + ClientMsgID string `protobuf:"bytes,6,opt,name=clientMsgID" json:"clientMsgID,omitempty"` + IsExternalExtensions bool `protobuf:"varint,7,opt,name=isExternalExtensions" json:"isExternalExtensions,omitempty"` + MsgFirstModifyTime int64 `protobuf:"varint,8,opt,name=msgFirstModifyTime" json:"msgFirstModifyTime,omitempty"` + ReactionExtensionList []*sdk_ws.KeyValue `protobuf:"bytes,9,rep,name=reactionExtensionList" json:"reactionExtensionList,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *DeleteMessageListReactionExtensionsReq) Reset() { + *m = DeleteMessageListReactionExtensionsReq{} +} +func (m *DeleteMessageListReactionExtensionsReq) String() string { return proto.CompactTextString(m) } +func (*DeleteMessageListReactionExtensionsReq) ProtoMessage() {} +func (*DeleteMessageListReactionExtensionsReq) Descriptor() ([]byte, []int) { + return fileDescriptor_msg_53ecdffb017d9c40, []int{31} +} +func (m *DeleteMessageListReactionExtensionsReq) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_DeleteMessageListReactionExtensionsReq.Unmarshal(m, b) +} +func (m *DeleteMessageListReactionExtensionsReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_DeleteMessageListReactionExtensionsReq.Marshal(b, m, deterministic) +} +func (dst *DeleteMessageListReactionExtensionsReq) XXX_Merge(src proto.Message) { + xxx_messageInfo_DeleteMessageListReactionExtensionsReq.Merge(dst, src) +} +func (m *DeleteMessageListReactionExtensionsReq) XXX_Size() int { + return xxx_messageInfo_DeleteMessageListReactionExtensionsReq.Size(m) +} +func (m *DeleteMessageListReactionExtensionsReq) XXX_DiscardUnknown() { + xxx_messageInfo_DeleteMessageListReactionExtensionsReq.DiscardUnknown(m) +} + +var xxx_messageInfo_DeleteMessageListReactionExtensionsReq proto.InternalMessageInfo + +func (m *DeleteMessageListReactionExtensionsReq) GetOperationID() string { + if m != nil { + return m.OperationID + } + return "" +} + +func (m *DeleteMessageListReactionExtensionsReq) GetOpUserID() string { + if m != nil { + return m.OpUserID + } + return "" +} + +func (m *DeleteMessageListReactionExtensionsReq) GetSourceID() string { + if m != nil { + return m.SourceID + } + return "" +} + +func (m *DeleteMessageListReactionExtensionsReq) GetOpUserIDPlatformID() int32 { + if m != nil { + return m.OpUserIDPlatformID + } + return 0 +} + +func (m *DeleteMessageListReactionExtensionsReq) GetSessionType() int32 { + if m != nil { + return m.SessionType + } + return 0 +} + +func (m *DeleteMessageListReactionExtensionsReq) GetClientMsgID() string { + if m != nil { + return m.ClientMsgID + } + return "" +} + +func (m *DeleteMessageListReactionExtensionsReq) GetIsExternalExtensions() bool { + if m != nil { + return m.IsExternalExtensions + } + return false +} + +func (m *DeleteMessageListReactionExtensionsReq) GetMsgFirstModifyTime() int64 { + if m != nil { + return m.MsgFirstModifyTime + } + return 0 +} + +func (m *DeleteMessageListReactionExtensionsReq) GetReactionExtensionList() []*sdk_ws.KeyValue { + if m != nil { + return m.ReactionExtensionList + } + return nil +} + +type DeleteMessageListReactionExtensionsResp struct { + ErrCode int32 `protobuf:"varint,1,opt,name=errCode" json:"errCode,omitempty"` + ErrMsg string `protobuf:"bytes,2,opt,name=errMsg" json:"errMsg,omitempty"` + Result []*KeyValueResp `protobuf:"bytes,6,rep,name=result" json:"result,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *DeleteMessageListReactionExtensionsResp) Reset() { + *m = DeleteMessageListReactionExtensionsResp{} +} +func (m *DeleteMessageListReactionExtensionsResp) String() string { return proto.CompactTextString(m) } +func (*DeleteMessageListReactionExtensionsResp) ProtoMessage() {} +func (*DeleteMessageListReactionExtensionsResp) Descriptor() ([]byte, []int) { + return fileDescriptor_msg_53ecdffb017d9c40, []int{32} +} +func (m *DeleteMessageListReactionExtensionsResp) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_DeleteMessageListReactionExtensionsResp.Unmarshal(m, b) +} +func (m *DeleteMessageListReactionExtensionsResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_DeleteMessageListReactionExtensionsResp.Marshal(b, m, deterministic) +} +func (dst *DeleteMessageListReactionExtensionsResp) XXX_Merge(src proto.Message) { + xxx_messageInfo_DeleteMessageListReactionExtensionsResp.Merge(dst, src) +} +func (m *DeleteMessageListReactionExtensionsResp) XXX_Size() int { + return xxx_messageInfo_DeleteMessageListReactionExtensionsResp.Size(m) +} +func (m *DeleteMessageListReactionExtensionsResp) XXX_DiscardUnknown() { + xxx_messageInfo_DeleteMessageListReactionExtensionsResp.DiscardUnknown(m) +} + +var xxx_messageInfo_DeleteMessageListReactionExtensionsResp proto.InternalMessageInfo + +func (m *DeleteMessageListReactionExtensionsResp) GetErrCode() int32 { + if m != nil { + return m.ErrCode + } + return 0 +} + +func (m *DeleteMessageListReactionExtensionsResp) GetErrMsg() string { + if m != nil { + return m.ErrMsg + } + return "" +} + +func (m *DeleteMessageListReactionExtensionsResp) GetResult() []*KeyValueResp { + if m != nil { + return m.Result + } + return nil +} + +type ExtendMsgResp struct { + ExtendMsg *ExtendMsg `protobuf:"bytes,1,opt,name=extendMsg" json:"extendMsg,omitempty"` + ErrCode int32 `protobuf:"varint,2,opt,name=errCode" json:"errCode,omitempty"` + ErrMsg string `protobuf:"bytes,3,opt,name=errMsg" json:"errMsg,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ExtendMsgResp) Reset() { *m = ExtendMsgResp{} } +func (m *ExtendMsgResp) String() string { return proto.CompactTextString(m) } +func (*ExtendMsgResp) ProtoMessage() {} +func (*ExtendMsgResp) Descriptor() ([]byte, []int) { + return fileDescriptor_msg_53ecdffb017d9c40, []int{33} +} +func (m *ExtendMsgResp) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_ExtendMsgResp.Unmarshal(m, b) +} +func (m *ExtendMsgResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_ExtendMsgResp.Marshal(b, m, deterministic) +} +func (dst *ExtendMsgResp) XXX_Merge(src proto.Message) { + xxx_messageInfo_ExtendMsgResp.Merge(dst, src) +} +func (m *ExtendMsgResp) XXX_Size() int { + return xxx_messageInfo_ExtendMsgResp.Size(m) +} +func (m *ExtendMsgResp) XXX_DiscardUnknown() { + xxx_messageInfo_ExtendMsgResp.DiscardUnknown(m) +} + +var xxx_messageInfo_ExtendMsgResp proto.InternalMessageInfo + +func (m *ExtendMsgResp) GetExtendMsg() *ExtendMsg { + if m != nil { + return m.ExtendMsg + } + return nil +} + +func (m *ExtendMsgResp) GetErrCode() int32 { + if m != nil { + return m.ErrCode + } + return 0 +} + +func (m *ExtendMsgResp) GetErrMsg() string { + if m != nil { + return m.ErrMsg + } + return "" +} + +type ExtendMsg struct { + ReactionExtensionList map[string]*KeyValueResp `protobuf:"bytes,1,rep,name=reactionExtensionList" json:"reactionExtensionList,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + ClientMsgID string `protobuf:"bytes,2,opt,name=clientMsgID" json:"clientMsgID,omitempty"` + MsgFirstModifyTime int64 `protobuf:"varint,3,opt,name=msgFirstModifyTime" json:"msgFirstModifyTime,omitempty"` + AttachedInfo string `protobuf:"bytes,4,opt,name=attachedInfo" json:"attachedInfo,omitempty"` + Ex string `protobuf:"bytes,5,opt,name=ex" json:"ex,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ExtendMsg) Reset() { *m = ExtendMsg{} } +func (m *ExtendMsg) String() string { return proto.CompactTextString(m) } +func (*ExtendMsg) ProtoMessage() {} +func (*ExtendMsg) Descriptor() ([]byte, []int) { + return fileDescriptor_msg_53ecdffb017d9c40, []int{34} +} +func (m *ExtendMsg) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_ExtendMsg.Unmarshal(m, b) +} +func (m *ExtendMsg) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_ExtendMsg.Marshal(b, m, deterministic) +} +func (dst *ExtendMsg) XXX_Merge(src proto.Message) { + xxx_messageInfo_ExtendMsg.Merge(dst, src) +} +func (m *ExtendMsg) XXX_Size() int { + return xxx_messageInfo_ExtendMsg.Size(m) +} +func (m *ExtendMsg) XXX_DiscardUnknown() { + xxx_messageInfo_ExtendMsg.DiscardUnknown(m) +} + +var xxx_messageInfo_ExtendMsg proto.InternalMessageInfo + +func (m *ExtendMsg) GetReactionExtensionList() map[string]*KeyValueResp { + if m != nil { + return m.ReactionExtensionList + } + return nil +} + +func (m *ExtendMsg) GetClientMsgID() string { + if m != nil { + return m.ClientMsgID + } + return "" +} + +func (m *ExtendMsg) GetMsgFirstModifyTime() int64 { + if m != nil { + return m.MsgFirstModifyTime + } + return 0 +} + +func (m *ExtendMsg) GetAttachedInfo() string { + if m != nil { + return m.AttachedInfo + } + return "" +} + +func (m *ExtendMsg) GetEx() string { + if m != nil { + return m.Ex + } + return "" +} + +type KeyValueResp struct { + KeyValue *sdk_ws.KeyValue `protobuf:"bytes,1,opt,name=keyValue" json:"keyValue,omitempty"` + ErrCode int32 `protobuf:"varint,2,opt,name=errCode" json:"errCode,omitempty"` + ErrMsg string `protobuf:"bytes,3,opt,name=errMsg" json:"errMsg,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *KeyValueResp) Reset() { *m = KeyValueResp{} } +func (m *KeyValueResp) String() string { return proto.CompactTextString(m) } +func (*KeyValueResp) ProtoMessage() {} +func (*KeyValueResp) Descriptor() ([]byte, []int) { + return fileDescriptor_msg_53ecdffb017d9c40, []int{35} +} +func (m *KeyValueResp) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_KeyValueResp.Unmarshal(m, b) +} +func (m *KeyValueResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_KeyValueResp.Marshal(b, m, deterministic) +} +func (dst *KeyValueResp) XXX_Merge(src proto.Message) { + xxx_messageInfo_KeyValueResp.Merge(dst, src) +} +func (m *KeyValueResp) XXX_Size() int { + return xxx_messageInfo_KeyValueResp.Size(m) +} +func (m *KeyValueResp) XXX_DiscardUnknown() { + xxx_messageInfo_KeyValueResp.DiscardUnknown(m) +} + +var xxx_messageInfo_KeyValueResp proto.InternalMessageInfo + +func (m *KeyValueResp) GetKeyValue() *sdk_ws.KeyValue { + if m != nil { + return m.KeyValue + } + return nil +} + +func (m *KeyValueResp) GetErrCode() int32 { + if m != nil { + return m.ErrCode + } + return 0 +} + +func (m *KeyValueResp) GetErrMsg() string { + if m != nil { + return m.ErrMsg + } + return "" +} + +type MsgDataToModifyByMQ struct { + AggregationID string `protobuf:"bytes,1,opt,name=aggregationID" json:"aggregationID,omitempty"` + MessageList []*MsgDataToMQ `protobuf:"bytes,2,rep,name=messageList" json:"messageList,omitempty"` + TriggerID string `protobuf:"bytes,3,opt,name=triggerID" json:"triggerID,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *MsgDataToModifyByMQ) Reset() { *m = MsgDataToModifyByMQ{} } +func (m *MsgDataToModifyByMQ) String() string { return proto.CompactTextString(m) } +func (*MsgDataToModifyByMQ) ProtoMessage() {} +func (*MsgDataToModifyByMQ) Descriptor() ([]byte, []int) { + return fileDescriptor_msg_53ecdffb017d9c40, []int{36} +} +func (m *MsgDataToModifyByMQ) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_MsgDataToModifyByMQ.Unmarshal(m, b) +} +func (m *MsgDataToModifyByMQ) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_MsgDataToModifyByMQ.Marshal(b, m, deterministic) +} +func (dst *MsgDataToModifyByMQ) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgDataToModifyByMQ.Merge(dst, src) +} +func (m *MsgDataToModifyByMQ) XXX_Size() int { + return xxx_messageInfo_MsgDataToModifyByMQ.Size(m) +} +func (m *MsgDataToModifyByMQ) XXX_DiscardUnknown() { + xxx_messageInfo_MsgDataToModifyByMQ.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgDataToModifyByMQ proto.InternalMessageInfo + +func (m *MsgDataToModifyByMQ) GetAggregationID() string { + if m != nil { + return m.AggregationID + } + return "" +} + +func (m *MsgDataToModifyByMQ) GetMessageList() []*MsgDataToMQ { + if m != nil { + return m.MessageList + } + return nil +} + +func (m *MsgDataToModifyByMQ) GetTriggerID() string { + if m != nil { + return m.TriggerID + } + return "" +} + +func init() { + proto.RegisterType((*MsgDataToMQ)(nil), "msg.MsgDataToMQ") + proto.RegisterType((*MsgDataToDB)(nil), "msg.MsgDataToDB") + proto.RegisterType((*PushMsgDataToMQ)(nil), "msg.PushMsgDataToMQ") + proto.RegisterType((*MsgDataToMongoByMQ)(nil), "msg.MsgDataToMongoByMQ") + proto.RegisterType((*GetMaxAndMinSeqReq)(nil), "msg.GetMaxAndMinSeqReq") + proto.RegisterType((*GetMaxAndMinSeqResp)(nil), "msg.GetMaxAndMinSeqResp") + proto.RegisterType((*SendMsgReq)(nil), "msg.SendMsgReq") + proto.RegisterType((*SendMsgResp)(nil), "msg.SendMsgResp") + proto.RegisterType((*ClearMsgReq)(nil), "msg.ClearMsgReq") + proto.RegisterType((*ClearMsgResp)(nil), "msg.ClearMsgResp") + proto.RegisterType((*SetMsgMinSeqReq)(nil), "msg.SetMsgMinSeqReq") + proto.RegisterType((*SetMsgMinSeqResp)(nil), "msg.SetMsgMinSeqResp") + proto.RegisterType((*SetSendMsgStatusReq)(nil), "msg.SetSendMsgStatusReq") + proto.RegisterType((*SetSendMsgStatusResp)(nil), "msg.SetSendMsgStatusResp") + proto.RegisterType((*GetSendMsgStatusReq)(nil), "msg.GetSendMsgStatusReq") + proto.RegisterType((*GetSendMsgStatusResp)(nil), "msg.GetSendMsgStatusResp") + proto.RegisterType((*DelSuperGroupMsgReq)(nil), "msg.DelSuperGroupMsgReq") + proto.RegisterType((*DelSuperGroupMsgResp)(nil), "msg.DelSuperGroupMsgResp") + proto.RegisterType((*GetSuperGroupMsgReq)(nil), "msg.GetSuperGroupMsgReq") + proto.RegisterType((*GetSuperGroupMsgResp)(nil), "msg.GetSuperGroupMsgResp") + proto.RegisterType((*GetWriteDiffMsgReq)(nil), "msg.GetWriteDiffMsgReq") + proto.RegisterType((*GetWriteDiffMsgResp)(nil), "msg.GetWriteDiffMsgResp") + proto.RegisterType((*ModifyMessageReactionExtensionsReq)(nil), "msg.ModifyMessageReactionExtensionsReq") + proto.RegisterMapType((map[string]*sdk_ws.KeyValue)(nil), "msg.ModifyMessageReactionExtensionsReq.ReactionExtensionListEntry") + proto.RegisterType((*SetMessageReactionExtensionsReq)(nil), "msg.SetMessageReactionExtensionsReq") + proto.RegisterMapType((map[string]*sdk_ws.KeyValue)(nil), "msg.SetMessageReactionExtensionsReq.ReactionExtensionListEntry") + proto.RegisterType((*SetMessageReactionExtensionsResp)(nil), "msg.SetMessageReactionExtensionsResp") + proto.RegisterType((*AddMessageReactionExtensionsReq)(nil), "msg.AddMessageReactionExtensionsReq") + proto.RegisterMapType((map[string]*sdk_ws.KeyValue)(nil), "msg.AddMessageReactionExtensionsReq.ReactionExtensionListEntry") + proto.RegisterType((*AddMessageReactionExtensionsResp)(nil), "msg.AddMessageReactionExtensionsResp") + proto.RegisterType((*GetMessageListReactionExtensionsReq)(nil), "msg.GetMessageListReactionExtensionsReq") + proto.RegisterType((*GetMessageListReactionExtensionsReq_MessageReactionKey)(nil), "msg.GetMessageListReactionExtensionsReq.MessageReactionKey") + proto.RegisterType((*GetMessageListReactionExtensionsResp)(nil), "msg.GetMessageListReactionExtensionsResp") + proto.RegisterType((*SingleMessageExtensionResult)(nil), "msg.SingleMessageExtensionResult") + proto.RegisterMapType((map[string]*sdk_ws.KeyValue)(nil), "msg.SingleMessageExtensionResult.ReactionExtensionListEntry") + proto.RegisterType((*ModifyMessageReactionExtensionsResp)(nil), "msg.ModifyMessageReactionExtensionsResp") + proto.RegisterType((*DeleteMessageListReactionExtensionsReq)(nil), "msg.DeleteMessageListReactionExtensionsReq") + proto.RegisterType((*DeleteMessageListReactionExtensionsResp)(nil), "msg.DeleteMessageListReactionExtensionsResp") + proto.RegisterType((*ExtendMsgResp)(nil), "msg.ExtendMsgResp") + proto.RegisterType((*ExtendMsg)(nil), "msg.ExtendMsg") + proto.RegisterMapType((map[string]*KeyValueResp)(nil), "msg.ExtendMsg.ReactionExtensionListEntry") + proto.RegisterType((*KeyValueResp)(nil), "msg.KeyValueResp") + proto.RegisterType((*MsgDataToModifyByMQ)(nil), "msg.MsgDataToModifyByMQ") +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConn + +// 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.SupportPackageIsVersion4 + +// Client API for Msg service + +type MsgClient interface { + GetMaxAndMinSeq(ctx context.Context, in *sdk_ws.GetMaxAndMinSeqReq, opts ...grpc.CallOption) (*sdk_ws.GetMaxAndMinSeqResp, error) + PullMessageBySeqList(ctx context.Context, in *sdk_ws.PullMessageBySeqListReq, opts ...grpc.CallOption) (*sdk_ws.PullMessageBySeqListResp, error) + SendMsg(ctx context.Context, in *SendMsgReq, opts ...grpc.CallOption) (*SendMsgResp, error) + DelMsgList(ctx context.Context, in *sdk_ws.DelMsgListReq, opts ...grpc.CallOption) (*sdk_ws.DelMsgListResp, error) + DelSuperGroupMsg(ctx context.Context, in *DelSuperGroupMsgReq, opts ...grpc.CallOption) (*DelSuperGroupMsgResp, error) + ClearMsg(ctx context.Context, in *ClearMsgReq, opts ...grpc.CallOption) (*ClearMsgResp, error) + SetMsgMinSeq(ctx context.Context, in *SetMsgMinSeqReq, opts ...grpc.CallOption) (*SetMsgMinSeqResp, error) + SetSendMsgStatus(ctx context.Context, in *SetSendMsgStatusReq, opts ...grpc.CallOption) (*SetSendMsgStatusResp, error) + GetSendMsgStatus(ctx context.Context, in *GetSendMsgStatusReq, opts ...grpc.CallOption) (*GetSendMsgStatusResp, error) + GetSuperGroupMsg(ctx context.Context, in *GetSuperGroupMsgReq, opts ...grpc.CallOption) (*GetSuperGroupMsgResp, error) + GetWriteDiffMsg(ctx context.Context, in *GetWriteDiffMsgReq, opts ...grpc.CallOption) (*GetWriteDiffMsgResp, error) + // modify msg + SetMessageReactionExtensions(ctx context.Context, in *SetMessageReactionExtensionsReq, opts ...grpc.CallOption) (*SetMessageReactionExtensionsResp, error) + GetMessageListReactionExtensions(ctx context.Context, in *GetMessageListReactionExtensionsReq, opts ...grpc.CallOption) (*GetMessageListReactionExtensionsResp, error) + AddMessageReactionExtensions(ctx context.Context, in *AddMessageReactionExtensionsReq, opts ...grpc.CallOption) (*AddMessageReactionExtensionsResp, error) + DeleteMessageReactionExtensions(ctx context.Context, in *DeleteMessageListReactionExtensionsReq, opts ...grpc.CallOption) (*DeleteMessageListReactionExtensionsResp, error) +} + +type msgClient struct { + cc *grpc.ClientConn +} + +func NewMsgClient(cc *grpc.ClientConn) MsgClient { + return &msgClient{cc} +} + +func (c *msgClient) GetMaxAndMinSeq(ctx context.Context, in *sdk_ws.GetMaxAndMinSeqReq, opts ...grpc.CallOption) (*sdk_ws.GetMaxAndMinSeqResp, error) { + out := new(sdk_ws.GetMaxAndMinSeqResp) + err := grpc.Invoke(ctx, "/msg.msg/GetMaxAndMinSeq", in, out, c.cc, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) PullMessageBySeqList(ctx context.Context, in *sdk_ws.PullMessageBySeqListReq, opts ...grpc.CallOption) (*sdk_ws.PullMessageBySeqListResp, error) { + out := new(sdk_ws.PullMessageBySeqListResp) + err := grpc.Invoke(ctx, "/msg.msg/PullMessageBySeqList", in, out, c.cc, 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 := grpc.Invoke(ctx, "/msg.msg/SendMsg", in, out, c.cc, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) DelMsgList(ctx context.Context, in *sdk_ws.DelMsgListReq, opts ...grpc.CallOption) (*sdk_ws.DelMsgListResp, error) { + out := new(sdk_ws.DelMsgListResp) + err := grpc.Invoke(ctx, "/msg.msg/DelMsgList", in, out, c.cc, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) DelSuperGroupMsg(ctx context.Context, in *DelSuperGroupMsgReq, opts ...grpc.CallOption) (*DelSuperGroupMsgResp, error) { + out := new(DelSuperGroupMsgResp) + err := grpc.Invoke(ctx, "/msg.msg/DelSuperGroupMsg", in, out, c.cc, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) ClearMsg(ctx context.Context, in *ClearMsgReq, opts ...grpc.CallOption) (*ClearMsgResp, error) { + out := new(ClearMsgResp) + err := grpc.Invoke(ctx, "/msg.msg/ClearMsg", in, out, c.cc, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) SetMsgMinSeq(ctx context.Context, in *SetMsgMinSeqReq, opts ...grpc.CallOption) (*SetMsgMinSeqResp, error) { + out := new(SetMsgMinSeqResp) + err := grpc.Invoke(ctx, "/msg.msg/SetMsgMinSeq", in, out, c.cc, 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 := grpc.Invoke(ctx, "/msg.msg/SetSendMsgStatus", in, out, c.cc, 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 := grpc.Invoke(ctx, "/msg.msg/GetSendMsgStatus", in, out, c.cc, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) GetSuperGroupMsg(ctx context.Context, in *GetSuperGroupMsgReq, opts ...grpc.CallOption) (*GetSuperGroupMsgResp, error) { + out := new(GetSuperGroupMsgResp) + err := grpc.Invoke(ctx, "/msg.msg/GetSuperGroupMsg", in, out, c.cc, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) GetWriteDiffMsg(ctx context.Context, in *GetWriteDiffMsgReq, opts ...grpc.CallOption) (*GetWriteDiffMsgResp, error) { + out := new(GetWriteDiffMsgResp) + err := grpc.Invoke(ctx, "/msg.msg/GetWriteDiffMsg", in, out, c.cc, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) SetMessageReactionExtensions(ctx context.Context, in *SetMessageReactionExtensionsReq, opts ...grpc.CallOption) (*SetMessageReactionExtensionsResp, error) { + out := new(SetMessageReactionExtensionsResp) + err := grpc.Invoke(ctx, "/msg.msg/SetMessageReactionExtensions", in, out, c.cc, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) GetMessageListReactionExtensions(ctx context.Context, in *GetMessageListReactionExtensionsReq, opts ...grpc.CallOption) (*GetMessageListReactionExtensionsResp, error) { + out := new(GetMessageListReactionExtensionsResp) + err := grpc.Invoke(ctx, "/msg.msg/GetMessageListReactionExtensions", in, out, c.cc, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) AddMessageReactionExtensions(ctx context.Context, in *AddMessageReactionExtensionsReq, opts ...grpc.CallOption) (*AddMessageReactionExtensionsResp, error) { + out := new(AddMessageReactionExtensionsResp) + err := grpc.Invoke(ctx, "/msg.msg/AddMessageReactionExtensions", in, out, c.cc, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) DeleteMessageReactionExtensions(ctx context.Context, in *DeleteMessageListReactionExtensionsReq, opts ...grpc.CallOption) (*DeleteMessageListReactionExtensionsResp, error) { + out := new(DeleteMessageListReactionExtensionsResp) + err := grpc.Invoke(ctx, "/msg.msg/DeleteMessageReactionExtensions", in, out, c.cc, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// Server API for Msg service + +type MsgServer interface { + GetMaxAndMinSeq(context.Context, *sdk_ws.GetMaxAndMinSeqReq) (*sdk_ws.GetMaxAndMinSeqResp, error) + PullMessageBySeqList(context.Context, *sdk_ws.PullMessageBySeqListReq) (*sdk_ws.PullMessageBySeqListResp, error) + SendMsg(context.Context, *SendMsgReq) (*SendMsgResp, error) + DelMsgList(context.Context, *sdk_ws.DelMsgListReq) (*sdk_ws.DelMsgListResp, error) + DelSuperGroupMsg(context.Context, *DelSuperGroupMsgReq) (*DelSuperGroupMsgResp, error) + ClearMsg(context.Context, *ClearMsgReq) (*ClearMsgResp, error) + SetMsgMinSeq(context.Context, *SetMsgMinSeqReq) (*SetMsgMinSeqResp, error) + SetSendMsgStatus(context.Context, *SetSendMsgStatusReq) (*SetSendMsgStatusResp, error) + GetSendMsgStatus(context.Context, *GetSendMsgStatusReq) (*GetSendMsgStatusResp, error) + GetSuperGroupMsg(context.Context, *GetSuperGroupMsgReq) (*GetSuperGroupMsgResp, error) + GetWriteDiffMsg(context.Context, *GetWriteDiffMsgReq) (*GetWriteDiffMsgResp, error) + // modify msg + SetMessageReactionExtensions(context.Context, *SetMessageReactionExtensionsReq) (*SetMessageReactionExtensionsResp, error) + GetMessageListReactionExtensions(context.Context, *GetMessageListReactionExtensionsReq) (*GetMessageListReactionExtensionsResp, error) + AddMessageReactionExtensions(context.Context, *AddMessageReactionExtensionsReq) (*AddMessageReactionExtensionsResp, error) + DeleteMessageReactionExtensions(context.Context, *DeleteMessageListReactionExtensionsReq) (*DeleteMessageListReactionExtensionsResp, error) +} + +func RegisterMsgServer(s *grpc.Server, srv MsgServer) { + s.RegisterService(&_Msg_serviceDesc, srv) +} + +func _Msg_GetMaxAndMinSeq_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(sdk_ws.GetMaxAndMinSeqReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).GetMaxAndMinSeq(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/msg.msg/GetMaxAndMinSeq", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).GetMaxAndMinSeq(ctx, req.(*sdk_ws.GetMaxAndMinSeqReq)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_PullMessageBySeqList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(sdk_ws.PullMessageBySeqListReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).PullMessageBySeqList(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/msg.msg/PullMessageBySeqList", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).PullMessageBySeqList(ctx, req.(*sdk_ws.PullMessageBySeqListReq)) + } + 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: "/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_DelMsgList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(sdk_ws.DelMsgListReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).DelMsgList(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/msg.msg/DelMsgList", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).DelMsgList(ctx, req.(*sdk_ws.DelMsgListReq)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_DelSuperGroupMsg_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DelSuperGroupMsgReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).DelSuperGroupMsg(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/msg.msg/DelSuperGroupMsg", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).DelSuperGroupMsg(ctx, req.(*DelSuperGroupMsgReq)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_ClearMsg_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ClearMsgReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).ClearMsg(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/msg.msg/ClearMsg", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).ClearMsg(ctx, req.(*ClearMsgReq)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_SetMsgMinSeq_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SetMsgMinSeqReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).SetMsgMinSeq(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/msg.msg/SetMsgMinSeq", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).SetMsgMinSeq(ctx, req.(*SetMsgMinSeqReq)) + } + 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: "/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: "/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_GetSuperGroupMsg_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetSuperGroupMsgReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).GetSuperGroupMsg(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/msg.msg/GetSuperGroupMsg", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).GetSuperGroupMsg(ctx, req.(*GetSuperGroupMsgReq)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_GetWriteDiffMsg_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetWriteDiffMsgReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).GetWriteDiffMsg(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/msg.msg/GetWriteDiffMsg", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).GetWriteDiffMsg(ctx, req.(*GetWriteDiffMsgReq)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_SetMessageReactionExtensions_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SetMessageReactionExtensionsReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).SetMessageReactionExtensions(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/msg.msg/SetMessageReactionExtensions", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).SetMessageReactionExtensions(ctx, req.(*SetMessageReactionExtensionsReq)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_GetMessageListReactionExtensions_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetMessageListReactionExtensionsReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).GetMessageListReactionExtensions(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/msg.msg/GetMessageListReactionExtensions", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).GetMessageListReactionExtensions(ctx, req.(*GetMessageListReactionExtensionsReq)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_AddMessageReactionExtensions_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(AddMessageReactionExtensionsReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).AddMessageReactionExtensions(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/msg.msg/AddMessageReactionExtensions", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).AddMessageReactionExtensions(ctx, req.(*AddMessageReactionExtensionsReq)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_DeleteMessageReactionExtensions_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteMessageListReactionExtensionsReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).DeleteMessageReactionExtensions(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/msg.msg/DeleteMessageReactionExtensions", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).DeleteMessageReactionExtensions(ctx, req.(*DeleteMessageListReactionExtensionsReq)) + } + return interceptor(ctx, in, info, handler) +} + +var _Msg_serviceDesc = grpc.ServiceDesc{ + ServiceName: "msg.msg", + HandlerType: (*MsgServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "GetMaxAndMinSeq", + Handler: _Msg_GetMaxAndMinSeq_Handler, + }, + { + MethodName: "PullMessageBySeqList", + Handler: _Msg_PullMessageBySeqList_Handler, + }, + { + MethodName: "SendMsg", + Handler: _Msg_SendMsg_Handler, + }, + { + MethodName: "DelMsgList", + Handler: _Msg_DelMsgList_Handler, + }, + { + MethodName: "DelSuperGroupMsg", + Handler: _Msg_DelSuperGroupMsg_Handler, + }, + { + MethodName: "ClearMsg", + Handler: _Msg_ClearMsg_Handler, + }, + { + MethodName: "SetMsgMinSeq", + Handler: _Msg_SetMsgMinSeq_Handler, + }, + { + MethodName: "SetSendMsgStatus", + Handler: _Msg_SetSendMsgStatus_Handler, + }, + { + MethodName: "GetSendMsgStatus", + Handler: _Msg_GetSendMsgStatus_Handler, + }, + { + MethodName: "GetSuperGroupMsg", + Handler: _Msg_GetSuperGroupMsg_Handler, + }, + { + MethodName: "GetWriteDiffMsg", + Handler: _Msg_GetWriteDiffMsg_Handler, + }, + { + MethodName: "SetMessageReactionExtensions", + Handler: _Msg_SetMessageReactionExtensions_Handler, + }, + { + MethodName: "GetMessageListReactionExtensions", + Handler: _Msg_GetMessageListReactionExtensions_Handler, + }, + { + MethodName: "AddMessageReactionExtensions", + Handler: _Msg_AddMessageReactionExtensions_Handler, + }, + { + MethodName: "DeleteMessageReactionExtensions", + Handler: _Msg_DeleteMessageReactionExtensions_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "msg/msg.proto", +} + +func init() { proto.RegisterFile("msg/msg.proto", fileDescriptor_msg_53ecdffb017d9c40) } + +var fileDescriptor_msg_53ecdffb017d9c40 = []byte{ + // 1785 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x5a, 0x4f, 0x6f, 0xdb, 0xc8, + 0x15, 0x07, 0x45, 0x53, 0xb2, 0x9e, 0xec, 0xb5, 0x77, 0xec, 0x75, 0xb5, 0x5c, 0x03, 0xd1, 0x72, + 0xb3, 0x1b, 0xa7, 0x49, 0x64, 0xd4, 0x2d, 0x90, 0xa2, 0x29, 0xd0, 0xc4, 0x91, 0xab, 0x18, 0xa9, + 0xea, 0x98, 0x72, 0x5b, 0xa0, 0x3d, 0x38, 0x8c, 0x34, 0x62, 0x08, 0x4b, 0x24, 0xcd, 0xa1, 0x62, + 0xab, 0xff, 0x0e, 0x05, 0xda, 0x5b, 0x0e, 0x3d, 0xf6, 0x0b, 0xf4, 0x16, 0xf4, 0x03, 0xf4, 0xd4, + 0x0f, 0x10, 0xf4, 0xd2, 0x6f, 0xd1, 0x2f, 0x51, 0xcc, 0x0c, 0x29, 0x0d, 0xff, 0x89, 0xb4, 0x1c, + 0x38, 0x40, 0xdb, 0x9b, 0x66, 0xe6, 0xcd, 0x9b, 0xf7, 0x7b, 0xef, 0xf7, 0x66, 0x86, 0xf3, 0x04, + 0xab, 0x23, 0x62, 0xee, 0x8e, 0x88, 0xd9, 0x74, 0x3d, 0xc7, 0x77, 0x90, 0x3c, 0x22, 0xa6, 0xba, + 0x73, 0xe4, 0x62, 0xfb, 0xc1, 0x61, 0xe7, 0x41, 0x17, 0x7b, 0x6f, 0xb0, 0xb7, 0xeb, 0x9e, 0x99, + 0xbb, 0x6c, 0x78, 0x97, 0xf4, 0xcf, 0x4e, 0x2f, 0xc8, 0xee, 0x05, 0xe1, 0xe2, 0x6a, 0x33, 0x57, + 0xd2, 0x33, 0x5c, 0x17, 0x7b, 0x81, 0xbc, 0xf6, 0x1b, 0xa8, 0x75, 0x88, 0xd9, 0x32, 0x7c, 0xe3, + 0xc4, 0xe9, 0x1c, 0xa3, 0x4d, 0x50, 0x7c, 0xe7, 0x0c, 0xdb, 0x75, 0xa9, 0x21, 0xed, 0x54, 0x75, + 0xde, 0x40, 0x0d, 0xa8, 0x39, 0x2e, 0xf6, 0x0c, 0xdf, 0x72, 0xec, 0xc3, 0x56, 0xbd, 0xc4, 0xc6, + 0xc4, 0x2e, 0xf4, 0x3d, 0xa8, 0x8c, 0xb8, 0x9a, 0xba, 0xdc, 0x90, 0x76, 0x6a, 0x7b, 0x6a, 0x93, + 0x30, 0x03, 0x4e, 0x0d, 0xd7, 0x3a, 0x75, 0x0d, 0xcf, 0x18, 0x91, 0x66, 0xb0, 0x90, 0x1e, 0x8a, + 0x6a, 0x58, 0x58, 0xbc, 0xb5, 0x2f, 0x2a, 0x91, 0x0a, 0x2b, 0xc9, 0x37, 0x4e, 0x7b, 0x2b, 0xc1, + 0xda, 0x8b, 0x31, 0x79, 0x2d, 0x02, 0x6d, 0x40, 0xed, 0x48, 0x98, 0xc5, 0xe1, 0x8a, 0x5d, 0xa2, + 0x35, 0xa5, 0xe2, 0xd6, 0x68, 0xb0, 0xe2, 0x8e, 0xc9, 0xeb, 0x13, 0xe7, 0x67, 0x04, 0x7b, 0x87, + 0x2d, 0xe6, 0x8d, 0xaa, 0x1e, 0xe9, 0xd3, 0xfe, 0x2a, 0x01, 0x9a, 0xd9, 0xe2, 0xd8, 0xa6, 0xb3, + 0x3f, 0xe9, 0x1c, 0xa3, 0x3a, 0x54, 0x86, 0x06, 0xf1, 0xbb, 0xf8, 0x9c, 0x99, 0xb3, 0xa4, 0x87, + 0x4d, 0x74, 0x1b, 0x56, 0x0d, 0xd3, 0xf4, 0xb0, 0x19, 0x05, 0x19, 0xed, 0x44, 0x7b, 0x50, 0x1b, + 0x61, 0x42, 0x0c, 0x13, 0xff, 0xc4, 0x22, 0x7e, 0x5d, 0x6e, 0xc8, 0x3b, 0xb5, 0xbd, 0xf5, 0x26, + 0xa5, 0x92, 0x80, 0x5c, 0x17, 0x85, 0xd0, 0x36, 0x54, 0x7d, 0xcf, 0x32, 0x4d, 0x66, 0xeb, 0x12, + 0xd3, 0x3a, 0xeb, 0xd0, 0x7e, 0x0a, 0xa8, 0x8d, 0xfd, 0x8e, 0x71, 0xf9, 0xc4, 0xee, 0x77, 0x2c, + 0xbb, 0x8b, 0xcf, 0x75, 0x7c, 0x8e, 0xb6, 0xa0, 0x1c, 0x80, 0xe3, 0x5e, 0x0b, 0x5a, 0x71, 0x97, + 0x96, 0x12, 0x2e, 0xd5, 0x2e, 0x60, 0x23, 0xa1, 0x8f, 0xb8, 0x14, 0xf8, 0x81, 0xe7, 0x3d, 0x75, + 0xfa, 0x98, 0x69, 0x54, 0xf4, 0xb0, 0x49, 0x97, 0x3a, 0xf0, 0xbc, 0x0e, 0x31, 0x03, 0x6d, 0x41, + 0x8b, 0xf6, 0x77, 0x8c, 0x4b, 0xea, 0x29, 0xea, 0xdf, 0x55, 0x3d, 0x68, 0xb1, 0x7e, 0xa6, 0x97, + 0x61, 0xa1, 0xfd, 0xac, 0xa5, 0xfd, 0x1a, 0xa0, 0x8b, 0xed, 0x7e, 0x87, 0x98, 0x14, 0xc0, 0xcd, + 0x92, 0xfc, 0x6f, 0x12, 0xd4, 0xa6, 0x8b, 0x73, 0xb4, 0x38, 0x8a, 0x16, 0xcf, 0xd0, 0xe2, 0x08, + 0x5a, 0xde, 0xa2, 0x96, 0xf1, 0x75, 0x3a, 0xc4, 0x9c, 0x86, 0x49, 0xec, 0xa2, 0x12, 0xbd, 0xa1, + 0x85, 0x6d, 0x9f, 0x4b, 0x28, 0x5c, 0x42, 0xe8, 0x42, 0x2a, 0x2c, 0x13, 0x6c, 0xf7, 0x4f, 0xac, + 0x11, 0xae, 0x97, 0x1b, 0xd2, 0x8e, 0xac, 0x4f, 0xdb, 0xe8, 0x13, 0x28, 0xe1, 0xcb, 0x7a, 0x85, + 0x4d, 0x2a, 0xe1, 0x4b, 0xad, 0x07, 0xb5, 0xa7, 0x43, 0x6c, 0x78, 0x81, 0xbb, 0xb6, 0xa0, 0x3c, + 0x8e, 0xc4, 0x9b, 0xb7, 0xa8, 0x4a, 0xc7, 0x0d, 0x98, 0xc0, 0x0d, 0x9e, 0xb6, 0xe3, 0xce, 0x94, + 0x93, 0x49, 0xf9, 0x18, 0x56, 0x66, 0x8b, 0x2c, 0xe2, 0x16, 0xed, 0x2f, 0x12, 0xac, 0x75, 0x31, + 0xc5, 0x17, 0xe1, 0x66, 0xaa, 0xad, 0x75, 0xa8, 0x98, 0x9e, 0x33, 0x76, 0xa7, 0xa6, 0x86, 0x4d, + 0x3a, 0x63, 0xc4, 0x29, 0x13, 0x50, 0x89, 0xb7, 0xe2, 0x08, 0x96, 0x92, 0x74, 0x10, 0xf1, 0x2b, + 0x51, 0xfc, 0x5a, 0x0b, 0xd6, 0xa3, 0xa6, 0x2d, 0x84, 0xf0, 0x08, 0x36, 0xba, 0xd8, 0x0f, 0xc8, + 0xd3, 0xf5, 0x0d, 0x7f, 0x4c, 0xf4, 0xa4, 0x69, 0x52, 0xd2, 0xb4, 0x2d, 0x28, 0x13, 0x26, 0xce, + 0x14, 0x2a, 0x7a, 0xd0, 0xd2, 0x9e, 0xc1, 0x66, 0x52, 0xe1, 0x42, 0xa6, 0x3d, 0x64, 0xa9, 0x7c, + 0x75, 0xd3, 0xb4, 0x97, 0xb0, 0xd9, 0xfe, 0x20, 0x26, 0x08, 0x20, 0xe5, 0x08, 0xc8, 0x3f, 0x4a, + 0xb0, 0xd1, 0xc2, 0xc3, 0xee, 0xd8, 0xc5, 0x5e, 0x9b, 0x46, 0x39, 0xe0, 0xb1, 0x18, 0x2f, 0x29, + 0xc6, 0xd7, 0x19, 0x6f, 0x4a, 0x59, 0xbc, 0x91, 0xa3, 0xbc, 0xc9, 0xe5, 0x07, 0x75, 0x76, 0xd2, + 0x8c, 0x85, 0x9c, 0xdd, 0xe3, 0xce, 0x8e, 0x03, 0xca, 0xe7, 0xc1, 0x3a, 0xc8, 0x94, 0xd9, 0x25, + 0xc6, 0x6c, 0xfa, 0x33, 0x1b, 0x90, 0xf6, 0x7b, 0x1e, 0x98, 0xeb, 0x9b, 0xbb, 0xe0, 0x3e, 0xf9, + 0x8c, 0x1d, 0x36, 0xbf, 0xf0, 0x2c, 0x1f, 0xb7, 0xac, 0xc1, 0x60, 0x71, 0x8c, 0xda, 0xef, 0x98, + 0xbb, 0xa2, 0x9a, 0x6e, 0x10, 0xc8, 0x9f, 0x15, 0xd0, 0x3a, 0x4e, 0xdf, 0x1a, 0x4c, 0x3a, 0xfc, + 0xa4, 0xd5, 0xb1, 0xd1, 0xa3, 0xc6, 0x1e, 0x5c, 0xfa, 0xd8, 0x26, 0x96, 0x63, 0x17, 0xcc, 0x62, + 0xba, 0x67, 0x3b, 0x63, 0xaf, 0x87, 0x67, 0x1b, 0x6c, 0xd8, 0x8e, 0x90, 0x59, 0x4e, 0x6e, 0xbe, + 0x04, 0x13, 0xba, 0xd0, 0xc9, 0xc4, 0xc5, 0x8c, 0x9a, 0x8a, 0x2e, 0x76, 0xa1, 0x4b, 0xf8, 0xcc, + 0x8b, 0x1b, 0xc5, 0x2e, 0x0d, 0x0a, 0xbb, 0x34, 0xec, 0xf3, 0x4b, 0x43, 0x2e, 0x86, 0xa6, 0x9e, + 0xa6, 0xe4, 0xc0, 0xf6, 0xbd, 0x89, 0x9e, 0xbe, 0x40, 0xfc, 0xa4, 0x2a, 0x27, 0x4f, 0xaa, 0xfb, + 0xd3, 0xd3, 0xa8, 0xb6, 0xb7, 0xdd, 0x34, 0x1d, 0xc7, 0x1c, 0x62, 0x7e, 0x59, 0x7d, 0x35, 0x1e, + 0x34, 0xbb, 0xbe, 0x67, 0xd9, 0xe6, 0xcf, 0x8d, 0xe1, 0x18, 0xd3, 0xb3, 0x0a, 0x3d, 0x86, 0x15, + 0xc3, 0xf7, 0x8d, 0xde, 0x6b, 0xdc, 0x3f, 0xb4, 0x07, 0x4e, 0x7d, 0xb9, 0xc0, 0xbc, 0xc8, 0x0c, + 0x4a, 0x0b, 0x8b, 0x30, 0x20, 0xf5, 0x6a, 0x43, 0xda, 0x59, 0xd6, 0xc3, 0x26, 0xda, 0x83, 0x4d, + 0x8b, 0x50, 0xf3, 0x3d, 0xdb, 0x18, 0xce, 0x80, 0xd7, 0x81, 0x89, 0xa5, 0x8e, 0xa1, 0x26, 0xa0, + 0x11, 0x31, 0x7f, 0x6c, 0x79, 0xc4, 0xe7, 0xfe, 0x63, 0x27, 0x6e, 0x8d, 0x9d, 0xb8, 0x29, 0x23, + 0x2a, 0x06, 0x35, 0xdb, 0x89, 0x94, 0xdb, 0x67, 0x78, 0x12, 0x70, 0x83, 0xfe, 0x44, 0xdf, 0x01, + 0xe5, 0x0d, 0x05, 0x11, 0xdc, 0x49, 0xbf, 0x48, 0x21, 0xe4, 0x73, 0x3c, 0xe1, 0x38, 0xb9, 0xe4, + 0x0f, 0x4a, 0xdf, 0x97, 0xb4, 0xbf, 0x2b, 0x70, 0x8b, 0x1e, 0x48, 0x1f, 0x87, 0x90, 0x4d, 0x40, + 0xe1, 0xef, 0x17, 0x43, 0xc3, 0x1f, 0x38, 0xde, 0x28, 0xd8, 0x32, 0x15, 0x3d, 0x65, 0x24, 0x4e, + 0x60, 0x25, 0x49, 0xe0, 0x71, 0x16, 0x81, 0xcb, 0x8c, 0xc0, 0x3f, 0x62, 0x04, 0xce, 0x01, 0x7c, + 0x7d, 0xf6, 0x56, 0xb2, 0xd8, 0xbb, 0xbc, 0x20, 0x7b, 0xab, 0xd7, 0x61, 0x2f, 0x14, 0x63, 0x6f, + 0xed, 0xca, 0xec, 0x5d, 0xf9, 0xd8, 0xec, 0xfd, 0xb7, 0x04, 0x8d, 0xf9, 0xc1, 0x5c, 0xf4, 0x5e, + 0x2d, 0x46, 0x53, 0x4e, 0x46, 0x33, 0xdd, 0x1f, 0x4b, 0x59, 0xfe, 0x10, 0xa3, 0xa1, 0x44, 0xa3, + 0x71, 0x17, 0xca, 0x1e, 0x26, 0xe3, 0x61, 0xc8, 0xd0, 0x4f, 0x19, 0x43, 0xa7, 0x60, 0x31, 0x71, + 0xf5, 0x40, 0x40, 0x7b, 0xaf, 0xc0, 0xad, 0x27, 0xfd, 0xfe, 0xff, 0x56, 0xae, 0xe6, 0x00, 0xfe, + 0x7f, 0xae, 0x5e, 0x37, 0x57, 0x69, 0x36, 0x12, 0x7c, 0x5e, 0x5f, 0xe5, 0xf7, 0x24, 0x82, 0xcf, + 0x6f, 0x32, 0x7b, 0xe7, 0x87, 0xf7, 0xbf, 0x29, 0x7b, 0xff, 0x25, 0xc3, 0x57, 0xed, 0xe9, 0x5e, + 0x45, 0xdd, 0x79, 0x8d, 0x0c, 0xce, 0xfc, 0xbe, 0x16, 0xb3, 0x5b, 0x8e, 0x65, 0x77, 0xfe, 0xf5, + 0x2f, 0x8b, 0x6e, 0xca, 0x1c, 0xba, 0x35, 0xa0, 0xe6, 0x4f, 0x5c, 0xfc, 0x1c, 0x4f, 0xa6, 0xb9, + 0x5b, 0xd5, 0xc5, 0x2e, 0x44, 0x60, 0x6b, 0x14, 0x8d, 0x71, 0x28, 0x5c, 0x61, 0x4e, 0x7b, 0xc4, + 0x9c, 0x56, 0xc0, 0x37, 0xcd, 0x4e, 0x42, 0x8d, 0x9e, 0xa1, 0x5a, 0x1d, 0x00, 0x4a, 0x4a, 0xc7, + 0xb9, 0x21, 0x15, 0xe5, 0x46, 0x29, 0x8b, 0x1b, 0xda, 0x3b, 0x09, 0x6e, 0xe7, 0x9b, 0xbe, 0x10, + 0x91, 0xbb, 0xb0, 0x41, 0x2c, 0xdb, 0x1c, 0xe2, 0x29, 0x10, 0xc6, 0x34, 0xfe, 0x7e, 0xf7, 0x25, + 0xbf, 0xc9, 0x88, 0xe3, 0xd3, 0x05, 0xb9, 0xa0, 0x9e, 0x36, 0x5b, 0x7b, 0x5f, 0x82, 0xed, 0x79, + 0xb3, 0x16, 0xb0, 0xd3, 0xcb, 0xda, 0xc7, 0xb9, 0xa5, 0x3f, 0xcc, 0xb5, 0xf4, 0xfa, 0x9b, 0xf8, + 0x52, 0x22, 0x90, 0x37, 0xb5, 0x89, 0xfd, 0x43, 0x82, 0xaf, 0x72, 0x3f, 0x88, 0x16, 0xfc, 0xc8, + 0xac, 0x91, 0x71, 0xaf, 0x87, 0x09, 0x11, 0x9c, 0x89, 0x98, 0x33, 0x99, 0xee, 0xf0, 0xe1, 0x50, + 0x17, 0xc5, 0xd0, 0x1e, 0xc0, 0xc0, 0xb0, 0x86, 0xb8, 0xcf, 0x26, 0x2d, 0x65, 0x4e, 0x12, 0xa4, + 0xb4, 0x77, 0x32, 0x7c, 0xd3, 0xc2, 0x43, 0xec, 0xe3, 0x8f, 0xb8, 0x3b, 0x7d, 0xf8, 0xfb, 0x45, + 0xfe, 0x27, 0x65, 0xd6, 0x7e, 0x57, 0xb9, 0xf2, 0xf1, 0xba, 0x9c, 0x79, 0x78, 0x1c, 0x67, 0x65, + 0x47, 0x95, 0xc5, 0x66, 0x2e, 0xcf, 0xd2, 0x67, 0x6a, 0x7f, 0x92, 0xe0, 0x4e, 0xa1, 0x78, 0x2d, + 0xc4, 0xbb, 0x2b, 0x9c, 0x69, 0x0e, 0xac, 0x46, 0x58, 0x85, 0xee, 0x43, 0x15, 0x87, 0x1d, 0x41, + 0xad, 0xe6, 0x93, 0x18, 0xf9, 0x66, 0x02, 0xa2, 0x6d, 0xa5, 0x2c, 0xdb, 0xe4, 0xc8, 0x83, 0xd7, + 0x3f, 0x4b, 0x50, 0x9d, 0xaa, 0x42, 0xa7, 0x59, 0xae, 0x95, 0x98, 0xe1, 0x77, 0xa3, 0x2b, 0x5f, + 0x7f, 0x97, 0x29, 0x15, 0x3d, 0x2e, 0xe4, 0x4c, 0x36, 0x68, 0xb1, 0xcb, 0x22, 0xdf, 0xb8, 0xa2, + 0xd7, 0x41, 0xfe, 0xec, 0xae, 0x84, 0xcf, 0xee, 0xea, 0xaf, 0xae, 0xb8, 0x93, 0xdd, 0x89, 0xee, + 0x64, 0x29, 0xf1, 0x13, 0xf6, 0xaf, 0x09, 0xac, 0x88, 0x43, 0xe8, 0x21, 0x2c, 0x9f, 0x05, 0xed, + 0x20, 0x80, 0x73, 0x19, 0x3a, 0x15, 0x5e, 0x20, 0x98, 0x6f, 0x25, 0xd8, 0x10, 0xca, 0x5d, 0xd4, + 0x47, 0xac, 0xde, 0x95, 0xa8, 0x6a, 0x49, 0x05, 0xaa, 0x5a, 0xa5, 0x2b, 0x57, 0xb5, 0xe4, 0x58, + 0x55, 0x6b, 0xef, 0x0f, 0x00, 0xf2, 0x88, 0x98, 0xe8, 0x25, 0xac, 0xc5, 0xaa, 0x51, 0xe8, 0xeb, + 0x14, 0x1f, 0x24, 0x2b, 0x60, 0xea, 0x37, 0x45, 0xc4, 0x88, 0x8b, 0x1c, 0xd8, 0x7c, 0x31, 0x1e, + 0x0e, 0x83, 0xec, 0xdd, 0x9f, 0x74, 0xf1, 0x39, 0xb3, 0xef, 0xdb, 0x29, 0xf3, 0xd3, 0x04, 0xe9, + 0x5a, 0xf7, 0x0a, 0xcb, 0xb2, 0xbc, 0xac, 0x04, 0x2f, 0xeb, 0x68, 0x2d, 0x78, 0x02, 0x09, 0xab, + 0x5e, 0xea, 0x7a, 0xb4, 0x83, 0xb8, 0xe8, 0x18, 0xa0, 0x85, 0x87, 0x1d, 0x62, 0xf2, 0x24, 0x48, + 0x59, 0x68, 0x36, 0x4c, 0x35, 0x7c, 0x99, 0x23, 0x41, 0x5c, 0xd4, 0x86, 0xf5, 0xf8, 0x9b, 0x37, + 0xaa, 0xb3, 0x85, 0x53, 0x5e, 0xe4, 0xd5, 0xcf, 0x33, 0x46, 0x88, 0x8b, 0x76, 0x61, 0x39, 0x2c, + 0x0f, 0x21, 0x6e, 0xb9, 0x50, 0x92, 0x52, 0x3f, 0x8d, 0xf5, 0x10, 0x17, 0x3d, 0x82, 0x15, 0xb1, + 0xe2, 0x82, 0x36, 0xa7, 0x4f, 0x40, 0x42, 0x7d, 0x48, 0xfd, 0x2c, 0xa5, 0x97, 0x9b, 0x1d, 0xaf, + 0x8b, 0x04, 0x66, 0xa7, 0xd4, 0x5f, 0x02, 0xb3, 0x53, 0x0b, 0x29, 0x6d, 0x58, 0x6f, 0xa7, 0x2b, + 0x6a, 0x67, 0x2a, 0x6a, 0xcf, 0x51, 0x94, 0xe2, 0xc8, 0x94, 0x4a, 0x80, 0xa0, 0x28, 0xe1, 0xc8, + 0x16, 0x63, 0xb9, 0xf8, 0x18, 0x8e, 0xbe, 0x15, 0x4a, 0xc7, 0x1e, 0xdb, 0xd5, 0x7a, 0xfa, 0x00, + 0x71, 0xd1, 0x19, 0x6c, 0xcf, 0x7b, 0x80, 0x41, 0xb7, 0x8b, 0x3c, 0xb8, 0xa9, 0x5f, 0x17, 0x90, + 0x22, 0x2e, 0xba, 0x80, 0x46, 0xde, 0x55, 0x1b, 0xed, 0x14, 0xfd, 0x98, 0x50, 0xef, 0x16, 0x94, + 0xe4, 0x28, 0xe7, 0x7d, 0xa8, 0x06, 0x28, 0x73, 0x9e, 0x2a, 0x02, 0x94, 0xb9, 0x5f, 0xbc, 0xbf, + 0x85, 0x5b, 0x91, 0xc3, 0x3d, 0x65, 0xbd, 0x7b, 0x61, 0x7e, 0x14, 0xb8, 0xb2, 0xa9, 0xf7, 0x8b, + 0x0b, 0x13, 0x77, 0xff, 0x8b, 0x5f, 0x7e, 0x7e, 0xe4, 0x62, 0xfb, 0xf4, 0xb0, 0x23, 0xfc, 0x45, + 0x64, 0x44, 0xcc, 0x47, 0x23, 0x62, 0xbe, 0x2a, 0xb3, 0xe6, 0x77, 0xff, 0x13, 0x00, 0x00, 0xff, + 0xff, 0x4c, 0x17, 0xe7, 0xd8, 0x8b, 0x22, 0x00, 0x00, +} diff --git a/tools/data-conversion/openim/proto/msg/msg.proto b/tools/data-conversion/openim/proto/msg/msg.proto new file mode 100644 index 000000000..d2fe5337e --- /dev/null +++ b/tools/data-conversion/openim/proto/msg/msg.proto @@ -0,0 +1,315 @@ +syntax = "proto3"; +import "Open-IM-Server/pkg/proto/sdk_ws/ws.proto"; +import "Open-IM-Server/pkg/proto/sdk_ws/wrappers.proto"; +option go_package = "Open_IM/pkg/proto/msg;msg"; +package msg; + +message MsgDataToMQ{ + string token =1; + string operationID = 2; + server_api_params.MsgData msgData = 3; +} + + +message MsgDataToDB { + server_api_params.MsgData msgData = 1; + string operationID = 2; + +} +message PushMsgDataToMQ{ + string OperationID = 1; + server_api_params.MsgData msgData = 2; + string pushToUserID = 3; +} +message MsgDataToMongoByMQ{ + uint64 lastSeq =1; + string aggregationID = 2; + repeated MsgDataToMQ messageList = 3; + string triggerID = 4; + + +} + +//message PullMessageReq { +// string UserID = 1; +// int64 SeqBegin = 2; +// int64 SeqEnd = 3; +// string OperationID = 4; +//} +// +//message PullMessageResp { +// int32 ErrCode = 1; +// string ErrMsg = 2; +// int64 MaxSeq = 3; +// int64 MinSeq = 4; +// repeated GatherFormat SingleUserMsg = 5; +// repeated GatherFormat GroupUserMsg = 6; +//} +//message PullMessageBySeqListReq{ +// string UserID = 1; +// string OperationID = 2; +// repeated int64 seqList =3; +//} +message GetMaxAndMinSeqReq { + string UserID = 1; + string OperationID = 2; +} +message GetMaxAndMinSeqResp { + int32 ErrCode = 1; + string ErrMsg = 2; + uint32 MaxSeq = 3; + uint32 MinSeq = 4; +} + +message SendMsgReq { + +string token =1; +string operationID = 2; +server_api_params.MsgData msgData = 3; + + +} + +message SendMsgResp { + int32 errCode = 1; + string errMsg = 2; + string serverMsgID = 4; + string clientMsgID = 5; + int64 sendTime = 6; + string ex = 7; +} + + +message ClearMsgReq{ + string userID = 1; + string opUserID = 2; + string operationID = 3; +} + + +message ClearMsgResp{ + int32 errCode = 1; + string errMsg = 2; +} + +message SetMsgMinSeqReq{ + string userID = 1; + string groupID = 2; + uint32 minSeq = 3; + string operationID = 4; + string opUserID = 5; +} +message SetMsgMinSeqResp{ + int32 errCode = 1; + string errMsg = 2; +} + +message SetSendMsgStatusReq{ + string operationID = 1; + int32 status = 2; +} + +message SetSendMsgStatusResp{ + int32 errCode = 1; + string errMsg = 2; +} + +message GetSendMsgStatusReq{ + string operationID = 1; +} + +message GetSendMsgStatusResp{ + int32 errCode = 1; + string errMsg = 2; + int32 status = 3; +} +message DelSuperGroupMsgReq{ + string opUserID = 1; + string userID = 2; + string groupID = 3; + string operationID = 4; +} +message DelSuperGroupMsgResp{ + int32 errCode = 1; + string errMsg = 2; +} +message GetSuperGroupMsgReq{ + string operationID = 1; + uint32 Seq = 2; + string groupID = 3; + +} +message GetSuperGroupMsgResp{ + int32 errCode = 1; + string errMsg = 2; + server_api_params.MsgData msgData = 3; +} +message GetWriteDiffMsgReq{ + string operationID = 1; + uint32 Seq = 2; + + } +message GetWriteDiffMsgResp{ + int32 errCode = 1; + string errMsg = 2; + server_api_params.MsgData msgData = 3; +} + +message ModifyMessageReactionExtensionsReq { + string operationID = 1; + string sourceID = 2; + string opUserID = 3; + int32 sessionType = 4; + map reactionExtensionList = 5; + string clientMsgID = 6; + google.protobuf.StringValue ex = 7; + google.protobuf.StringValue attachedInfo = 8; + bool isReact = 9; + bool isExternalExtensions = 10; + int64 msgFirstModifyTime = 11; +} +message SetMessageReactionExtensionsReq { + string operationID = 1; + string sourceID = 2; + string opUserID = 3; + int32 opUserIDPlatformID = 4; + int32 sessionType = 5; + map reactionExtensionList = 6; + string clientMsgID = 7; + google.protobuf.StringValue ex = 8; + google.protobuf.StringValue attachedInfo = 9; + bool isReact = 10; + bool isExternalExtensions = 11; + int64 msgFirstModifyTime = 12; +} +message SetMessageReactionExtensionsResp { + int32 errCode = 1; + string errMsg = 2; + string clientMsgID = 3; + int64 msgFirstModifyTime = 4; + bool isReact = 5; + repeated KeyValueResp result = 6; +} +message AddMessageReactionExtensionsReq { + string operationID = 1; + string sourceID = 2; + string opUserID = 3; + int32 opUserIDPlatformID = 4; + int32 sessionType = 5; + map reactionExtensionList = 6; + string clientMsgID = 7; + google.protobuf.StringValue ex = 8; + google.protobuf.StringValue attachedInfo = 9; + bool isReact = 10; + bool isExternalExtensions = 11; + int64 msgFirstModifyTime = 12; + uint32 seq = 13; +} +message AddMessageReactionExtensionsResp { + int32 errCode = 1; + string errMsg = 2; + string clientMsgID = 3; + int64 msgFirstModifyTime = 4; + bool isReact = 5; + repeated KeyValueResp result = 6; +} + + +message GetMessageListReactionExtensionsReq { + string operationID = 1; + string opUserID = 2; + string sourceID = 3; + int32 sessionType = 4; + bool isExternalExtensions = 5; + message MessageReactionKey { + string clientMsgID = 1; + int64 msgFirstModifyTime = 2; + } + repeated string typeKeyList = 6; + repeated MessageReactionKey messageReactionKeyList = 7; +} +message GetMessageListReactionExtensionsResp{ + int32 errCode = 1; + string errMsg = 2; + repeated SingleMessageExtensionResult singleMessageResult =3; + +} +message SingleMessageExtensionResult { + int32 errCode = 1; + string errMsg = 2; + map reactionExtensionList = 3; + string clientMsgID = 4; +} + + +message ModifyMessageReactionExtensionsResp { + int32 errCode = 1; + string errMsg = 2; + repeated ExtendMsgResp successList = 3; + repeated ExtendMsgResp failedList = 4; +} + +message DeleteMessageListReactionExtensionsReq { + string operationID = 1; + string opUserID = 2; + string sourceID = 3; + int32 opUserIDPlatformID = 4; + int32 sessionType = 5; + string clientMsgID = 6; + bool isExternalExtensions = 7; + int64 msgFirstModifyTime = 8; + repeated server_api_params.KeyValue reactionExtensionList = 9; +} + +message DeleteMessageListReactionExtensionsResp { + int32 errCode = 1; + string errMsg = 2; + repeated KeyValueResp result = 6; +} + +message ExtendMsgResp { + ExtendMsg extendMsg = 1; + int32 errCode = 2; + string errMsg = 3; +} + +message ExtendMsg { + map reactionExtensionList = 1; + string clientMsgID = 2; + int64 msgFirstModifyTime = 3; + string attachedInfo = 4; + string ex = 5; +} + +message KeyValueResp { + server_api_params.KeyValue keyValue = 1; + int32 errCode = 2; + string errMsg = 3; +} + +message MsgDataToModifyByMQ{ + string aggregationID = 1; + repeated MsgDataToMQ messageList = 2; + string triggerID = 3; +} + + +service msg { + rpc GetMaxAndMinSeq(server_api_params.GetMaxAndMinSeqReq) returns(server_api_params.GetMaxAndMinSeqResp); + rpc PullMessageBySeqList(server_api_params.PullMessageBySeqListReq) returns(server_api_params.PullMessageBySeqListResp); + rpc SendMsg(SendMsgReq) returns(SendMsgResp); + rpc DelMsgList(server_api_params.DelMsgListReq) returns(server_api_params.DelMsgListResp); + rpc DelSuperGroupMsg(DelSuperGroupMsgReq) returns(DelSuperGroupMsgResp); + rpc ClearMsg(ClearMsgReq) returns(ClearMsgResp); + rpc SetMsgMinSeq(SetMsgMinSeqReq) returns(SetMsgMinSeqResp); + rpc SetSendMsgStatus(SetSendMsgStatusReq) returns(SetSendMsgStatusResp); + rpc GetSendMsgStatus(GetSendMsgStatusReq) returns(GetSendMsgStatusResp); + rpc GetSuperGroupMsg(GetSuperGroupMsgReq) returns(GetSuperGroupMsgResp); + rpc GetWriteDiffMsg(GetWriteDiffMsgReq) returns(GetWriteDiffMsgResp); + + // modify msg + rpc SetMessageReactionExtensions(SetMessageReactionExtensionsReq) returns(SetMessageReactionExtensionsResp); + rpc GetMessageListReactionExtensions(GetMessageListReactionExtensionsReq) returns(GetMessageListReactionExtensionsResp); + rpc AddMessageReactionExtensions(AddMessageReactionExtensionsReq) returns(AddMessageReactionExtensionsResp); + rpc DeleteMessageReactionExtensions(DeleteMessageListReactionExtensionsReq) returns(DeleteMessageListReactionExtensionsResp); +} diff --git a/tools/data-conversion/openim/proto/sdk_ws/wrappers.proto b/tools/data-conversion/openim/proto/sdk_ws/wrappers.proto new file mode 100644 index 000000000..c571f0968 --- /dev/null +++ b/tools/data-conversion/openim/proto/sdk_ws/wrappers.proto @@ -0,0 +1,123 @@ +// Protocol Buffers - Google's data interchange format +// Copyright 2008 Google Inc. All rights reserved. +// https://developers.google.com/protocol-buffers/ +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +// Wrappers for primitive (non-message) types. These types are useful +// for embedding primitives in the `google.protobuf.Any` type and for places +// where we need to distinguish between the absence of a primitive +// typed field and its default value. +// +// These wrappers have no meaningful use within repeated fields as they lack +// the ability to detect presence on individual elements. +// These wrappers have no meaningful use within a map or a oneof since +// individual entries of a map or fields of a oneof can already detect presence. + +syntax = "proto3"; + +package google.protobuf; + +option csharp_namespace = "Google.Protobuf.WellKnownTypes"; +option cc_enable_arenas = true; +option go_package = "google.golang.org/protobuf/types/known/wrapperspb"; +option java_package = "com.google.protobuf"; +option java_outer_classname = "WrappersProto"; +option java_multiple_files = true; +option objc_class_prefix = "GPB"; + +// 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/tools/data-conversion/openim/proto/sdk_ws/ws.pb.go b/tools/data-conversion/openim/proto/sdk_ws/ws.pb.go new file mode 100644 index 000000000..097280860 --- /dev/null +++ b/tools/data-conversion/openim/proto/sdk_ws/ws.pb.go @@ -0,0 +1,6622 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// source: sdk_ws/ws.proto + +package server_api_params // import "Open_IM/pkg/proto/sdk_ws" + +import proto "github.com/golang/protobuf/proto" +import fmt "fmt" +import math "math" +import wrapperspb "google.golang.org/protobuf/types/known/wrapperspb" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package + +type GroupInfo 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:"varint,13,opt,name=needVerification" json:"needVerification,omitempty"` + LookMemberInfo int32 `protobuf:"varint,14,opt,name=lookMemberInfo" json:"lookMemberInfo,omitempty"` + ApplyMemberFriend int32 `protobuf:"varint,15,opt,name=applyMemberFriend" json:"applyMemberFriend,omitempty"` + NotificationUpdateTime uint32 `protobuf:"varint,16,opt,name=notificationUpdateTime" json:"notificationUpdateTime,omitempty"` + NotificationUserID string `protobuf:"bytes,17,opt,name=notificationUserID" json:"notificationUserID,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GroupInfo) Reset() { *m = GroupInfo{} } +func (m *GroupInfo) String() string { return proto.CompactTextString(m) } +func (*GroupInfo) ProtoMessage() {} +func (*GroupInfo) Descriptor() ([]byte, []int) { + return fileDescriptor_ws_bc78a4975e7e5f46, []int{0} +} +func (m *GroupInfo) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GroupInfo.Unmarshal(m, b) +} +func (m *GroupInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GroupInfo.Marshal(b, m, deterministic) +} +func (dst *GroupInfo) XXX_Merge(src proto.Message) { + xxx_messageInfo_GroupInfo.Merge(dst, src) +} +func (m *GroupInfo) XXX_Size() int { + return xxx_messageInfo_GroupInfo.Size(m) +} +func (m *GroupInfo) XXX_DiscardUnknown() { + xxx_messageInfo_GroupInfo.DiscardUnknown(m) +} + +var xxx_messageInfo_GroupInfo proto.InternalMessageInfo + +func (m *GroupInfo) GetGroupID() string { + if m != nil { + return m.GroupID + } + return "" +} + +func (m *GroupInfo) GetGroupName() string { + if m != nil { + return m.GroupName + } + return "" +} + +func (m *GroupInfo) GetNotification() string { + if m != nil { + return m.Notification + } + return "" +} + +func (m *GroupInfo) GetIntroduction() string { + if m != nil { + return m.Introduction + } + return "" +} + +func (m *GroupInfo) GetFaceURL() string { + if m != nil { + return m.FaceURL + } + return "" +} + +func (m *GroupInfo) GetOwnerUserID() string { + if m != nil { + return m.OwnerUserID + } + return "" +} + +func (m *GroupInfo) GetCreateTime() uint32 { + if m != nil { + return m.CreateTime + } + return 0 +} + +func (m *GroupInfo) GetMemberCount() uint32 { + if m != nil { + return m.MemberCount + } + return 0 +} + +func (m *GroupInfo) GetEx() string { + if m != nil { + return m.Ex + } + return "" +} + +func (m *GroupInfo) GetStatus() int32 { + if m != nil { + return m.Status + } + return 0 +} + +func (m *GroupInfo) GetCreatorUserID() string { + if m != nil { + return m.CreatorUserID + } + return "" +} + +func (m *GroupInfo) GetGroupType() int32 { + if m != nil { + return m.GroupType + } + return 0 +} + +func (m *GroupInfo) GetNeedVerification() int32 { + if m != nil { + return m.NeedVerification + } + return 0 +} + +func (m *GroupInfo) GetLookMemberInfo() int32 { + if m != nil { + return m.LookMemberInfo + } + return 0 +} + +func (m *GroupInfo) GetApplyMemberFriend() int32 { + if m != nil { + return m.ApplyMemberFriend + } + return 0 +} + +func (m *GroupInfo) GetNotificationUpdateTime() uint32 { + if m != nil { + return m.NotificationUpdateTime + } + return 0 +} + +func (m *GroupInfo) GetNotificationUserID() string { + if m != nil { + return m.NotificationUserID + } + return "" +} + +type GroupInfoForSet 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"` + Ex string `protobuf:"bytes,6,opt,name=ex" json:"ex,omitempty"` + NeedVerification *wrapperspb.Int32Value `protobuf:"bytes,7,opt,name=needVerification" json:"needVerification,omitempty"` + LookMemberInfo *wrapperspb.Int32Value `protobuf:"bytes,8,opt,name=lookMemberInfo" json:"lookMemberInfo,omitempty"` + ApplyMemberFriend *wrapperspb.Int32Value `protobuf:"bytes,9,opt,name=applyMemberFriend" json:"applyMemberFriend,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GroupInfoForSet) Reset() { *m = GroupInfoForSet{} } +func (m *GroupInfoForSet) String() string { return proto.CompactTextString(m) } +func (*GroupInfoForSet) ProtoMessage() {} +func (*GroupInfoForSet) Descriptor() ([]byte, []int) { + return fileDescriptor_ws_bc78a4975e7e5f46, []int{1} +} +func (m *GroupInfoForSet) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GroupInfoForSet.Unmarshal(m, b) +} +func (m *GroupInfoForSet) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GroupInfoForSet.Marshal(b, m, deterministic) +} +func (dst *GroupInfoForSet) XXX_Merge(src proto.Message) { + xxx_messageInfo_GroupInfoForSet.Merge(dst, src) +} +func (m *GroupInfoForSet) XXX_Size() int { + return xxx_messageInfo_GroupInfoForSet.Size(m) +} +func (m *GroupInfoForSet) XXX_DiscardUnknown() { + xxx_messageInfo_GroupInfoForSet.DiscardUnknown(m) +} + +var xxx_messageInfo_GroupInfoForSet proto.InternalMessageInfo + +func (m *GroupInfoForSet) GetGroupID() string { + if m != nil { + return m.GroupID + } + return "" +} + +func (m *GroupInfoForSet) GetGroupName() string { + if m != nil { + return m.GroupName + } + return "" +} + +func (m *GroupInfoForSet) GetNotification() string { + if m != nil { + return m.Notification + } + return "" +} + +func (m *GroupInfoForSet) GetIntroduction() string { + if m != nil { + return m.Introduction + } + return "" +} + +func (m *GroupInfoForSet) GetFaceURL() string { + if m != nil { + return m.FaceURL + } + return "" +} + +func (m *GroupInfoForSet) GetEx() string { + if m != nil { + return m.Ex + } + return "" +} + +func (m *GroupInfoForSet) GetNeedVerification() *wrapperspb.Int32Value { + if m != nil { + return m.NeedVerification + } + return nil +} + +func (m *GroupInfoForSet) GetLookMemberInfo() *wrapperspb.Int32Value { + if m != nil { + return m.LookMemberInfo + } + return nil +} + +func (m *GroupInfoForSet) GetApplyMemberFriend() *wrapperspb.Int32Value { + if m != nil { + return m.ApplyMemberFriend + } + return nil +} + +type GroupMemberFullInfo struct { + GroupID string `protobuf:"bytes,1,opt,name=groupID" json:"groupID,omitempty"` + UserID string `protobuf:"bytes,2,opt,name=userID" json:"userID,omitempty"` + RoleLevel int32 `protobuf:"varint,3,opt,name=roleLevel" json:"roleLevel,omitempty"` + JoinTime int32 `protobuf:"varint,4,opt,name=joinTime" json:"joinTime,omitempty"` + Nickname string `protobuf:"bytes,5,opt,name=nickname" json:"nickname,omitempty"` + FaceURL string `protobuf:"bytes,6,opt,name=faceURL" json:"faceURL,omitempty"` + AppMangerLevel int32 `protobuf:"varint,7,opt,name=appMangerLevel" json:"appMangerLevel,omitempty"` + JoinSource int32 `protobuf:"varint,8,opt,name=joinSource" json:"joinSource,omitempty"` + OperatorUserID string `protobuf:"bytes,9,opt,name=operatorUserID" json:"operatorUserID,omitempty"` + Ex string `protobuf:"bytes,10,opt,name=ex" json:"ex,omitempty"` + MuteEndTime uint32 `protobuf:"varint,11,opt,name=muteEndTime" json:"muteEndTime,omitempty"` + InviterUserID string `protobuf:"bytes,12,opt,name=inviterUserID" json:"inviterUserID,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GroupMemberFullInfo) Reset() { *m = GroupMemberFullInfo{} } +func (m *GroupMemberFullInfo) String() string { return proto.CompactTextString(m) } +func (*GroupMemberFullInfo) ProtoMessage() {} +func (*GroupMemberFullInfo) Descriptor() ([]byte, []int) { + return fileDescriptor_ws_bc78a4975e7e5f46, []int{2} +} +func (m *GroupMemberFullInfo) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GroupMemberFullInfo.Unmarshal(m, b) +} +func (m *GroupMemberFullInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GroupMemberFullInfo.Marshal(b, m, deterministic) +} +func (dst *GroupMemberFullInfo) XXX_Merge(src proto.Message) { + xxx_messageInfo_GroupMemberFullInfo.Merge(dst, src) +} +func (m *GroupMemberFullInfo) XXX_Size() int { + return xxx_messageInfo_GroupMemberFullInfo.Size(m) +} +func (m *GroupMemberFullInfo) XXX_DiscardUnknown() { + xxx_messageInfo_GroupMemberFullInfo.DiscardUnknown(m) +} + +var xxx_messageInfo_GroupMemberFullInfo proto.InternalMessageInfo + +func (m *GroupMemberFullInfo) GetGroupID() string { + if m != nil { + return m.GroupID + } + return "" +} + +func (m *GroupMemberFullInfo) GetUserID() string { + if m != nil { + return m.UserID + } + return "" +} + +func (m *GroupMemberFullInfo) GetRoleLevel() int32 { + if m != nil { + return m.RoleLevel + } + return 0 +} + +func (m *GroupMemberFullInfo) GetJoinTime() int32 { + if m != nil { + return m.JoinTime + } + return 0 +} + +func (m *GroupMemberFullInfo) GetNickname() string { + if m != nil { + return m.Nickname + } + return "" +} + +func (m *GroupMemberFullInfo) GetFaceURL() string { + if m != nil { + return m.FaceURL + } + return "" +} + +func (m *GroupMemberFullInfo) GetAppMangerLevel() int32 { + if m != nil { + return m.AppMangerLevel + } + return 0 +} + +func (m *GroupMemberFullInfo) GetJoinSource() int32 { + if m != nil { + return m.JoinSource + } + return 0 +} + +func (m *GroupMemberFullInfo) GetOperatorUserID() string { + if m != nil { + return m.OperatorUserID + } + return "" +} + +func (m *GroupMemberFullInfo) GetEx() string { + if m != nil { + return m.Ex + } + return "" +} + +func (m *GroupMemberFullInfo) GetMuteEndTime() uint32 { + if m != nil { + return m.MuteEndTime + } + return 0 +} + +func (m *GroupMemberFullInfo) GetInviterUserID() string { + if m != nil { + return m.InviterUserID + } + return "" +} + +type PublicUserInfo struct { + UserID string `protobuf:"bytes,1,opt,name=userID" json:"userID,omitempty"` + Nickname string `protobuf:"bytes,2,opt,name=nickname" json:"nickname,omitempty"` + FaceURL string `protobuf:"bytes,3,opt,name=faceURL" json:"faceURL,omitempty"` + Gender int32 `protobuf:"varint,4,opt,name=gender" json:"gender,omitempty"` + Ex string `protobuf:"bytes,5,opt,name=ex" json:"ex,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *PublicUserInfo) Reset() { *m = PublicUserInfo{} } +func (m *PublicUserInfo) String() string { return proto.CompactTextString(m) } +func (*PublicUserInfo) ProtoMessage() {} +func (*PublicUserInfo) Descriptor() ([]byte, []int) { + return fileDescriptor_ws_bc78a4975e7e5f46, []int{3} +} +func (m *PublicUserInfo) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_PublicUserInfo.Unmarshal(m, b) +} +func (m *PublicUserInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_PublicUserInfo.Marshal(b, m, deterministic) +} +func (dst *PublicUserInfo) XXX_Merge(src proto.Message) { + xxx_messageInfo_PublicUserInfo.Merge(dst, src) +} +func (m *PublicUserInfo) XXX_Size() int { + return xxx_messageInfo_PublicUserInfo.Size(m) +} +func (m *PublicUserInfo) XXX_DiscardUnknown() { + xxx_messageInfo_PublicUserInfo.DiscardUnknown(m) +} + +var xxx_messageInfo_PublicUserInfo proto.InternalMessageInfo + +func (m *PublicUserInfo) GetUserID() string { + if m != nil { + return m.UserID + } + return "" +} + +func (m *PublicUserInfo) GetNickname() string { + if m != nil { + return m.Nickname + } + return "" +} + +func (m *PublicUserInfo) GetFaceURL() string { + if m != nil { + return m.FaceURL + } + return "" +} + +func (m *PublicUserInfo) GetGender() int32 { + if m != nil { + return m.Gender + } + return 0 +} + +func (m *PublicUserInfo) GetEx() string { + if m != nil { + return m.Ex + } + return "" +} + +type UserInfo struct { + UserID string `protobuf:"bytes,1,opt,name=userID" json:"userID,omitempty"` + Nickname string `protobuf:"bytes,2,opt,name=nickname" json:"nickname,omitempty"` + FaceURL string `protobuf:"bytes,3,opt,name=faceURL" json:"faceURL,omitempty"` + Gender int32 `protobuf:"varint,4,opt,name=gender" json:"gender,omitempty"` + PhoneNumber string `protobuf:"bytes,5,opt,name=phoneNumber" json:"phoneNumber,omitempty"` + Birth uint32 `protobuf:"varint,6,opt,name=birth" json:"birth,omitempty"` + Email string `protobuf:"bytes,7,opt,name=email" json:"email,omitempty"` + Ex string `protobuf:"bytes,8,opt,name=ex" json:"ex,omitempty"` + CreateTime uint32 `protobuf:"varint,9,opt,name=createTime" json:"createTime,omitempty"` + AppMangerLevel int32 `protobuf:"varint,10,opt,name=appMangerLevel" json:"appMangerLevel,omitempty"` + GlobalRecvMsgOpt int32 `protobuf:"varint,11,opt,name=globalRecvMsgOpt" json:"globalRecvMsgOpt,omitempty"` + BirthStr string `protobuf:"bytes,12,opt,name=birthStr" json:"birthStr,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *UserInfo) Reset() { *m = UserInfo{} } +func (m *UserInfo) String() string { return proto.CompactTextString(m) } +func (*UserInfo) ProtoMessage() {} +func (*UserInfo) Descriptor() ([]byte, []int) { + return fileDescriptor_ws_bc78a4975e7e5f46, []int{4} +} +func (m *UserInfo) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_UserInfo.Unmarshal(m, b) +} +func (m *UserInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_UserInfo.Marshal(b, m, deterministic) +} +func (dst *UserInfo) XXX_Merge(src proto.Message) { + xxx_messageInfo_UserInfo.Merge(dst, src) +} +func (m *UserInfo) XXX_Size() int { + return xxx_messageInfo_UserInfo.Size(m) +} +func (m *UserInfo) XXX_DiscardUnknown() { + xxx_messageInfo_UserInfo.DiscardUnknown(m) +} + +var xxx_messageInfo_UserInfo proto.InternalMessageInfo + +func (m *UserInfo) GetUserID() string { + if m != nil { + return m.UserID + } + return "" +} + +func (m *UserInfo) GetNickname() string { + if m != nil { + return m.Nickname + } + return "" +} + +func (m *UserInfo) GetFaceURL() string { + if m != nil { + return m.FaceURL + } + return "" +} + +func (m *UserInfo) GetGender() int32 { + if m != nil { + return m.Gender + } + return 0 +} + +func (m *UserInfo) GetPhoneNumber() string { + if m != nil { + return m.PhoneNumber + } + return "" +} + +func (m *UserInfo) GetBirth() uint32 { + if m != nil { + return m.Birth + } + return 0 +} + +func (m *UserInfo) GetEmail() string { + if m != nil { + return m.Email + } + return "" +} + +func (m *UserInfo) GetEx() string { + if m != nil { + return m.Ex + } + return "" +} + +func (m *UserInfo) GetCreateTime() uint32 { + if m != nil { + return m.CreateTime + } + return 0 +} + +func (m *UserInfo) GetAppMangerLevel() int32 { + if m != nil { + return m.AppMangerLevel + } + return 0 +} + +func (m *UserInfo) GetGlobalRecvMsgOpt() int32 { + if m != nil { + return m.GlobalRecvMsgOpt + } + return 0 +} + +func (m *UserInfo) GetBirthStr() string { + if m != nil { + return m.BirthStr + } + return "" +} + +type FriendInfo struct { + OwnerUserID string `protobuf:"bytes,1,opt,name=ownerUserID" json:"ownerUserID,omitempty"` + Remark string `protobuf:"bytes,2,opt,name=remark" json:"remark,omitempty"` + CreateTime uint32 `protobuf:"varint,3,opt,name=createTime" json:"createTime,omitempty"` + FriendUser *UserInfo `protobuf:"bytes,4,opt,name=friendUser" json:"friendUser,omitempty"` + AddSource int32 `protobuf:"varint,5,opt,name=addSource" json:"addSource,omitempty"` + OperatorUserID string `protobuf:"bytes,6,opt,name=operatorUserID" json:"operatorUserID,omitempty"` + Ex string `protobuf:"bytes,7,opt,name=ex" json:"ex,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *FriendInfo) Reset() { *m = FriendInfo{} } +func (m *FriendInfo) String() string { return proto.CompactTextString(m) } +func (*FriendInfo) ProtoMessage() {} +func (*FriendInfo) Descriptor() ([]byte, []int) { + return fileDescriptor_ws_bc78a4975e7e5f46, []int{5} +} +func (m *FriendInfo) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_FriendInfo.Unmarshal(m, b) +} +func (m *FriendInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_FriendInfo.Marshal(b, m, deterministic) +} +func (dst *FriendInfo) XXX_Merge(src proto.Message) { + xxx_messageInfo_FriendInfo.Merge(dst, src) +} +func (m *FriendInfo) XXX_Size() int { + return xxx_messageInfo_FriendInfo.Size(m) +} +func (m *FriendInfo) XXX_DiscardUnknown() { + xxx_messageInfo_FriendInfo.DiscardUnknown(m) +} + +var xxx_messageInfo_FriendInfo proto.InternalMessageInfo + +func (m *FriendInfo) GetOwnerUserID() string { + if m != nil { + return m.OwnerUserID + } + return "" +} + +func (m *FriendInfo) GetRemark() string { + if m != nil { + return m.Remark + } + return "" +} + +func (m *FriendInfo) GetCreateTime() uint32 { + if m != nil { + return m.CreateTime + } + return 0 +} + +func (m *FriendInfo) GetFriendUser() *UserInfo { + if m != nil { + return m.FriendUser + } + return nil +} + +func (m *FriendInfo) GetAddSource() int32 { + if m != nil { + return m.AddSource + } + return 0 +} + +func (m *FriendInfo) GetOperatorUserID() string { + if m != nil { + return m.OperatorUserID + } + return "" +} + +func (m *FriendInfo) GetEx() string { + if m != nil { + return m.Ex + } + return "" +} + +type BlackInfo struct { + OwnerUserID string `protobuf:"bytes,1,opt,name=ownerUserID" json:"ownerUserID,omitempty"` + CreateTime uint32 `protobuf:"varint,2,opt,name=createTime" json:"createTime,omitempty"` + BlackUserInfo *PublicUserInfo `protobuf:"bytes,3,opt,name=blackUserInfo" json:"blackUserInfo,omitempty"` + AddSource int32 `protobuf:"varint,4,opt,name=addSource" json:"addSource,omitempty"` + OperatorUserID string `protobuf:"bytes,5,opt,name=operatorUserID" json:"operatorUserID,omitempty"` + Ex string `protobuf:"bytes,6,opt,name=ex" json:"ex,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *BlackInfo) Reset() { *m = BlackInfo{} } +func (m *BlackInfo) String() string { return proto.CompactTextString(m) } +func (*BlackInfo) ProtoMessage() {} +func (*BlackInfo) Descriptor() ([]byte, []int) { + return fileDescriptor_ws_bc78a4975e7e5f46, []int{6} +} +func (m *BlackInfo) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_BlackInfo.Unmarshal(m, b) +} +func (m *BlackInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_BlackInfo.Marshal(b, m, deterministic) +} +func (dst *BlackInfo) XXX_Merge(src proto.Message) { + xxx_messageInfo_BlackInfo.Merge(dst, src) +} +func (m *BlackInfo) XXX_Size() int { + return xxx_messageInfo_BlackInfo.Size(m) +} +func (m *BlackInfo) XXX_DiscardUnknown() { + xxx_messageInfo_BlackInfo.DiscardUnknown(m) +} + +var xxx_messageInfo_BlackInfo proto.InternalMessageInfo + +func (m *BlackInfo) GetOwnerUserID() string { + if m != nil { + return m.OwnerUserID + } + return "" +} + +func (m *BlackInfo) GetCreateTime() uint32 { + if m != nil { + return m.CreateTime + } + return 0 +} + +func (m *BlackInfo) GetBlackUserInfo() *PublicUserInfo { + if m != nil { + return m.BlackUserInfo + } + return nil +} + +func (m *BlackInfo) GetAddSource() int32 { + if m != nil { + return m.AddSource + } + return 0 +} + +func (m *BlackInfo) GetOperatorUserID() string { + if m != nil { + return m.OperatorUserID + } + return "" +} + +func (m *BlackInfo) GetEx() string { + if m != nil { + return m.Ex + } + return "" +} + +type GroupRequest struct { + UserInfo *PublicUserInfo `protobuf:"bytes,1,opt,name=userInfo" json:"userInfo,omitempty"` + GroupInfo *GroupInfo `protobuf:"bytes,2,opt,name=groupInfo" json:"groupInfo,omitempty"` + HandleResult int32 `protobuf:"varint,3,opt,name=handleResult" json:"handleResult,omitempty"` + ReqMsg string `protobuf:"bytes,4,opt,name=reqMsg" json:"reqMsg,omitempty"` + HandleMsg string `protobuf:"bytes,5,opt,name=handleMsg" json:"handleMsg,omitempty"` + ReqTime uint32 `protobuf:"varint,6,opt,name=reqTime" json:"reqTime,omitempty"` + HandleUserID string `protobuf:"bytes,7,opt,name=handleUserID" json:"handleUserID,omitempty"` + HandleTime uint32 `protobuf:"varint,8,opt,name=handleTime" json:"handleTime,omitempty"` + Ex string `protobuf:"bytes,9,opt,name=ex" json:"ex,omitempty"` + JoinSource int32 `protobuf:"varint,10,opt,name=joinSource" json:"joinSource,omitempty"` + InviterUserID string `protobuf:"bytes,11,opt,name=inviterUserID" json:"inviterUserID,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GroupRequest) Reset() { *m = GroupRequest{} } +func (m *GroupRequest) String() string { return proto.CompactTextString(m) } +func (*GroupRequest) ProtoMessage() {} +func (*GroupRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_ws_bc78a4975e7e5f46, []int{7} +} +func (m *GroupRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GroupRequest.Unmarshal(m, b) +} +func (m *GroupRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GroupRequest.Marshal(b, m, deterministic) +} +func (dst *GroupRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_GroupRequest.Merge(dst, src) +} +func (m *GroupRequest) XXX_Size() int { + return xxx_messageInfo_GroupRequest.Size(m) +} +func (m *GroupRequest) XXX_DiscardUnknown() { + xxx_messageInfo_GroupRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_GroupRequest proto.InternalMessageInfo + +func (m *GroupRequest) GetUserInfo() *PublicUserInfo { + if m != nil { + return m.UserInfo + } + return nil +} + +func (m *GroupRequest) GetGroupInfo() *GroupInfo { + if m != nil { + return m.GroupInfo + } + return nil +} + +func (m *GroupRequest) GetHandleResult() int32 { + if m != nil { + return m.HandleResult + } + return 0 +} + +func (m *GroupRequest) GetReqMsg() string { + if m != nil { + return m.ReqMsg + } + return "" +} + +func (m *GroupRequest) GetHandleMsg() string { + if m != nil { + return m.HandleMsg + } + return "" +} + +func (m *GroupRequest) GetReqTime() uint32 { + if m != nil { + return m.ReqTime + } + return 0 +} + +func (m *GroupRequest) GetHandleUserID() string { + if m != nil { + return m.HandleUserID + } + return "" +} + +func (m *GroupRequest) GetHandleTime() uint32 { + if m != nil { + return m.HandleTime + } + return 0 +} + +func (m *GroupRequest) GetEx() string { + if m != nil { + return m.Ex + } + return "" +} + +func (m *GroupRequest) GetJoinSource() int32 { + if m != nil { + return m.JoinSource + } + return 0 +} + +func (m *GroupRequest) GetInviterUserID() string { + if m != nil { + return m.InviterUserID + } + return "" +} + +type FriendRequest struct { + FromUserID string `protobuf:"bytes,1,opt,name=fromUserID" json:"fromUserID,omitempty"` + FromNickname string `protobuf:"bytes,2,opt,name=fromNickname" json:"fromNickname,omitempty"` + FromFaceURL string `protobuf:"bytes,3,opt,name=fromFaceURL" json:"fromFaceURL,omitempty"` + FromGender int32 `protobuf:"varint,4,opt,name=fromGender" json:"fromGender,omitempty"` + ToUserID string `protobuf:"bytes,5,opt,name=toUserID" json:"toUserID,omitempty"` + ToNickname string `protobuf:"bytes,6,opt,name=toNickname" json:"toNickname,omitempty"` + ToFaceURL string `protobuf:"bytes,7,opt,name=toFaceURL" json:"toFaceURL,omitempty"` + ToGender int32 `protobuf:"varint,8,opt,name=toGender" json:"toGender,omitempty"` + HandleResult int32 `protobuf:"varint,9,opt,name=handleResult" json:"handleResult,omitempty"` + ReqMsg string `protobuf:"bytes,10,opt,name=reqMsg" json:"reqMsg,omitempty"` + CreateTime uint32 `protobuf:"varint,11,opt,name=createTime" json:"createTime,omitempty"` + HandlerUserID string `protobuf:"bytes,12,opt,name=handlerUserID" json:"handlerUserID,omitempty"` + HandleMsg string `protobuf:"bytes,13,opt,name=handleMsg" json:"handleMsg,omitempty"` + HandleTime uint32 `protobuf:"varint,14,opt,name=handleTime" json:"handleTime,omitempty"` + Ex string `protobuf:"bytes,15,opt,name=ex" json:"ex,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *FriendRequest) Reset() { *m = FriendRequest{} } +func (m *FriendRequest) String() string { return proto.CompactTextString(m) } +func (*FriendRequest) ProtoMessage() {} +func (*FriendRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_ws_bc78a4975e7e5f46, []int{8} +} +func (m *FriendRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_FriendRequest.Unmarshal(m, b) +} +func (m *FriendRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_FriendRequest.Marshal(b, m, deterministic) +} +func (dst *FriendRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_FriendRequest.Merge(dst, src) +} +func (m *FriendRequest) XXX_Size() int { + return xxx_messageInfo_FriendRequest.Size(m) +} +func (m *FriendRequest) XXX_DiscardUnknown() { + xxx_messageInfo_FriendRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_FriendRequest proto.InternalMessageInfo + +func (m *FriendRequest) GetFromUserID() string { + if m != nil { + return m.FromUserID + } + return "" +} + +func (m *FriendRequest) GetFromNickname() string { + if m != nil { + return m.FromNickname + } + return "" +} + +func (m *FriendRequest) GetFromFaceURL() string { + if m != nil { + return m.FromFaceURL + } + return "" +} + +func (m *FriendRequest) GetFromGender() int32 { + if m != nil { + return m.FromGender + } + return 0 +} + +func (m *FriendRequest) GetToUserID() string { + if m != nil { + return m.ToUserID + } + return "" +} + +func (m *FriendRequest) GetToNickname() string { + if m != nil { + return m.ToNickname + } + return "" +} + +func (m *FriendRequest) GetToFaceURL() string { + if m != nil { + return m.ToFaceURL + } + return "" +} + +func (m *FriendRequest) GetToGender() int32 { + if m != nil { + return m.ToGender + } + return 0 +} + +func (m *FriendRequest) GetHandleResult() int32 { + if m != nil { + return m.HandleResult + } + return 0 +} + +func (m *FriendRequest) GetReqMsg() string { + if m != nil { + return m.ReqMsg + } + return "" +} + +func (m *FriendRequest) GetCreateTime() uint32 { + if m != nil { + return m.CreateTime + } + return 0 +} + +func (m *FriendRequest) GetHandlerUserID() string { + if m != nil { + return m.HandlerUserID + } + return "" +} + +func (m *FriendRequest) GetHandleMsg() string { + if m != nil { + return m.HandleMsg + } + return "" +} + +func (m *FriendRequest) GetHandleTime() uint32 { + if m != nil { + return m.HandleTime + } + return 0 +} + +func (m *FriendRequest) GetEx() string { + if m != nil { + return m.Ex + } + return "" +} + +type Department struct { + DepartmentID string `protobuf:"bytes,1,opt,name=departmentID" json:"departmentID,omitempty"` + FaceURL string `protobuf:"bytes,2,opt,name=faceURL" json:"faceURL,omitempty"` + Name string `protobuf:"bytes,3,opt,name=name" json:"name,omitempty"` + ParentID string `protobuf:"bytes,4,opt,name=parentID" json:"parentID,omitempty"` + Order int32 `protobuf:"varint,5,opt,name=order" json:"order,omitempty"` + DepartmentType int32 `protobuf:"varint,6,opt,name=departmentType" json:"departmentType,omitempty"` + CreateTime uint32 `protobuf:"varint,7,opt,name=createTime" json:"createTime,omitempty"` + SubDepartmentNum uint32 `protobuf:"varint,8,opt,name=subDepartmentNum" json:"subDepartmentNum,omitempty"` + MemberNum uint32 `protobuf:"varint,9,opt,name=memberNum" json:"memberNum,omitempty"` + Ex string `protobuf:"bytes,10,opt,name=ex" json:"ex,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Department) Reset() { *m = Department{} } +func (m *Department) String() string { return proto.CompactTextString(m) } +func (*Department) ProtoMessage() {} +func (*Department) Descriptor() ([]byte, []int) { + return fileDescriptor_ws_bc78a4975e7e5f46, []int{9} +} +func (m *Department) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Department.Unmarshal(m, b) +} +func (m *Department) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Department.Marshal(b, m, deterministic) +} +func (dst *Department) XXX_Merge(src proto.Message) { + xxx_messageInfo_Department.Merge(dst, src) +} +func (m *Department) XXX_Size() int { + return xxx_messageInfo_Department.Size(m) +} +func (m *Department) XXX_DiscardUnknown() { + xxx_messageInfo_Department.DiscardUnknown(m) +} + +var xxx_messageInfo_Department proto.InternalMessageInfo + +func (m *Department) GetDepartmentID() string { + if m != nil { + return m.DepartmentID + } + return "" +} + +func (m *Department) GetFaceURL() string { + if m != nil { + return m.FaceURL + } + return "" +} + +func (m *Department) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *Department) GetParentID() string { + if m != nil { + return m.ParentID + } + return "" +} + +func (m *Department) GetOrder() int32 { + if m != nil { + return m.Order + } + return 0 +} + +func (m *Department) GetDepartmentType() int32 { + if m != nil { + return m.DepartmentType + } + return 0 +} + +func (m *Department) GetCreateTime() uint32 { + if m != nil { + return m.CreateTime + } + return 0 +} + +func (m *Department) GetSubDepartmentNum() uint32 { + if m != nil { + return m.SubDepartmentNum + } + return 0 +} + +func (m *Department) GetMemberNum() uint32 { + if m != nil { + return m.MemberNum + } + return 0 +} + +func (m *Department) GetEx() string { + if m != nil { + return m.Ex + } + return "" +} + +type OrganizationUser struct { + UserID string `protobuf:"bytes,1,opt,name=userID" json:"userID,omitempty"` + Nickname string `protobuf:"bytes,2,opt,name=nickname" json:"nickname,omitempty"` + EnglishName string `protobuf:"bytes,3,opt,name=englishName" json:"englishName,omitempty"` + FaceURL string `protobuf:"bytes,4,opt,name=faceURL" json:"faceURL,omitempty"` + Gender int32 `protobuf:"varint,5,opt,name=gender" json:"gender,omitempty"` + Mobile string `protobuf:"bytes,6,opt,name=mobile" json:"mobile,omitempty"` + Telephone string `protobuf:"bytes,7,opt,name=telephone" json:"telephone,omitempty"` + Birth uint32 `protobuf:"varint,8,opt,name=birth" json:"birth,omitempty"` + Email string `protobuf:"bytes,9,opt,name=email" json:"email,omitempty"` + CreateTime uint32 `protobuf:"varint,10,opt,name=createTime" json:"createTime,omitempty"` + Ex string `protobuf:"bytes,11,opt,name=ex" json:"ex,omitempty"` + BirthStr string `protobuf:"bytes,12,opt,name=birthStr" json:"birthStr,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *OrganizationUser) Reset() { *m = OrganizationUser{} } +func (m *OrganizationUser) String() string { return proto.CompactTextString(m) } +func (*OrganizationUser) ProtoMessage() {} +func (*OrganizationUser) Descriptor() ([]byte, []int) { + return fileDescriptor_ws_bc78a4975e7e5f46, []int{10} +} +func (m *OrganizationUser) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_OrganizationUser.Unmarshal(m, b) +} +func (m *OrganizationUser) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_OrganizationUser.Marshal(b, m, deterministic) +} +func (dst *OrganizationUser) XXX_Merge(src proto.Message) { + xxx_messageInfo_OrganizationUser.Merge(dst, src) +} +func (m *OrganizationUser) XXX_Size() int { + return xxx_messageInfo_OrganizationUser.Size(m) +} +func (m *OrganizationUser) XXX_DiscardUnknown() { + xxx_messageInfo_OrganizationUser.DiscardUnknown(m) +} + +var xxx_messageInfo_OrganizationUser proto.InternalMessageInfo + +func (m *OrganizationUser) GetUserID() string { + if m != nil { + return m.UserID + } + return "" +} + +func (m *OrganizationUser) GetNickname() string { + if m != nil { + return m.Nickname + } + return "" +} + +func (m *OrganizationUser) GetEnglishName() string { + if m != nil { + return m.EnglishName + } + return "" +} + +func (m *OrganizationUser) GetFaceURL() string { + if m != nil { + return m.FaceURL + } + return "" +} + +func (m *OrganizationUser) GetGender() int32 { + if m != nil { + return m.Gender + } + return 0 +} + +func (m *OrganizationUser) GetMobile() string { + if m != nil { + return m.Mobile + } + return "" +} + +func (m *OrganizationUser) GetTelephone() string { + if m != nil { + return m.Telephone + } + return "" +} + +func (m *OrganizationUser) GetBirth() uint32 { + if m != nil { + return m.Birth + } + return 0 +} + +func (m *OrganizationUser) GetEmail() string { + if m != nil { + return m.Email + } + return "" +} + +func (m *OrganizationUser) GetCreateTime() uint32 { + if m != nil { + return m.CreateTime + } + return 0 +} + +func (m *OrganizationUser) GetEx() string { + if m != nil { + return m.Ex + } + return "" +} + +func (m *OrganizationUser) GetBirthStr() string { + if m != nil { + return m.BirthStr + } + return "" +} + +type DepartmentMember struct { + UserID string `protobuf:"bytes,1,opt,name=userID" json:"userID,omitempty"` + DepartmentID string `protobuf:"bytes,2,opt,name=departmentID" json:"departmentID,omitempty"` + Order int32 `protobuf:"varint,3,opt,name=order" json:"order,omitempty"` + Position string `protobuf:"bytes,4,opt,name=position" json:"position,omitempty"` + Leader int32 `protobuf:"varint,5,opt,name=leader" json:"leader,omitempty"` + Status int32 `protobuf:"varint,6,opt,name=status" json:"status,omitempty"` + Ex string `protobuf:"bytes,7,opt,name=ex" json:"ex,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *DepartmentMember) Reset() { *m = DepartmentMember{} } +func (m *DepartmentMember) String() string { return proto.CompactTextString(m) } +func (*DepartmentMember) ProtoMessage() {} +func (*DepartmentMember) Descriptor() ([]byte, []int) { + return fileDescriptor_ws_bc78a4975e7e5f46, []int{11} +} +func (m *DepartmentMember) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_DepartmentMember.Unmarshal(m, b) +} +func (m *DepartmentMember) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_DepartmentMember.Marshal(b, m, deterministic) +} +func (dst *DepartmentMember) XXX_Merge(src proto.Message) { + xxx_messageInfo_DepartmentMember.Merge(dst, src) +} +func (m *DepartmentMember) XXX_Size() int { + return xxx_messageInfo_DepartmentMember.Size(m) +} +func (m *DepartmentMember) XXX_DiscardUnknown() { + xxx_messageInfo_DepartmentMember.DiscardUnknown(m) +} + +var xxx_messageInfo_DepartmentMember proto.InternalMessageInfo + +func (m *DepartmentMember) GetUserID() string { + if m != nil { + return m.UserID + } + return "" +} + +func (m *DepartmentMember) GetDepartmentID() string { + if m != nil { + return m.DepartmentID + } + return "" +} + +func (m *DepartmentMember) GetOrder() int32 { + if m != nil { + return m.Order + } + return 0 +} + +func (m *DepartmentMember) GetPosition() string { + if m != nil { + return m.Position + } + return "" +} + +func (m *DepartmentMember) GetLeader() int32 { + if m != nil { + return m.Leader + } + return 0 +} + +func (m *DepartmentMember) GetStatus() int32 { + if m != nil { + return m.Status + } + return 0 +} + +func (m *DepartmentMember) GetEx() string { + if m != nil { + return m.Ex + } + return "" +} + +type UserDepartmentMember struct { + OrganizationUser *OrganizationUser `protobuf:"bytes,1,opt,name=organizationUser" json:"organizationUser,omitempty"` + DepartmentMember *DepartmentMember `protobuf:"bytes,2,opt,name=departmentMember" json:"departmentMember,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *UserDepartmentMember) Reset() { *m = UserDepartmentMember{} } +func (m *UserDepartmentMember) String() string { return proto.CompactTextString(m) } +func (*UserDepartmentMember) ProtoMessage() {} +func (*UserDepartmentMember) Descriptor() ([]byte, []int) { + return fileDescriptor_ws_bc78a4975e7e5f46, []int{12} +} +func (m *UserDepartmentMember) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_UserDepartmentMember.Unmarshal(m, b) +} +func (m *UserDepartmentMember) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_UserDepartmentMember.Marshal(b, m, deterministic) +} +func (dst *UserDepartmentMember) XXX_Merge(src proto.Message) { + xxx_messageInfo_UserDepartmentMember.Merge(dst, src) +} +func (m *UserDepartmentMember) XXX_Size() int { + return xxx_messageInfo_UserDepartmentMember.Size(m) +} +func (m *UserDepartmentMember) XXX_DiscardUnknown() { + xxx_messageInfo_UserDepartmentMember.DiscardUnknown(m) +} + +var xxx_messageInfo_UserDepartmentMember proto.InternalMessageInfo + +func (m *UserDepartmentMember) GetOrganizationUser() *OrganizationUser { + if m != nil { + return m.OrganizationUser + } + return nil +} + +func (m *UserDepartmentMember) GetDepartmentMember() *DepartmentMember { + if m != nil { + return m.DepartmentMember + } + return nil +} + +type UserInDepartment struct { + OrganizationUser *OrganizationUser `protobuf:"bytes,1,opt,name=organizationUser" json:"organizationUser,omitempty"` + DepartmentMemberList []*DepartmentMember `protobuf:"bytes,2,rep,name=departmentMemberList" json:"departmentMemberList,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *UserInDepartment) Reset() { *m = UserInDepartment{} } +func (m *UserInDepartment) String() string { return proto.CompactTextString(m) } +func (*UserInDepartment) ProtoMessage() {} +func (*UserInDepartment) Descriptor() ([]byte, []int) { + return fileDescriptor_ws_bc78a4975e7e5f46, []int{13} +} +func (m *UserInDepartment) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_UserInDepartment.Unmarshal(m, b) +} +func (m *UserInDepartment) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_UserInDepartment.Marshal(b, m, deterministic) +} +func (dst *UserInDepartment) XXX_Merge(src proto.Message) { + xxx_messageInfo_UserInDepartment.Merge(dst, src) +} +func (m *UserInDepartment) XXX_Size() int { + return xxx_messageInfo_UserInDepartment.Size(m) +} +func (m *UserInDepartment) XXX_DiscardUnknown() { + xxx_messageInfo_UserInDepartment.DiscardUnknown(m) +} + +var xxx_messageInfo_UserInDepartment proto.InternalMessageInfo + +func (m *UserInDepartment) GetOrganizationUser() *OrganizationUser { + if m != nil { + return m.OrganizationUser + } + return nil +} + +func (m *UserInDepartment) GetDepartmentMemberList() []*DepartmentMember { + if m != nil { + return m.DepartmentMemberList + } + return nil +} + +// /////////////////////////////////base end///////////////////////////////////// +type PullMessageBySeqListReq struct { + UserID string `protobuf:"bytes,1,opt,name=userID" json:"userID,omitempty"` + OperationID string `protobuf:"bytes,2,opt,name=operationID" json:"operationID,omitempty"` + SeqList []uint32 `protobuf:"varint,3,rep,packed,name=seqList" json:"seqList,omitempty"` + GroupSeqList map[string]*SeqList `protobuf:"bytes,4,rep,name=groupSeqList" json:"groupSeqList,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *PullMessageBySeqListReq) Reset() { *m = PullMessageBySeqListReq{} } +func (m *PullMessageBySeqListReq) String() string { return proto.CompactTextString(m) } +func (*PullMessageBySeqListReq) ProtoMessage() {} +func (*PullMessageBySeqListReq) Descriptor() ([]byte, []int) { + return fileDescriptor_ws_bc78a4975e7e5f46, []int{14} +} +func (m *PullMessageBySeqListReq) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_PullMessageBySeqListReq.Unmarshal(m, b) +} +func (m *PullMessageBySeqListReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_PullMessageBySeqListReq.Marshal(b, m, deterministic) +} +func (dst *PullMessageBySeqListReq) XXX_Merge(src proto.Message) { + xxx_messageInfo_PullMessageBySeqListReq.Merge(dst, src) +} +func (m *PullMessageBySeqListReq) XXX_Size() int { + return xxx_messageInfo_PullMessageBySeqListReq.Size(m) +} +func (m *PullMessageBySeqListReq) XXX_DiscardUnknown() { + xxx_messageInfo_PullMessageBySeqListReq.DiscardUnknown(m) +} + +var xxx_messageInfo_PullMessageBySeqListReq proto.InternalMessageInfo + +func (m *PullMessageBySeqListReq) GetUserID() string { + if m != nil { + return m.UserID + } + return "" +} + +func (m *PullMessageBySeqListReq) GetOperationID() string { + if m != nil { + return m.OperationID + } + return "" +} + +func (m *PullMessageBySeqListReq) GetSeqList() []uint32 { + if m != nil { + return m.SeqList + } + return nil +} + +func (m *PullMessageBySeqListReq) GetGroupSeqList() map[string]*SeqList { + if m != nil { + return m.GroupSeqList + } + return nil +} + +type SeqList struct { + SeqList []uint32 `protobuf:"varint,1,rep,packed,name=seqList" json:"seqList,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *SeqList) Reset() { *m = SeqList{} } +func (m *SeqList) String() string { return proto.CompactTextString(m) } +func (*SeqList) ProtoMessage() {} +func (*SeqList) Descriptor() ([]byte, []int) { + return fileDescriptor_ws_bc78a4975e7e5f46, []int{15} +} +func (m *SeqList) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_SeqList.Unmarshal(m, b) +} +func (m *SeqList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_SeqList.Marshal(b, m, deterministic) +} +func (dst *SeqList) XXX_Merge(src proto.Message) { + xxx_messageInfo_SeqList.Merge(dst, src) +} +func (m *SeqList) XXX_Size() int { + return xxx_messageInfo_SeqList.Size(m) +} +func (m *SeqList) XXX_DiscardUnknown() { + xxx_messageInfo_SeqList.DiscardUnknown(m) +} + +var xxx_messageInfo_SeqList proto.InternalMessageInfo + +func (m *SeqList) GetSeqList() []uint32 { + if m != nil { + return m.SeqList + } + return nil +} + +type MsgDataList struct { + MsgDataList []*MsgData `protobuf:"bytes,1,rep,name=msgDataList" json:"msgDataList,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *MsgDataList) Reset() { *m = MsgDataList{} } +func (m *MsgDataList) String() string { return proto.CompactTextString(m) } +func (*MsgDataList) ProtoMessage() {} +func (*MsgDataList) Descriptor() ([]byte, []int) { + return fileDescriptor_ws_bc78a4975e7e5f46, []int{16} +} +func (m *MsgDataList) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_MsgDataList.Unmarshal(m, b) +} +func (m *MsgDataList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_MsgDataList.Marshal(b, m, deterministic) +} +func (dst *MsgDataList) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgDataList.Merge(dst, src) +} +func (m *MsgDataList) XXX_Size() int { + return xxx_messageInfo_MsgDataList.Size(m) +} +func (m *MsgDataList) XXX_DiscardUnknown() { + xxx_messageInfo_MsgDataList.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgDataList proto.InternalMessageInfo + +func (m *MsgDataList) GetMsgDataList() []*MsgData { + if m != nil { + return m.MsgDataList + } + return nil +} + +type PullMessageBySeqListResp struct { + ErrCode int32 `protobuf:"varint,1,opt,name=errCode" json:"errCode,omitempty"` + ErrMsg string `protobuf:"bytes,2,opt,name=errMsg" json:"errMsg,omitempty"` + List []*MsgData `protobuf:"bytes,3,rep,name=list" json:"list,omitempty"` + GroupMsgDataList map[string]*MsgDataList `protobuf:"bytes,4,rep,name=groupMsgDataList" json:"groupMsgDataList,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *PullMessageBySeqListResp) Reset() { *m = PullMessageBySeqListResp{} } +func (m *PullMessageBySeqListResp) String() string { return proto.CompactTextString(m) } +func (*PullMessageBySeqListResp) ProtoMessage() {} +func (*PullMessageBySeqListResp) Descriptor() ([]byte, []int) { + return fileDescriptor_ws_bc78a4975e7e5f46, []int{17} +} +func (m *PullMessageBySeqListResp) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_PullMessageBySeqListResp.Unmarshal(m, b) +} +func (m *PullMessageBySeqListResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_PullMessageBySeqListResp.Marshal(b, m, deterministic) +} +func (dst *PullMessageBySeqListResp) XXX_Merge(src proto.Message) { + xxx_messageInfo_PullMessageBySeqListResp.Merge(dst, src) +} +func (m *PullMessageBySeqListResp) XXX_Size() int { + return xxx_messageInfo_PullMessageBySeqListResp.Size(m) +} +func (m *PullMessageBySeqListResp) XXX_DiscardUnknown() { + xxx_messageInfo_PullMessageBySeqListResp.DiscardUnknown(m) +} + +var xxx_messageInfo_PullMessageBySeqListResp proto.InternalMessageInfo + +func (m *PullMessageBySeqListResp) GetErrCode() int32 { + if m != nil { + return m.ErrCode + } + return 0 +} + +func (m *PullMessageBySeqListResp) GetErrMsg() string { + if m != nil { + return m.ErrMsg + } + return "" +} + +func (m *PullMessageBySeqListResp) GetList() []*MsgData { + if m != nil { + return m.List + } + return nil +} + +func (m *PullMessageBySeqListResp) GetGroupMsgDataList() map[string]*MsgDataList { + if m != nil { + return m.GroupMsgDataList + } + return nil +} + +type GetMaxAndMinSeqReq struct { + GroupIDList []string `protobuf:"bytes,1,rep,name=groupIDList" json:"groupIDList,omitempty"` + UserID string `protobuf:"bytes,2,opt,name=userID" json:"userID,omitempty"` + OperationID string `protobuf:"bytes,3,opt,name=operationID" json:"operationID,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GetMaxAndMinSeqReq) Reset() { *m = GetMaxAndMinSeqReq{} } +func (m *GetMaxAndMinSeqReq) String() string { return proto.CompactTextString(m) } +func (*GetMaxAndMinSeqReq) ProtoMessage() {} +func (*GetMaxAndMinSeqReq) Descriptor() ([]byte, []int) { + return fileDescriptor_ws_bc78a4975e7e5f46, []int{18} +} +func (m *GetMaxAndMinSeqReq) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GetMaxAndMinSeqReq.Unmarshal(m, b) +} +func (m *GetMaxAndMinSeqReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GetMaxAndMinSeqReq.Marshal(b, m, deterministic) +} +func (dst *GetMaxAndMinSeqReq) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetMaxAndMinSeqReq.Merge(dst, src) +} +func (m *GetMaxAndMinSeqReq) XXX_Size() int { + return xxx_messageInfo_GetMaxAndMinSeqReq.Size(m) +} +func (m *GetMaxAndMinSeqReq) XXX_DiscardUnknown() { + xxx_messageInfo_GetMaxAndMinSeqReq.DiscardUnknown(m) +} + +var xxx_messageInfo_GetMaxAndMinSeqReq proto.InternalMessageInfo + +func (m *GetMaxAndMinSeqReq) GetGroupIDList() []string { + if m != nil { + return m.GroupIDList + } + return nil +} + +func (m *GetMaxAndMinSeqReq) GetUserID() string { + if m != nil { + return m.UserID + } + return "" +} + +func (m *GetMaxAndMinSeqReq) GetOperationID() string { + if m != nil { + return m.OperationID + } + return "" +} + +type MaxAndMinSeq struct { + MaxSeq uint32 `protobuf:"varint,1,opt,name=maxSeq" json:"maxSeq,omitempty"` + MinSeq uint32 `protobuf:"varint,2,opt,name=minSeq" json:"minSeq,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *MaxAndMinSeq) Reset() { *m = MaxAndMinSeq{} } +func (m *MaxAndMinSeq) String() string { return proto.CompactTextString(m) } +func (*MaxAndMinSeq) ProtoMessage() {} +func (*MaxAndMinSeq) Descriptor() ([]byte, []int) { + return fileDescriptor_ws_bc78a4975e7e5f46, []int{19} +} +func (m *MaxAndMinSeq) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_MaxAndMinSeq.Unmarshal(m, b) +} +func (m *MaxAndMinSeq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_MaxAndMinSeq.Marshal(b, m, deterministic) +} +func (dst *MaxAndMinSeq) XXX_Merge(src proto.Message) { + xxx_messageInfo_MaxAndMinSeq.Merge(dst, src) +} +func (m *MaxAndMinSeq) XXX_Size() int { + return xxx_messageInfo_MaxAndMinSeq.Size(m) +} +func (m *MaxAndMinSeq) XXX_DiscardUnknown() { + xxx_messageInfo_MaxAndMinSeq.DiscardUnknown(m) +} + +var xxx_messageInfo_MaxAndMinSeq proto.InternalMessageInfo + +func (m *MaxAndMinSeq) GetMaxSeq() uint32 { + if m != nil { + return m.MaxSeq + } + return 0 +} + +func (m *MaxAndMinSeq) GetMinSeq() uint32 { + if m != nil { + return m.MinSeq + } + return 0 +} + +type GetMaxAndMinSeqResp struct { + MaxSeq uint32 `protobuf:"varint,1,opt,name=maxSeq" json:"maxSeq,omitempty"` + MinSeq uint32 `protobuf:"varint,2,opt,name=minSeq" json:"minSeq,omitempty"` + ErrCode int32 `protobuf:"varint,3,opt,name=errCode" json:"errCode,omitempty"` + ErrMsg string `protobuf:"bytes,4,opt,name=errMsg" json:"errMsg,omitempty"` + GroupMaxAndMinSeq map[string]*MaxAndMinSeq `protobuf:"bytes,5,rep,name=groupMaxAndMinSeq" json:"groupMaxAndMinSeq,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GetMaxAndMinSeqResp) Reset() { *m = GetMaxAndMinSeqResp{} } +func (m *GetMaxAndMinSeqResp) String() string { return proto.CompactTextString(m) } +func (*GetMaxAndMinSeqResp) ProtoMessage() {} +func (*GetMaxAndMinSeqResp) Descriptor() ([]byte, []int) { + return fileDescriptor_ws_bc78a4975e7e5f46, []int{20} +} +func (m *GetMaxAndMinSeqResp) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GetMaxAndMinSeqResp.Unmarshal(m, b) +} +func (m *GetMaxAndMinSeqResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GetMaxAndMinSeqResp.Marshal(b, m, deterministic) +} +func (dst *GetMaxAndMinSeqResp) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetMaxAndMinSeqResp.Merge(dst, src) +} +func (m *GetMaxAndMinSeqResp) XXX_Size() int { + return xxx_messageInfo_GetMaxAndMinSeqResp.Size(m) +} +func (m *GetMaxAndMinSeqResp) XXX_DiscardUnknown() { + xxx_messageInfo_GetMaxAndMinSeqResp.DiscardUnknown(m) +} + +var xxx_messageInfo_GetMaxAndMinSeqResp proto.InternalMessageInfo + +func (m *GetMaxAndMinSeqResp) GetMaxSeq() uint32 { + if m != nil { + return m.MaxSeq + } + return 0 +} + +func (m *GetMaxAndMinSeqResp) GetMinSeq() uint32 { + if m != nil { + return m.MinSeq + } + return 0 +} + +func (m *GetMaxAndMinSeqResp) GetErrCode() int32 { + if m != nil { + return m.ErrCode + } + return 0 +} + +func (m *GetMaxAndMinSeqResp) GetErrMsg() string { + if m != nil { + return m.ErrMsg + } + return "" +} + +func (m *GetMaxAndMinSeqResp) GetGroupMaxAndMinSeq() map[string]*MaxAndMinSeq { + if m != nil { + return m.GroupMaxAndMinSeq + } + return nil +} + +type UserSendMsgResp struct { + ServerMsgID string `protobuf:"bytes,1,opt,name=serverMsgID" json:"serverMsgID,omitempty"` + ClientMsgID string `protobuf:"bytes,2,opt,name=clientMsgID" json:"clientMsgID,omitempty"` + SendTime int64 `protobuf:"varint,3,opt,name=sendTime" json:"sendTime,omitempty"` + Ex string `protobuf:"bytes,4,opt,name=ex" json:"ex,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *UserSendMsgResp) Reset() { *m = UserSendMsgResp{} } +func (m *UserSendMsgResp) String() string { return proto.CompactTextString(m) } +func (*UserSendMsgResp) ProtoMessage() {} +func (*UserSendMsgResp) Descriptor() ([]byte, []int) { + return fileDescriptor_ws_bc78a4975e7e5f46, []int{21} +} +func (m *UserSendMsgResp) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_UserSendMsgResp.Unmarshal(m, b) +} +func (m *UserSendMsgResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_UserSendMsgResp.Marshal(b, m, deterministic) +} +func (dst *UserSendMsgResp) XXX_Merge(src proto.Message) { + xxx_messageInfo_UserSendMsgResp.Merge(dst, src) +} +func (m *UserSendMsgResp) XXX_Size() int { + return xxx_messageInfo_UserSendMsgResp.Size(m) +} +func (m *UserSendMsgResp) XXX_DiscardUnknown() { + xxx_messageInfo_UserSendMsgResp.DiscardUnknown(m) +} + +var xxx_messageInfo_UserSendMsgResp proto.InternalMessageInfo + +func (m *UserSendMsgResp) GetServerMsgID() string { + if m != nil { + return m.ServerMsgID + } + return "" +} + +func (m *UserSendMsgResp) GetClientMsgID() string { + if m != nil { + return m.ClientMsgID + } + return "" +} + +func (m *UserSendMsgResp) GetSendTime() int64 { + if m != nil { + return m.SendTime + } + return 0 +} + +func (m *UserSendMsgResp) GetEx() string { + if m != nil { + return m.Ex + } + return "" +} + +type MsgData struct { + SendID string `protobuf:"bytes,1,opt,name=sendID" json:"sendID,omitempty"` + RecvID string `protobuf:"bytes,2,opt,name=recvID" json:"recvID,omitempty"` + GroupID string `protobuf:"bytes,3,opt,name=groupID" json:"groupID,omitempty"` + ClientMsgID string `protobuf:"bytes,4,opt,name=clientMsgID" json:"clientMsgID,omitempty"` + ServerMsgID string `protobuf:"bytes,5,opt,name=serverMsgID" json:"serverMsgID,omitempty"` + SenderPlatformID int32 `protobuf:"varint,6,opt,name=senderPlatformID" json:"senderPlatformID,omitempty"` + SenderNickname string `protobuf:"bytes,7,opt,name=senderNickname" json:"senderNickname,omitempty"` + SenderFaceURL string `protobuf:"bytes,8,opt,name=senderFaceURL" json:"senderFaceURL,omitempty"` + SessionType int32 `protobuf:"varint,9,opt,name=sessionType" json:"sessionType,omitempty"` + MsgFrom int32 `protobuf:"varint,10,opt,name=msgFrom" json:"msgFrom,omitempty"` + ContentType int32 `protobuf:"varint,11,opt,name=contentType" json:"contentType,omitempty"` + Content []byte `protobuf:"bytes,12,opt,name=content,proto3" json:"content,omitempty"` + Seq uint32 `protobuf:"varint,14,opt,name=seq" json:"seq,omitempty"` + SendTime int64 `protobuf:"varint,15,opt,name=sendTime" json:"sendTime,omitempty"` + CreateTime int64 `protobuf:"varint,16,opt,name=createTime" json:"createTime,omitempty"` + Status int32 `protobuf:"varint,17,opt,name=status" json:"status,omitempty"` + Options map[string]bool `protobuf:"bytes,18,rep,name=options" json:"options,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + OfflinePushInfo *OfflinePushInfo `protobuf:"bytes,19,opt,name=offlinePushInfo" json:"offlinePushInfo,omitempty"` + AtUserIDList []string `protobuf:"bytes,20,rep,name=atUserIDList" json:"atUserIDList,omitempty"` + MsgDataList []byte `protobuf:"bytes,21,opt,name=msgDataList,proto3" json:"msgDataList,omitempty"` + AttachedInfo string `protobuf:"bytes,22,opt,name=attachedInfo" json:"attachedInfo,omitempty"` + Ex string `protobuf:"bytes,23,opt,name=ex" json:"ex,omitempty"` + IsReact bool `protobuf:"varint,40,opt,name=isReact" json:"isReact,omitempty"` + IsExternalExtensions bool `protobuf:"varint,41,opt,name=isExternalExtensions" json:"isExternalExtensions,omitempty"` + MsgFirstModifyTime int64 `protobuf:"varint,42,opt,name=msgFirstModifyTime" json:"msgFirstModifyTime,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *MsgData) Reset() { *m = MsgData{} } +func (m *MsgData) String() string { return proto.CompactTextString(m) } +func (*MsgData) ProtoMessage() {} +func (*MsgData) Descriptor() ([]byte, []int) { + return fileDescriptor_ws_bc78a4975e7e5f46, []int{22} +} +func (m *MsgData) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_MsgData.Unmarshal(m, b) +} +func (m *MsgData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_MsgData.Marshal(b, m, deterministic) +} +func (dst *MsgData) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgData.Merge(dst, src) +} +func (m *MsgData) XXX_Size() int { + return xxx_messageInfo_MsgData.Size(m) +} +func (m *MsgData) XXX_DiscardUnknown() { + xxx_messageInfo_MsgData.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgData proto.InternalMessageInfo + +func (m *MsgData) GetSendID() string { + if m != nil { + return m.SendID + } + return "" +} + +func (m *MsgData) GetRecvID() string { + if m != nil { + return m.RecvID + } + return "" +} + +func (m *MsgData) GetGroupID() string { + if m != nil { + return m.GroupID + } + return "" +} + +func (m *MsgData) GetClientMsgID() string { + if m != nil { + return m.ClientMsgID + } + return "" +} + +func (m *MsgData) GetServerMsgID() string { + if m != nil { + return m.ServerMsgID + } + return "" +} + +func (m *MsgData) GetSenderPlatformID() int32 { + if m != nil { + return m.SenderPlatformID + } + return 0 +} + +func (m *MsgData) GetSenderNickname() string { + if m != nil { + return m.SenderNickname + } + return "" +} + +func (m *MsgData) GetSenderFaceURL() string { + if m != nil { + return m.SenderFaceURL + } + return "" +} + +func (m *MsgData) GetSessionType() int32 { + if m != nil { + return m.SessionType + } + return 0 +} + +func (m *MsgData) GetMsgFrom() int32 { + if m != nil { + return m.MsgFrom + } + return 0 +} + +func (m *MsgData) GetContentType() int32 { + if m != nil { + return m.ContentType + } + return 0 +} + +func (m *MsgData) GetContent() []byte { + if m != nil { + return m.Content + } + return nil +} + +func (m *MsgData) GetSeq() uint32 { + if m != nil { + return m.Seq + } + return 0 +} + +func (m *MsgData) GetSendTime() int64 { + if m != nil { + return m.SendTime + } + return 0 +} + +func (m *MsgData) GetCreateTime() int64 { + if m != nil { + return m.CreateTime + } + return 0 +} + +func (m *MsgData) GetStatus() int32 { + if m != nil { + return m.Status + } + return 0 +} + +func (m *MsgData) GetOptions() map[string]bool { + if m != nil { + return m.Options + } + return nil +} + +func (m *MsgData) GetOfflinePushInfo() *OfflinePushInfo { + if m != nil { + return m.OfflinePushInfo + } + return nil +} + +func (m *MsgData) GetAtUserIDList() []string { + if m != nil { + return m.AtUserIDList + } + return nil +} + +func (m *MsgData) GetMsgDataList() []byte { + if m != nil { + return m.MsgDataList + } + return nil +} + +func (m *MsgData) GetAttachedInfo() string { + if m != nil { + return m.AttachedInfo + } + return "" +} + +func (m *MsgData) GetEx() string { + if m != nil { + return m.Ex + } + return "" +} + +func (m *MsgData) GetIsReact() bool { + if m != nil { + return m.IsReact + } + return false +} + +func (m *MsgData) GetIsExternalExtensions() bool { + if m != nil { + return m.IsExternalExtensions + } + return false +} + +func (m *MsgData) GetMsgFirstModifyTime() int64 { + if m != nil { + return m.MsgFirstModifyTime + } + return 0 +} + +type OfflinePushInfo struct { + Title string `protobuf:"bytes,1,opt,name=title" json:"title,omitempty"` + Desc string `protobuf:"bytes,2,opt,name=desc" json:"desc,omitempty"` + Ex string `protobuf:"bytes,3,opt,name=ex" json:"ex,omitempty"` + IOSPushSound string `protobuf:"bytes,4,opt,name=iOSPushSound" json:"iOSPushSound,omitempty"` + IOSBadgeCount bool `protobuf:"varint,5,opt,name=iOSBadgeCount" json:"iOSBadgeCount,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *OfflinePushInfo) Reset() { *m = OfflinePushInfo{} } +func (m *OfflinePushInfo) String() string { return proto.CompactTextString(m) } +func (*OfflinePushInfo) ProtoMessage() {} +func (*OfflinePushInfo) Descriptor() ([]byte, []int) { + return fileDescriptor_ws_bc78a4975e7e5f46, []int{23} +} +func (m *OfflinePushInfo) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_OfflinePushInfo.Unmarshal(m, b) +} +func (m *OfflinePushInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_OfflinePushInfo.Marshal(b, m, deterministic) +} +func (dst *OfflinePushInfo) XXX_Merge(src proto.Message) { + xxx_messageInfo_OfflinePushInfo.Merge(dst, src) +} +func (m *OfflinePushInfo) XXX_Size() int { + return xxx_messageInfo_OfflinePushInfo.Size(m) +} +func (m *OfflinePushInfo) XXX_DiscardUnknown() { + xxx_messageInfo_OfflinePushInfo.DiscardUnknown(m) +} + +var xxx_messageInfo_OfflinePushInfo proto.InternalMessageInfo + +func (m *OfflinePushInfo) GetTitle() string { + if m != nil { + return m.Title + } + return "" +} + +func (m *OfflinePushInfo) GetDesc() string { + if m != nil { + return m.Desc + } + return "" +} + +func (m *OfflinePushInfo) GetEx() string { + if m != nil { + return m.Ex + } + return "" +} + +func (m *OfflinePushInfo) GetIOSPushSound() string { + if m != nil { + return m.IOSPushSound + } + return "" +} + +func (m *OfflinePushInfo) GetIOSBadgeCount() bool { + if m != nil { + return m.IOSBadgeCount + } + return false +} + +type TipsComm struct { + Detail []byte `protobuf:"bytes,1,opt,name=detail,proto3" json:"detail,omitempty"` + DefaultTips string `protobuf:"bytes,2,opt,name=defaultTips" json:"defaultTips,omitempty"` + JsonDetail string `protobuf:"bytes,3,opt,name=jsonDetail" json:"jsonDetail,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *TipsComm) Reset() { *m = TipsComm{} } +func (m *TipsComm) String() string { return proto.CompactTextString(m) } +func (*TipsComm) ProtoMessage() {} +func (*TipsComm) Descriptor() ([]byte, []int) { + return fileDescriptor_ws_bc78a4975e7e5f46, []int{24} +} +func (m *TipsComm) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_TipsComm.Unmarshal(m, b) +} +func (m *TipsComm) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_TipsComm.Marshal(b, m, deterministic) +} +func (dst *TipsComm) XXX_Merge(src proto.Message) { + xxx_messageInfo_TipsComm.Merge(dst, src) +} +func (m *TipsComm) XXX_Size() int { + return xxx_messageInfo_TipsComm.Size(m) +} +func (m *TipsComm) XXX_DiscardUnknown() { + xxx_messageInfo_TipsComm.DiscardUnknown(m) +} + +var xxx_messageInfo_TipsComm proto.InternalMessageInfo + +func (m *TipsComm) GetDetail() []byte { + if m != nil { + return m.Detail + } + return nil +} + +func (m *TipsComm) GetDefaultTips() string { + if m != nil { + return m.DefaultTips + } + return "" +} + +func (m *TipsComm) GetJsonDetail() string { + if m != nil { + return m.JsonDetail + } + return "" +} + +// OnGroupCreated() +type GroupCreatedTips struct { + Group *GroupInfo `protobuf:"bytes,1,opt,name=group" json:"group,omitempty"` + OpUser *GroupMemberFullInfo `protobuf:"bytes,2,opt,name=opUser" json:"opUser,omitempty"` + MemberList []*GroupMemberFullInfo `protobuf:"bytes,3,rep,name=memberList" json:"memberList,omitempty"` + OperationTime int64 `protobuf:"varint,4,opt,name=operationTime" json:"operationTime,omitempty"` + GroupOwnerUser *GroupMemberFullInfo `protobuf:"bytes,5,opt,name=groupOwnerUser" json:"groupOwnerUser,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GroupCreatedTips) Reset() { *m = GroupCreatedTips{} } +func (m *GroupCreatedTips) String() string { return proto.CompactTextString(m) } +func (*GroupCreatedTips) ProtoMessage() {} +func (*GroupCreatedTips) Descriptor() ([]byte, []int) { + return fileDescriptor_ws_bc78a4975e7e5f46, []int{25} +} +func (m *GroupCreatedTips) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GroupCreatedTips.Unmarshal(m, b) +} +func (m *GroupCreatedTips) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GroupCreatedTips.Marshal(b, m, deterministic) +} +func (dst *GroupCreatedTips) XXX_Merge(src proto.Message) { + xxx_messageInfo_GroupCreatedTips.Merge(dst, src) +} +func (m *GroupCreatedTips) XXX_Size() int { + return xxx_messageInfo_GroupCreatedTips.Size(m) +} +func (m *GroupCreatedTips) XXX_DiscardUnknown() { + xxx_messageInfo_GroupCreatedTips.DiscardUnknown(m) +} + +var xxx_messageInfo_GroupCreatedTips proto.InternalMessageInfo + +func (m *GroupCreatedTips) GetGroup() *GroupInfo { + if m != nil { + return m.Group + } + return nil +} + +func (m *GroupCreatedTips) GetOpUser() *GroupMemberFullInfo { + if m != nil { + return m.OpUser + } + return nil +} + +func (m *GroupCreatedTips) GetMemberList() []*GroupMemberFullInfo { + if m != nil { + return m.MemberList + } + return nil +} + +func (m *GroupCreatedTips) GetOperationTime() int64 { + if m != nil { + return m.OperationTime + } + return 0 +} + +func (m *GroupCreatedTips) GetGroupOwnerUser() *GroupMemberFullInfo { + if m != nil { + return m.GroupOwnerUser + } + return nil +} + +// OnGroupInfoSet() +type GroupInfoSetTips struct { + OpUser *GroupMemberFullInfo `protobuf:"bytes,1,opt,name=opUser" json:"opUser,omitempty"` + MuteTime int64 `protobuf:"varint,2,opt,name=muteTime" json:"muteTime,omitempty"` + Group *GroupInfo `protobuf:"bytes,3,opt,name=group" json:"group,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GroupInfoSetTips) Reset() { *m = GroupInfoSetTips{} } +func (m *GroupInfoSetTips) String() string { return proto.CompactTextString(m) } +func (*GroupInfoSetTips) ProtoMessage() {} +func (*GroupInfoSetTips) Descriptor() ([]byte, []int) { + return fileDescriptor_ws_bc78a4975e7e5f46, []int{26} +} +func (m *GroupInfoSetTips) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GroupInfoSetTips.Unmarshal(m, b) +} +func (m *GroupInfoSetTips) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GroupInfoSetTips.Marshal(b, m, deterministic) +} +func (dst *GroupInfoSetTips) XXX_Merge(src proto.Message) { + xxx_messageInfo_GroupInfoSetTips.Merge(dst, src) +} +func (m *GroupInfoSetTips) XXX_Size() int { + return xxx_messageInfo_GroupInfoSetTips.Size(m) +} +func (m *GroupInfoSetTips) XXX_DiscardUnknown() { + xxx_messageInfo_GroupInfoSetTips.DiscardUnknown(m) +} + +var xxx_messageInfo_GroupInfoSetTips proto.InternalMessageInfo + +func (m *GroupInfoSetTips) GetOpUser() *GroupMemberFullInfo { + if m != nil { + return m.OpUser + } + return nil +} + +func (m *GroupInfoSetTips) GetMuteTime() int64 { + if m != nil { + return m.MuteTime + } + return 0 +} + +func (m *GroupInfoSetTips) GetGroup() *GroupInfo { + if m != nil { + return m.Group + } + return nil +} + +// OnJoinGroupApplication() +type JoinGroupApplicationTips struct { + Group *GroupInfo `protobuf:"bytes,1,opt,name=group" json:"group,omitempty"` + Applicant *PublicUserInfo `protobuf:"bytes,2,opt,name=applicant" json:"applicant,omitempty"` + ReqMsg string `protobuf:"bytes,3,opt,name=reqMsg" json:"reqMsg,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *JoinGroupApplicationTips) Reset() { *m = JoinGroupApplicationTips{} } +func (m *JoinGroupApplicationTips) String() string { return proto.CompactTextString(m) } +func (*JoinGroupApplicationTips) ProtoMessage() {} +func (*JoinGroupApplicationTips) Descriptor() ([]byte, []int) { + return fileDescriptor_ws_bc78a4975e7e5f46, []int{27} +} +func (m *JoinGroupApplicationTips) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_JoinGroupApplicationTips.Unmarshal(m, b) +} +func (m *JoinGroupApplicationTips) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_JoinGroupApplicationTips.Marshal(b, m, deterministic) +} +func (dst *JoinGroupApplicationTips) XXX_Merge(src proto.Message) { + xxx_messageInfo_JoinGroupApplicationTips.Merge(dst, src) +} +func (m *JoinGroupApplicationTips) XXX_Size() int { + return xxx_messageInfo_JoinGroupApplicationTips.Size(m) +} +func (m *JoinGroupApplicationTips) XXX_DiscardUnknown() { + xxx_messageInfo_JoinGroupApplicationTips.DiscardUnknown(m) +} + +var xxx_messageInfo_JoinGroupApplicationTips proto.InternalMessageInfo + +func (m *JoinGroupApplicationTips) GetGroup() *GroupInfo { + if m != nil { + return m.Group + } + return nil +} + +func (m *JoinGroupApplicationTips) GetApplicant() *PublicUserInfo { + if m != nil { + return m.Applicant + } + return nil +} + +func (m *JoinGroupApplicationTips) GetReqMsg() string { + if m != nil { + return m.ReqMsg + } + return "" +} + +// OnQuitGroup() +// +// Actively leave the group +type MemberQuitTips struct { + Group *GroupInfo `protobuf:"bytes,1,opt,name=group" json:"group,omitempty"` + QuitUser *GroupMemberFullInfo `protobuf:"bytes,2,opt,name=quitUser" json:"quitUser,omitempty"` + OperationTime int64 `protobuf:"varint,3,opt,name=operationTime" json:"operationTime,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *MemberQuitTips) Reset() { *m = MemberQuitTips{} } +func (m *MemberQuitTips) String() string { return proto.CompactTextString(m) } +func (*MemberQuitTips) ProtoMessage() {} +func (*MemberQuitTips) Descriptor() ([]byte, []int) { + return fileDescriptor_ws_bc78a4975e7e5f46, []int{28} +} +func (m *MemberQuitTips) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_MemberQuitTips.Unmarshal(m, b) +} +func (m *MemberQuitTips) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_MemberQuitTips.Marshal(b, m, deterministic) +} +func (dst *MemberQuitTips) XXX_Merge(src proto.Message) { + xxx_messageInfo_MemberQuitTips.Merge(dst, src) +} +func (m *MemberQuitTips) XXX_Size() int { + return xxx_messageInfo_MemberQuitTips.Size(m) +} +func (m *MemberQuitTips) XXX_DiscardUnknown() { + xxx_messageInfo_MemberQuitTips.DiscardUnknown(m) +} + +var xxx_messageInfo_MemberQuitTips proto.InternalMessageInfo + +func (m *MemberQuitTips) GetGroup() *GroupInfo { + if m != nil { + return m.Group + } + return nil +} + +func (m *MemberQuitTips) GetQuitUser() *GroupMemberFullInfo { + if m != nil { + return m.QuitUser + } + return nil +} + +func (m *MemberQuitTips) GetOperationTime() int64 { + if m != nil { + return m.OperationTime + } + return 0 +} + +// OnApplicationGroupAccepted() +type GroupApplicationAcceptedTips struct { + Group *GroupInfo `protobuf:"bytes,1,opt,name=group" json:"group,omitempty"` + OpUser *GroupMemberFullInfo `protobuf:"bytes,2,opt,name=opUser" json:"opUser,omitempty"` + HandleMsg string `protobuf:"bytes,4,opt,name=handleMsg" json:"handleMsg,omitempty"` + ReceiverAs int32 `protobuf:"varint,5,opt,name=receiverAs" json:"receiverAs,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GroupApplicationAcceptedTips) Reset() { *m = GroupApplicationAcceptedTips{} } +func (m *GroupApplicationAcceptedTips) String() string { return proto.CompactTextString(m) } +func (*GroupApplicationAcceptedTips) ProtoMessage() {} +func (*GroupApplicationAcceptedTips) Descriptor() ([]byte, []int) { + return fileDescriptor_ws_bc78a4975e7e5f46, []int{29} +} +func (m *GroupApplicationAcceptedTips) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GroupApplicationAcceptedTips.Unmarshal(m, b) +} +func (m *GroupApplicationAcceptedTips) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GroupApplicationAcceptedTips.Marshal(b, m, deterministic) +} +func (dst *GroupApplicationAcceptedTips) XXX_Merge(src proto.Message) { + xxx_messageInfo_GroupApplicationAcceptedTips.Merge(dst, src) +} +func (m *GroupApplicationAcceptedTips) XXX_Size() int { + return xxx_messageInfo_GroupApplicationAcceptedTips.Size(m) +} +func (m *GroupApplicationAcceptedTips) XXX_DiscardUnknown() { + xxx_messageInfo_GroupApplicationAcceptedTips.DiscardUnknown(m) +} + +var xxx_messageInfo_GroupApplicationAcceptedTips proto.InternalMessageInfo + +func (m *GroupApplicationAcceptedTips) GetGroup() *GroupInfo { + if m != nil { + return m.Group + } + return nil +} + +func (m *GroupApplicationAcceptedTips) GetOpUser() *GroupMemberFullInfo { + if m != nil { + return m.OpUser + } + return nil +} + +func (m *GroupApplicationAcceptedTips) GetHandleMsg() string { + if m != nil { + return m.HandleMsg + } + return "" +} + +func (m *GroupApplicationAcceptedTips) GetReceiverAs() int32 { + if m != nil { + return m.ReceiverAs + } + return 0 +} + +// OnApplicationGroupRejected() +type GroupApplicationRejectedTips struct { + Group *GroupInfo `protobuf:"bytes,1,opt,name=group" json:"group,omitempty"` + OpUser *GroupMemberFullInfo `protobuf:"bytes,2,opt,name=opUser" json:"opUser,omitempty"` + HandleMsg string `protobuf:"bytes,4,opt,name=handleMsg" json:"handleMsg,omitempty"` + ReceiverAs int32 `protobuf:"varint,5,opt,name=receiverAs" json:"receiverAs,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GroupApplicationRejectedTips) Reset() { *m = GroupApplicationRejectedTips{} } +func (m *GroupApplicationRejectedTips) String() string { return proto.CompactTextString(m) } +func (*GroupApplicationRejectedTips) ProtoMessage() {} +func (*GroupApplicationRejectedTips) Descriptor() ([]byte, []int) { + return fileDescriptor_ws_bc78a4975e7e5f46, []int{30} +} +func (m *GroupApplicationRejectedTips) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GroupApplicationRejectedTips.Unmarshal(m, b) +} +func (m *GroupApplicationRejectedTips) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GroupApplicationRejectedTips.Marshal(b, m, deterministic) +} +func (dst *GroupApplicationRejectedTips) XXX_Merge(src proto.Message) { + xxx_messageInfo_GroupApplicationRejectedTips.Merge(dst, src) +} +func (m *GroupApplicationRejectedTips) XXX_Size() int { + return xxx_messageInfo_GroupApplicationRejectedTips.Size(m) +} +func (m *GroupApplicationRejectedTips) XXX_DiscardUnknown() { + xxx_messageInfo_GroupApplicationRejectedTips.DiscardUnknown(m) +} + +var xxx_messageInfo_GroupApplicationRejectedTips proto.InternalMessageInfo + +func (m *GroupApplicationRejectedTips) GetGroup() *GroupInfo { + if m != nil { + return m.Group + } + return nil +} + +func (m *GroupApplicationRejectedTips) GetOpUser() *GroupMemberFullInfo { + if m != nil { + return m.OpUser + } + return nil +} + +func (m *GroupApplicationRejectedTips) GetHandleMsg() string { + if m != nil { + return m.HandleMsg + } + return "" +} + +func (m *GroupApplicationRejectedTips) GetReceiverAs() int32 { + if m != nil { + return m.ReceiverAs + } + return 0 +} + +// OnTransferGroupOwner() +type GroupOwnerTransferredTips struct { + Group *GroupInfo `protobuf:"bytes,1,opt,name=group" json:"group,omitempty"` + OpUser *GroupMemberFullInfo `protobuf:"bytes,2,opt,name=opUser" json:"opUser,omitempty"` + NewGroupOwner *GroupMemberFullInfo `protobuf:"bytes,3,opt,name=newGroupOwner" json:"newGroupOwner,omitempty"` + OperationTime int64 `protobuf:"varint,4,opt,name=operationTime" json:"operationTime,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GroupOwnerTransferredTips) Reset() { *m = GroupOwnerTransferredTips{} } +func (m *GroupOwnerTransferredTips) String() string { return proto.CompactTextString(m) } +func (*GroupOwnerTransferredTips) ProtoMessage() {} +func (*GroupOwnerTransferredTips) Descriptor() ([]byte, []int) { + return fileDescriptor_ws_bc78a4975e7e5f46, []int{31} +} +func (m *GroupOwnerTransferredTips) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GroupOwnerTransferredTips.Unmarshal(m, b) +} +func (m *GroupOwnerTransferredTips) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GroupOwnerTransferredTips.Marshal(b, m, deterministic) +} +func (dst *GroupOwnerTransferredTips) XXX_Merge(src proto.Message) { + xxx_messageInfo_GroupOwnerTransferredTips.Merge(dst, src) +} +func (m *GroupOwnerTransferredTips) XXX_Size() int { + return xxx_messageInfo_GroupOwnerTransferredTips.Size(m) +} +func (m *GroupOwnerTransferredTips) XXX_DiscardUnknown() { + xxx_messageInfo_GroupOwnerTransferredTips.DiscardUnknown(m) +} + +var xxx_messageInfo_GroupOwnerTransferredTips proto.InternalMessageInfo + +func (m *GroupOwnerTransferredTips) GetGroup() *GroupInfo { + if m != nil { + return m.Group + } + return nil +} + +func (m *GroupOwnerTransferredTips) GetOpUser() *GroupMemberFullInfo { + if m != nil { + return m.OpUser + } + return nil +} + +func (m *GroupOwnerTransferredTips) GetNewGroupOwner() *GroupMemberFullInfo { + if m != nil { + return m.NewGroupOwner + } + return nil +} + +func (m *GroupOwnerTransferredTips) GetOperationTime() int64 { + if m != nil { + return m.OperationTime + } + return 0 +} + +// OnMemberKicked() +type MemberKickedTips struct { + Group *GroupInfo `protobuf:"bytes,1,opt,name=group" json:"group,omitempty"` + OpUser *GroupMemberFullInfo `protobuf:"bytes,2,opt,name=opUser" json:"opUser,omitempty"` + KickedUserList []*GroupMemberFullInfo `protobuf:"bytes,3,rep,name=kickedUserList" json:"kickedUserList,omitempty"` + OperationTime int64 `protobuf:"varint,4,opt,name=operationTime" json:"operationTime,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *MemberKickedTips) Reset() { *m = MemberKickedTips{} } +func (m *MemberKickedTips) String() string { return proto.CompactTextString(m) } +func (*MemberKickedTips) ProtoMessage() {} +func (*MemberKickedTips) Descriptor() ([]byte, []int) { + return fileDescriptor_ws_bc78a4975e7e5f46, []int{32} +} +func (m *MemberKickedTips) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_MemberKickedTips.Unmarshal(m, b) +} +func (m *MemberKickedTips) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_MemberKickedTips.Marshal(b, m, deterministic) +} +func (dst *MemberKickedTips) XXX_Merge(src proto.Message) { + xxx_messageInfo_MemberKickedTips.Merge(dst, src) +} +func (m *MemberKickedTips) XXX_Size() int { + return xxx_messageInfo_MemberKickedTips.Size(m) +} +func (m *MemberKickedTips) XXX_DiscardUnknown() { + xxx_messageInfo_MemberKickedTips.DiscardUnknown(m) +} + +var xxx_messageInfo_MemberKickedTips proto.InternalMessageInfo + +func (m *MemberKickedTips) GetGroup() *GroupInfo { + if m != nil { + return m.Group + } + return nil +} + +func (m *MemberKickedTips) GetOpUser() *GroupMemberFullInfo { + if m != nil { + return m.OpUser + } + return nil +} + +func (m *MemberKickedTips) GetKickedUserList() []*GroupMemberFullInfo { + if m != nil { + return m.KickedUserList + } + return nil +} + +func (m *MemberKickedTips) GetOperationTime() int64 { + if m != nil { + return m.OperationTime + } + return 0 +} + +// OnMemberInvited() +type MemberInvitedTips struct { + Group *GroupInfo `protobuf:"bytes,1,opt,name=group" json:"group,omitempty"` + OpUser *GroupMemberFullInfo `protobuf:"bytes,2,opt,name=opUser" json:"opUser,omitempty"` + InvitedUserList []*GroupMemberFullInfo `protobuf:"bytes,3,rep,name=invitedUserList" json:"invitedUserList,omitempty"` + OperationTime int64 `protobuf:"varint,4,opt,name=operationTime" json:"operationTime,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *MemberInvitedTips) Reset() { *m = MemberInvitedTips{} } +func (m *MemberInvitedTips) String() string { return proto.CompactTextString(m) } +func (*MemberInvitedTips) ProtoMessage() {} +func (*MemberInvitedTips) Descriptor() ([]byte, []int) { + return fileDescriptor_ws_bc78a4975e7e5f46, []int{33} +} +func (m *MemberInvitedTips) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_MemberInvitedTips.Unmarshal(m, b) +} +func (m *MemberInvitedTips) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_MemberInvitedTips.Marshal(b, m, deterministic) +} +func (dst *MemberInvitedTips) XXX_Merge(src proto.Message) { + xxx_messageInfo_MemberInvitedTips.Merge(dst, src) +} +func (m *MemberInvitedTips) XXX_Size() int { + return xxx_messageInfo_MemberInvitedTips.Size(m) +} +func (m *MemberInvitedTips) XXX_DiscardUnknown() { + xxx_messageInfo_MemberInvitedTips.DiscardUnknown(m) +} + +var xxx_messageInfo_MemberInvitedTips proto.InternalMessageInfo + +func (m *MemberInvitedTips) GetGroup() *GroupInfo { + if m != nil { + return m.Group + } + return nil +} + +func (m *MemberInvitedTips) GetOpUser() *GroupMemberFullInfo { + if m != nil { + return m.OpUser + } + return nil +} + +func (m *MemberInvitedTips) GetInvitedUserList() []*GroupMemberFullInfo { + if m != nil { + return m.InvitedUserList + } + return nil +} + +func (m *MemberInvitedTips) GetOperationTime() int64 { + if m != nil { + return m.OperationTime + } + return 0 +} + +// Actively join the group +type MemberEnterTips struct { + Group *GroupInfo `protobuf:"bytes,1,opt,name=group" json:"group,omitempty"` + EntrantUser *GroupMemberFullInfo `protobuf:"bytes,2,opt,name=entrantUser" json:"entrantUser,omitempty"` + OperationTime int64 `protobuf:"varint,3,opt,name=operationTime" json:"operationTime,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *MemberEnterTips) Reset() { *m = MemberEnterTips{} } +func (m *MemberEnterTips) String() string { return proto.CompactTextString(m) } +func (*MemberEnterTips) ProtoMessage() {} +func (*MemberEnterTips) Descriptor() ([]byte, []int) { + return fileDescriptor_ws_bc78a4975e7e5f46, []int{34} +} +func (m *MemberEnterTips) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_MemberEnterTips.Unmarshal(m, b) +} +func (m *MemberEnterTips) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_MemberEnterTips.Marshal(b, m, deterministic) +} +func (dst *MemberEnterTips) XXX_Merge(src proto.Message) { + xxx_messageInfo_MemberEnterTips.Merge(dst, src) +} +func (m *MemberEnterTips) XXX_Size() int { + return xxx_messageInfo_MemberEnterTips.Size(m) +} +func (m *MemberEnterTips) XXX_DiscardUnknown() { + xxx_messageInfo_MemberEnterTips.DiscardUnknown(m) +} + +var xxx_messageInfo_MemberEnterTips proto.InternalMessageInfo + +func (m *MemberEnterTips) GetGroup() *GroupInfo { + if m != nil { + return m.Group + } + return nil +} + +func (m *MemberEnterTips) GetEntrantUser() *GroupMemberFullInfo { + if m != nil { + return m.EntrantUser + } + return nil +} + +func (m *MemberEnterTips) GetOperationTime() int64 { + if m != nil { + return m.OperationTime + } + return 0 +} + +type GroupDismissedTips struct { + Group *GroupInfo `protobuf:"bytes,1,opt,name=group" json:"group,omitempty"` + OpUser *GroupMemberFullInfo `protobuf:"bytes,2,opt,name=opUser" json:"opUser,omitempty"` + OperationTime int64 `protobuf:"varint,3,opt,name=operationTime" json:"operationTime,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GroupDismissedTips) Reset() { *m = GroupDismissedTips{} } +func (m *GroupDismissedTips) String() string { return proto.CompactTextString(m) } +func (*GroupDismissedTips) ProtoMessage() {} +func (*GroupDismissedTips) Descriptor() ([]byte, []int) { + return fileDescriptor_ws_bc78a4975e7e5f46, []int{35} +} +func (m *GroupDismissedTips) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GroupDismissedTips.Unmarshal(m, b) +} +func (m *GroupDismissedTips) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GroupDismissedTips.Marshal(b, m, deterministic) +} +func (dst *GroupDismissedTips) XXX_Merge(src proto.Message) { + xxx_messageInfo_GroupDismissedTips.Merge(dst, src) +} +func (m *GroupDismissedTips) XXX_Size() int { + return xxx_messageInfo_GroupDismissedTips.Size(m) +} +func (m *GroupDismissedTips) XXX_DiscardUnknown() { + xxx_messageInfo_GroupDismissedTips.DiscardUnknown(m) +} + +var xxx_messageInfo_GroupDismissedTips proto.InternalMessageInfo + +func (m *GroupDismissedTips) GetGroup() *GroupInfo { + if m != nil { + return m.Group + } + return nil +} + +func (m *GroupDismissedTips) GetOpUser() *GroupMemberFullInfo { + if m != nil { + return m.OpUser + } + return nil +} + +func (m *GroupDismissedTips) GetOperationTime() int64 { + if m != nil { + return m.OperationTime + } + return 0 +} + +type GroupMemberMutedTips struct { + Group *GroupInfo `protobuf:"bytes,1,opt,name=group" json:"group,omitempty"` + OpUser *GroupMemberFullInfo `protobuf:"bytes,2,opt,name=opUser" json:"opUser,omitempty"` + OperationTime int64 `protobuf:"varint,3,opt,name=operationTime" json:"operationTime,omitempty"` + MutedUser *GroupMemberFullInfo `protobuf:"bytes,4,opt,name=mutedUser" json:"mutedUser,omitempty"` + MutedSeconds uint32 `protobuf:"varint,5,opt,name=mutedSeconds" json:"mutedSeconds,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GroupMemberMutedTips) Reset() { *m = GroupMemberMutedTips{} } +func (m *GroupMemberMutedTips) String() string { return proto.CompactTextString(m) } +func (*GroupMemberMutedTips) ProtoMessage() {} +func (*GroupMemberMutedTips) Descriptor() ([]byte, []int) { + return fileDescriptor_ws_bc78a4975e7e5f46, []int{36} +} +func (m *GroupMemberMutedTips) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GroupMemberMutedTips.Unmarshal(m, b) +} +func (m *GroupMemberMutedTips) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GroupMemberMutedTips.Marshal(b, m, deterministic) +} +func (dst *GroupMemberMutedTips) XXX_Merge(src proto.Message) { + xxx_messageInfo_GroupMemberMutedTips.Merge(dst, src) +} +func (m *GroupMemberMutedTips) XXX_Size() int { + return xxx_messageInfo_GroupMemberMutedTips.Size(m) +} +func (m *GroupMemberMutedTips) XXX_DiscardUnknown() { + xxx_messageInfo_GroupMemberMutedTips.DiscardUnknown(m) +} + +var xxx_messageInfo_GroupMemberMutedTips proto.InternalMessageInfo + +func (m *GroupMemberMutedTips) GetGroup() *GroupInfo { + if m != nil { + return m.Group + } + return nil +} + +func (m *GroupMemberMutedTips) GetOpUser() *GroupMemberFullInfo { + if m != nil { + return m.OpUser + } + return nil +} + +func (m *GroupMemberMutedTips) GetOperationTime() int64 { + if m != nil { + return m.OperationTime + } + return 0 +} + +func (m *GroupMemberMutedTips) GetMutedUser() *GroupMemberFullInfo { + if m != nil { + return m.MutedUser + } + return nil +} + +func (m *GroupMemberMutedTips) GetMutedSeconds() uint32 { + if m != nil { + return m.MutedSeconds + } + return 0 +} + +type GroupMemberCancelMutedTips struct { + Group *GroupInfo `protobuf:"bytes,1,opt,name=group" json:"group,omitempty"` + OpUser *GroupMemberFullInfo `protobuf:"bytes,2,opt,name=opUser" json:"opUser,omitempty"` + OperationTime int64 `protobuf:"varint,3,opt,name=operationTime" json:"operationTime,omitempty"` + MutedUser *GroupMemberFullInfo `protobuf:"bytes,4,opt,name=mutedUser" json:"mutedUser,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GroupMemberCancelMutedTips) Reset() { *m = GroupMemberCancelMutedTips{} } +func (m *GroupMemberCancelMutedTips) String() string { return proto.CompactTextString(m) } +func (*GroupMemberCancelMutedTips) ProtoMessage() {} +func (*GroupMemberCancelMutedTips) Descriptor() ([]byte, []int) { + return fileDescriptor_ws_bc78a4975e7e5f46, []int{37} +} +func (m *GroupMemberCancelMutedTips) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GroupMemberCancelMutedTips.Unmarshal(m, b) +} +func (m *GroupMemberCancelMutedTips) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GroupMemberCancelMutedTips.Marshal(b, m, deterministic) +} +func (dst *GroupMemberCancelMutedTips) XXX_Merge(src proto.Message) { + xxx_messageInfo_GroupMemberCancelMutedTips.Merge(dst, src) +} +func (m *GroupMemberCancelMutedTips) XXX_Size() int { + return xxx_messageInfo_GroupMemberCancelMutedTips.Size(m) +} +func (m *GroupMemberCancelMutedTips) XXX_DiscardUnknown() { + xxx_messageInfo_GroupMemberCancelMutedTips.DiscardUnknown(m) +} + +var xxx_messageInfo_GroupMemberCancelMutedTips proto.InternalMessageInfo + +func (m *GroupMemberCancelMutedTips) GetGroup() *GroupInfo { + if m != nil { + return m.Group + } + return nil +} + +func (m *GroupMemberCancelMutedTips) GetOpUser() *GroupMemberFullInfo { + if m != nil { + return m.OpUser + } + return nil +} + +func (m *GroupMemberCancelMutedTips) GetOperationTime() int64 { + if m != nil { + return m.OperationTime + } + return 0 +} + +func (m *GroupMemberCancelMutedTips) GetMutedUser() *GroupMemberFullInfo { + if m != nil { + return m.MutedUser + } + return nil +} + +type GroupMutedTips struct { + Group *GroupInfo `protobuf:"bytes,1,opt,name=group" json:"group,omitempty"` + OpUser *GroupMemberFullInfo `protobuf:"bytes,2,opt,name=opUser" json:"opUser,omitempty"` + OperationTime int64 `protobuf:"varint,3,opt,name=operationTime" json:"operationTime,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GroupMutedTips) Reset() { *m = GroupMutedTips{} } +func (m *GroupMutedTips) String() string { return proto.CompactTextString(m) } +func (*GroupMutedTips) ProtoMessage() {} +func (*GroupMutedTips) Descriptor() ([]byte, []int) { + return fileDescriptor_ws_bc78a4975e7e5f46, []int{38} +} +func (m *GroupMutedTips) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GroupMutedTips.Unmarshal(m, b) +} +func (m *GroupMutedTips) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GroupMutedTips.Marshal(b, m, deterministic) +} +func (dst *GroupMutedTips) XXX_Merge(src proto.Message) { + xxx_messageInfo_GroupMutedTips.Merge(dst, src) +} +func (m *GroupMutedTips) XXX_Size() int { + return xxx_messageInfo_GroupMutedTips.Size(m) +} +func (m *GroupMutedTips) XXX_DiscardUnknown() { + xxx_messageInfo_GroupMutedTips.DiscardUnknown(m) +} + +var xxx_messageInfo_GroupMutedTips proto.InternalMessageInfo + +func (m *GroupMutedTips) GetGroup() *GroupInfo { + if m != nil { + return m.Group + } + return nil +} + +func (m *GroupMutedTips) GetOpUser() *GroupMemberFullInfo { + if m != nil { + return m.OpUser + } + return nil +} + +func (m *GroupMutedTips) GetOperationTime() int64 { + if m != nil { + return m.OperationTime + } + return 0 +} + +type GroupCancelMutedTips struct { + Group *GroupInfo `protobuf:"bytes,1,opt,name=group" json:"group,omitempty"` + OpUser *GroupMemberFullInfo `protobuf:"bytes,2,opt,name=opUser" json:"opUser,omitempty"` + OperationTime int64 `protobuf:"varint,3,opt,name=operationTime" json:"operationTime,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GroupCancelMutedTips) Reset() { *m = GroupCancelMutedTips{} } +func (m *GroupCancelMutedTips) String() string { return proto.CompactTextString(m) } +func (*GroupCancelMutedTips) ProtoMessage() {} +func (*GroupCancelMutedTips) Descriptor() ([]byte, []int) { + return fileDescriptor_ws_bc78a4975e7e5f46, []int{39} +} +func (m *GroupCancelMutedTips) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GroupCancelMutedTips.Unmarshal(m, b) +} +func (m *GroupCancelMutedTips) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GroupCancelMutedTips.Marshal(b, m, deterministic) +} +func (dst *GroupCancelMutedTips) XXX_Merge(src proto.Message) { + xxx_messageInfo_GroupCancelMutedTips.Merge(dst, src) +} +func (m *GroupCancelMutedTips) XXX_Size() int { + return xxx_messageInfo_GroupCancelMutedTips.Size(m) +} +func (m *GroupCancelMutedTips) XXX_DiscardUnknown() { + xxx_messageInfo_GroupCancelMutedTips.DiscardUnknown(m) +} + +var xxx_messageInfo_GroupCancelMutedTips proto.InternalMessageInfo + +func (m *GroupCancelMutedTips) GetGroup() *GroupInfo { + if m != nil { + return m.Group + } + return nil +} + +func (m *GroupCancelMutedTips) GetOpUser() *GroupMemberFullInfo { + if m != nil { + return m.OpUser + } + return nil +} + +func (m *GroupCancelMutedTips) GetOperationTime() int64 { + if m != nil { + return m.OperationTime + } + return 0 +} + +type GroupMemberInfoSetTips struct { + Group *GroupInfo `protobuf:"bytes,1,opt,name=group" json:"group,omitempty"` + OpUser *GroupMemberFullInfo `protobuf:"bytes,2,opt,name=opUser" json:"opUser,omitempty"` + OperationTime int64 `protobuf:"varint,3,opt,name=operationTime" json:"operationTime,omitempty"` + ChangedUser *GroupMemberFullInfo `protobuf:"bytes,4,opt,name=changedUser" json:"changedUser,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GroupMemberInfoSetTips) Reset() { *m = GroupMemberInfoSetTips{} } +func (m *GroupMemberInfoSetTips) String() string { return proto.CompactTextString(m) } +func (*GroupMemberInfoSetTips) ProtoMessage() {} +func (*GroupMemberInfoSetTips) Descriptor() ([]byte, []int) { + return fileDescriptor_ws_bc78a4975e7e5f46, []int{40} +} +func (m *GroupMemberInfoSetTips) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GroupMemberInfoSetTips.Unmarshal(m, b) +} +func (m *GroupMemberInfoSetTips) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GroupMemberInfoSetTips.Marshal(b, m, deterministic) +} +func (dst *GroupMemberInfoSetTips) XXX_Merge(src proto.Message) { + xxx_messageInfo_GroupMemberInfoSetTips.Merge(dst, src) +} +func (m *GroupMemberInfoSetTips) XXX_Size() int { + return xxx_messageInfo_GroupMemberInfoSetTips.Size(m) +} +func (m *GroupMemberInfoSetTips) XXX_DiscardUnknown() { + xxx_messageInfo_GroupMemberInfoSetTips.DiscardUnknown(m) +} + +var xxx_messageInfo_GroupMemberInfoSetTips proto.InternalMessageInfo + +func (m *GroupMemberInfoSetTips) GetGroup() *GroupInfo { + if m != nil { + return m.Group + } + return nil +} + +func (m *GroupMemberInfoSetTips) GetOpUser() *GroupMemberFullInfo { + if m != nil { + return m.OpUser + } + return nil +} + +func (m *GroupMemberInfoSetTips) GetOperationTime() int64 { + if m != nil { + return m.OperationTime + } + return 0 +} + +func (m *GroupMemberInfoSetTips) GetChangedUser() *GroupMemberFullInfo { + if m != nil { + return m.ChangedUser + } + return nil +} + +type OrganizationChangedTips struct { + OpUser *UserInfo `protobuf:"bytes,2,opt,name=opUser" json:"opUser,omitempty"` + OperationTime int64 `protobuf:"varint,3,opt,name=operationTime" json:"operationTime,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *OrganizationChangedTips) Reset() { *m = OrganizationChangedTips{} } +func (m *OrganizationChangedTips) String() string { return proto.CompactTextString(m) } +func (*OrganizationChangedTips) ProtoMessage() {} +func (*OrganizationChangedTips) Descriptor() ([]byte, []int) { + return fileDescriptor_ws_bc78a4975e7e5f46, []int{41} +} +func (m *OrganizationChangedTips) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_OrganizationChangedTips.Unmarshal(m, b) +} +func (m *OrganizationChangedTips) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_OrganizationChangedTips.Marshal(b, m, deterministic) +} +func (dst *OrganizationChangedTips) XXX_Merge(src proto.Message) { + xxx_messageInfo_OrganizationChangedTips.Merge(dst, src) +} +func (m *OrganizationChangedTips) XXX_Size() int { + return xxx_messageInfo_OrganizationChangedTips.Size(m) +} +func (m *OrganizationChangedTips) XXX_DiscardUnknown() { + xxx_messageInfo_OrganizationChangedTips.DiscardUnknown(m) +} + +var xxx_messageInfo_OrganizationChangedTips proto.InternalMessageInfo + +func (m *OrganizationChangedTips) GetOpUser() *UserInfo { + if m != nil { + return m.OpUser + } + return nil +} + +func (m *OrganizationChangedTips) GetOperationTime() int64 { + if m != nil { + return m.OperationTime + } + return 0 +} + +type FriendApplication struct { + AddTime int64 `protobuf:"varint,1,opt,name=addTime" json:"addTime,omitempty"` + AddSource string `protobuf:"bytes,2,opt,name=addSource" json:"addSource,omitempty"` + AddWording string `protobuf:"bytes,3,opt,name=addWording" json:"addWording,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *FriendApplication) Reset() { *m = FriendApplication{} } +func (m *FriendApplication) String() string { return proto.CompactTextString(m) } +func (*FriendApplication) ProtoMessage() {} +func (*FriendApplication) Descriptor() ([]byte, []int) { + return fileDescriptor_ws_bc78a4975e7e5f46, []int{42} +} +func (m *FriendApplication) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_FriendApplication.Unmarshal(m, b) +} +func (m *FriendApplication) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_FriendApplication.Marshal(b, m, deterministic) +} +func (dst *FriendApplication) XXX_Merge(src proto.Message) { + xxx_messageInfo_FriendApplication.Merge(dst, src) +} +func (m *FriendApplication) XXX_Size() int { + return xxx_messageInfo_FriendApplication.Size(m) +} +func (m *FriendApplication) XXX_DiscardUnknown() { + xxx_messageInfo_FriendApplication.DiscardUnknown(m) +} + +var xxx_messageInfo_FriendApplication proto.InternalMessageInfo + +func (m *FriendApplication) GetAddTime() int64 { + if m != nil { + return m.AddTime + } + return 0 +} + +func (m *FriendApplication) GetAddSource() string { + if m != nil { + return m.AddSource + } + return "" +} + +func (m *FriendApplication) GetAddWording() string { + if m != nil { + return m.AddWording + } + return "" +} + +type FromToUserID struct { + FromUserID string `protobuf:"bytes,1,opt,name=fromUserID" json:"fromUserID,omitempty"` + ToUserID string `protobuf:"bytes,2,opt,name=toUserID" json:"toUserID,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *FromToUserID) Reset() { *m = FromToUserID{} } +func (m *FromToUserID) String() string { return proto.CompactTextString(m) } +func (*FromToUserID) ProtoMessage() {} +func (*FromToUserID) Descriptor() ([]byte, []int) { + return fileDescriptor_ws_bc78a4975e7e5f46, []int{43} +} +func (m *FromToUserID) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_FromToUserID.Unmarshal(m, b) +} +func (m *FromToUserID) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_FromToUserID.Marshal(b, m, deterministic) +} +func (dst *FromToUserID) XXX_Merge(src proto.Message) { + xxx_messageInfo_FromToUserID.Merge(dst, src) +} +func (m *FromToUserID) XXX_Size() int { + return xxx_messageInfo_FromToUserID.Size(m) +} +func (m *FromToUserID) XXX_DiscardUnknown() { + xxx_messageInfo_FromToUserID.DiscardUnknown(m) +} + +var xxx_messageInfo_FromToUserID proto.InternalMessageInfo + +func (m *FromToUserID) GetFromUserID() string { + if m != nil { + return m.FromUserID + } + return "" +} + +func (m *FromToUserID) GetToUserID() string { + if m != nil { + return m.ToUserID + } + return "" +} + +// FromUserID apply to add ToUserID +type FriendApplicationTips struct { + FromToUserID *FromToUserID `protobuf:"bytes,1,opt,name=fromToUserID" json:"fromToUserID,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *FriendApplicationTips) Reset() { *m = FriendApplicationTips{} } +func (m *FriendApplicationTips) String() string { return proto.CompactTextString(m) } +func (*FriendApplicationTips) ProtoMessage() {} +func (*FriendApplicationTips) Descriptor() ([]byte, []int) { + return fileDescriptor_ws_bc78a4975e7e5f46, []int{44} +} +func (m *FriendApplicationTips) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_FriendApplicationTips.Unmarshal(m, b) +} +func (m *FriendApplicationTips) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_FriendApplicationTips.Marshal(b, m, deterministic) +} +func (dst *FriendApplicationTips) XXX_Merge(src proto.Message) { + xxx_messageInfo_FriendApplicationTips.Merge(dst, src) +} +func (m *FriendApplicationTips) XXX_Size() int { + return xxx_messageInfo_FriendApplicationTips.Size(m) +} +func (m *FriendApplicationTips) XXX_DiscardUnknown() { + xxx_messageInfo_FriendApplicationTips.DiscardUnknown(m) +} + +var xxx_messageInfo_FriendApplicationTips proto.InternalMessageInfo + +func (m *FriendApplicationTips) GetFromToUserID() *FromToUserID { + if m != nil { + return m.FromToUserID + } + return nil +} + +// FromUserID accept or reject ToUserID +type FriendApplicationApprovedTips struct { + FromToUserID *FromToUserID `protobuf:"bytes,1,opt,name=fromToUserID" json:"fromToUserID,omitempty"` + HandleMsg string `protobuf:"bytes,2,opt,name=handleMsg" json:"handleMsg,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *FriendApplicationApprovedTips) Reset() { *m = FriendApplicationApprovedTips{} } +func (m *FriendApplicationApprovedTips) String() string { return proto.CompactTextString(m) } +func (*FriendApplicationApprovedTips) ProtoMessage() {} +func (*FriendApplicationApprovedTips) Descriptor() ([]byte, []int) { + return fileDescriptor_ws_bc78a4975e7e5f46, []int{45} +} +func (m *FriendApplicationApprovedTips) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_FriendApplicationApprovedTips.Unmarshal(m, b) +} +func (m *FriendApplicationApprovedTips) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_FriendApplicationApprovedTips.Marshal(b, m, deterministic) +} +func (dst *FriendApplicationApprovedTips) XXX_Merge(src proto.Message) { + xxx_messageInfo_FriendApplicationApprovedTips.Merge(dst, src) +} +func (m *FriendApplicationApprovedTips) XXX_Size() int { + return xxx_messageInfo_FriendApplicationApprovedTips.Size(m) +} +func (m *FriendApplicationApprovedTips) XXX_DiscardUnknown() { + xxx_messageInfo_FriendApplicationApprovedTips.DiscardUnknown(m) +} + +var xxx_messageInfo_FriendApplicationApprovedTips proto.InternalMessageInfo + +func (m *FriendApplicationApprovedTips) GetFromToUserID() *FromToUserID { + if m != nil { + return m.FromToUserID + } + return nil +} + +func (m *FriendApplicationApprovedTips) GetHandleMsg() string { + if m != nil { + return m.HandleMsg + } + return "" +} + +// FromUserID accept or reject ToUserID +type FriendApplicationRejectedTips struct { + FromToUserID *FromToUserID `protobuf:"bytes,1,opt,name=fromToUserID" json:"fromToUserID,omitempty"` + HandleMsg string `protobuf:"bytes,2,opt,name=handleMsg" json:"handleMsg,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *FriendApplicationRejectedTips) Reset() { *m = FriendApplicationRejectedTips{} } +func (m *FriendApplicationRejectedTips) String() string { return proto.CompactTextString(m) } +func (*FriendApplicationRejectedTips) ProtoMessage() {} +func (*FriendApplicationRejectedTips) Descriptor() ([]byte, []int) { + return fileDescriptor_ws_bc78a4975e7e5f46, []int{46} +} +func (m *FriendApplicationRejectedTips) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_FriendApplicationRejectedTips.Unmarshal(m, b) +} +func (m *FriendApplicationRejectedTips) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_FriendApplicationRejectedTips.Marshal(b, m, deterministic) +} +func (dst *FriendApplicationRejectedTips) XXX_Merge(src proto.Message) { + xxx_messageInfo_FriendApplicationRejectedTips.Merge(dst, src) +} +func (m *FriendApplicationRejectedTips) XXX_Size() int { + return xxx_messageInfo_FriendApplicationRejectedTips.Size(m) +} +func (m *FriendApplicationRejectedTips) XXX_DiscardUnknown() { + xxx_messageInfo_FriendApplicationRejectedTips.DiscardUnknown(m) +} + +var xxx_messageInfo_FriendApplicationRejectedTips proto.InternalMessageInfo + +func (m *FriendApplicationRejectedTips) GetFromToUserID() *FromToUserID { + if m != nil { + return m.FromToUserID + } + return nil +} + +func (m *FriendApplicationRejectedTips) GetHandleMsg() string { + if m != nil { + return m.HandleMsg + } + return "" +} + +// FromUserID Added a friend ToUserID +type FriendAddedTips struct { + Friend *FriendInfo `protobuf:"bytes,1,opt,name=friend" json:"friend,omitempty"` + OperationTime int64 `protobuf:"varint,2,opt,name=operationTime" json:"operationTime,omitempty"` + OpUser *PublicUserInfo `protobuf:"bytes,3,opt,name=opUser" json:"opUser,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *FriendAddedTips) Reset() { *m = FriendAddedTips{} } +func (m *FriendAddedTips) String() string { return proto.CompactTextString(m) } +func (*FriendAddedTips) ProtoMessage() {} +func (*FriendAddedTips) Descriptor() ([]byte, []int) { + return fileDescriptor_ws_bc78a4975e7e5f46, []int{47} +} +func (m *FriendAddedTips) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_FriendAddedTips.Unmarshal(m, b) +} +func (m *FriendAddedTips) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_FriendAddedTips.Marshal(b, m, deterministic) +} +func (dst *FriendAddedTips) XXX_Merge(src proto.Message) { + xxx_messageInfo_FriendAddedTips.Merge(dst, src) +} +func (m *FriendAddedTips) XXX_Size() int { + return xxx_messageInfo_FriendAddedTips.Size(m) +} +func (m *FriendAddedTips) XXX_DiscardUnknown() { + xxx_messageInfo_FriendAddedTips.DiscardUnknown(m) +} + +var xxx_messageInfo_FriendAddedTips proto.InternalMessageInfo + +func (m *FriendAddedTips) GetFriend() *FriendInfo { + if m != nil { + return m.Friend + } + return nil +} + +func (m *FriendAddedTips) GetOperationTime() int64 { + if m != nil { + return m.OperationTime + } + return 0 +} + +func (m *FriendAddedTips) GetOpUser() *PublicUserInfo { + if m != nil { + return m.OpUser + } + return nil +} + +// FromUserID deleted a friend ToUserID +type FriendDeletedTips struct { + FromToUserID *FromToUserID `protobuf:"bytes,1,opt,name=fromToUserID" json:"fromToUserID,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *FriendDeletedTips) Reset() { *m = FriendDeletedTips{} } +func (m *FriendDeletedTips) String() string { return proto.CompactTextString(m) } +func (*FriendDeletedTips) ProtoMessage() {} +func (*FriendDeletedTips) Descriptor() ([]byte, []int) { + return fileDescriptor_ws_bc78a4975e7e5f46, []int{48} +} +func (m *FriendDeletedTips) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_FriendDeletedTips.Unmarshal(m, b) +} +func (m *FriendDeletedTips) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_FriendDeletedTips.Marshal(b, m, deterministic) +} +func (dst *FriendDeletedTips) XXX_Merge(src proto.Message) { + xxx_messageInfo_FriendDeletedTips.Merge(dst, src) +} +func (m *FriendDeletedTips) XXX_Size() int { + return xxx_messageInfo_FriendDeletedTips.Size(m) +} +func (m *FriendDeletedTips) XXX_DiscardUnknown() { + xxx_messageInfo_FriendDeletedTips.DiscardUnknown(m) +} + +var xxx_messageInfo_FriendDeletedTips proto.InternalMessageInfo + +func (m *FriendDeletedTips) GetFromToUserID() *FromToUserID { + if m != nil { + return m.FromToUserID + } + return nil +} + +type BlackAddedTips struct { + FromToUserID *FromToUserID `protobuf:"bytes,1,opt,name=fromToUserID" json:"fromToUserID,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *BlackAddedTips) Reset() { *m = BlackAddedTips{} } +func (m *BlackAddedTips) String() string { return proto.CompactTextString(m) } +func (*BlackAddedTips) ProtoMessage() {} +func (*BlackAddedTips) Descriptor() ([]byte, []int) { + return fileDescriptor_ws_bc78a4975e7e5f46, []int{49} +} +func (m *BlackAddedTips) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_BlackAddedTips.Unmarshal(m, b) +} +func (m *BlackAddedTips) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_BlackAddedTips.Marshal(b, m, deterministic) +} +func (dst *BlackAddedTips) XXX_Merge(src proto.Message) { + xxx_messageInfo_BlackAddedTips.Merge(dst, src) +} +func (m *BlackAddedTips) XXX_Size() int { + return xxx_messageInfo_BlackAddedTips.Size(m) +} +func (m *BlackAddedTips) XXX_DiscardUnknown() { + xxx_messageInfo_BlackAddedTips.DiscardUnknown(m) +} + +var xxx_messageInfo_BlackAddedTips proto.InternalMessageInfo + +func (m *BlackAddedTips) GetFromToUserID() *FromToUserID { + if m != nil { + return m.FromToUserID + } + return nil +} + +type BlackDeletedTips struct { + FromToUserID *FromToUserID `protobuf:"bytes,1,opt,name=fromToUserID" json:"fromToUserID,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *BlackDeletedTips) Reset() { *m = BlackDeletedTips{} } +func (m *BlackDeletedTips) String() string { return proto.CompactTextString(m) } +func (*BlackDeletedTips) ProtoMessage() {} +func (*BlackDeletedTips) Descriptor() ([]byte, []int) { + return fileDescriptor_ws_bc78a4975e7e5f46, []int{50} +} +func (m *BlackDeletedTips) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_BlackDeletedTips.Unmarshal(m, b) +} +func (m *BlackDeletedTips) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_BlackDeletedTips.Marshal(b, m, deterministic) +} +func (dst *BlackDeletedTips) XXX_Merge(src proto.Message) { + xxx_messageInfo_BlackDeletedTips.Merge(dst, src) +} +func (m *BlackDeletedTips) XXX_Size() int { + return xxx_messageInfo_BlackDeletedTips.Size(m) +} +func (m *BlackDeletedTips) XXX_DiscardUnknown() { + xxx_messageInfo_BlackDeletedTips.DiscardUnknown(m) +} + +var xxx_messageInfo_BlackDeletedTips proto.InternalMessageInfo + +func (m *BlackDeletedTips) GetFromToUserID() *FromToUserID { + if m != nil { + return m.FromToUserID + } + return nil +} + +type FriendInfoChangedTips struct { + FromToUserID *FromToUserID `protobuf:"bytes,1,opt,name=fromToUserID" json:"fromToUserID,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *FriendInfoChangedTips) Reset() { *m = FriendInfoChangedTips{} } +func (m *FriendInfoChangedTips) String() string { return proto.CompactTextString(m) } +func (*FriendInfoChangedTips) ProtoMessage() {} +func (*FriendInfoChangedTips) Descriptor() ([]byte, []int) { + return fileDescriptor_ws_bc78a4975e7e5f46, []int{51} +} +func (m *FriendInfoChangedTips) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_FriendInfoChangedTips.Unmarshal(m, b) +} +func (m *FriendInfoChangedTips) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_FriendInfoChangedTips.Marshal(b, m, deterministic) +} +func (dst *FriendInfoChangedTips) XXX_Merge(src proto.Message) { + xxx_messageInfo_FriendInfoChangedTips.Merge(dst, src) +} +func (m *FriendInfoChangedTips) XXX_Size() int { + return xxx_messageInfo_FriendInfoChangedTips.Size(m) +} +func (m *FriendInfoChangedTips) XXX_DiscardUnknown() { + xxx_messageInfo_FriendInfoChangedTips.DiscardUnknown(m) +} + +var xxx_messageInfo_FriendInfoChangedTips proto.InternalMessageInfo + +func (m *FriendInfoChangedTips) GetFromToUserID() *FromToUserID { + if m != nil { + return m.FromToUserID + } + return nil +} + +// ////////////////////user///////////////////// +type UserInfoUpdatedTips struct { + UserID string `protobuf:"bytes,1,opt,name=userID" json:"userID,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *UserInfoUpdatedTips) Reset() { *m = UserInfoUpdatedTips{} } +func (m *UserInfoUpdatedTips) String() string { return proto.CompactTextString(m) } +func (*UserInfoUpdatedTips) ProtoMessage() {} +func (*UserInfoUpdatedTips) Descriptor() ([]byte, []int) { + return fileDescriptor_ws_bc78a4975e7e5f46, []int{52} +} +func (m *UserInfoUpdatedTips) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_UserInfoUpdatedTips.Unmarshal(m, b) +} +func (m *UserInfoUpdatedTips) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_UserInfoUpdatedTips.Marshal(b, m, deterministic) +} +func (dst *UserInfoUpdatedTips) XXX_Merge(src proto.Message) { + xxx_messageInfo_UserInfoUpdatedTips.Merge(dst, src) +} +func (m *UserInfoUpdatedTips) XXX_Size() int { + return xxx_messageInfo_UserInfoUpdatedTips.Size(m) +} +func (m *UserInfoUpdatedTips) XXX_DiscardUnknown() { + xxx_messageInfo_UserInfoUpdatedTips.DiscardUnknown(m) +} + +var xxx_messageInfo_UserInfoUpdatedTips proto.InternalMessageInfo + +func (m *UserInfoUpdatedTips) GetUserID() string { + if m != nil { + return m.UserID + } + return "" +} + +// ////////////////////conversation///////////////////// +type ConversationUpdateTips struct { + UserID string `protobuf:"bytes,1,opt,name=UserID" json:"UserID,omitempty"` + ConversationIDList []string `protobuf:"bytes,2,rep,name=conversationIDList" json:"conversationIDList,omitempty"` + UpdateUnreadCountTime int64 `protobuf:"varint,3,opt,name=updateUnreadCountTime" json:"updateUnreadCountTime,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ConversationUpdateTips) Reset() { *m = ConversationUpdateTips{} } +func (m *ConversationUpdateTips) String() string { return proto.CompactTextString(m) } +func (*ConversationUpdateTips) ProtoMessage() {} +func (*ConversationUpdateTips) Descriptor() ([]byte, []int) { + return fileDescriptor_ws_bc78a4975e7e5f46, []int{53} +} +func (m *ConversationUpdateTips) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_ConversationUpdateTips.Unmarshal(m, b) +} +func (m *ConversationUpdateTips) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_ConversationUpdateTips.Marshal(b, m, deterministic) +} +func (dst *ConversationUpdateTips) XXX_Merge(src proto.Message) { + xxx_messageInfo_ConversationUpdateTips.Merge(dst, src) +} +func (m *ConversationUpdateTips) XXX_Size() int { + return xxx_messageInfo_ConversationUpdateTips.Size(m) +} +func (m *ConversationUpdateTips) XXX_DiscardUnknown() { + xxx_messageInfo_ConversationUpdateTips.DiscardUnknown(m) +} + +var xxx_messageInfo_ConversationUpdateTips proto.InternalMessageInfo + +func (m *ConversationUpdateTips) GetUserID() string { + if m != nil { + return m.UserID + } + return "" +} + +func (m *ConversationUpdateTips) GetConversationIDList() []string { + if m != nil { + return m.ConversationIDList + } + return nil +} + +func (m *ConversationUpdateTips) GetUpdateUnreadCountTime() int64 { + if m != nil { + return m.UpdateUnreadCountTime + } + return 0 +} + +type ConversationSetPrivateTips struct { + RecvID string `protobuf:"bytes,1,opt,name=recvID" json:"recvID,omitempty"` + SendID string `protobuf:"bytes,2,opt,name=sendID" json:"sendID,omitempty"` + IsPrivate bool `protobuf:"varint,3,opt,name=isPrivate" json:"isPrivate,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ConversationSetPrivateTips) Reset() { *m = ConversationSetPrivateTips{} } +func (m *ConversationSetPrivateTips) String() string { return proto.CompactTextString(m) } +func (*ConversationSetPrivateTips) ProtoMessage() {} +func (*ConversationSetPrivateTips) Descriptor() ([]byte, []int) { + return fileDescriptor_ws_bc78a4975e7e5f46, []int{54} +} +func (m *ConversationSetPrivateTips) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_ConversationSetPrivateTips.Unmarshal(m, b) +} +func (m *ConversationSetPrivateTips) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_ConversationSetPrivateTips.Marshal(b, m, deterministic) +} +func (dst *ConversationSetPrivateTips) XXX_Merge(src proto.Message) { + xxx_messageInfo_ConversationSetPrivateTips.Merge(dst, src) +} +func (m *ConversationSetPrivateTips) XXX_Size() int { + return xxx_messageInfo_ConversationSetPrivateTips.Size(m) +} +func (m *ConversationSetPrivateTips) XXX_DiscardUnknown() { + xxx_messageInfo_ConversationSetPrivateTips.DiscardUnknown(m) +} + +var xxx_messageInfo_ConversationSetPrivateTips proto.InternalMessageInfo + +func (m *ConversationSetPrivateTips) GetRecvID() string { + if m != nil { + return m.RecvID + } + return "" +} + +func (m *ConversationSetPrivateTips) GetSendID() string { + if m != nil { + return m.SendID + } + return "" +} + +func (m *ConversationSetPrivateTips) GetIsPrivate() bool { + if m != nil { + return m.IsPrivate + } + return false +} + +// //////////////////message/////////////////////// +type DeleteMessageTips struct { + OpUserID string `protobuf:"bytes,1,opt,name=opUserID" json:"opUserID,omitempty"` + UserID string `protobuf:"bytes,2,opt,name=userID" json:"userID,omitempty"` + SeqList []uint32 `protobuf:"varint,3,rep,packed,name=seqList" json:"seqList,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *DeleteMessageTips) Reset() { *m = DeleteMessageTips{} } +func (m *DeleteMessageTips) String() string { return proto.CompactTextString(m) } +func (*DeleteMessageTips) ProtoMessage() {} +func (*DeleteMessageTips) Descriptor() ([]byte, []int) { + return fileDescriptor_ws_bc78a4975e7e5f46, []int{55} +} +func (m *DeleteMessageTips) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_DeleteMessageTips.Unmarshal(m, b) +} +func (m *DeleteMessageTips) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_DeleteMessageTips.Marshal(b, m, deterministic) +} +func (dst *DeleteMessageTips) XXX_Merge(src proto.Message) { + xxx_messageInfo_DeleteMessageTips.Merge(dst, src) +} +func (m *DeleteMessageTips) XXX_Size() int { + return xxx_messageInfo_DeleteMessageTips.Size(m) +} +func (m *DeleteMessageTips) XXX_DiscardUnknown() { + xxx_messageInfo_DeleteMessageTips.DiscardUnknown(m) +} + +var xxx_messageInfo_DeleteMessageTips proto.InternalMessageInfo + +func (m *DeleteMessageTips) GetOpUserID() string { + if m != nil { + return m.OpUserID + } + return "" +} + +func (m *DeleteMessageTips) GetUserID() string { + if m != nil { + return m.UserID + } + return "" +} + +func (m *DeleteMessageTips) GetSeqList() []uint32 { + if m != nil { + return m.SeqList + } + return nil +} + +// /cms +type RequestPagination struct { + PageNumber int32 `protobuf:"varint,1,opt,name=pageNumber" json:"pageNumber,omitempty"` + ShowNumber int32 `protobuf:"varint,2,opt,name=showNumber" json:"showNumber,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *RequestPagination) Reset() { *m = RequestPagination{} } +func (m *RequestPagination) String() string { return proto.CompactTextString(m) } +func (*RequestPagination) ProtoMessage() {} +func (*RequestPagination) Descriptor() ([]byte, []int) { + return fileDescriptor_ws_bc78a4975e7e5f46, []int{56} +} +func (m *RequestPagination) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_RequestPagination.Unmarshal(m, b) +} +func (m *RequestPagination) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_RequestPagination.Marshal(b, m, deterministic) +} +func (dst *RequestPagination) XXX_Merge(src proto.Message) { + xxx_messageInfo_RequestPagination.Merge(dst, src) +} +func (m *RequestPagination) XXX_Size() int { + return xxx_messageInfo_RequestPagination.Size(m) +} +func (m *RequestPagination) XXX_DiscardUnknown() { + xxx_messageInfo_RequestPagination.DiscardUnknown(m) +} + +var xxx_messageInfo_RequestPagination proto.InternalMessageInfo + +func (m *RequestPagination) GetPageNumber() int32 { + if m != nil { + return m.PageNumber + } + return 0 +} + +func (m *RequestPagination) GetShowNumber() int32 { + if m != nil { + return m.ShowNumber + } + return 0 +} + +type ResponsePagination struct { + CurrentPage int32 `protobuf:"varint,5,opt,name=CurrentPage" json:"CurrentPage,omitempty"` + ShowNumber int32 `protobuf:"varint,6,opt,name=ShowNumber" json:"ShowNumber,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ResponsePagination) Reset() { *m = ResponsePagination{} } +func (m *ResponsePagination) String() string { return proto.CompactTextString(m) } +func (*ResponsePagination) ProtoMessage() {} +func (*ResponsePagination) Descriptor() ([]byte, []int) { + return fileDescriptor_ws_bc78a4975e7e5f46, []int{57} +} +func (m *ResponsePagination) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_ResponsePagination.Unmarshal(m, b) +} +func (m *ResponsePagination) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_ResponsePagination.Marshal(b, m, deterministic) +} +func (dst *ResponsePagination) XXX_Merge(src proto.Message) { + xxx_messageInfo_ResponsePagination.Merge(dst, src) +} +func (m *ResponsePagination) XXX_Size() int { + return xxx_messageInfo_ResponsePagination.Size(m) +} +func (m *ResponsePagination) XXX_DiscardUnknown() { + xxx_messageInfo_ResponsePagination.DiscardUnknown(m) +} + +var xxx_messageInfo_ResponsePagination proto.InternalMessageInfo + +func (m *ResponsePagination) GetCurrentPage() int32 { + if m != nil { + return m.CurrentPage + } + return 0 +} + +func (m *ResponsePagination) GetShowNumber() int32 { + if m != nil { + return m.ShowNumber + } + return 0 +} + +// /////////////////signal////////////// +type SignalReq struct { + // Types that are valid to be assigned to Payload: + // *SignalReq_Invite + // *SignalReq_InviteInGroup + // *SignalReq_Cancel + // *SignalReq_Accept + // *SignalReq_HungUp + // *SignalReq_Reject + // *SignalReq_GetRoomByGroupID + // *SignalReq_OnRoomParticipantConnectedReq + // *SignalReq_OnRoomParticipantDisconnectedReq + // *SignalReq_GetTokenByRoomID + Payload isSignalReq_Payload `protobuf_oneof:"payload"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *SignalReq) Reset() { *m = SignalReq{} } +func (m *SignalReq) String() string { return proto.CompactTextString(m) } +func (*SignalReq) ProtoMessage() {} +func (*SignalReq) Descriptor() ([]byte, []int) { + return fileDescriptor_ws_bc78a4975e7e5f46, []int{58} +} +func (m *SignalReq) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_SignalReq.Unmarshal(m, b) +} +func (m *SignalReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_SignalReq.Marshal(b, m, deterministic) +} +func (dst *SignalReq) XXX_Merge(src proto.Message) { + xxx_messageInfo_SignalReq.Merge(dst, src) +} +func (m *SignalReq) XXX_Size() int { + return xxx_messageInfo_SignalReq.Size(m) +} +func (m *SignalReq) XXX_DiscardUnknown() { + xxx_messageInfo_SignalReq.DiscardUnknown(m) +} + +var xxx_messageInfo_SignalReq proto.InternalMessageInfo + +type isSignalReq_Payload interface { + isSignalReq_Payload() +} + +type SignalReq_Invite struct { + Invite *SignalInviteReq `protobuf:"bytes,1,opt,name=invite,oneof"` +} +type SignalReq_InviteInGroup struct { + InviteInGroup *SignalInviteInGroupReq `protobuf:"bytes,2,opt,name=inviteInGroup,oneof"` +} +type SignalReq_Cancel struct { + Cancel *SignalCancelReq `protobuf:"bytes,3,opt,name=cancel,oneof"` +} +type SignalReq_Accept struct { + Accept *SignalAcceptReq `protobuf:"bytes,4,opt,name=accept,oneof"` +} +type SignalReq_HungUp struct { + HungUp *SignalHungUpReq `protobuf:"bytes,5,opt,name=hungUp,oneof"` +} +type SignalReq_Reject struct { + Reject *SignalRejectReq `protobuf:"bytes,6,opt,name=reject,oneof"` +} +type SignalReq_GetRoomByGroupID struct { + GetRoomByGroupID *SignalGetRoomByGroupIDReq `protobuf:"bytes,7,opt,name=getRoomByGroupID,oneof"` +} +type SignalReq_OnRoomParticipantConnectedReq struct { + OnRoomParticipantConnectedReq *SignalOnRoomParticipantConnectedReq `protobuf:"bytes,8,opt,name=onRoomParticipantConnectedReq,oneof"` +} +type SignalReq_OnRoomParticipantDisconnectedReq struct { + OnRoomParticipantDisconnectedReq *SignalOnRoomParticipantDisconnectedReq `protobuf:"bytes,9,opt,name=onRoomParticipantDisconnectedReq,oneof"` +} +type SignalReq_GetTokenByRoomID struct { + GetTokenByRoomID *SignalGetTokenByRoomIDReq `protobuf:"bytes,10,opt,name=getTokenByRoomID,oneof"` +} + +func (*SignalReq_Invite) isSignalReq_Payload() {} +func (*SignalReq_InviteInGroup) isSignalReq_Payload() {} +func (*SignalReq_Cancel) isSignalReq_Payload() {} +func (*SignalReq_Accept) isSignalReq_Payload() {} +func (*SignalReq_HungUp) isSignalReq_Payload() {} +func (*SignalReq_Reject) isSignalReq_Payload() {} +func (*SignalReq_GetRoomByGroupID) isSignalReq_Payload() {} +func (*SignalReq_OnRoomParticipantConnectedReq) isSignalReq_Payload() {} +func (*SignalReq_OnRoomParticipantDisconnectedReq) isSignalReq_Payload() {} +func (*SignalReq_GetTokenByRoomID) isSignalReq_Payload() {} + +func (m *SignalReq) GetPayload() isSignalReq_Payload { + if m != nil { + return m.Payload + } + return nil +} + +func (m *SignalReq) GetInvite() *SignalInviteReq { + if x, ok := m.GetPayload().(*SignalReq_Invite); ok { + return x.Invite + } + return nil +} + +func (m *SignalReq) GetInviteInGroup() *SignalInviteInGroupReq { + if x, ok := m.GetPayload().(*SignalReq_InviteInGroup); ok { + return x.InviteInGroup + } + return nil +} + +func (m *SignalReq) GetCancel() *SignalCancelReq { + if x, ok := m.GetPayload().(*SignalReq_Cancel); ok { + return x.Cancel + } + return nil +} + +func (m *SignalReq) GetAccept() *SignalAcceptReq { + if x, ok := m.GetPayload().(*SignalReq_Accept); ok { + return x.Accept + } + return nil +} + +func (m *SignalReq) GetHungUp() *SignalHungUpReq { + if x, ok := m.GetPayload().(*SignalReq_HungUp); ok { + return x.HungUp + } + return nil +} + +func (m *SignalReq) GetReject() *SignalRejectReq { + if x, ok := m.GetPayload().(*SignalReq_Reject); ok { + return x.Reject + } + return nil +} + +func (m *SignalReq) GetGetRoomByGroupID() *SignalGetRoomByGroupIDReq { + if x, ok := m.GetPayload().(*SignalReq_GetRoomByGroupID); ok { + return x.GetRoomByGroupID + } + return nil +} + +func (m *SignalReq) GetOnRoomParticipantConnectedReq() *SignalOnRoomParticipantConnectedReq { + if x, ok := m.GetPayload().(*SignalReq_OnRoomParticipantConnectedReq); ok { + return x.OnRoomParticipantConnectedReq + } + return nil +} + +func (m *SignalReq) GetOnRoomParticipantDisconnectedReq() *SignalOnRoomParticipantDisconnectedReq { + if x, ok := m.GetPayload().(*SignalReq_OnRoomParticipantDisconnectedReq); ok { + return x.OnRoomParticipantDisconnectedReq + } + return nil +} + +func (m *SignalReq) GetGetTokenByRoomID() *SignalGetTokenByRoomIDReq { + if x, ok := m.GetPayload().(*SignalReq_GetTokenByRoomID); ok { + return x.GetTokenByRoomID + } + return nil +} + +// XXX_OneofFuncs is for the internal use of the proto package. +func (*SignalReq) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { + return _SignalReq_OneofMarshaler, _SignalReq_OneofUnmarshaler, _SignalReq_OneofSizer, []interface{}{ + (*SignalReq_Invite)(nil), + (*SignalReq_InviteInGroup)(nil), + (*SignalReq_Cancel)(nil), + (*SignalReq_Accept)(nil), + (*SignalReq_HungUp)(nil), + (*SignalReq_Reject)(nil), + (*SignalReq_GetRoomByGroupID)(nil), + (*SignalReq_OnRoomParticipantConnectedReq)(nil), + (*SignalReq_OnRoomParticipantDisconnectedReq)(nil), + (*SignalReq_GetTokenByRoomID)(nil), + } +} + +func _SignalReq_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { + m := msg.(*SignalReq) + // payload + switch x := m.Payload.(type) { + case *SignalReq_Invite: + b.EncodeVarint(1<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.Invite); err != nil { + return err + } + case *SignalReq_InviteInGroup: + b.EncodeVarint(2<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.InviteInGroup); err != nil { + return err + } + case *SignalReq_Cancel: + b.EncodeVarint(3<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.Cancel); err != nil { + return err + } + case *SignalReq_Accept: + b.EncodeVarint(4<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.Accept); err != nil { + return err + } + case *SignalReq_HungUp: + b.EncodeVarint(5<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.HungUp); err != nil { + return err + } + case *SignalReq_Reject: + b.EncodeVarint(6<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.Reject); err != nil { + return err + } + case *SignalReq_GetRoomByGroupID: + b.EncodeVarint(7<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.GetRoomByGroupID); err != nil { + return err + } + case *SignalReq_OnRoomParticipantConnectedReq: + b.EncodeVarint(8<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.OnRoomParticipantConnectedReq); err != nil { + return err + } + case *SignalReq_OnRoomParticipantDisconnectedReq: + b.EncodeVarint(9<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.OnRoomParticipantDisconnectedReq); err != nil { + return err + } + case *SignalReq_GetTokenByRoomID: + b.EncodeVarint(10<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.GetTokenByRoomID); err != nil { + return err + } + case nil: + default: + return fmt.Errorf("SignalReq.Payload has unexpected type %T", x) + } + return nil +} + +func _SignalReq_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { + m := msg.(*SignalReq) + switch tag { + case 1: // payload.invite + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(SignalInviteReq) + err := b.DecodeMessage(msg) + m.Payload = &SignalReq_Invite{msg} + return true, err + case 2: // payload.inviteInGroup + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(SignalInviteInGroupReq) + err := b.DecodeMessage(msg) + m.Payload = &SignalReq_InviteInGroup{msg} + return true, err + case 3: // payload.cancel + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(SignalCancelReq) + err := b.DecodeMessage(msg) + m.Payload = &SignalReq_Cancel{msg} + return true, err + case 4: // payload.accept + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(SignalAcceptReq) + err := b.DecodeMessage(msg) + m.Payload = &SignalReq_Accept{msg} + return true, err + case 5: // payload.hungUp + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(SignalHungUpReq) + err := b.DecodeMessage(msg) + m.Payload = &SignalReq_HungUp{msg} + return true, err + case 6: // payload.reject + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(SignalRejectReq) + err := b.DecodeMessage(msg) + m.Payload = &SignalReq_Reject{msg} + return true, err + case 7: // payload.getRoomByGroupID + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(SignalGetRoomByGroupIDReq) + err := b.DecodeMessage(msg) + m.Payload = &SignalReq_GetRoomByGroupID{msg} + return true, err + case 8: // payload.onRoomParticipantConnectedReq + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(SignalOnRoomParticipantConnectedReq) + err := b.DecodeMessage(msg) + m.Payload = &SignalReq_OnRoomParticipantConnectedReq{msg} + return true, err + case 9: // payload.onRoomParticipantDisconnectedReq + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(SignalOnRoomParticipantDisconnectedReq) + err := b.DecodeMessage(msg) + m.Payload = &SignalReq_OnRoomParticipantDisconnectedReq{msg} + return true, err + case 10: // payload.getTokenByRoomID + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(SignalGetTokenByRoomIDReq) + err := b.DecodeMessage(msg) + m.Payload = &SignalReq_GetTokenByRoomID{msg} + return true, err + default: + return false, nil + } +} + +func _SignalReq_OneofSizer(msg proto.Message) (n int) { + m := msg.(*SignalReq) + // payload + switch x := m.Payload.(type) { + case *SignalReq_Invite: + s := proto.Size(x.Invite) + n += 1 // tag and wire + n += proto.SizeVarint(uint64(s)) + n += s + case *SignalReq_InviteInGroup: + s := proto.Size(x.InviteInGroup) + n += 1 // tag and wire + n += proto.SizeVarint(uint64(s)) + n += s + case *SignalReq_Cancel: + s := proto.Size(x.Cancel) + n += 1 // tag and wire + n += proto.SizeVarint(uint64(s)) + n += s + case *SignalReq_Accept: + s := proto.Size(x.Accept) + n += 1 // tag and wire + n += proto.SizeVarint(uint64(s)) + n += s + case *SignalReq_HungUp: + s := proto.Size(x.HungUp) + n += 1 // tag and wire + n += proto.SizeVarint(uint64(s)) + n += s + case *SignalReq_Reject: + s := proto.Size(x.Reject) + n += 1 // tag and wire + n += proto.SizeVarint(uint64(s)) + n += s + case *SignalReq_GetRoomByGroupID: + s := proto.Size(x.GetRoomByGroupID) + n += 1 // tag and wire + n += proto.SizeVarint(uint64(s)) + n += s + case *SignalReq_OnRoomParticipantConnectedReq: + s := proto.Size(x.OnRoomParticipantConnectedReq) + n += 1 // tag and wire + n += proto.SizeVarint(uint64(s)) + n += s + case *SignalReq_OnRoomParticipantDisconnectedReq: + s := proto.Size(x.OnRoomParticipantDisconnectedReq) + n += 1 // tag and wire + n += proto.SizeVarint(uint64(s)) + n += s + case *SignalReq_GetTokenByRoomID: + s := proto.Size(x.GetTokenByRoomID) + n += 1 // tag and wire + n += proto.SizeVarint(uint64(s)) + n += s + case nil: + default: + panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) + } + return n +} + +type SignalResp struct { + // Types that are valid to be assigned to Payload: + // *SignalResp_Invite + // *SignalResp_InviteInGroup + // *SignalResp_Cancel + // *SignalResp_Accept + // *SignalResp_HungUp + // *SignalResp_Reject + // *SignalResp_GetRoomByGroupID + // *SignalResp_GetTokenByRoomID + Payload isSignalResp_Payload `protobuf_oneof:"payload"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *SignalResp) Reset() { *m = SignalResp{} } +func (m *SignalResp) String() string { return proto.CompactTextString(m) } +func (*SignalResp) ProtoMessage() {} +func (*SignalResp) Descriptor() ([]byte, []int) { + return fileDescriptor_ws_bc78a4975e7e5f46, []int{59} +} +func (m *SignalResp) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_SignalResp.Unmarshal(m, b) +} +func (m *SignalResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_SignalResp.Marshal(b, m, deterministic) +} +func (dst *SignalResp) XXX_Merge(src proto.Message) { + xxx_messageInfo_SignalResp.Merge(dst, src) +} +func (m *SignalResp) XXX_Size() int { + return xxx_messageInfo_SignalResp.Size(m) +} +func (m *SignalResp) XXX_DiscardUnknown() { + xxx_messageInfo_SignalResp.DiscardUnknown(m) +} + +var xxx_messageInfo_SignalResp proto.InternalMessageInfo + +type isSignalResp_Payload interface { + isSignalResp_Payload() +} + +type SignalResp_Invite struct { + Invite *SignalInviteReply `protobuf:"bytes,1,opt,name=invite,oneof"` +} +type SignalResp_InviteInGroup struct { + InviteInGroup *SignalInviteInGroupReply `protobuf:"bytes,2,opt,name=inviteInGroup,oneof"` +} +type SignalResp_Cancel struct { + Cancel *SignalCancelReply `protobuf:"bytes,3,opt,name=cancel,oneof"` +} +type SignalResp_Accept struct { + Accept *SignalAcceptReply `protobuf:"bytes,4,opt,name=accept,oneof"` +} +type SignalResp_HungUp struct { + HungUp *SignalHungUpReply `protobuf:"bytes,5,opt,name=hungUp,oneof"` +} +type SignalResp_Reject struct { + Reject *SignalRejectReply `protobuf:"bytes,6,opt,name=reject,oneof"` +} +type SignalResp_GetRoomByGroupID struct { + GetRoomByGroupID *SignalGetRoomByGroupIDReply `protobuf:"bytes,7,opt,name=getRoomByGroupID,oneof"` +} +type SignalResp_GetTokenByRoomID struct { + GetTokenByRoomID *SignalGetTokenByRoomIDReply `protobuf:"bytes,8,opt,name=getTokenByRoomID,oneof"` +} + +func (*SignalResp_Invite) isSignalResp_Payload() {} +func (*SignalResp_InviteInGroup) isSignalResp_Payload() {} +func (*SignalResp_Cancel) isSignalResp_Payload() {} +func (*SignalResp_Accept) isSignalResp_Payload() {} +func (*SignalResp_HungUp) isSignalResp_Payload() {} +func (*SignalResp_Reject) isSignalResp_Payload() {} +func (*SignalResp_GetRoomByGroupID) isSignalResp_Payload() {} +func (*SignalResp_GetTokenByRoomID) isSignalResp_Payload() {} + +func (m *SignalResp) GetPayload() isSignalResp_Payload { + if m != nil { + return m.Payload + } + return nil +} + +func (m *SignalResp) GetInvite() *SignalInviteReply { + if x, ok := m.GetPayload().(*SignalResp_Invite); ok { + return x.Invite + } + return nil +} + +func (m *SignalResp) GetInviteInGroup() *SignalInviteInGroupReply { + if x, ok := m.GetPayload().(*SignalResp_InviteInGroup); ok { + return x.InviteInGroup + } + return nil +} + +func (m *SignalResp) GetCancel() *SignalCancelReply { + if x, ok := m.GetPayload().(*SignalResp_Cancel); ok { + return x.Cancel + } + return nil +} + +func (m *SignalResp) GetAccept() *SignalAcceptReply { + if x, ok := m.GetPayload().(*SignalResp_Accept); ok { + return x.Accept + } + return nil +} + +func (m *SignalResp) GetHungUp() *SignalHungUpReply { + if x, ok := m.GetPayload().(*SignalResp_HungUp); ok { + return x.HungUp + } + return nil +} + +func (m *SignalResp) GetReject() *SignalRejectReply { + if x, ok := m.GetPayload().(*SignalResp_Reject); ok { + return x.Reject + } + return nil +} + +func (m *SignalResp) GetGetRoomByGroupID() *SignalGetRoomByGroupIDReply { + if x, ok := m.GetPayload().(*SignalResp_GetRoomByGroupID); ok { + return x.GetRoomByGroupID + } + return nil +} + +func (m *SignalResp) GetGetTokenByRoomID() *SignalGetTokenByRoomIDReply { + if x, ok := m.GetPayload().(*SignalResp_GetTokenByRoomID); ok { + return x.GetTokenByRoomID + } + return nil +} + +// XXX_OneofFuncs is for the internal use of the proto package. +func (*SignalResp) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { + return _SignalResp_OneofMarshaler, _SignalResp_OneofUnmarshaler, _SignalResp_OneofSizer, []interface{}{ + (*SignalResp_Invite)(nil), + (*SignalResp_InviteInGroup)(nil), + (*SignalResp_Cancel)(nil), + (*SignalResp_Accept)(nil), + (*SignalResp_HungUp)(nil), + (*SignalResp_Reject)(nil), + (*SignalResp_GetRoomByGroupID)(nil), + (*SignalResp_GetTokenByRoomID)(nil), + } +} + +func _SignalResp_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { + m := msg.(*SignalResp) + // payload + switch x := m.Payload.(type) { + case *SignalResp_Invite: + b.EncodeVarint(1<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.Invite); err != nil { + return err + } + case *SignalResp_InviteInGroup: + b.EncodeVarint(2<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.InviteInGroup); err != nil { + return err + } + case *SignalResp_Cancel: + b.EncodeVarint(3<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.Cancel); err != nil { + return err + } + case *SignalResp_Accept: + b.EncodeVarint(4<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.Accept); err != nil { + return err + } + case *SignalResp_HungUp: + b.EncodeVarint(5<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.HungUp); err != nil { + return err + } + case *SignalResp_Reject: + b.EncodeVarint(6<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.Reject); err != nil { + return err + } + case *SignalResp_GetRoomByGroupID: + b.EncodeVarint(7<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.GetRoomByGroupID); err != nil { + return err + } + case *SignalResp_GetTokenByRoomID: + b.EncodeVarint(8<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.GetTokenByRoomID); err != nil { + return err + } + case nil: + default: + return fmt.Errorf("SignalResp.Payload has unexpected type %T", x) + } + return nil +} + +func _SignalResp_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { + m := msg.(*SignalResp) + switch tag { + case 1: // payload.invite + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(SignalInviteReply) + err := b.DecodeMessage(msg) + m.Payload = &SignalResp_Invite{msg} + return true, err + case 2: // payload.inviteInGroup + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(SignalInviteInGroupReply) + err := b.DecodeMessage(msg) + m.Payload = &SignalResp_InviteInGroup{msg} + return true, err + case 3: // payload.cancel + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(SignalCancelReply) + err := b.DecodeMessage(msg) + m.Payload = &SignalResp_Cancel{msg} + return true, err + case 4: // payload.accept + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(SignalAcceptReply) + err := b.DecodeMessage(msg) + m.Payload = &SignalResp_Accept{msg} + return true, err + case 5: // payload.hungUp + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(SignalHungUpReply) + err := b.DecodeMessage(msg) + m.Payload = &SignalResp_HungUp{msg} + return true, err + case 6: // payload.reject + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(SignalRejectReply) + err := b.DecodeMessage(msg) + m.Payload = &SignalResp_Reject{msg} + return true, err + case 7: // payload.getRoomByGroupID + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(SignalGetRoomByGroupIDReply) + err := b.DecodeMessage(msg) + m.Payload = &SignalResp_GetRoomByGroupID{msg} + return true, err + case 8: // payload.getTokenByRoomID + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(SignalGetTokenByRoomIDReply) + err := b.DecodeMessage(msg) + m.Payload = &SignalResp_GetTokenByRoomID{msg} + return true, err + default: + return false, nil + } +} + +func _SignalResp_OneofSizer(msg proto.Message) (n int) { + m := msg.(*SignalResp) + // payload + switch x := m.Payload.(type) { + case *SignalResp_Invite: + s := proto.Size(x.Invite) + n += 1 // tag and wire + n += proto.SizeVarint(uint64(s)) + n += s + case *SignalResp_InviteInGroup: + s := proto.Size(x.InviteInGroup) + n += 1 // tag and wire + n += proto.SizeVarint(uint64(s)) + n += s + case *SignalResp_Cancel: + s := proto.Size(x.Cancel) + n += 1 // tag and wire + n += proto.SizeVarint(uint64(s)) + n += s + case *SignalResp_Accept: + s := proto.Size(x.Accept) + n += 1 // tag and wire + n += proto.SizeVarint(uint64(s)) + n += s + case *SignalResp_HungUp: + s := proto.Size(x.HungUp) + n += 1 // tag and wire + n += proto.SizeVarint(uint64(s)) + n += s + case *SignalResp_Reject: + s := proto.Size(x.Reject) + n += 1 // tag and wire + n += proto.SizeVarint(uint64(s)) + n += s + case *SignalResp_GetRoomByGroupID: + s := proto.Size(x.GetRoomByGroupID) + n += 1 // tag and wire + n += proto.SizeVarint(uint64(s)) + n += s + case *SignalResp_GetTokenByRoomID: + s := proto.Size(x.GetTokenByRoomID) + n += 1 // tag and wire + n += proto.SizeVarint(uint64(s)) + n += s + case nil: + default: + panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) + } + return n +} + +type InvitationInfo struct { + InviterUserID string `protobuf:"bytes,1,opt,name=inviterUserID" json:"inviterUserID,omitempty"` + InviteeUserIDList []string `protobuf:"bytes,2,rep,name=inviteeUserIDList" json:"inviteeUserIDList,omitempty"` + CustomData string `protobuf:"bytes,3,opt,name=customData" json:"customData,omitempty"` + GroupID string `protobuf:"bytes,4,opt,name=groupID" json:"groupID,omitempty"` + RoomID string `protobuf:"bytes,5,opt,name=roomID" json:"roomID,omitempty"` + Timeout int32 `protobuf:"varint,6,opt,name=timeout" json:"timeout,omitempty"` + MediaType string `protobuf:"bytes,7,opt,name=mediaType" json:"mediaType,omitempty"` + PlatformID int32 `protobuf:"varint,8,opt,name=platformID" json:"platformID,omitempty"` + SessionType int32 `protobuf:"varint,9,opt,name=sessionType" json:"sessionType,omitempty"` + InitiateTime int32 `protobuf:"varint,10,opt,name=initiateTime" json:"initiateTime,omitempty"` + BusyLineUserIDList []string `protobuf:"bytes,11,rep,name=busyLineUserIDList" json:"busyLineUserIDList,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *InvitationInfo) Reset() { *m = InvitationInfo{} } +func (m *InvitationInfo) String() string { return proto.CompactTextString(m) } +func (*InvitationInfo) ProtoMessage() {} +func (*InvitationInfo) Descriptor() ([]byte, []int) { + return fileDescriptor_ws_bc78a4975e7e5f46, []int{60} +} +func (m *InvitationInfo) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_InvitationInfo.Unmarshal(m, b) +} +func (m *InvitationInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_InvitationInfo.Marshal(b, m, deterministic) +} +func (dst *InvitationInfo) XXX_Merge(src proto.Message) { + xxx_messageInfo_InvitationInfo.Merge(dst, src) +} +func (m *InvitationInfo) XXX_Size() int { + return xxx_messageInfo_InvitationInfo.Size(m) +} +func (m *InvitationInfo) XXX_DiscardUnknown() { + xxx_messageInfo_InvitationInfo.DiscardUnknown(m) +} + +var xxx_messageInfo_InvitationInfo proto.InternalMessageInfo + +func (m *InvitationInfo) GetInviterUserID() string { + if m != nil { + return m.InviterUserID + } + return "" +} + +func (m *InvitationInfo) GetInviteeUserIDList() []string { + if m != nil { + return m.InviteeUserIDList + } + return nil +} + +func (m *InvitationInfo) GetCustomData() string { + if m != nil { + return m.CustomData + } + return "" +} + +func (m *InvitationInfo) GetGroupID() string { + if m != nil { + return m.GroupID + } + return "" +} + +func (m *InvitationInfo) GetRoomID() string { + if m != nil { + return m.RoomID + } + return "" +} + +func (m *InvitationInfo) GetTimeout() int32 { + if m != nil { + return m.Timeout + } + return 0 +} + +func (m *InvitationInfo) GetMediaType() string { + if m != nil { + return m.MediaType + } + return "" +} + +func (m *InvitationInfo) GetPlatformID() int32 { + if m != nil { + return m.PlatformID + } + return 0 +} + +func (m *InvitationInfo) GetSessionType() int32 { + if m != nil { + return m.SessionType + } + return 0 +} + +func (m *InvitationInfo) GetInitiateTime() int32 { + if m != nil { + return m.InitiateTime + } + return 0 +} + +func (m *InvitationInfo) GetBusyLineUserIDList() []string { + if m != nil { + return m.BusyLineUserIDList + } + return nil +} + +type ParticipantMetaData struct { + GroupInfo *GroupInfo `protobuf:"bytes,1,opt,name=groupInfo" json:"groupInfo,omitempty"` + GroupMemberInfo *GroupMemberFullInfo `protobuf:"bytes,2,opt,name=groupMemberInfo" json:"groupMemberInfo,omitempty"` + UserInfo *PublicUserInfo `protobuf:"bytes,3,opt,name=userInfo" json:"userInfo,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ParticipantMetaData) Reset() { *m = ParticipantMetaData{} } +func (m *ParticipantMetaData) String() string { return proto.CompactTextString(m) } +func (*ParticipantMetaData) ProtoMessage() {} +func (*ParticipantMetaData) Descriptor() ([]byte, []int) { + return fileDescriptor_ws_bc78a4975e7e5f46, []int{61} +} +func (m *ParticipantMetaData) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_ParticipantMetaData.Unmarshal(m, b) +} +func (m *ParticipantMetaData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_ParticipantMetaData.Marshal(b, m, deterministic) +} +func (dst *ParticipantMetaData) XXX_Merge(src proto.Message) { + xxx_messageInfo_ParticipantMetaData.Merge(dst, src) +} +func (m *ParticipantMetaData) XXX_Size() int { + return xxx_messageInfo_ParticipantMetaData.Size(m) +} +func (m *ParticipantMetaData) XXX_DiscardUnknown() { + xxx_messageInfo_ParticipantMetaData.DiscardUnknown(m) +} + +var xxx_messageInfo_ParticipantMetaData proto.InternalMessageInfo + +func (m *ParticipantMetaData) GetGroupInfo() *GroupInfo { + if m != nil { + return m.GroupInfo + } + return nil +} + +func (m *ParticipantMetaData) GetGroupMemberInfo() *GroupMemberFullInfo { + if m != nil { + return m.GroupMemberInfo + } + return nil +} + +func (m *ParticipantMetaData) GetUserInfo() *PublicUserInfo { + if m != nil { + return m.UserInfo + } + return nil +} + +type SignalInviteReq struct { + OpUserID string `protobuf:"bytes,1,opt,name=opUserID" json:"opUserID,omitempty"` + Invitation *InvitationInfo `protobuf:"bytes,2,opt,name=invitation" json:"invitation,omitempty"` + OfflinePushInfo *OfflinePushInfo `protobuf:"bytes,3,opt,name=offlinePushInfo" json:"offlinePushInfo,omitempty"` + Participant *ParticipantMetaData `protobuf:"bytes,4,opt,name=participant" json:"participant,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *SignalInviteReq) Reset() { *m = SignalInviteReq{} } +func (m *SignalInviteReq) String() string { return proto.CompactTextString(m) } +func (*SignalInviteReq) ProtoMessage() {} +func (*SignalInviteReq) Descriptor() ([]byte, []int) { + return fileDescriptor_ws_bc78a4975e7e5f46, []int{62} +} +func (m *SignalInviteReq) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_SignalInviteReq.Unmarshal(m, b) +} +func (m *SignalInviteReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_SignalInviteReq.Marshal(b, m, deterministic) +} +func (dst *SignalInviteReq) XXX_Merge(src proto.Message) { + xxx_messageInfo_SignalInviteReq.Merge(dst, src) +} +func (m *SignalInviteReq) XXX_Size() int { + return xxx_messageInfo_SignalInviteReq.Size(m) +} +func (m *SignalInviteReq) XXX_DiscardUnknown() { + xxx_messageInfo_SignalInviteReq.DiscardUnknown(m) +} + +var xxx_messageInfo_SignalInviteReq proto.InternalMessageInfo + +func (m *SignalInviteReq) GetOpUserID() string { + if m != nil { + return m.OpUserID + } + return "" +} + +func (m *SignalInviteReq) GetInvitation() *InvitationInfo { + if m != nil { + return m.Invitation + } + return nil +} + +func (m *SignalInviteReq) GetOfflinePushInfo() *OfflinePushInfo { + if m != nil { + return m.OfflinePushInfo + } + return nil +} + +func (m *SignalInviteReq) GetParticipant() *ParticipantMetaData { + if m != nil { + return m.Participant + } + return nil +} + +type SignalInviteReply struct { + Token string `protobuf:"bytes,1,opt,name=token" json:"token,omitempty"` + RoomID string `protobuf:"bytes,2,opt,name=roomID" json:"roomID,omitempty"` + LiveURL string `protobuf:"bytes,3,opt,name=liveURL" json:"liveURL,omitempty"` + BusyLineUserIDList []string `protobuf:"bytes,4,rep,name=busyLineUserIDList" json:"busyLineUserIDList,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *SignalInviteReply) Reset() { *m = SignalInviteReply{} } +func (m *SignalInviteReply) String() string { return proto.CompactTextString(m) } +func (*SignalInviteReply) ProtoMessage() {} +func (*SignalInviteReply) Descriptor() ([]byte, []int) { + return fileDescriptor_ws_bc78a4975e7e5f46, []int{63} +} +func (m *SignalInviteReply) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_SignalInviteReply.Unmarshal(m, b) +} +func (m *SignalInviteReply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_SignalInviteReply.Marshal(b, m, deterministic) +} +func (dst *SignalInviteReply) XXX_Merge(src proto.Message) { + xxx_messageInfo_SignalInviteReply.Merge(dst, src) +} +func (m *SignalInviteReply) XXX_Size() int { + return xxx_messageInfo_SignalInviteReply.Size(m) +} +func (m *SignalInviteReply) XXX_DiscardUnknown() { + xxx_messageInfo_SignalInviteReply.DiscardUnknown(m) +} + +var xxx_messageInfo_SignalInviteReply proto.InternalMessageInfo + +func (m *SignalInviteReply) GetToken() string { + if m != nil { + return m.Token + } + return "" +} + +func (m *SignalInviteReply) GetRoomID() string { + if m != nil { + return m.RoomID + } + return "" +} + +func (m *SignalInviteReply) GetLiveURL() string { + if m != nil { + return m.LiveURL + } + return "" +} + +func (m *SignalInviteReply) GetBusyLineUserIDList() []string { + if m != nil { + return m.BusyLineUserIDList + } + return nil +} + +type SignalInviteInGroupReq struct { + OpUserID string `protobuf:"bytes,1,opt,name=opUserID" json:"opUserID,omitempty"` + Invitation *InvitationInfo `protobuf:"bytes,2,opt,name=invitation" json:"invitation,omitempty"` + OfflinePushInfo *OfflinePushInfo `protobuf:"bytes,3,opt,name=offlinePushInfo" json:"offlinePushInfo,omitempty"` + Participant *ParticipantMetaData `protobuf:"bytes,4,opt,name=participant" json:"participant,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *SignalInviteInGroupReq) Reset() { *m = SignalInviteInGroupReq{} } +func (m *SignalInviteInGroupReq) String() string { return proto.CompactTextString(m) } +func (*SignalInviteInGroupReq) ProtoMessage() {} +func (*SignalInviteInGroupReq) Descriptor() ([]byte, []int) { + return fileDescriptor_ws_bc78a4975e7e5f46, []int{64} +} +func (m *SignalInviteInGroupReq) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_SignalInviteInGroupReq.Unmarshal(m, b) +} +func (m *SignalInviteInGroupReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_SignalInviteInGroupReq.Marshal(b, m, deterministic) +} +func (dst *SignalInviteInGroupReq) XXX_Merge(src proto.Message) { + xxx_messageInfo_SignalInviteInGroupReq.Merge(dst, src) +} +func (m *SignalInviteInGroupReq) XXX_Size() int { + return xxx_messageInfo_SignalInviteInGroupReq.Size(m) +} +func (m *SignalInviteInGroupReq) XXX_DiscardUnknown() { + xxx_messageInfo_SignalInviteInGroupReq.DiscardUnknown(m) +} + +var xxx_messageInfo_SignalInviteInGroupReq proto.InternalMessageInfo + +func (m *SignalInviteInGroupReq) GetOpUserID() string { + if m != nil { + return m.OpUserID + } + return "" +} + +func (m *SignalInviteInGroupReq) GetInvitation() *InvitationInfo { + if m != nil { + return m.Invitation + } + return nil +} + +func (m *SignalInviteInGroupReq) GetOfflinePushInfo() *OfflinePushInfo { + if m != nil { + return m.OfflinePushInfo + } + return nil +} + +func (m *SignalInviteInGroupReq) GetParticipant() *ParticipantMetaData { + if m != nil { + return m.Participant + } + return nil +} + +type SignalInviteInGroupReply struct { + Token string `protobuf:"bytes,1,opt,name=token" json:"token,omitempty"` + RoomID string `protobuf:"bytes,2,opt,name=roomID" json:"roomID,omitempty"` + LiveURL string `protobuf:"bytes,3,opt,name=liveURL" json:"liveURL,omitempty"` + BusyLineUserIDList []string `protobuf:"bytes,4,rep,name=busyLineUserIDList" json:"busyLineUserIDList,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *SignalInviteInGroupReply) Reset() { *m = SignalInviteInGroupReply{} } +func (m *SignalInviteInGroupReply) String() string { return proto.CompactTextString(m) } +func (*SignalInviteInGroupReply) ProtoMessage() {} +func (*SignalInviteInGroupReply) Descriptor() ([]byte, []int) { + return fileDescriptor_ws_bc78a4975e7e5f46, []int{65} +} +func (m *SignalInviteInGroupReply) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_SignalInviteInGroupReply.Unmarshal(m, b) +} +func (m *SignalInviteInGroupReply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_SignalInviteInGroupReply.Marshal(b, m, deterministic) +} +func (dst *SignalInviteInGroupReply) XXX_Merge(src proto.Message) { + xxx_messageInfo_SignalInviteInGroupReply.Merge(dst, src) +} +func (m *SignalInviteInGroupReply) XXX_Size() int { + return xxx_messageInfo_SignalInviteInGroupReply.Size(m) +} +func (m *SignalInviteInGroupReply) XXX_DiscardUnknown() { + xxx_messageInfo_SignalInviteInGroupReply.DiscardUnknown(m) +} + +var xxx_messageInfo_SignalInviteInGroupReply proto.InternalMessageInfo + +func (m *SignalInviteInGroupReply) GetToken() string { + if m != nil { + return m.Token + } + return "" +} + +func (m *SignalInviteInGroupReply) GetRoomID() string { + if m != nil { + return m.RoomID + } + return "" +} + +func (m *SignalInviteInGroupReply) GetLiveURL() string { + if m != nil { + return m.LiveURL + } + return "" +} + +func (m *SignalInviteInGroupReply) GetBusyLineUserIDList() []string { + if m != nil { + return m.BusyLineUserIDList + } + return nil +} + +type SignalCancelReq struct { + OpUserID string `protobuf:"bytes,1,opt,name=opUserID" json:"opUserID,omitempty"` + Invitation *InvitationInfo `protobuf:"bytes,2,opt,name=invitation" json:"invitation,omitempty"` + OfflinePushInfo *OfflinePushInfo `protobuf:"bytes,3,opt,name=offlinePushInfo" json:"offlinePushInfo,omitempty"` + Participant *ParticipantMetaData `protobuf:"bytes,4,opt,name=participant" json:"participant,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *SignalCancelReq) Reset() { *m = SignalCancelReq{} } +func (m *SignalCancelReq) String() string { return proto.CompactTextString(m) } +func (*SignalCancelReq) ProtoMessage() {} +func (*SignalCancelReq) Descriptor() ([]byte, []int) { + return fileDescriptor_ws_bc78a4975e7e5f46, []int{66} +} +func (m *SignalCancelReq) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_SignalCancelReq.Unmarshal(m, b) +} +func (m *SignalCancelReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_SignalCancelReq.Marshal(b, m, deterministic) +} +func (dst *SignalCancelReq) XXX_Merge(src proto.Message) { + xxx_messageInfo_SignalCancelReq.Merge(dst, src) +} +func (m *SignalCancelReq) XXX_Size() int { + return xxx_messageInfo_SignalCancelReq.Size(m) +} +func (m *SignalCancelReq) XXX_DiscardUnknown() { + xxx_messageInfo_SignalCancelReq.DiscardUnknown(m) +} + +var xxx_messageInfo_SignalCancelReq proto.InternalMessageInfo + +func (m *SignalCancelReq) GetOpUserID() string { + if m != nil { + return m.OpUserID + } + return "" +} + +func (m *SignalCancelReq) GetInvitation() *InvitationInfo { + if m != nil { + return m.Invitation + } + return nil +} + +func (m *SignalCancelReq) GetOfflinePushInfo() *OfflinePushInfo { + if m != nil { + return m.OfflinePushInfo + } + return nil +} + +func (m *SignalCancelReq) GetParticipant() *ParticipantMetaData { + if m != nil { + return m.Participant + } + return nil +} + +type SignalCancelReply struct { + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *SignalCancelReply) Reset() { *m = SignalCancelReply{} } +func (m *SignalCancelReply) String() string { return proto.CompactTextString(m) } +func (*SignalCancelReply) ProtoMessage() {} +func (*SignalCancelReply) Descriptor() ([]byte, []int) { + return fileDescriptor_ws_bc78a4975e7e5f46, []int{67} +} +func (m *SignalCancelReply) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_SignalCancelReply.Unmarshal(m, b) +} +func (m *SignalCancelReply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_SignalCancelReply.Marshal(b, m, deterministic) +} +func (dst *SignalCancelReply) XXX_Merge(src proto.Message) { + xxx_messageInfo_SignalCancelReply.Merge(dst, src) +} +func (m *SignalCancelReply) XXX_Size() int { + return xxx_messageInfo_SignalCancelReply.Size(m) +} +func (m *SignalCancelReply) XXX_DiscardUnknown() { + xxx_messageInfo_SignalCancelReply.DiscardUnknown(m) +} + +var xxx_messageInfo_SignalCancelReply proto.InternalMessageInfo + +type SignalAcceptReq struct { + OpUserID string `protobuf:"bytes,1,opt,name=opUserID" json:"opUserID,omitempty"` + Invitation *InvitationInfo `protobuf:"bytes,2,opt,name=invitation" json:"invitation,omitempty"` + OfflinePushInfo *OfflinePushInfo `protobuf:"bytes,3,opt,name=offlinePushInfo" json:"offlinePushInfo,omitempty"` + Participant *ParticipantMetaData `protobuf:"bytes,4,opt,name=participant" json:"participant,omitempty"` + OpUserPlatformID int32 `protobuf:"varint,5,opt,name=opUserPlatformID" json:"opUserPlatformID,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *SignalAcceptReq) Reset() { *m = SignalAcceptReq{} } +func (m *SignalAcceptReq) String() string { return proto.CompactTextString(m) } +func (*SignalAcceptReq) ProtoMessage() {} +func (*SignalAcceptReq) Descriptor() ([]byte, []int) { + return fileDescriptor_ws_bc78a4975e7e5f46, []int{68} +} +func (m *SignalAcceptReq) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_SignalAcceptReq.Unmarshal(m, b) +} +func (m *SignalAcceptReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_SignalAcceptReq.Marshal(b, m, deterministic) +} +func (dst *SignalAcceptReq) XXX_Merge(src proto.Message) { + xxx_messageInfo_SignalAcceptReq.Merge(dst, src) +} +func (m *SignalAcceptReq) XXX_Size() int { + return xxx_messageInfo_SignalAcceptReq.Size(m) +} +func (m *SignalAcceptReq) XXX_DiscardUnknown() { + xxx_messageInfo_SignalAcceptReq.DiscardUnknown(m) +} + +var xxx_messageInfo_SignalAcceptReq proto.InternalMessageInfo + +func (m *SignalAcceptReq) GetOpUserID() string { + if m != nil { + return m.OpUserID + } + return "" +} + +func (m *SignalAcceptReq) GetInvitation() *InvitationInfo { + if m != nil { + return m.Invitation + } + return nil +} + +func (m *SignalAcceptReq) GetOfflinePushInfo() *OfflinePushInfo { + if m != nil { + return m.OfflinePushInfo + } + return nil +} + +func (m *SignalAcceptReq) GetParticipant() *ParticipantMetaData { + if m != nil { + return m.Participant + } + return nil +} + +func (m *SignalAcceptReq) GetOpUserPlatformID() int32 { + if m != nil { + return m.OpUserPlatformID + } + return 0 +} + +type SignalAcceptReply struct { + Token string `protobuf:"bytes,1,opt,name=token" json:"token,omitempty"` + RoomID string `protobuf:"bytes,2,opt,name=roomID" json:"roomID,omitempty"` + LiveURL string `protobuf:"bytes,3,opt,name=liveURL" json:"liveURL,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *SignalAcceptReply) Reset() { *m = SignalAcceptReply{} } +func (m *SignalAcceptReply) String() string { return proto.CompactTextString(m) } +func (*SignalAcceptReply) ProtoMessage() {} +func (*SignalAcceptReply) Descriptor() ([]byte, []int) { + return fileDescriptor_ws_bc78a4975e7e5f46, []int{69} +} +func (m *SignalAcceptReply) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_SignalAcceptReply.Unmarshal(m, b) +} +func (m *SignalAcceptReply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_SignalAcceptReply.Marshal(b, m, deterministic) +} +func (dst *SignalAcceptReply) XXX_Merge(src proto.Message) { + xxx_messageInfo_SignalAcceptReply.Merge(dst, src) +} +func (m *SignalAcceptReply) XXX_Size() int { + return xxx_messageInfo_SignalAcceptReply.Size(m) +} +func (m *SignalAcceptReply) XXX_DiscardUnknown() { + xxx_messageInfo_SignalAcceptReply.DiscardUnknown(m) +} + +var xxx_messageInfo_SignalAcceptReply proto.InternalMessageInfo + +func (m *SignalAcceptReply) GetToken() string { + if m != nil { + return m.Token + } + return "" +} + +func (m *SignalAcceptReply) GetRoomID() string { + if m != nil { + return m.RoomID + } + return "" +} + +func (m *SignalAcceptReply) GetLiveURL() string { + if m != nil { + return m.LiveURL + } + return "" +} + +type SignalHungUpReq struct { + OpUserID string `protobuf:"bytes,1,opt,name=opUserID" json:"opUserID,omitempty"` + Invitation *InvitationInfo `protobuf:"bytes,2,opt,name=invitation" json:"invitation,omitempty"` + OfflinePushInfo *OfflinePushInfo `protobuf:"bytes,3,opt,name=offlinePushInfo" json:"offlinePushInfo,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *SignalHungUpReq) Reset() { *m = SignalHungUpReq{} } +func (m *SignalHungUpReq) String() string { return proto.CompactTextString(m) } +func (*SignalHungUpReq) ProtoMessage() {} +func (*SignalHungUpReq) Descriptor() ([]byte, []int) { + return fileDescriptor_ws_bc78a4975e7e5f46, []int{70} +} +func (m *SignalHungUpReq) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_SignalHungUpReq.Unmarshal(m, b) +} +func (m *SignalHungUpReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_SignalHungUpReq.Marshal(b, m, deterministic) +} +func (dst *SignalHungUpReq) XXX_Merge(src proto.Message) { + xxx_messageInfo_SignalHungUpReq.Merge(dst, src) +} +func (m *SignalHungUpReq) XXX_Size() int { + return xxx_messageInfo_SignalHungUpReq.Size(m) +} +func (m *SignalHungUpReq) XXX_DiscardUnknown() { + xxx_messageInfo_SignalHungUpReq.DiscardUnknown(m) +} + +var xxx_messageInfo_SignalHungUpReq proto.InternalMessageInfo + +func (m *SignalHungUpReq) GetOpUserID() string { + if m != nil { + return m.OpUserID + } + return "" +} + +func (m *SignalHungUpReq) GetInvitation() *InvitationInfo { + if m != nil { + return m.Invitation + } + return nil +} + +func (m *SignalHungUpReq) GetOfflinePushInfo() *OfflinePushInfo { + if m != nil { + return m.OfflinePushInfo + } + return nil +} + +type SignalHungUpReply struct { + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *SignalHungUpReply) Reset() { *m = SignalHungUpReply{} } +func (m *SignalHungUpReply) String() string { return proto.CompactTextString(m) } +func (*SignalHungUpReply) ProtoMessage() {} +func (*SignalHungUpReply) Descriptor() ([]byte, []int) { + return fileDescriptor_ws_bc78a4975e7e5f46, []int{71} +} +func (m *SignalHungUpReply) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_SignalHungUpReply.Unmarshal(m, b) +} +func (m *SignalHungUpReply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_SignalHungUpReply.Marshal(b, m, deterministic) +} +func (dst *SignalHungUpReply) XXX_Merge(src proto.Message) { + xxx_messageInfo_SignalHungUpReply.Merge(dst, src) +} +func (m *SignalHungUpReply) XXX_Size() int { + return xxx_messageInfo_SignalHungUpReply.Size(m) +} +func (m *SignalHungUpReply) XXX_DiscardUnknown() { + xxx_messageInfo_SignalHungUpReply.DiscardUnknown(m) +} + +var xxx_messageInfo_SignalHungUpReply proto.InternalMessageInfo + +type SignalRejectReq struct { + OpUserID string `protobuf:"bytes,1,opt,name=opUserID" json:"opUserID,omitempty"` + Invitation *InvitationInfo `protobuf:"bytes,2,opt,name=invitation" json:"invitation,omitempty"` + OfflinePushInfo *OfflinePushInfo `protobuf:"bytes,3,opt,name=offlinePushInfo" json:"offlinePushInfo,omitempty"` + Participant *ParticipantMetaData `protobuf:"bytes,4,opt,name=participant" json:"participant,omitempty"` + OpUserPlatformID int32 `protobuf:"varint,5,opt,name=opUserPlatformID" json:"opUserPlatformID,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *SignalRejectReq) Reset() { *m = SignalRejectReq{} } +func (m *SignalRejectReq) String() string { return proto.CompactTextString(m) } +func (*SignalRejectReq) ProtoMessage() {} +func (*SignalRejectReq) Descriptor() ([]byte, []int) { + return fileDescriptor_ws_bc78a4975e7e5f46, []int{72} +} +func (m *SignalRejectReq) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_SignalRejectReq.Unmarshal(m, b) +} +func (m *SignalRejectReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_SignalRejectReq.Marshal(b, m, deterministic) +} +func (dst *SignalRejectReq) XXX_Merge(src proto.Message) { + xxx_messageInfo_SignalRejectReq.Merge(dst, src) +} +func (m *SignalRejectReq) XXX_Size() int { + return xxx_messageInfo_SignalRejectReq.Size(m) +} +func (m *SignalRejectReq) XXX_DiscardUnknown() { + xxx_messageInfo_SignalRejectReq.DiscardUnknown(m) +} + +var xxx_messageInfo_SignalRejectReq proto.InternalMessageInfo + +func (m *SignalRejectReq) GetOpUserID() string { + if m != nil { + return m.OpUserID + } + return "" +} + +func (m *SignalRejectReq) GetInvitation() *InvitationInfo { + if m != nil { + return m.Invitation + } + return nil +} + +func (m *SignalRejectReq) GetOfflinePushInfo() *OfflinePushInfo { + if m != nil { + return m.OfflinePushInfo + } + return nil +} + +func (m *SignalRejectReq) GetParticipant() *ParticipantMetaData { + if m != nil { + return m.Participant + } + return nil +} + +func (m *SignalRejectReq) GetOpUserPlatformID() int32 { + if m != nil { + return m.OpUserPlatformID + } + return 0 +} + +type SignalRejectReply struct { + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *SignalRejectReply) Reset() { *m = SignalRejectReply{} } +func (m *SignalRejectReply) String() string { return proto.CompactTextString(m) } +func (*SignalRejectReply) ProtoMessage() {} +func (*SignalRejectReply) Descriptor() ([]byte, []int) { + return fileDescriptor_ws_bc78a4975e7e5f46, []int{73} +} +func (m *SignalRejectReply) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_SignalRejectReply.Unmarshal(m, b) +} +func (m *SignalRejectReply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_SignalRejectReply.Marshal(b, m, deterministic) +} +func (dst *SignalRejectReply) XXX_Merge(src proto.Message) { + xxx_messageInfo_SignalRejectReply.Merge(dst, src) +} +func (m *SignalRejectReply) XXX_Size() int { + return xxx_messageInfo_SignalRejectReply.Size(m) +} +func (m *SignalRejectReply) XXX_DiscardUnknown() { + xxx_messageInfo_SignalRejectReply.DiscardUnknown(m) +} + +var xxx_messageInfo_SignalRejectReply proto.InternalMessageInfo + +type SignalGetRoomByGroupIDReq struct { + OpUserID string `protobuf:"bytes,1,opt,name=opUserID" json:"opUserID,omitempty"` + GroupID string `protobuf:"bytes,2,opt,name=groupID" json:"groupID,omitempty"` + Participant *ParticipantMetaData `protobuf:"bytes,3,opt,name=participant" json:"participant,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *SignalGetRoomByGroupIDReq) Reset() { *m = SignalGetRoomByGroupIDReq{} } +func (m *SignalGetRoomByGroupIDReq) String() string { return proto.CompactTextString(m) } +func (*SignalGetRoomByGroupIDReq) ProtoMessage() {} +func (*SignalGetRoomByGroupIDReq) Descriptor() ([]byte, []int) { + return fileDescriptor_ws_bc78a4975e7e5f46, []int{74} +} +func (m *SignalGetRoomByGroupIDReq) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_SignalGetRoomByGroupIDReq.Unmarshal(m, b) +} +func (m *SignalGetRoomByGroupIDReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_SignalGetRoomByGroupIDReq.Marshal(b, m, deterministic) +} +func (dst *SignalGetRoomByGroupIDReq) XXX_Merge(src proto.Message) { + xxx_messageInfo_SignalGetRoomByGroupIDReq.Merge(dst, src) +} +func (m *SignalGetRoomByGroupIDReq) XXX_Size() int { + return xxx_messageInfo_SignalGetRoomByGroupIDReq.Size(m) +} +func (m *SignalGetRoomByGroupIDReq) XXX_DiscardUnknown() { + xxx_messageInfo_SignalGetRoomByGroupIDReq.DiscardUnknown(m) +} + +var xxx_messageInfo_SignalGetRoomByGroupIDReq proto.InternalMessageInfo + +func (m *SignalGetRoomByGroupIDReq) GetOpUserID() string { + if m != nil { + return m.OpUserID + } + return "" +} + +func (m *SignalGetRoomByGroupIDReq) GetGroupID() string { + if m != nil { + return m.GroupID + } + return "" +} + +func (m *SignalGetRoomByGroupIDReq) GetParticipant() *ParticipantMetaData { + if m != nil { + return m.Participant + } + return nil +} + +type SignalGetRoomByGroupIDReply struct { + Invitation *InvitationInfo `protobuf:"bytes,1,opt,name=invitation" json:"invitation,omitempty"` + Participant []*ParticipantMetaData `protobuf:"bytes,2,rep,name=participant" json:"participant,omitempty"` + RoomID string `protobuf:"bytes,3,opt,name=roomID" json:"roomID,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *SignalGetRoomByGroupIDReply) Reset() { *m = SignalGetRoomByGroupIDReply{} } +func (m *SignalGetRoomByGroupIDReply) String() string { return proto.CompactTextString(m) } +func (*SignalGetRoomByGroupIDReply) ProtoMessage() {} +func (*SignalGetRoomByGroupIDReply) Descriptor() ([]byte, []int) { + return fileDescriptor_ws_bc78a4975e7e5f46, []int{75} +} +func (m *SignalGetRoomByGroupIDReply) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_SignalGetRoomByGroupIDReply.Unmarshal(m, b) +} +func (m *SignalGetRoomByGroupIDReply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_SignalGetRoomByGroupIDReply.Marshal(b, m, deterministic) +} +func (dst *SignalGetRoomByGroupIDReply) XXX_Merge(src proto.Message) { + xxx_messageInfo_SignalGetRoomByGroupIDReply.Merge(dst, src) +} +func (m *SignalGetRoomByGroupIDReply) XXX_Size() int { + return xxx_messageInfo_SignalGetRoomByGroupIDReply.Size(m) +} +func (m *SignalGetRoomByGroupIDReply) XXX_DiscardUnknown() { + xxx_messageInfo_SignalGetRoomByGroupIDReply.DiscardUnknown(m) +} + +var xxx_messageInfo_SignalGetRoomByGroupIDReply proto.InternalMessageInfo + +func (m *SignalGetRoomByGroupIDReply) GetInvitation() *InvitationInfo { + if m != nil { + return m.Invitation + } + return nil +} + +func (m *SignalGetRoomByGroupIDReply) GetParticipant() []*ParticipantMetaData { + if m != nil { + return m.Participant + } + return nil +} + +func (m *SignalGetRoomByGroupIDReply) GetRoomID() string { + if m != nil { + return m.RoomID + } + return "" +} + +type SignalOnRoomParticipantConnectedReq struct { + Invitation *InvitationInfo `protobuf:"bytes,1,opt,name=invitation" json:"invitation,omitempty"` + Participant []*ParticipantMetaData `protobuf:"bytes,2,rep,name=participant" json:"participant,omitempty"` + GroupID string `protobuf:"bytes,3,opt,name=groupID" json:"groupID,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *SignalOnRoomParticipantConnectedReq) Reset() { *m = SignalOnRoomParticipantConnectedReq{} } +func (m *SignalOnRoomParticipantConnectedReq) String() string { return proto.CompactTextString(m) } +func (*SignalOnRoomParticipantConnectedReq) ProtoMessage() {} +func (*SignalOnRoomParticipantConnectedReq) Descriptor() ([]byte, []int) { + return fileDescriptor_ws_bc78a4975e7e5f46, []int{76} +} +func (m *SignalOnRoomParticipantConnectedReq) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_SignalOnRoomParticipantConnectedReq.Unmarshal(m, b) +} +func (m *SignalOnRoomParticipantConnectedReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_SignalOnRoomParticipantConnectedReq.Marshal(b, m, deterministic) +} +func (dst *SignalOnRoomParticipantConnectedReq) XXX_Merge(src proto.Message) { + xxx_messageInfo_SignalOnRoomParticipantConnectedReq.Merge(dst, src) +} +func (m *SignalOnRoomParticipantConnectedReq) XXX_Size() int { + return xxx_messageInfo_SignalOnRoomParticipantConnectedReq.Size(m) +} +func (m *SignalOnRoomParticipantConnectedReq) XXX_DiscardUnknown() { + xxx_messageInfo_SignalOnRoomParticipantConnectedReq.DiscardUnknown(m) +} + +var xxx_messageInfo_SignalOnRoomParticipantConnectedReq proto.InternalMessageInfo + +func (m *SignalOnRoomParticipantConnectedReq) GetInvitation() *InvitationInfo { + if m != nil { + return m.Invitation + } + return nil +} + +func (m *SignalOnRoomParticipantConnectedReq) GetParticipant() []*ParticipantMetaData { + if m != nil { + return m.Participant + } + return nil +} + +func (m *SignalOnRoomParticipantConnectedReq) GetGroupID() string { + if m != nil { + return m.GroupID + } + return "" +} + +type SignalOnRoomParticipantDisconnectedReq struct { + Invitation *InvitationInfo `protobuf:"bytes,1,opt,name=invitation" json:"invitation,omitempty"` + Participant []*ParticipantMetaData `protobuf:"bytes,2,rep,name=participant" json:"participant,omitempty"` + GroupID string `protobuf:"bytes,3,opt,name=groupID" json:"groupID,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *SignalOnRoomParticipantDisconnectedReq) Reset() { + *m = SignalOnRoomParticipantDisconnectedReq{} +} +func (m *SignalOnRoomParticipantDisconnectedReq) String() string { return proto.CompactTextString(m) } +func (*SignalOnRoomParticipantDisconnectedReq) ProtoMessage() {} +func (*SignalOnRoomParticipantDisconnectedReq) Descriptor() ([]byte, []int) { + return fileDescriptor_ws_bc78a4975e7e5f46, []int{77} +} +func (m *SignalOnRoomParticipantDisconnectedReq) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_SignalOnRoomParticipantDisconnectedReq.Unmarshal(m, b) +} +func (m *SignalOnRoomParticipantDisconnectedReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_SignalOnRoomParticipantDisconnectedReq.Marshal(b, m, deterministic) +} +func (dst *SignalOnRoomParticipantDisconnectedReq) XXX_Merge(src proto.Message) { + xxx_messageInfo_SignalOnRoomParticipantDisconnectedReq.Merge(dst, src) +} +func (m *SignalOnRoomParticipantDisconnectedReq) XXX_Size() int { + return xxx_messageInfo_SignalOnRoomParticipantDisconnectedReq.Size(m) +} +func (m *SignalOnRoomParticipantDisconnectedReq) XXX_DiscardUnknown() { + xxx_messageInfo_SignalOnRoomParticipantDisconnectedReq.DiscardUnknown(m) +} + +var xxx_messageInfo_SignalOnRoomParticipantDisconnectedReq proto.InternalMessageInfo + +func (m *SignalOnRoomParticipantDisconnectedReq) GetInvitation() *InvitationInfo { + if m != nil { + return m.Invitation + } + return nil +} + +func (m *SignalOnRoomParticipantDisconnectedReq) GetParticipant() []*ParticipantMetaData { + if m != nil { + return m.Participant + } + return nil +} + +func (m *SignalOnRoomParticipantDisconnectedReq) GetGroupID() string { + if m != nil { + return m.GroupID + } + return "" +} + +type SignalGetTokenByRoomIDReq struct { + RoomID string `protobuf:"bytes,1,opt,name=roomID" json:"roomID,omitempty"` + OpUserID string `protobuf:"bytes,2,opt,name=opUserID" json:"opUserID,omitempty"` + Participant *ParticipantMetaData `protobuf:"bytes,3,opt,name=participant" json:"participant,omitempty"` + OperationID string `protobuf:"bytes,4,opt,name=operationID" json:"operationID,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *SignalGetTokenByRoomIDReq) Reset() { *m = SignalGetTokenByRoomIDReq{} } +func (m *SignalGetTokenByRoomIDReq) String() string { return proto.CompactTextString(m) } +func (*SignalGetTokenByRoomIDReq) ProtoMessage() {} +func (*SignalGetTokenByRoomIDReq) Descriptor() ([]byte, []int) { + return fileDescriptor_ws_bc78a4975e7e5f46, []int{78} +} +func (m *SignalGetTokenByRoomIDReq) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_SignalGetTokenByRoomIDReq.Unmarshal(m, b) +} +func (m *SignalGetTokenByRoomIDReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_SignalGetTokenByRoomIDReq.Marshal(b, m, deterministic) +} +func (dst *SignalGetTokenByRoomIDReq) XXX_Merge(src proto.Message) { + xxx_messageInfo_SignalGetTokenByRoomIDReq.Merge(dst, src) +} +func (m *SignalGetTokenByRoomIDReq) XXX_Size() int { + return xxx_messageInfo_SignalGetTokenByRoomIDReq.Size(m) +} +func (m *SignalGetTokenByRoomIDReq) XXX_DiscardUnknown() { + xxx_messageInfo_SignalGetTokenByRoomIDReq.DiscardUnknown(m) +} + +var xxx_messageInfo_SignalGetTokenByRoomIDReq proto.InternalMessageInfo + +func (m *SignalGetTokenByRoomIDReq) GetRoomID() string { + if m != nil { + return m.RoomID + } + return "" +} + +func (m *SignalGetTokenByRoomIDReq) GetOpUserID() string { + if m != nil { + return m.OpUserID + } + return "" +} + +func (m *SignalGetTokenByRoomIDReq) GetParticipant() *ParticipantMetaData { + if m != nil { + return m.Participant + } + return nil +} + +func (m *SignalGetTokenByRoomIDReq) GetOperationID() string { + if m != nil { + return m.OperationID + } + return "" +} + +type SignalGetTokenByRoomIDReply struct { + Token string `protobuf:"bytes,1,opt,name=token" json:"token,omitempty"` + LiveURL string `protobuf:"bytes,2,opt,name=liveURL" json:"liveURL,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *SignalGetTokenByRoomIDReply) Reset() { *m = SignalGetTokenByRoomIDReply{} } +func (m *SignalGetTokenByRoomIDReply) String() string { return proto.CompactTextString(m) } +func (*SignalGetTokenByRoomIDReply) ProtoMessage() {} +func (*SignalGetTokenByRoomIDReply) Descriptor() ([]byte, []int) { + return fileDescriptor_ws_bc78a4975e7e5f46, []int{79} +} +func (m *SignalGetTokenByRoomIDReply) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_SignalGetTokenByRoomIDReply.Unmarshal(m, b) +} +func (m *SignalGetTokenByRoomIDReply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_SignalGetTokenByRoomIDReply.Marshal(b, m, deterministic) +} +func (dst *SignalGetTokenByRoomIDReply) XXX_Merge(src proto.Message) { + xxx_messageInfo_SignalGetTokenByRoomIDReply.Merge(dst, src) +} +func (m *SignalGetTokenByRoomIDReply) XXX_Size() int { + return xxx_messageInfo_SignalGetTokenByRoomIDReply.Size(m) +} +func (m *SignalGetTokenByRoomIDReply) XXX_DiscardUnknown() { + xxx_messageInfo_SignalGetTokenByRoomIDReply.DiscardUnknown(m) +} + +var xxx_messageInfo_SignalGetTokenByRoomIDReply proto.InternalMessageInfo + +func (m *SignalGetTokenByRoomIDReply) GetToken() string { + if m != nil { + return m.Token + } + return "" +} + +func (m *SignalGetTokenByRoomIDReply) GetLiveURL() string { + if m != nil { + return m.LiveURL + } + return "" +} + +type DelMsgListReq struct { + OpUserID string `protobuf:"bytes,1,opt,name=opUserID" json:"opUserID,omitempty"` + UserID string `protobuf:"bytes,2,opt,name=userID" json:"userID,omitempty"` + SeqList []uint32 `protobuf:"varint,3,rep,packed,name=seqList" json:"seqList,omitempty"` + OperationID string `protobuf:"bytes,4,opt,name=operationID" json:"operationID,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *DelMsgListReq) Reset() { *m = DelMsgListReq{} } +func (m *DelMsgListReq) String() string { return proto.CompactTextString(m) } +func (*DelMsgListReq) ProtoMessage() {} +func (*DelMsgListReq) Descriptor() ([]byte, []int) { + return fileDescriptor_ws_bc78a4975e7e5f46, []int{80} +} +func (m *DelMsgListReq) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_DelMsgListReq.Unmarshal(m, b) +} +func (m *DelMsgListReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_DelMsgListReq.Marshal(b, m, deterministic) +} +func (dst *DelMsgListReq) XXX_Merge(src proto.Message) { + xxx_messageInfo_DelMsgListReq.Merge(dst, src) +} +func (m *DelMsgListReq) XXX_Size() int { + return xxx_messageInfo_DelMsgListReq.Size(m) +} +func (m *DelMsgListReq) XXX_DiscardUnknown() { + xxx_messageInfo_DelMsgListReq.DiscardUnknown(m) +} + +var xxx_messageInfo_DelMsgListReq proto.InternalMessageInfo + +func (m *DelMsgListReq) GetOpUserID() string { + if m != nil { + return m.OpUserID + } + return "" +} + +func (m *DelMsgListReq) GetUserID() string { + if m != nil { + return m.UserID + } + return "" +} + +func (m *DelMsgListReq) GetSeqList() []uint32 { + if m != nil { + return m.SeqList + } + return nil +} + +func (m *DelMsgListReq) GetOperationID() string { + if m != nil { + return m.OperationID + } + return "" +} + +type DelMsgListResp struct { + ErrCode int32 `protobuf:"varint,1,opt,name=errCode" json:"errCode,omitempty"` + ErrMsg string `protobuf:"bytes,2,opt,name=errMsg" json:"errMsg,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *DelMsgListResp) Reset() { *m = DelMsgListResp{} } +func (m *DelMsgListResp) String() string { return proto.CompactTextString(m) } +func (*DelMsgListResp) ProtoMessage() {} +func (*DelMsgListResp) Descriptor() ([]byte, []int) { + return fileDescriptor_ws_bc78a4975e7e5f46, []int{81} +} +func (m *DelMsgListResp) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_DelMsgListResp.Unmarshal(m, b) +} +func (m *DelMsgListResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_DelMsgListResp.Marshal(b, m, deterministic) +} +func (dst *DelMsgListResp) XXX_Merge(src proto.Message) { + xxx_messageInfo_DelMsgListResp.Merge(dst, src) +} +func (m *DelMsgListResp) XXX_Size() int { + return xxx_messageInfo_DelMsgListResp.Size(m) +} +func (m *DelMsgListResp) XXX_DiscardUnknown() { + xxx_messageInfo_DelMsgListResp.DiscardUnknown(m) +} + +var xxx_messageInfo_DelMsgListResp proto.InternalMessageInfo + +func (m *DelMsgListResp) GetErrCode() int32 { + if m != nil { + return m.ErrCode + } + return 0 +} + +func (m *DelMsgListResp) GetErrMsg() string { + if m != nil { + return m.ErrMsg + } + return "" +} + +type SetAppBackgroundStatusReq struct { + UserID string `protobuf:"bytes,1,opt,name=userID" json:"userID,omitempty"` + IsBackground bool `protobuf:"varint,2,opt,name=isBackground" json:"isBackground,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *SetAppBackgroundStatusReq) Reset() { *m = SetAppBackgroundStatusReq{} } +func (m *SetAppBackgroundStatusReq) String() string { return proto.CompactTextString(m) } +func (*SetAppBackgroundStatusReq) ProtoMessage() {} +func (*SetAppBackgroundStatusReq) Descriptor() ([]byte, []int) { + return fileDescriptor_ws_bc78a4975e7e5f46, []int{82} +} +func (m *SetAppBackgroundStatusReq) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_SetAppBackgroundStatusReq.Unmarshal(m, b) +} +func (m *SetAppBackgroundStatusReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_SetAppBackgroundStatusReq.Marshal(b, m, deterministic) +} +func (dst *SetAppBackgroundStatusReq) XXX_Merge(src proto.Message) { + xxx_messageInfo_SetAppBackgroundStatusReq.Merge(dst, src) +} +func (m *SetAppBackgroundStatusReq) XXX_Size() int { + return xxx_messageInfo_SetAppBackgroundStatusReq.Size(m) +} +func (m *SetAppBackgroundStatusReq) XXX_DiscardUnknown() { + xxx_messageInfo_SetAppBackgroundStatusReq.DiscardUnknown(m) +} + +var xxx_messageInfo_SetAppBackgroundStatusReq proto.InternalMessageInfo + +func (m *SetAppBackgroundStatusReq) GetUserID() string { + if m != nil { + return m.UserID + } + return "" +} + +func (m *SetAppBackgroundStatusReq) GetIsBackground() bool { + if m != nil { + return m.IsBackground + } + return false +} + +type SetAppBackgroundStatusResp struct { + ErrCode int32 `protobuf:"varint,1,opt,name=errCode" json:"errCode,omitempty"` + ErrMsg string `protobuf:"bytes,2,opt,name=errMsg" json:"errMsg,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *SetAppBackgroundStatusResp) Reset() { *m = SetAppBackgroundStatusResp{} } +func (m *SetAppBackgroundStatusResp) String() string { return proto.CompactTextString(m) } +func (*SetAppBackgroundStatusResp) ProtoMessage() {} +func (*SetAppBackgroundStatusResp) Descriptor() ([]byte, []int) { + return fileDescriptor_ws_bc78a4975e7e5f46, []int{83} +} +func (m *SetAppBackgroundStatusResp) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_SetAppBackgroundStatusResp.Unmarshal(m, b) +} +func (m *SetAppBackgroundStatusResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_SetAppBackgroundStatusResp.Marshal(b, m, deterministic) +} +func (dst *SetAppBackgroundStatusResp) XXX_Merge(src proto.Message) { + xxx_messageInfo_SetAppBackgroundStatusResp.Merge(dst, src) +} +func (m *SetAppBackgroundStatusResp) XXX_Size() int { + return xxx_messageInfo_SetAppBackgroundStatusResp.Size(m) +} +func (m *SetAppBackgroundStatusResp) XXX_DiscardUnknown() { + xxx_messageInfo_SetAppBackgroundStatusResp.DiscardUnknown(m) +} + +var xxx_messageInfo_SetAppBackgroundStatusResp proto.InternalMessageInfo + +func (m *SetAppBackgroundStatusResp) GetErrCode() int32 { + if m != nil { + return m.ErrCode + } + return 0 +} + +func (m *SetAppBackgroundStatusResp) GetErrMsg() string { + if m != nil { + return m.ErrMsg + } + return "" +} + +type ExtendMsgSet struct { + SourceID string `protobuf:"bytes,1,opt,name=sourceID" json:"sourceID,omitempty"` + SessionType int32 `protobuf:"varint,2,opt,name=sessionType" json:"sessionType,omitempty"` + ExtendMsgs map[string]*ExtendMsg `protobuf:"bytes,3,rep,name=extendMsgs" json:"extendMsgs,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + MaxMsgUpdateTime int64 `protobuf:"varint,4,opt,name=MaxMsgUpdateTime" json:"MaxMsgUpdateTime,omitempty"` + ExtendMsgNum int32 `protobuf:"varint,5,opt,name=extendMsgNum" json:"extendMsgNum,omitempty"` + CreateTime int64 `protobuf:"varint,6,opt,name=createTime" json:"createTime,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ExtendMsgSet) Reset() { *m = ExtendMsgSet{} } +func (m *ExtendMsgSet) String() string { return proto.CompactTextString(m) } +func (*ExtendMsgSet) ProtoMessage() {} +func (*ExtendMsgSet) Descriptor() ([]byte, []int) { + return fileDescriptor_ws_bc78a4975e7e5f46, []int{84} +} +func (m *ExtendMsgSet) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_ExtendMsgSet.Unmarshal(m, b) +} +func (m *ExtendMsgSet) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_ExtendMsgSet.Marshal(b, m, deterministic) +} +func (dst *ExtendMsgSet) XXX_Merge(src proto.Message) { + xxx_messageInfo_ExtendMsgSet.Merge(dst, src) +} +func (m *ExtendMsgSet) XXX_Size() int { + return xxx_messageInfo_ExtendMsgSet.Size(m) +} +func (m *ExtendMsgSet) XXX_DiscardUnknown() { + xxx_messageInfo_ExtendMsgSet.DiscardUnknown(m) +} + +var xxx_messageInfo_ExtendMsgSet proto.InternalMessageInfo + +func (m *ExtendMsgSet) GetSourceID() string { + if m != nil { + return m.SourceID + } + return "" +} + +func (m *ExtendMsgSet) GetSessionType() int32 { + if m != nil { + return m.SessionType + } + return 0 +} + +func (m *ExtendMsgSet) GetExtendMsgs() map[string]*ExtendMsg { + if m != nil { + return m.ExtendMsgs + } + return nil +} + +func (m *ExtendMsgSet) GetMaxMsgUpdateTime() int64 { + if m != nil { + return m.MaxMsgUpdateTime + } + return 0 +} + +func (m *ExtendMsgSet) GetExtendMsgNum() int32 { + if m != nil { + return m.ExtendMsgNum + } + return 0 +} + +func (m *ExtendMsgSet) GetCreateTime() int64 { + if m != nil { + return m.CreateTime + } + return 0 +} + +type ExtendMsg struct { + ReactionExtensionList map[string]*KeyValue `protobuf:"bytes,1,rep,name=reactionExtensionList" json:"reactionExtensionList,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + ClientMsgID string `protobuf:"bytes,2,opt,name=clientMsgID" json:"clientMsgID,omitempty"` + MsgFirstModifyTime int64 `protobuf:"varint,3,opt,name=msgFirstModifyTime" json:"msgFirstModifyTime,omitempty"` + AttachedInfo string `protobuf:"bytes,4,opt,name=attachedInfo" json:"attachedInfo,omitempty"` + Ex string `protobuf:"bytes,5,opt,name=ex" json:"ex,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ExtendMsg) Reset() { *m = ExtendMsg{} } +func (m *ExtendMsg) String() string { return proto.CompactTextString(m) } +func (*ExtendMsg) ProtoMessage() {} +func (*ExtendMsg) Descriptor() ([]byte, []int) { + return fileDescriptor_ws_bc78a4975e7e5f46, []int{85} +} +func (m *ExtendMsg) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_ExtendMsg.Unmarshal(m, b) +} +func (m *ExtendMsg) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_ExtendMsg.Marshal(b, m, deterministic) +} +func (dst *ExtendMsg) XXX_Merge(src proto.Message) { + xxx_messageInfo_ExtendMsg.Merge(dst, src) +} +func (m *ExtendMsg) XXX_Size() int { + return xxx_messageInfo_ExtendMsg.Size(m) +} +func (m *ExtendMsg) XXX_DiscardUnknown() { + xxx_messageInfo_ExtendMsg.DiscardUnknown(m) +} + +var xxx_messageInfo_ExtendMsg proto.InternalMessageInfo + +func (m *ExtendMsg) GetReactionExtensionList() map[string]*KeyValue { + if m != nil { + return m.ReactionExtensionList + } + return nil +} + +func (m *ExtendMsg) GetClientMsgID() string { + if m != nil { + return m.ClientMsgID + } + return "" +} + +func (m *ExtendMsg) GetMsgFirstModifyTime() int64 { + if m != nil { + return m.MsgFirstModifyTime + } + return 0 +} + +func (m *ExtendMsg) GetAttachedInfo() string { + if m != nil { + return m.AttachedInfo + } + return "" +} + +func (m *ExtendMsg) GetEx() string { + if m != nil { + return m.Ex + } + return "" +} + +type KeyValue struct { + TypeKey string `protobuf:"bytes,1,opt,name=typeKey" json:"typeKey,omitempty"` + Value string `protobuf:"bytes,2,opt,name=value" json:"value,omitempty"` + LatestUpdateTime int64 `protobuf:"varint,3,opt,name=latestUpdateTime" json:"latestUpdateTime,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *KeyValue) Reset() { *m = KeyValue{} } +func (m *KeyValue) String() string { return proto.CompactTextString(m) } +func (*KeyValue) ProtoMessage() {} +func (*KeyValue) Descriptor() ([]byte, []int) { + return fileDescriptor_ws_bc78a4975e7e5f46, []int{86} +} +func (m *KeyValue) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_KeyValue.Unmarshal(m, b) +} +func (m *KeyValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_KeyValue.Marshal(b, m, deterministic) +} +func (dst *KeyValue) XXX_Merge(src proto.Message) { + xxx_messageInfo_KeyValue.Merge(dst, src) +} +func (m *KeyValue) XXX_Size() int { + return xxx_messageInfo_KeyValue.Size(m) +} +func (m *KeyValue) XXX_DiscardUnknown() { + xxx_messageInfo_KeyValue.DiscardUnknown(m) +} + +var xxx_messageInfo_KeyValue proto.InternalMessageInfo + +func (m *KeyValue) GetTypeKey() string { + if m != nil { + return m.TypeKey + } + return "" +} + +func (m *KeyValue) GetValue() string { + if m != nil { + return m.Value + } + return "" +} + +func (m *KeyValue) GetLatestUpdateTime() int64 { + if m != nil { + return m.LatestUpdateTime + } + return 0 +} + +func init() { + proto.RegisterType((*GroupInfo)(nil), "server_api_params.GroupInfo") + proto.RegisterType((*GroupInfoForSet)(nil), "server_api_params.GroupInfoForSet") + proto.RegisterType((*GroupMemberFullInfo)(nil), "server_api_params.GroupMemberFullInfo") + proto.RegisterType((*PublicUserInfo)(nil), "server_api_params.PublicUserInfo") + proto.RegisterType((*UserInfo)(nil), "server_api_params.UserInfo") + proto.RegisterType((*FriendInfo)(nil), "server_api_params.FriendInfo") + proto.RegisterType((*BlackInfo)(nil), "server_api_params.BlackInfo") + proto.RegisterType((*GroupRequest)(nil), "server_api_params.GroupRequest") + proto.RegisterType((*FriendRequest)(nil), "server_api_params.FriendRequest") + proto.RegisterType((*Department)(nil), "server_api_params.Department") + proto.RegisterType((*OrganizationUser)(nil), "server_api_params.OrganizationUser") + proto.RegisterType((*DepartmentMember)(nil), "server_api_params.DepartmentMember") + proto.RegisterType((*UserDepartmentMember)(nil), "server_api_params.UserDepartmentMember") + proto.RegisterType((*UserInDepartment)(nil), "server_api_params.UserInDepartment") + proto.RegisterType((*PullMessageBySeqListReq)(nil), "server_api_params.PullMessageBySeqListReq") + proto.RegisterMapType((map[string]*SeqList)(nil), "server_api_params.PullMessageBySeqListReq.GroupSeqListEntry") + proto.RegisterType((*SeqList)(nil), "server_api_params.seqList") + proto.RegisterType((*MsgDataList)(nil), "server_api_params.MsgDataList") + proto.RegisterType((*PullMessageBySeqListResp)(nil), "server_api_params.PullMessageBySeqListResp") + proto.RegisterMapType((map[string]*MsgDataList)(nil), "server_api_params.PullMessageBySeqListResp.GroupMsgDataListEntry") + proto.RegisterType((*GetMaxAndMinSeqReq)(nil), "server_api_params.GetMaxAndMinSeqReq") + proto.RegisterType((*MaxAndMinSeq)(nil), "server_api_params.MaxAndMinSeq") + proto.RegisterType((*GetMaxAndMinSeqResp)(nil), "server_api_params.GetMaxAndMinSeqResp") + proto.RegisterMapType((map[string]*MaxAndMinSeq)(nil), "server_api_params.GetMaxAndMinSeqResp.GroupMaxAndMinSeqEntry") + proto.RegisterType((*UserSendMsgResp)(nil), "server_api_params.UserSendMsgResp") + proto.RegisterType((*MsgData)(nil), "server_api_params.MsgData") + proto.RegisterMapType((map[string]bool)(nil), "server_api_params.MsgData.OptionsEntry") + proto.RegisterType((*OfflinePushInfo)(nil), "server_api_params.OfflinePushInfo") + proto.RegisterType((*TipsComm)(nil), "server_api_params.TipsComm") + proto.RegisterType((*GroupCreatedTips)(nil), "server_api_params.GroupCreatedTips") + proto.RegisterType((*GroupInfoSetTips)(nil), "server_api_params.GroupInfoSetTips") + proto.RegisterType((*JoinGroupApplicationTips)(nil), "server_api_params.JoinGroupApplicationTips") + proto.RegisterType((*MemberQuitTips)(nil), "server_api_params.MemberQuitTips") + proto.RegisterType((*GroupApplicationAcceptedTips)(nil), "server_api_params.GroupApplicationAcceptedTips") + proto.RegisterType((*GroupApplicationRejectedTips)(nil), "server_api_params.GroupApplicationRejectedTips") + proto.RegisterType((*GroupOwnerTransferredTips)(nil), "server_api_params.GroupOwnerTransferredTips") + proto.RegisterType((*MemberKickedTips)(nil), "server_api_params.MemberKickedTips") + proto.RegisterType((*MemberInvitedTips)(nil), "server_api_params.MemberInvitedTips") + proto.RegisterType((*MemberEnterTips)(nil), "server_api_params.MemberEnterTips") + proto.RegisterType((*GroupDismissedTips)(nil), "server_api_params.GroupDismissedTips") + proto.RegisterType((*GroupMemberMutedTips)(nil), "server_api_params.GroupMemberMutedTips") + proto.RegisterType((*GroupMemberCancelMutedTips)(nil), "server_api_params.GroupMemberCancelMutedTips") + proto.RegisterType((*GroupMutedTips)(nil), "server_api_params.GroupMutedTips") + proto.RegisterType((*GroupCancelMutedTips)(nil), "server_api_params.GroupCancelMutedTips") + proto.RegisterType((*GroupMemberInfoSetTips)(nil), "server_api_params.GroupMemberInfoSetTips") + proto.RegisterType((*OrganizationChangedTips)(nil), "server_api_params.OrganizationChangedTips") + proto.RegisterType((*FriendApplication)(nil), "server_api_params.FriendApplication") + proto.RegisterType((*FromToUserID)(nil), "server_api_params.FromToUserID") + proto.RegisterType((*FriendApplicationTips)(nil), "server_api_params.FriendApplicationTips") + proto.RegisterType((*FriendApplicationApprovedTips)(nil), "server_api_params.FriendApplicationApprovedTips") + proto.RegisterType((*FriendApplicationRejectedTips)(nil), "server_api_params.FriendApplicationRejectedTips") + proto.RegisterType((*FriendAddedTips)(nil), "server_api_params.FriendAddedTips") + proto.RegisterType((*FriendDeletedTips)(nil), "server_api_params.FriendDeletedTips") + proto.RegisterType((*BlackAddedTips)(nil), "server_api_params.BlackAddedTips") + proto.RegisterType((*BlackDeletedTips)(nil), "server_api_params.BlackDeletedTips") + proto.RegisterType((*FriendInfoChangedTips)(nil), "server_api_params.FriendInfoChangedTips") + proto.RegisterType((*UserInfoUpdatedTips)(nil), "server_api_params.UserInfoUpdatedTips") + proto.RegisterType((*ConversationUpdateTips)(nil), "server_api_params.ConversationUpdateTips") + proto.RegisterType((*ConversationSetPrivateTips)(nil), "server_api_params.ConversationSetPrivateTips") + proto.RegisterType((*DeleteMessageTips)(nil), "server_api_params.DeleteMessageTips") + proto.RegisterType((*RequestPagination)(nil), "server_api_params.RequestPagination") + proto.RegisterType((*ResponsePagination)(nil), "server_api_params.ResponsePagination") + proto.RegisterType((*SignalReq)(nil), "server_api_params.SignalReq") + proto.RegisterType((*SignalResp)(nil), "server_api_params.SignalResp") + proto.RegisterType((*InvitationInfo)(nil), "server_api_params.InvitationInfo") + proto.RegisterType((*ParticipantMetaData)(nil), "server_api_params.ParticipantMetaData") + proto.RegisterType((*SignalInviteReq)(nil), "server_api_params.SignalInviteReq") + proto.RegisterType((*SignalInviteReply)(nil), "server_api_params.SignalInviteReply") + proto.RegisterType((*SignalInviteInGroupReq)(nil), "server_api_params.SignalInviteInGroupReq") + proto.RegisterType((*SignalInviteInGroupReply)(nil), "server_api_params.SignalInviteInGroupReply") + proto.RegisterType((*SignalCancelReq)(nil), "server_api_params.SignalCancelReq") + proto.RegisterType((*SignalCancelReply)(nil), "server_api_params.SignalCancelReply") + proto.RegisterType((*SignalAcceptReq)(nil), "server_api_params.SignalAcceptReq") + proto.RegisterType((*SignalAcceptReply)(nil), "server_api_params.SignalAcceptReply") + proto.RegisterType((*SignalHungUpReq)(nil), "server_api_params.SignalHungUpReq") + proto.RegisterType((*SignalHungUpReply)(nil), "server_api_params.SignalHungUpReply") + proto.RegisterType((*SignalRejectReq)(nil), "server_api_params.SignalRejectReq") + proto.RegisterType((*SignalRejectReply)(nil), "server_api_params.SignalRejectReply") + proto.RegisterType((*SignalGetRoomByGroupIDReq)(nil), "server_api_params.SignalGetRoomByGroupIDReq") + proto.RegisterType((*SignalGetRoomByGroupIDReply)(nil), "server_api_params.SignalGetRoomByGroupIDReply") + proto.RegisterType((*SignalOnRoomParticipantConnectedReq)(nil), "server_api_params.SignalOnRoomParticipantConnectedReq") + proto.RegisterType((*SignalOnRoomParticipantDisconnectedReq)(nil), "server_api_params.SignalOnRoomParticipantDisconnectedReq") + proto.RegisterType((*SignalGetTokenByRoomIDReq)(nil), "server_api_params.SignalGetTokenByRoomIDReq") + proto.RegisterType((*SignalGetTokenByRoomIDReply)(nil), "server_api_params.SignalGetTokenByRoomIDReply") + proto.RegisterType((*DelMsgListReq)(nil), "server_api_params.DelMsgListReq") + proto.RegisterType((*DelMsgListResp)(nil), "server_api_params.DelMsgListResp") + proto.RegisterType((*SetAppBackgroundStatusReq)(nil), "server_api_params.SetAppBackgroundStatusReq") + proto.RegisterType((*SetAppBackgroundStatusResp)(nil), "server_api_params.SetAppBackgroundStatusResp") + proto.RegisterType((*ExtendMsgSet)(nil), "server_api_params.ExtendMsgSet") + proto.RegisterMapType((map[string]*ExtendMsg)(nil), "server_api_params.ExtendMsgSet.ExtendMsgsEntry") + proto.RegisterType((*ExtendMsg)(nil), "server_api_params.ExtendMsg") + proto.RegisterMapType((map[string]*KeyValue)(nil), "server_api_params.ExtendMsg.ReactionExtensionListEntry") + proto.RegisterType((*KeyValue)(nil), "server_api_params.KeyValue") +} + +func init() { proto.RegisterFile("sdk_ws/ws.proto", fileDescriptor_ws_bc78a4975e7e5f46) } + +var fileDescriptor_ws_bc78a4975e7e5f46 = []byte{ + // 4162 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x3c, 0x59, 0x8f, 0x1c, 0x57, + 0xb9, 0xa9, 0xea, 0x65, 0xba, 0xbf, 0x9e, 0xa5, 0xa7, 0x6c, 0x4f, 0x3a, 0x13, 0xc7, 0x77, 0x6e, + 0xc5, 0xf2, 0x75, 0x7c, 0x9d, 0xf1, 0xbd, 0xce, 0x72, 0x6f, 0x36, 0xa3, 0x59, 0xec, 0xf1, 0xc4, + 0xee, 0x99, 0x49, 0xb5, 0x1d, 0xa3, 0x24, 0x92, 0xa9, 0xe9, 0x3a, 0xd3, 0x53, 0x99, 0xea, 0xaa, + 0x9a, 0x5a, 0xc6, 0x1e, 0x1e, 0x40, 0x2c, 0x02, 0x24, 0x1e, 0x90, 0x10, 0x8b, 0x04, 0x6f, 0xbc, + 0x20, 0x10, 0x8a, 0x10, 0x0a, 0x12, 0x12, 0x08, 0x21, 0xc4, 0x03, 0x12, 0x48, 0xe4, 0x1d, 0x09, + 0x04, 0x2f, 0x20, 0xc4, 0x1f, 0x40, 0x42, 0x0a, 0x3a, 0x4b, 0x55, 0x9d, 0x53, 0x4b, 0x77, 0xbb, + 0x35, 0x8a, 0x6d, 0x99, 0x27, 0xfb, 0xfb, 0xea, 0x7c, 0xdf, 0xf9, 0xf6, 0xf3, 0x9d, 0xa5, 0x07, + 0x66, 0x7c, 0x63, 0xef, 0xf6, 0x1d, 0xff, 0xc2, 0x1d, 0x7f, 0xd1, 0xf5, 0x9c, 0xc0, 0x51, 0x66, + 0x7d, 0xe4, 0x1d, 0x20, 0xef, 0xb6, 0xee, 0x9a, 0xb7, 0x5d, 0xdd, 0xd3, 0xfb, 0xfe, 0xfc, 0xe2, + 0xa6, 0x8b, 0xec, 0x67, 0xd7, 0xdb, 0xcf, 0x76, 0xc8, 0xa7, 0x0b, 0xee, 0x5e, 0xef, 0x02, 0x19, + 0x7c, 0x21, 0x22, 0xf6, 0x74, 0xd7, 0x45, 0x1e, 0x63, 0xa1, 0xfe, 0xb1, 0x0c, 0xf5, 0x35, 0xcf, + 0x09, 0xdd, 0x75, 0x7b, 0xc7, 0x51, 0x5a, 0x30, 0xd1, 0x23, 0xc0, 0x6a, 0x4b, 0x5a, 0x90, 0xce, + 0xd6, 0xb5, 0x08, 0x54, 0x4e, 0x42, 0x9d, 0xfc, 0x77, 0x43, 0xef, 0xa3, 0x96, 0x4c, 0xbe, 0x25, + 0x08, 0x45, 0x85, 0x49, 0xdb, 0x09, 0xcc, 0x1d, 0xb3, 0xab, 0x07, 0xa6, 0x63, 0xb7, 0x4a, 0x64, + 0x80, 0x80, 0xc3, 0x63, 0x4c, 0x3b, 0xf0, 0x1c, 0x23, 0xec, 0x92, 0x31, 0x65, 0x3a, 0x86, 0xc7, + 0xe1, 0xf9, 0x77, 0xf4, 0x2e, 0xba, 0xa9, 0x5d, 0x6f, 0x55, 0xe8, 0xfc, 0x0c, 0x54, 0x16, 0xa0, + 0xe1, 0xdc, 0xb1, 0x91, 0x77, 0xd3, 0x47, 0xde, 0xfa, 0x6a, 0xab, 0x4a, 0xbe, 0xf2, 0x28, 0xe5, + 0x14, 0x40, 0xd7, 0x43, 0x7a, 0x80, 0x6e, 0x98, 0x7d, 0xd4, 0x9a, 0x58, 0x90, 0xce, 0x4e, 0x69, + 0x1c, 0x06, 0x73, 0xe8, 0xa3, 0xfe, 0x36, 0xf2, 0x56, 0x9c, 0xd0, 0x0e, 0x5a, 0x35, 0x32, 0x80, + 0x47, 0x29, 0xd3, 0x20, 0xa3, 0xbb, 0xad, 0x3a, 0x61, 0x2d, 0xa3, 0xbb, 0xca, 0x1c, 0x54, 0xfd, + 0x40, 0x0f, 0x42, 0xbf, 0x05, 0x0b, 0xd2, 0xd9, 0x8a, 0xc6, 0x20, 0xe5, 0x34, 0x4c, 0x11, 0xbe, + 0x4e, 0x24, 0x4d, 0x83, 0x90, 0x88, 0xc8, 0xd8, 0x62, 0x37, 0x0e, 0x5d, 0xd4, 0x9a, 0x24, 0x0c, + 0x12, 0x84, 0x72, 0x0e, 0x9a, 0x36, 0x42, 0xc6, 0x9b, 0xc8, 0x4b, 0xac, 0x36, 0x45, 0x06, 0x65, + 0xf0, 0xca, 0x19, 0x98, 0xb6, 0x1c, 0x67, 0xaf, 0x4d, 0x44, 0xc5, 0x7e, 0x6a, 0x4d, 0x93, 0x91, + 0x29, 0xac, 0x72, 0x1e, 0x66, 0x75, 0xd7, 0xb5, 0x0e, 0x29, 0xea, 0x8a, 0x67, 0x22, 0xdb, 0x68, + 0xcd, 0x90, 0xa1, 0xd9, 0x0f, 0xca, 0x8b, 0x30, 0xc7, 0xfb, 0xe7, 0xa6, 0x6b, 0x44, 0xb6, 0x6b, + 0x12, 0xd3, 0x14, 0x7c, 0x55, 0x16, 0x41, 0x11, 0xbe, 0x50, 0x13, 0xcc, 0x12, 0x13, 0xe4, 0x7c, + 0x51, 0xbf, 0x56, 0x82, 0x99, 0x38, 0xc2, 0xae, 0x38, 0x5e, 0x07, 0x05, 0x0f, 0x70, 0x9c, 0xd1, + 0x18, 0xa8, 0xc6, 0x31, 0xb0, 0x96, 0xe3, 0x27, 0x1c, 0x5b, 0x8d, 0x8b, 0x4f, 0x2e, 0xf6, 0x1c, + 0xa7, 0x67, 0x21, 0x9a, 0x48, 0xdb, 0xe1, 0xce, 0xe2, 0xba, 0x1d, 0x3c, 0x77, 0xf1, 0x4d, 0xdd, + 0x0a, 0x51, 0x8e, 0x13, 0x57, 0x32, 0x4e, 0xac, 0x0d, 0x67, 0x93, 0xf6, 0xf0, 0x7a, 0x9e, 0x87, + 0xeb, 0xc3, 0xf9, 0x64, 0xa9, 0xd4, 0x0f, 0x65, 0x38, 0x46, 0xdc, 0xc2, 0xb0, 0xa1, 0x65, 0x0d, + 0x29, 0x01, 0x73, 0x50, 0x0d, 0xa9, 0xb3, 0xa9, 0x5f, 0x18, 0x84, 0x5d, 0xe6, 0x39, 0x16, 0xba, + 0x8e, 0x0e, 0x90, 0x45, 0x3c, 0x52, 0xd1, 0x12, 0x84, 0x32, 0x0f, 0xb5, 0x77, 0x1d, 0xd3, 0x26, + 0x81, 0x55, 0x26, 0x1f, 0x63, 0x18, 0x7f, 0xb3, 0xcd, 0xee, 0x9e, 0x8d, 0x7d, 0x4d, 0xfd, 0x10, + 0xc3, 0xbc, 0x8b, 0xaa, 0xa2, 0x8b, 0xce, 0xc0, 0xb4, 0xee, 0xba, 0x6d, 0xdd, 0xee, 0x21, 0x8f, + 0x4e, 0x3a, 0x41, 0xd3, 0x41, 0xc4, 0xe2, 0x82, 0x80, 0x67, 0xea, 0x38, 0xa1, 0xd7, 0x45, 0xc4, + 0xda, 0x15, 0x8d, 0xc3, 0x60, 0x3e, 0x8e, 0x8b, 0x3c, 0x2e, 0x8f, 0x69, 0xea, 0xa7, 0xb0, 0x2c, + 0x24, 0x20, 0x0e, 0x09, 0x5c, 0x48, 0xc2, 0x00, 0x5d, 0xb6, 0x0d, 0xa2, 0x54, 0x83, 0x15, 0x92, + 0x04, 0x85, 0x0b, 0x84, 0x69, 0x1f, 0x98, 0x41, 0x5c, 0xae, 0x26, 0x69, 0x81, 0x10, 0x90, 0xea, + 0x17, 0x24, 0x98, 0xde, 0x0a, 0xb7, 0x2d, 0xb3, 0x4b, 0x10, 0xd8, 0xf8, 0x89, 0x89, 0x25, 0xc1, + 0xc4, 0xbc, 0xa1, 0xe4, 0x62, 0x43, 0x95, 0x44, 0x43, 0xcd, 0x41, 0xb5, 0x87, 0x6c, 0x03, 0x79, + 0xcc, 0xf0, 0x0c, 0x62, 0x0a, 0x55, 0x22, 0x85, 0xd4, 0x3f, 0xc8, 0x50, 0xfb, 0x88, 0x45, 0x58, + 0x80, 0x86, 0xbb, 0xeb, 0xd8, 0x68, 0x23, 0xc4, 0xc1, 0xc7, 0x64, 0xe1, 0x51, 0xca, 0x71, 0xa8, + 0x6c, 0x9b, 0x5e, 0xb0, 0x4b, 0xbc, 0x3f, 0xa5, 0x51, 0x00, 0x63, 0x51, 0x5f, 0x37, 0xa9, 0xcb, + 0xeb, 0x1a, 0x05, 0x98, 0x42, 0xb5, 0xd8, 0x43, 0xe2, 0x52, 0x50, 0xcf, 0x2c, 0x05, 0xd9, 0x08, + 0x82, 0xdc, 0x08, 0x3a, 0x07, 0xcd, 0x9e, 0xe5, 0x6c, 0xeb, 0x96, 0x86, 0xba, 0x07, 0x6d, 0xbf, + 0xb7, 0xe9, 0x06, 0xc4, 0xdd, 0x15, 0x2d, 0x83, 0xc7, 0xf6, 0x21, 0x22, 0x76, 0x02, 0x8f, 0xb9, + 0x3b, 0x86, 0xd5, 0x7f, 0x48, 0x00, 0x34, 0xed, 0x88, 0x89, 0x53, 0x6b, 0x99, 0x94, 0x5d, 0xcb, + 0xe6, 0xa0, 0xea, 0xa1, 0xbe, 0xee, 0xed, 0x45, 0xa9, 0x46, 0xa1, 0x94, 0x62, 0xa5, 0x8c, 0x62, + 0xaf, 0x00, 0xec, 0x90, 0x79, 0x30, 0x1f, 0x62, 0x72, 0x5c, 0x18, 0x32, 0x5d, 0xc2, 0x62, 0xe4, + 0x6d, 0x8d, 0x1b, 0x8e, 0xf3, 0x58, 0x37, 0x0c, 0x96, 0x2e, 0x15, 0x9a, 0xc7, 0x31, 0x22, 0x27, + 0x5b, 0xaa, 0x03, 0xb2, 0x65, 0x22, 0x0e, 0xae, 0xbf, 0x4b, 0x50, 0x5f, 0xb6, 0xf4, 0xee, 0xde, + 0x88, 0xaa, 0x8b, 0x2a, 0xca, 0x19, 0x15, 0xd7, 0x60, 0x6a, 0x1b, 0xb3, 0x8b, 0x54, 0x20, 0x56, + 0x68, 0x5c, 0xfc, 0xcf, 0x1c, 0x2d, 0xc5, 0xe4, 0xd2, 0x44, 0x3a, 0x51, 0xdd, 0xf2, 0x70, 0x75, + 0x2b, 0x03, 0xd4, 0x8d, 0xd7, 0x0b, 0xf5, 0x9b, 0x25, 0x98, 0x24, 0x65, 0x55, 0x43, 0xfb, 0x21, + 0xf2, 0x03, 0xe5, 0x35, 0xa8, 0x85, 0x91, 0xa8, 0xd2, 0xa8, 0xa2, 0xc6, 0x24, 0xca, 0xcb, 0x6c, + 0x3d, 0x24, 0xf4, 0x32, 0xa1, 0x3f, 0x99, 0x43, 0x1f, 0x2f, 0xb0, 0x5a, 0x32, 0x1c, 0xaf, 0x84, + 0xbb, 0xba, 0x6d, 0x58, 0x48, 0x43, 0x7e, 0x68, 0x05, 0xac, 0x36, 0x0b, 0x38, 0x1a, 0x69, 0xfb, + 0x6d, 0xbf, 0xc7, 0xd6, 0x49, 0x06, 0x61, 0xeb, 0xd0, 0x71, 0xf8, 0x13, 0x55, 0x3d, 0x41, 0xe0, + 0x84, 0xf7, 0xd0, 0x3e, 0xf1, 0x10, 0x4d, 0xcf, 0x08, 0x4c, 0xe6, 0x64, 0x56, 0xa3, 0x81, 0x20, + 0xe0, 0xb0, 0x8b, 0x29, 0x4c, 0x18, 0xd0, 0x46, 0x8c, 0xc3, 0x64, 0xfa, 0x30, 0xb1, 0x90, 0x43, + 0xa6, 0x90, 0x67, 0xca, 0x6d, 0x23, 0xaf, 0xdc, 0xfe, 0xbe, 0x04, 0x53, 0x34, 0x09, 0x23, 0xd7, + 0x9c, 0xc2, 0xd9, 0xe2, 0xf4, 0x85, 0x58, 0xe4, 0x30, 0x58, 0x17, 0x0c, 0x6d, 0x88, 0x65, 0x4f, + 0xc0, 0xe1, 0x80, 0xc6, 0xf0, 0x15, 0xa1, 0xfc, 0xf1, 0xa8, 0x68, 0x96, 0x35, 0xbe, 0x0c, 0x72, + 0x18, 0x5c, 0x38, 0x02, 0x47, 0x88, 0xb1, 0x18, 0xc6, 0xb4, 0x81, 0x13, 0xcf, 0x4f, 0xa3, 0x8c, + 0xc3, 0x60, 0x2f, 0x05, 0x4e, 0x34, 0x37, 0x35, 0x75, 0x82, 0xa0, 0x9c, 0xd9, 0xbc, 0x74, 0xf9, + 0x8b, 0xe1, 0x4c, 0x6c, 0xd4, 0x07, 0xc6, 0x06, 0x08, 0xb1, 0x21, 0xa6, 0x68, 0x23, 0x93, 0xa2, + 0xa7, 0x61, 0x8a, 0xf2, 0x49, 0x2d, 0x7f, 0x02, 0x52, 0x8c, 0xb0, 0xa9, 0x74, 0x84, 0x89, 0x31, + 0x32, 0x5d, 0x10, 0x23, 0x33, 0x71, 0xde, 0xfd, 0x48, 0x06, 0x58, 0x45, 0xae, 0xee, 0x05, 0x7d, + 0x64, 0x07, 0x58, 0x3d, 0x23, 0x86, 0x62, 0xe7, 0x0a, 0x38, 0x7e, 0xd5, 0x92, 0xc5, 0x55, 0x4b, + 0x81, 0x32, 0x31, 0x38, 0xf5, 0x26, 0xf9, 0x3f, 0x36, 0xa6, 0xab, 0x7b, 0x94, 0x1b, 0x4d, 0x95, + 0x18, 0xc6, 0xab, 0x92, 0xe3, 0x19, 0x6c, 0x1d, 0xab, 0x68, 0x14, 0xc0, 0x25, 0x24, 0x99, 0x8f, + 0xec, 0x02, 0xaa, 0x74, 0x95, 0x11, 0xb1, 0x43, 0x37, 0x2e, 0xe7, 0xa0, 0xe9, 0x87, 0xdb, 0x89, + 0x72, 0x1b, 0x61, 0x9f, 0x25, 0x4d, 0x06, 0x8f, 0x8d, 0x4a, 0x77, 0x34, 0x78, 0x10, 0x5d, 0xf8, + 0x12, 0x44, 0xba, 0x93, 0x51, 0x7f, 0x2d, 0x43, 0x73, 0xd3, 0xeb, 0xe9, 0xb6, 0xf9, 0xc9, 0xb8, + 0x63, 0x1f, 0xab, 0x01, 0x58, 0x80, 0x06, 0xb2, 0x7b, 0x96, 0xe9, 0xef, 0x6e, 0x24, 0x76, 0xe3, + 0x51, 0xbc, 0xb1, 0xcb, 0x45, 0x2d, 0x42, 0x45, 0x68, 0x11, 0xe6, 0xa0, 0xda, 0x77, 0xb6, 0x4d, + 0x2b, 0x8a, 0x7b, 0x06, 0x91, 0x98, 0x47, 0x16, 0x22, 0xbd, 0x42, 0x1c, 0xf3, 0x11, 0x22, 0x69, + 0x1b, 0x6a, 0xb9, 0x6d, 0x43, 0x9d, 0x6f, 0x1b, 0x44, 0xc3, 0x43, 0xc6, 0xf0, 0xd4, 0x5c, 0x8d, + 0xb8, 0x0e, 0x0d, 0x5a, 0xe2, 0x7f, 0x21, 0x41, 0x33, 0x71, 0x05, 0xed, 0xa9, 0x0b, 0x4d, 0x99, + 0x8e, 0x4e, 0x39, 0x27, 0x3a, 0xe3, 0x98, 0x2a, 0xf1, 0x31, 0x85, 0xa3, 0xd0, 0xf1, 0x4d, 0x6e, + 0x63, 0x13, 0xc3, 0x78, 0x36, 0x0b, 0xe9, 0x9c, 0x21, 0x29, 0xc4, 0x6d, 0x63, 0xab, 0xc2, 0x36, + 0x36, 0xbd, 0x52, 0xff, 0x44, 0x82, 0xe3, 0x38, 0x02, 0x32, 0x6a, 0x6c, 0x42, 0xd3, 0x49, 0x45, + 0x09, 0x5b, 0xca, 0x9e, 0xce, 0x59, 0x8a, 0xd2, 0x01, 0xa5, 0x65, 0x88, 0x31, 0x43, 0x23, 0x35, + 0x09, 0x5b, 0xdb, 0xf2, 0x18, 0xa6, 0xe5, 0xd1, 0x32, 0xc4, 0xea, 0xcf, 0x24, 0x68, 0xd2, 0xc5, + 0x93, 0xab, 0x01, 0x47, 0x2e, 0xf6, 0x2d, 0x38, 0x9e, 0x9e, 0xf9, 0xba, 0xe9, 0x07, 0x2d, 0x79, + 0xa1, 0x34, 0xaa, 0xe8, 0xb9, 0x0c, 0xd4, 0x1f, 0xc8, 0xf0, 0xf8, 0x56, 0x68, 0x59, 0x6d, 0xe4, + 0xfb, 0x7a, 0x0f, 0x2d, 0x1f, 0x76, 0xd0, 0x3e, 0xfe, 0xa0, 0xa1, 0xfd, 0xc2, 0x18, 0xc2, 0x9d, + 0x14, 0x69, 0x45, 0x4c, 0xc7, 0x8e, 0x43, 0x88, 0x47, 0xe1, 0x94, 0xf3, 0x29, 0x9f, 0x56, 0x69, + 0xa1, 0x84, 0x17, 0x69, 0x06, 0x2a, 0x9f, 0x80, 0x49, 0xd2, 0x25, 0xb0, 0x69, 0x5a, 0x65, 0xa2, + 0xc0, 0xab, 0xb9, 0x7d, 0x49, 0xae, 0x54, 0xb4, 0xdf, 0x60, 0xf0, 0x65, 0x3b, 0xf0, 0x0e, 0x35, + 0x81, 0xe3, 0xfc, 0xdb, 0x30, 0x9b, 0x19, 0xa2, 0x34, 0xa1, 0xb4, 0x87, 0x0e, 0x99, 0x1e, 0xf8, + 0xbf, 0xca, 0xff, 0x40, 0xe5, 0x00, 0x6f, 0x50, 0x99, 0xf7, 0xe7, 0x73, 0x24, 0x60, 0x32, 0x6b, + 0x74, 0xe0, 0xcb, 0xf2, 0xff, 0x4b, 0xea, 0xd3, 0xb1, 0x62, 0xbc, 0x8e, 0x92, 0xa0, 0xa3, 0x7a, + 0x0d, 0x1a, 0x6d, 0xbf, 0xb7, 0xaa, 0x07, 0x3a, 0x19, 0xf8, 0x2a, 0x34, 0xfa, 0x09, 0x48, 0x06, + 0xe7, 0xcf, 0xc7, 0x88, 0x34, 0x7e, 0xb8, 0xfa, 0x81, 0x0c, 0xad, 0x7c, 0x53, 0xf8, 0x2e, 0x96, + 0x01, 0x79, 0xde, 0x8a, 0x63, 0x20, 0xa2, 0x5a, 0x45, 0x8b, 0x40, 0xec, 0x3b, 0xe4, 0x79, 0x78, + 0x7d, 0x63, 0x6d, 0x3c, 0x85, 0x94, 0x45, 0x28, 0x5b, 0x91, 0x5b, 0x06, 0x4b, 0x41, 0xc6, 0x29, + 0x7d, 0x68, 0x12, 0xeb, 0x72, 0x0a, 0x31, 0x9f, 0x2d, 0x8d, 0xec, 0x33, 0xdf, 0xa5, 0x4e, 0xe3, + 0x78, 0x50, 0xc7, 0x65, 0x58, 0xcf, 0x77, 0xe1, 0x44, 0xee, 0xd0, 0x1c, 0x07, 0x3e, 0x2f, 0x3a, + 0xf0, 0x54, 0xb1, 0x2a, 0x69, 0x27, 0xba, 0xa0, 0xac, 0xa1, 0xa0, 0xad, 0xdf, 0x5d, 0xb2, 0x8d, + 0xb6, 0x69, 0x77, 0xd0, 0x3e, 0x8e, 0xf6, 0x05, 0x68, 0xb0, 0xe3, 0x86, 0xd8, 0x4d, 0x75, 0x8d, + 0x47, 0x15, 0x9e, 0x42, 0xa4, 0xf2, 0xa1, 0x94, 0xc9, 0x07, 0xf5, 0x12, 0x4c, 0xf2, 0xd3, 0x91, + 0x05, 0x46, 0xbf, 0xdb, 0x41, 0xfb, 0x44, 0xa1, 0x29, 0x8d, 0x41, 0x04, 0x4f, 0x46, 0xb0, 0xdd, + 0x07, 0x83, 0xd4, 0xdf, 0xc8, 0x70, 0x2c, 0x23, 0xb2, 0xef, 0xde, 0x2b, 0x1f, 0x3e, 0x5e, 0x4a, + 0x45, 0xf1, 0x52, 0x16, 0xe2, 0x65, 0x0f, 0x66, 0xa9, 0x93, 0xb8, 0xa9, 0x5b, 0x15, 0x12, 0x00, + 0xaf, 0xe5, 0x6d, 0x06, 0xb2, 0x42, 0x32, 0xdf, 0x73, 0x58, 0xea, 0xfc, 0x2c, 0xdf, 0x79, 0x04, + 0x73, 0xf9, 0x83, 0x73, 0xdc, 0xff, 0x82, 0xe8, 0xfe, 0xff, 0xc8, 0x73, 0x3f, 0x2f, 0x09, 0xe7, + 0xff, 0xcf, 0x48, 0x30, 0x83, 0xab, 0x6a, 0x07, 0xd9, 0x46, 0xdb, 0xef, 0x11, 0x4b, 0x2e, 0x40, + 0x83, 0x32, 0x68, 0xfb, 0xbd, 0x64, 0x77, 0xc8, 0xa1, 0xf0, 0x88, 0xae, 0x65, 0xe2, 0xea, 0x49, + 0x46, 0xb0, 0xaa, 0xc7, 0xa1, 0xf0, 0x0a, 0xe9, 0x23, 0x76, 0x34, 0x83, 0xcd, 0x5b, 0xd2, 0x62, + 0x98, 0xad, 0x78, 0xe5, 0x78, 0xc5, 0x7b, 0x7f, 0x02, 0x26, 0x58, 0x78, 0x92, 0x55, 0x12, 0x6f, + 0xd0, 0xe3, 0x3a, 0x4b, 0x21, 0xda, 0x04, 0x77, 0x0f, 0x92, 0x78, 0xa3, 0x10, 0x7f, 0x4e, 0x56, + 0x12, 0xcf, 0xc9, 0x52, 0x32, 0x96, 0xb3, 0x32, 0xa6, 0xf4, 0xac, 0x64, 0xf5, 0xc4, 0x3d, 0x1f, + 0x69, 0x83, 0xb6, 0x2c, 0x3d, 0xd8, 0x71, 0xbc, 0x3e, 0xdb, 0x6f, 0x57, 0xb4, 0x0c, 0x1e, 0xf7, + 0x99, 0x14, 0x17, 0x6f, 0x14, 0xe8, 0x9a, 0x9e, 0xc2, 0xe2, 0xb6, 0x9c, 0x62, 0xa2, 0x0d, 0x03, + 0x3d, 0x30, 0x11, 0x91, 0x54, 0x36, 0xdf, 0x37, 0x1d, 0x9b, 0xb4, 0xac, 0x74, 0x5f, 0xc0, 0xa3, + 0xb0, 0xe6, 0x7d, 0xbf, 0x77, 0xc5, 0x73, 0xfa, 0x6c, 0x2f, 0x16, 0x81, 0x44, 0x73, 0xc7, 0x0e, + 0xa2, 0x76, 0x97, 0x1e, 0x95, 0xf0, 0x28, 0x4c, 0xcb, 0x40, 0xd2, 0x41, 0x4d, 0x6a, 0x11, 0x88, + 0x83, 0xcb, 0x47, 0xfb, 0xac, 0xd3, 0xc7, 0xff, 0x15, 0x3c, 0x39, 0x93, 0xf2, 0xa4, 0xd8, 0xba, + 0x35, 0xc9, 0x57, 0xbe, 0x75, 0x4b, 0x7a, 0x9e, 0x59, 0xa1, 0xe7, 0x59, 0x82, 0x09, 0xc7, 0xc5, + 0xf5, 0xc0, 0x6f, 0x29, 0x24, 0x7f, 0xfe, 0xab, 0xb8, 0x62, 0x2d, 0x6e, 0xd2, 0x91, 0x34, 0x53, + 0x22, 0x3a, 0xe5, 0x3a, 0xcc, 0x38, 0x3b, 0x3b, 0x96, 0x69, 0xa3, 0xad, 0xd0, 0xdf, 0x25, 0xfb, + 0xf2, 0x63, 0x24, 0xfa, 0xd5, 0xbc, 0xae, 0x42, 0x1c, 0xa9, 0xa5, 0x49, 0x71, 0x2b, 0xa8, 0x07, + 0x74, 0x47, 0x44, 0x2a, 0xde, 0x71, 0x52, 0xf1, 0x04, 0x1c, 0x39, 0x70, 0xe4, 0x2a, 0xff, 0x09, + 0x62, 0x38, 0x1e, 0x45, 0xb9, 0x04, 0x7a, 0x77, 0x17, 0x91, 0x13, 0xa6, 0xd6, 0x1c, 0x6d, 0x28, + 0x79, 0x1c, 0x0b, 0xfe, 0xc7, 0xe3, 0x6e, 0xb6, 0x05, 0x13, 0xa6, 0xaf, 0x21, 0xbd, 0x1b, 0xb4, + 0xce, 0x2e, 0x48, 0x67, 0x6b, 0x5a, 0x04, 0x2a, 0x17, 0xe1, 0xb8, 0xe9, 0x5f, 0xbe, 0x1b, 0x20, + 0xcf, 0xd6, 0x2d, 0xfc, 0xaf, 0xed, 0x13, 0x8b, 0x3d, 0x43, 0x86, 0xe5, 0x7e, 0x53, 0x16, 0x41, + 0xc1, 0x51, 0x60, 0x7a, 0x7e, 0xd0, 0x76, 0x0c, 0x73, 0xe7, 0x90, 0x38, 0xe6, 0x1c, 0x71, 0x4c, + 0xce, 0x97, 0xf9, 0x97, 0x61, 0x92, 0x37, 0x6f, 0x4e, 0x6d, 0x39, 0xce, 0xd7, 0x96, 0x1a, 0x5f, + 0x3a, 0xbe, 0x2e, 0xc1, 0x4c, 0xca, 0xb0, 0x78, 0x74, 0x60, 0x06, 0x16, 0x62, 0x1c, 0x28, 0x80, + 0x37, 0x72, 0x06, 0xf2, 0xbb, 0x2c, 0x75, 0xc9, 0xff, 0x99, 0x1d, 0x4a, 0xb1, 0x1d, 0x54, 0x98, + 0x34, 0x37, 0x3b, 0x98, 0x51, 0xc7, 0x09, 0x6d, 0x23, 0xbe, 0x2f, 0xe0, 0x70, 0xe4, 0x84, 0x61, + 0xb3, 0xb3, 0xac, 0x1b, 0x3d, 0x44, 0x6f, 0x8f, 0x2a, 0x44, 0x26, 0x11, 0xa9, 0x1a, 0x50, 0xbb, + 0x61, 0xba, 0xfe, 0x8a, 0xd3, 0xef, 0xe3, 0x00, 0x34, 0x50, 0x80, 0xb7, 0x1c, 0x12, 0x71, 0x17, + 0x83, 0xb0, 0x2f, 0x0d, 0xb4, 0xa3, 0x87, 0x56, 0x80, 0x87, 0x46, 0x05, 0x8c, 0x43, 0x91, 0xd3, + 0x0e, 0xdf, 0xb1, 0x57, 0x29, 0x35, 0x95, 0x93, 0xc3, 0xa8, 0xbf, 0x92, 0xa1, 0x49, 0x0a, 0xf4, + 0x0a, 0x09, 0x77, 0x83, 0x10, 0x5d, 0x84, 0x0a, 0x29, 0x3f, 0xac, 0xc1, 0x1d, 0x7c, 0x44, 0x44, + 0x87, 0x2a, 0x97, 0xa0, 0xea, 0xb8, 0xa4, 0x2b, 0xa6, 0xd5, 0xfb, 0x4c, 0x11, 0x91, 0x78, 0x43, + 0xa0, 0x31, 0x2a, 0xe5, 0x0a, 0x40, 0x3f, 0x69, 0x82, 0x69, 0x2f, 0x33, 0x2a, 0x0f, 0x8e, 0x12, + 0x1b, 0x37, 0x5e, 0xa6, 0xe3, 0x6b, 0x82, 0x92, 0x26, 0x22, 0x95, 0x0d, 0x98, 0x26, 0x62, 0x6f, + 0x46, 0x67, 0x85, 0xc4, 0x07, 0xa3, 0xcf, 0x98, 0xa2, 0x56, 0xbf, 0x23, 0x31, 0x33, 0xe2, 0xaf, + 0x1d, 0x44, 0x6d, 0x9f, 0x98, 0x44, 0x1a, 0xcb, 0x24, 0xf3, 0x50, 0xeb, 0x87, 0xdc, 0xd1, 0x65, + 0x49, 0x8b, 0xe1, 0xc4, 0x45, 0xa5, 0x91, 0x5d, 0xa4, 0x7e, 0x57, 0x82, 0xd6, 0xeb, 0x8e, 0x69, + 0x93, 0x0f, 0x4b, 0xae, 0x6b, 0xb1, 0xdb, 0xa4, 0xb1, 0x7d, 0xfe, 0x31, 0xa8, 0xeb, 0x94, 0x8d, + 0x1d, 0x30, 0xb7, 0x8f, 0x70, 0x1c, 0x99, 0xd0, 0x70, 0x67, 0x42, 0x25, 0xfe, 0x4c, 0x48, 0x7d, + 0x4f, 0x82, 0x69, 0x6a, 0x94, 0x37, 0x42, 0x33, 0x18, 0x5b, 0xbe, 0x65, 0xa8, 0xed, 0x87, 0x66, + 0x30, 0x46, 0x54, 0xc6, 0x74, 0xd9, 0x78, 0x2a, 0xe5, 0xc4, 0x93, 0xfa, 0x81, 0x04, 0x27, 0xd3, + 0x66, 0x5d, 0xea, 0x76, 0x91, 0x7b, 0x3f, 0x53, 0x4a, 0x38, 0x13, 0x2b, 0xe7, 0x9c, 0x89, 0x79, + 0xa8, 0x8b, 0xcc, 0x03, 0xe4, 0x2d, 0xf9, 0x6c, 0x93, 0xcf, 0x61, 0x72, 0x55, 0xd2, 0xd0, 0xbb, + 0xa8, 0xfb, 0xf0, 0xaa, 0xf4, 0x39, 0x19, 0x9e, 0x58, 0x8b, 0x13, 0xf7, 0x86, 0xa7, 0xdb, 0xfe, + 0x0e, 0xf2, 0xbc, 0xfb, 0xa8, 0xcf, 0x75, 0x98, 0xb2, 0xd1, 0x9d, 0x44, 0x26, 0x96, 0xce, 0xa3, + 0xb2, 0x11, 0x89, 0x47, 0xab, 0x7d, 0xea, 0x3f, 0x25, 0x68, 0x52, 0x3e, 0xd7, 0xcc, 0xee, 0xde, + 0x7d, 0x54, 0x7e, 0x03, 0xa6, 0xf7, 0x88, 0x04, 0x18, 0x1a, 0xa3, 0xec, 0xa7, 0xa8, 0x47, 0x54, + 0xff, 0x43, 0x09, 0x66, 0xa3, 0x4b, 0xf0, 0x03, 0xf3, 0x7e, 0x06, 0xf3, 0x16, 0xcc, 0xd0, 0x4b, + 0x85, 0x71, 0x0d, 0x90, 0x26, 0x1f, 0xd1, 0x02, 0x3f, 0x96, 0x60, 0x86, 0x72, 0xba, 0x6c, 0x07, + 0xc8, 0x1b, 0x5b, 0xff, 0xab, 0xd0, 0x40, 0x76, 0xe0, 0xe9, 0xf6, 0x38, 0x15, 0x96, 0x27, 0x1d, + 0xb1, 0xc8, 0xbe, 0x27, 0x81, 0x42, 0x58, 0xad, 0x9a, 0x7e, 0xdf, 0xf4, 0xfd, 0xfb, 0xe8, 0xba, + 0xd1, 0x04, 0xfe, 0x96, 0x0c, 0xc7, 0x39, 0x2e, 0xed, 0x30, 0x78, 0xd0, 0x45, 0x56, 0x56, 0xa1, + 0x8e, 0x7b, 0x0c, 0xfe, 0xca, 0x77, 0xd4, 0x89, 0x12, 0x42, 0xdc, 0x05, 0x13, 0xa0, 0x83, 0xba, + 0x8e, 0x6d, 0xd0, 0x52, 0x3c, 0xa5, 0x09, 0x38, 0x5c, 0x86, 0xe6, 0x39, 0x36, 0x2b, 0xba, 0xdd, + 0x45, 0xd6, 0x23, 0x63, 0x22, 0xf5, 0xfb, 0x12, 0x4c, 0xd3, 0x21, 0x0f, 0xbe, 0xca, 0xea, 0x0f, + 0x25, 0x16, 0xc8, 0x0f, 0x8d, 0x97, 0x70, 0x78, 0xcd, 0x71, 0x5c, 0xf8, 0xbe, 0xfc, 0xc1, 0x0d, + 0xad, 0xab, 0xd0, 0xe8, 0xee, 0xea, 0x76, 0x6f, 0xac, 0xe0, 0xe2, 0x49, 0xd5, 0x00, 0x1e, 0xe7, + 0xef, 0x20, 0x56, 0xe8, 0x27, 0xa2, 0xfe, 0x73, 0x29, 0x55, 0x06, 0x3e, 0xe9, 0xb8, 0x37, 0xa3, + 0xef, 0xc1, 0x2c, 0xbd, 0x14, 0xe7, 0x7a, 0x46, 0xa5, 0x05, 0x13, 0xba, 0x41, 0x0f, 0x5e, 0x24, + 0x42, 0x14, 0x81, 0xe2, 0xa3, 0x09, 0xf6, 0x3c, 0x2f, 0x79, 0x34, 0x71, 0x0a, 0x40, 0x37, 0x8c, + 0x5b, 0x8e, 0x67, 0x98, 0x76, 0xb4, 0x41, 0xe0, 0x30, 0xea, 0xeb, 0x30, 0x79, 0xc5, 0x73, 0xfa, + 0x37, 0xb8, 0xeb, 0xed, 0x81, 0x17, 0xf0, 0xfc, 0xd5, 0xb8, 0x2c, 0x5e, 0x8d, 0xab, 0xef, 0xc0, + 0x89, 0x8c, 0xe0, 0xc4, 0x58, 0x2b, 0xf4, 0xd6, 0x3e, 0x9a, 0x84, 0x85, 0x4c, 0xde, 0xd1, 0x24, + 0x2f, 0x8b, 0x26, 0x10, 0xa9, 0x9f, 0x95, 0xe0, 0xa9, 0x0c, 0xfb, 0x25, 0xd7, 0xf5, 0x9c, 0x03, + 0xe6, 0x93, 0xa3, 0x98, 0x46, 0x6c, 0x8e, 0xe5, 0x54, 0x73, 0x9c, 0x2f, 0x84, 0xd0, 0xd0, 0x7f, + 0x04, 0x42, 0x7c, 0x4f, 0x82, 0x19, 0x26, 0x84, 0x61, 0xb0, 0x69, 0x5f, 0x80, 0x2a, 0x7d, 0x37, + 0xc4, 0x26, 0x7c, 0x2a, 0x77, 0xc2, 0xe8, 0xbd, 0x93, 0xc6, 0x06, 0x67, 0x23, 0x52, 0xce, 0xcb, + 0xa8, 0x97, 0xe2, 0x60, 0x1f, 0xf9, 0x65, 0x0f, 0x23, 0x50, 0x3f, 0x1e, 0x05, 0xf3, 0x2a, 0xb2, + 0xd0, 0x51, 0xda, 0x48, 0xbd, 0x09, 0xd3, 0xe4, 0x11, 0x53, 0x62, 0x83, 0x23, 0x61, 0x7b, 0x0b, + 0x9a, 0x84, 0xed, 0x91, 0xcb, 0x1b, 0x67, 0x07, 0xb6, 0x0f, 0x5f, 0x4a, 0x8e, 0x84, 0xfb, 0xb3, + 0x70, 0x2c, 0xb2, 0x3d, 0x7d, 0x18, 0x4c, 0x79, 0x17, 0x5c, 0x55, 0xaa, 0xdf, 0x90, 0x60, 0x6e, + 0xc5, 0xb1, 0x0f, 0x90, 0xe7, 0x0b, 0x8f, 0x89, 0x29, 0x89, 0x90, 0xfd, 0x0c, 0x52, 0x16, 0x41, + 0xe9, 0x72, 0x14, 0xec, 0x70, 0x54, 0x26, 0x87, 0xa3, 0x39, 0x5f, 0x94, 0xe7, 0xe1, 0x44, 0x48, + 0xb8, 0xde, 0xb4, 0x3d, 0xa4, 0x1b, 0xe4, 0x3c, 0x8e, 0x2b, 0x7a, 0xf9, 0x1f, 0xd5, 0x77, 0x61, + 0x9e, 0x97, 0xab, 0x83, 0x82, 0x2d, 0xcf, 0x3c, 0xe0, 0x64, 0x63, 0x27, 0xff, 0x92, 0x70, 0xf2, + 0x9f, 0xdc, 0x14, 0xc8, 0xc2, 0x4d, 0xc1, 0x49, 0xa8, 0x9b, 0x3e, 0x63, 0x40, 0xe6, 0xad, 0x69, + 0x09, 0x42, 0xd5, 0x61, 0x96, 0x7a, 0x99, 0x5d, 0xcd, 0x91, 0x29, 0xe6, 0xa1, 0x46, 0x43, 0x37, + 0x9e, 0x24, 0x86, 0x0b, 0x2f, 0xba, 0x0a, 0xaf, 0x75, 0xd5, 0x0e, 0xcc, 0xb2, 0xa7, 0x4d, 0x5b, + 0x7a, 0xcf, 0xb4, 0x69, 0x2d, 0x3f, 0x05, 0xe0, 0xea, 0xbd, 0xe8, 0xa1, 0x25, 0xbd, 0xa0, 0xe4, + 0x30, 0xf8, 0xbb, 0xbf, 0xeb, 0xdc, 0x61, 0xdf, 0x65, 0xfa, 0x3d, 0xc1, 0xa8, 0x6f, 0x82, 0xa2, + 0x21, 0xdf, 0x75, 0x6c, 0x1f, 0x71, 0x5c, 0x17, 0xa0, 0xb1, 0x12, 0x7a, 0x1e, 0xb2, 0xf1, 0x54, + 0xd1, 0x6b, 0x41, 0x1e, 0x85, 0xf9, 0x76, 0x12, 0xbe, 0xf4, 0xee, 0x82, 0xc3, 0xa8, 0x7f, 0xaa, + 0x42, 0xbd, 0x63, 0xf6, 0x6c, 0xdd, 0xd2, 0xd0, 0xbe, 0xf2, 0x2a, 0x54, 0xe9, 0xce, 0x88, 0x05, + 0x64, 0xde, 0x59, 0x3a, 0x1d, 0x4d, 0xb7, 0x80, 0x1a, 0xda, 0xbf, 0xfa, 0x98, 0xc6, 0x68, 0x94, + 0x37, 0xa2, 0x07, 0x60, 0xeb, 0xf4, 0xa4, 0x8c, 0x2d, 0x93, 0xcf, 0x0c, 0x61, 0xc2, 0x46, 0x53, + 0x5e, 0x22, 0x07, 0x2c, 0x50, 0x97, 0x74, 0x4e, 0xac, 0x0a, 0x15, 0x0b, 0x44, 0x1b, 0x2c, 0x26, + 0x10, 0xa5, 0xc1, 0xd4, 0x3a, 0x39, 0x4b, 0x62, 0x0d, 0x41, 0x31, 0x35, 0x3d, 0x72, 0x62, 0xd4, + 0x94, 0x06, 0x53, 0xef, 0x86, 0x76, 0xef, 0xa6, 0xcb, 0x8e, 0x38, 0x8b, 0xa9, 0xaf, 0x92, 0x61, + 0x8c, 0x9a, 0xd2, 0x60, 0x6a, 0x8f, 0xac, 0x11, 0xc4, 0xe8, 0x83, 0xa8, 0xe9, 0x52, 0xc2, 0xa8, + 0x29, 0x8d, 0xf2, 0x16, 0x34, 0x7b, 0x28, 0xd0, 0x1c, 0xa7, 0xbf, 0x7c, 0xb8, 0xc6, 0xee, 0xb7, + 0xe8, 0x7b, 0xf7, 0xf3, 0x85, 0x7c, 0xd6, 0x52, 0x04, 0x94, 0x63, 0x86, 0x8f, 0xf2, 0x29, 0x78, + 0xca, 0xb1, 0x31, 0x6a, 0x4b, 0xf7, 0x02, 0xb3, 0x6b, 0xba, 0xba, 0x1d, 0xac, 0x38, 0xb6, 0x4d, + 0xd6, 0x33, 0x0d, 0xed, 0xb3, 0x17, 0xf1, 0x2f, 0x16, 0x4e, 0xb4, 0x39, 0x88, 0xfa, 0xea, 0x63, + 0xda, 0x60, 0xf6, 0xca, 0x17, 0x25, 0x58, 0xc8, 0x8c, 0x58, 0x35, 0xfd, 0x2e, 0x2f, 0x03, 0x7d, + 0x4d, 0xff, 0xd2, 0xe8, 0x32, 0xa4, 0x18, 0x5c, 0x7d, 0x4c, 0x1b, 0x3a, 0x09, 0xb3, 0xf2, 0x0d, + 0x67, 0x0f, 0xd9, 0xcb, 0x87, 0x78, 0xec, 0xfa, 0x2a, 0xb9, 0x4b, 0x1b, 0x62, 0x65, 0x81, 0x20, + 0xb1, 0xb2, 0x80, 0x5e, 0xae, 0xc3, 0x84, 0xab, 0x1f, 0x5a, 0x8e, 0x6e, 0xa8, 0x7f, 0x2d, 0x03, + 0x44, 0xae, 0xf6, 0x49, 0x47, 0x2c, 0x24, 0xd9, 0xe9, 0xa1, 0x49, 0xe6, 0x5a, 0x87, 0x5c, 0x9a, + 0x75, 0xf2, 0xd3, 0xec, 0xbf, 0x47, 0x4d, 0x33, 0xca, 0x2d, 0x95, 0x68, 0x97, 0x52, 0x89, 0x76, + 0x7a, 0x68, 0xa2, 0x31, 0xa1, 0x58, 0xaa, 0x5d, 0x4a, 0xa5, 0xda, 0xe9, 0xa1, 0xa9, 0xc6, 0xe8, + 0x59, 0xb2, 0x5d, 0x4a, 0x25, 0xdb, 0xe9, 0xa1, 0xc9, 0xc6, 0xe8, 0x59, 0xba, 0x5d, 0x4a, 0xa5, + 0xdb, 0xe9, 0xa1, 0xe9, 0xc6, 0xe8, 0x59, 0xc2, 0xbd, 0x53, 0x98, 0x70, 0x8b, 0xf7, 0x90, 0x70, + 0x94, 0x67, 0x36, 0xe5, 0xde, 0xc9, 0x09, 0xb4, 0xda, 0x70, 0xee, 0xa9, 0x40, 0x4b, 0xb8, 0x17, + 0x86, 0xda, 0xe7, 0x4b, 0x30, 0x4d, 0xdc, 0x4d, 0x57, 0x65, 0x7b, 0xc7, 0xc9, 0x3e, 0xcb, 0x95, + 0x72, 0x9e, 0xe5, 0x2a, 0xe7, 0x61, 0x96, 0x22, 0x10, 0x77, 0x0b, 0x4a, 0x17, 0xfa, 0xec, 0x07, + 0x72, 0xef, 0x1b, 0xfa, 0x81, 0xd3, 0x5f, 0xd5, 0x03, 0x3d, 0xda, 0x61, 0x24, 0x18, 0xfe, 0x56, + 0xbe, 0x9c, 0xf9, 0xf5, 0x8a, 0x47, 0xf5, 0xaf, 0xb0, 0xd5, 0x9c, 0x40, 0x98, 0x22, 0x30, 0xfb, + 0xc8, 0x09, 0x03, 0xb6, 0x48, 0x45, 0x20, 0x7d, 0x4b, 0x69, 0x98, 0x3a, 0xb9, 0xcb, 0x66, 0x0f, + 0x0d, 0x63, 0x04, 0x59, 0x57, 0x93, 0xbb, 0x79, 0xf6, 0xeb, 0x92, 0x04, 0x33, 0xc2, 0x3d, 0x3a, + 0xf9, 0xa1, 0x92, 0x19, 0x98, 0xfc, 0x03, 0xc4, 0x8a, 0x26, 0xe0, 0x70, 0x1f, 0xb4, 0x1d, 0xfa, + 0x87, 0xd7, 0x4d, 0x9b, 0x37, 0x4f, 0x83, 0xf6, 0x41, 0xd9, 0x2f, 0xea, 0x9f, 0x25, 0x38, 0xc6, + 0xd5, 0x9d, 0x36, 0x0a, 0x74, 0x62, 0x17, 0xe1, 0x19, 0xb9, 0x74, 0x6f, 0xcf, 0xc8, 0xb7, 0x60, + 0xa6, 0x27, 0x6e, 0xcb, 0xef, 0x71, 0x47, 0x9d, 0x26, 0x17, 0xde, 0xc4, 0x97, 0xee, 0xf9, 0x4d, + 0xbc, 0xfa, 0x25, 0x19, 0x66, 0x52, 0xcd, 0xc0, 0xc0, 0x4e, 0x6a, 0x09, 0xc0, 0x8c, 0x43, 0x73, + 0xc0, 0xad, 0x97, 0x18, 0xbf, 0x1a, 0x47, 0x94, 0x77, 0xe9, 0x5f, 0x1a, 0xff, 0xd2, 0xff, 0x2a, + 0x34, 0xdc, 0xc4, 0x49, 0x03, 0x0e, 0x0d, 0x72, 0x5c, 0xa9, 0xf1, 0xa4, 0xea, 0x97, 0x25, 0x98, + 0xcd, 0x94, 0x6c, 0x72, 0x19, 0x8e, 0x13, 0x35, 0xbe, 0x0c, 0xc7, 0x00, 0x97, 0x01, 0x72, 0x3a, + 0x03, 0x2c, 0xf3, 0x80, 0xff, 0xf5, 0x0e, 0x03, 0x0b, 0xa2, 0xaf, 0x5c, 0x18, 0x7d, 0x5f, 0x91, + 0x61, 0x2e, 0xbf, 0xc1, 0x7a, 0x54, 0xfd, 0xf3, 0x55, 0x09, 0x5a, 0x45, 0x6b, 0xe1, 0x7d, 0x73, + 0x53, 0x92, 0x3f, 0x71, 0xef, 0xfa, 0xa8, 0xfa, 0xe7, 0x58, 0x94, 0x3e, 0x5c, 0x73, 0xa1, 0xbe, + 0x1f, 0xdb, 0x27, 0xee, 0xce, 0x1f, 0x51, 0xfb, 0x28, 0xe7, 0xa0, 0x49, 0xd5, 0xe4, 0xde, 0xa1, + 0xd1, 0xcd, 0x5e, 0x06, 0xaf, 0xbe, 0x1d, 0xd9, 0x92, 0x6b, 0xb4, 0x8e, 0x2a, 0xc6, 0xd5, 0x9f, + 0x4b, 0x91, 0x4f, 0xe2, 0x3d, 0xcf, 0x43, 0xe5, 0x93, 0x24, 0xd2, 0xb8, 0x36, 0x92, 0x8b, 0xb4, + 0x78, 0x2f, 0xf6, 0xef, 0x48, 0x1b, 0x1e, 0x69, 0xb1, 0x2d, 0xb9, 0x96, 0x5a, 0xfd, 0xb6, 0x04, + 0x4f, 0x14, 0xee, 0x47, 0x07, 0x5a, 0x95, 0x6b, 0x1a, 0x65, 0xb1, 0x69, 0x4c, 0xa9, 0x57, 0x1a, + 0xbf, 0xd0, 0xfc, 0x52, 0x82, 0x27, 0x07, 0x34, 0xef, 0x29, 0xcf, 0x4a, 0xe3, 0x78, 0x36, 0x25, + 0xac, 0x5c, 0x78, 0x31, 0x3d, 0xd4, 0x17, 0x49, 0x7a, 0x96, 0xf8, 0xf4, 0x54, 0x7f, 0x2b, 0xc1, + 0xd3, 0x23, 0xec, 0xc4, 0x1f, 0x2c, 0x65, 0x0a, 0x1f, 0xea, 0xaa, 0xbf, 0x93, 0xe0, 0xcc, 0x68, + 0x9b, 0xfa, 0x87, 0x45, 0xa3, 0x9f, 0xf2, 0x39, 0x90, 0x3e, 0x2d, 0xe0, 0xdc, 0x2a, 0x09, 0x55, + 0x97, 0xcf, 0x0d, 0x39, 0x95, 0x1b, 0x47, 0x96, 0x01, 0xe9, 0x07, 0xfa, 0xe5, 0xec, 0x03, 0xfd, + 0x36, 0x97, 0x22, 0xd9, 0x1d, 0x68, 0xc1, 0x52, 0xc2, 0x2d, 0x19, 0xb2, 0xb8, 0x64, 0x7c, 0x1a, + 0xa6, 0x56, 0x91, 0xd5, 0xf6, 0x7b, 0xd1, 0x4f, 0x69, 0x8e, 0xf4, 0xb4, 0x75, 0x04, 0x7d, 0x96, + 0x61, 0x9a, 0x17, 0x60, 0x9c, 0x9f, 0x8a, 0xa8, 0xb7, 0xe0, 0x89, 0x0e, 0x0a, 0x96, 0x5c, 0x77, + 0x59, 0xef, 0xee, 0x61, 0x37, 0xdb, 0x46, 0x87, 0x3c, 0x65, 0x1e, 0xf4, 0xdb, 0x20, 0xbc, 0xb3, + 0xf4, 0x13, 0x02, 0xf6, 0x82, 0x56, 0xc0, 0xa9, 0x1b, 0x30, 0x5f, 0xc4, 0x78, 0x2c, 0x41, 0xff, + 0x26, 0xc3, 0x24, 0x79, 0x0f, 0x6c, 0xb4, 0xfd, 0x5e, 0x07, 0x91, 0x1f, 0xc4, 0xfb, 0xe4, 0x5a, + 0x30, 0xb1, 0x76, 0x04, 0xa7, 0x37, 0xc7, 0x72, 0x76, 0x73, 0xbc, 0x09, 0x80, 0x22, 0x6e, 0x3e, + 0x7b, 0x64, 0x73, 0x21, 0x27, 0xec, 0xf8, 0x29, 0x13, 0x80, 0xbd, 0xd9, 0xe6, 0x58, 0xe0, 0xf5, + 0xa5, 0xad, 0xdf, 0x6d, 0xfb, 0x3d, 0xee, 0x0f, 0x9d, 0xd0, 0xb7, 0x36, 0x19, 0x3c, 0xb6, 0x5f, + 0x4c, 0xb9, 0x11, 0xf6, 0xd9, 0x3a, 0x24, 0xe0, 0x52, 0x2f, 0xd0, 0xab, 0xe9, 0x17, 0xe8, 0xf3, + 0x6f, 0xc3, 0x4c, 0x4a, 0x9c, 0x9c, 0x37, 0xce, 0x17, 0xc5, 0xdf, 0x4f, 0x9c, 0x1c, 0xa4, 0x20, + 0xff, 0x02, 0xfa, 0x2f, 0x32, 0xd4, 0xe3, 0x0f, 0x4a, 0x1f, 0x4e, 0x78, 0x48, 0x27, 0x7f, 0xd9, + 0x24, 0x7e, 0x91, 0xcd, 0xfd, 0xca, 0xe9, 0xff, 0x06, 0x71, 0x5d, 0xd4, 0xf2, 0x28, 0xa9, 0xf9, + 0xf2, 0xb9, 0x8e, 0xf0, 0x1b, 0x8c, 0xfc, 0xc7, 0xe0, 0xa5, 0xa2, 0xc7, 0xe0, 0x99, 0xe7, 0xeb, + 0xe5, 0xc2, 0xe7, 0xeb, 0xf1, 0x1f, 0xad, 0x98, 0x47, 0x30, 0x5f, 0x2c, 0x7a, 0x8e, 0xa9, 0xff, + 0x57, 0x34, 0x75, 0xde, 0x15, 0xfa, 0x35, 0x74, 0x48, 0xff, 0x5c, 0x0a, 0x67, 0xe9, 0x1d, 0xa8, + 0x45, 0x68, 0x72, 0x54, 0x74, 0xe8, 0xa2, 0x6b, 0x31, 0xe3, 0x08, 0x14, 0xdf, 0xaa, 0xd7, 0x19, + 0x3d, 0x0e, 0x39, 0x4b, 0x0f, 0x90, 0x1f, 0x70, 0x21, 0x47, 0x8d, 0x90, 0xc1, 0x2f, 0x9f, 0x7f, + 0xeb, 0xdc, 0xa6, 0x8b, 0xec, 0xdb, 0xeb, 0xed, 0xcc, 0x9f, 0x6c, 0x7a, 0x25, 0x23, 0xe9, 0x76, + 0x95, 0x7c, 0x7f, 0xee, 0x5f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x71, 0x3a, 0xae, 0x9b, 0x12, 0x4a, + 0x00, 0x00, +} diff --git a/tools/data-conversion/openim/proto/sdk_ws/ws.proto b/tools/data-conversion/openim/proto/sdk_ws/ws.proto new file mode 100644 index 000000000..c8ef680c9 --- /dev/null +++ b/tools/data-conversion/openim/proto/sdk_ws/ws.proto @@ -0,0 +1,740 @@ +syntax = "proto3"; +import "Open-IM-Server/pkg/proto/sdk_ws/wrappers.proto"; +option go_package = "Open_IM/pkg/proto/sdk_ws;server_api_params"; +package server_api_params; + + +////////////////////////////////base/////////////////////////////// + + +message GroupInfo{ + string groupID = 1; + string groupName = 2; + string notification = 3; + string introduction = 4; + string faceURL = 5; + string ownerUserID = 6; + uint32 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; + uint32 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; + google.protobuf.Int32Value needVerification = 7; + google.protobuf.Int32Value lookMemberInfo = 8; + google.protobuf.Int32Value applyMemberFriend = 9; +} + + +message GroupMemberFullInfo { + string groupID = 1 ; + string userID = 2 ; + int32 roleLevel = 3; + int32 joinTime = 4; + string nickname = 5; + string faceURL = 6; + int32 appMangerLevel = 7; //if >0 + int32 joinSource = 8; + string operatorUserID = 9; + string ex = 10; + uint32 muteEndTime = 11; + string inviterUserID = 12; +} + +message PublicUserInfo{ + string userID = 1; + string nickname = 2; + string faceURL = 3; + int32 gender = 4; + string ex = 5; +} + +message UserInfo{ + string userID = 1; + string nickname = 2; + string faceURL = 3; + int32 gender = 4; + string phoneNumber = 5; + uint32 birth = 6; + string email = 7; + string ex = 8; + uint32 createTime = 9; + int32 appMangerLevel = 10; + int32 globalRecvMsgOpt = 11; + string birthStr = 12; +} + +message FriendInfo{ + string ownerUserID = 1; + string remark = 2; + uint32 createTime = 3; + UserInfo friendUser = 4; + int32 addSource = 5; + string operatorUserID = 6; + string ex = 7; +} + +message BlackInfo{ + string ownerUserID = 1; + uint32 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; + uint32 reqTime = 6; + string handleUserID = 7; + uint32 handleTime = 8; + string ex = 9; + int32 joinSource = 10; + string inviterUserID = 11; +} + +message FriendRequest{ + string fromUserID = 1; + string fromNickname = 2; + string fromFaceURL = 3; + int32 fromGender = 4; + string toUserID = 5; + string toNickname = 6; + string toFaceURL = 7; + int32 toGender = 8; + int32 handleResult = 9; + string reqMsg = 10; + uint32 createTime = 11; + string handlerUserID = 12; + string handleMsg = 13; + uint32 handleTime = 14; + string ex = 15; +} + +///////////////////////////////////organization///////////////////////////////////// + +message Department { + string departmentID = 1; + string faceURL = 2; + string name = 3; + string parentID = 4; + int32 order = 5; + int32 departmentType = 6; + uint32 createTime = 7; + uint32 subDepartmentNum = 8; + uint32 memberNum = 9; + string ex = 10; +} + + + +message OrganizationUser { + string userID = 1; + string nickname = 2; + string englishName = 3; + string faceURL = 4; + int32 gender = 5; + string mobile = 6; + string telephone = 7; + uint32 birth = 8; + string email = 9; + uint32 createTime = 10; + string ex = 11; + string birthStr = 12; +} + +message DepartmentMember { + string userID = 1; + string departmentID = 2; + int32 order = 3; + string position = 4; + int32 leader = 5; + int32 status = 6; + string ex = 7; +} + + +message UserDepartmentMember { + OrganizationUser organizationUser = 1; + DepartmentMember departmentMember = 2; +} + + +message UserInDepartment { + OrganizationUser organizationUser = 1; + repeated DepartmentMember departmentMemberList = 2; +} + + + + + +///////////////////////////////////organization end////////////////////////////////// + + + + + + +///////////////////////////////////base end///////////////////////////////////// +message PullMessageBySeqListReq{ + string userID = 1; + string operationID = 2; + repeated uint32 seqList = 3; + map groupSeqList = 4; +} + +message seqList { + repeated uint32 seqList = 1; +} + + +message MsgDataList { + repeated MsgData msgDataList = 1; +} + +message PullMessageBySeqListResp { + int32 errCode = 1; + string errMsg = 2; + repeated MsgData list = 3; + map groupMsgDataList = 4; +} + + + +message GetMaxAndMinSeqReq { + repeated string groupIDList = 1; + string userID = 2; + string operationID = 3; +} +message MaxAndMinSeq{ + uint32 maxSeq = 1; + uint32 minSeq = 2; +} +message GetMaxAndMinSeqResp { + uint32 maxSeq = 1; + uint32 minSeq = 2; + int32 errCode = 3; + string errMsg = 4; + map groupMaxAndMinSeq = 5; +} + +message UserSendMsgResp { + string serverMsgID = 1; + string clientMsgID = 2; + int64 sendTime = 3; + string ex = 4; +} + +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; + uint32 seq = 14; + int64 sendTime = 15; + int64 createTime = 16; + int32 status = 17; + map options = 18; + OfflinePushInfo offlinePushInfo = 19; + repeated string atUserIDList = 20; + bytes msgDataList = 21; + string attachedInfo = 22; + string ex = 23; + + bool isReact = 40; + bool isExternalExtensions = 41; + int64 msgFirstModifyTime = 42; + +} +message OfflinePushInfo{ + string title = 1; + string desc = 2; + string ex = 3; + string iOSPushSound = 4; + bool iOSBadgeCount = 5; +} + + + + + + + + + +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; +} + +// 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; +} + + +message OrganizationChangedTips{ + UserInfo opUser = 2; + int64 operationTime = 3; +} + + +//////////////////////friend///////////////////// +//message FriendInfo{ +// UserInfo OwnerUser = 1; +// string Remark = 2; +// uint64 CreateTime = 3; +// UserInfo FriendUser = 4; +//} + +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; +} + +//FromUserID accept or reject ToUserID +message FriendApplicationApprovedTips{ + FromToUserID fromToUserID = 1; + string handleMsg = 2; +} + +//FromUserID accept or reject ToUserID +message FriendApplicationRejectedTips{ + FromToUserID fromToUserID = 1; + 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; +} + + + +message BlackAddedTips{ + FromToUserID fromToUserID = 1; +} + +message BlackDeletedTips{ + FromToUserID fromToUserID = 1; +} + +message FriendInfoChangedTips{ + FromToUserID fromToUserID = 1; +} +//////////////////////user///////////////////// +message UserInfoUpdatedTips{ + string userID = 1; +} + +//////////////////////conversation///////////////////// +message ConversationUpdateTips{ + string UserID = 1; + repeated string conversationIDList = 2; + int64 updateUnreadCountTime = 3; + + +} + +message ConversationSetPrivateTips{ + string recvID = 1; + string sendID = 2; + bool isPrivate = 3; +} + +////////////////////message/////////////////////// +message DeleteMessageTips{ + string opUserID = 1; + string userID = 2; + repeated uint32 seqList = 3; +} +///cms +message RequestPagination { + int32 pageNumber = 1; + int32 showNumber = 2; +} + +message ResponsePagination { + int32 CurrentPage = 5; + int32 ShowNumber = 6; +} + + +///////////////////signal////////////// +message SignalReq { + oneof payload { + SignalInviteReq invite = 1; + SignalInviteInGroupReq inviteInGroup = 2; + SignalCancelReq cancel = 3; + SignalAcceptReq accept = 4; + SignalHungUpReq hungUp = 5; + SignalRejectReq reject = 6; + SignalGetRoomByGroupIDReq getRoomByGroupID = 7; + + SignalOnRoomParticipantConnectedReq onRoomParticipantConnectedReq = 8; + SignalOnRoomParticipantDisconnectedReq onRoomParticipantDisconnectedReq = 9; + SignalGetTokenByRoomIDReq getTokenByRoomID = 10; + } +} + +message SignalResp { + oneof payload { + SignalInviteReply invite = 1; + SignalInviteInGroupReply inviteInGroup = 2; + SignalCancelReply cancel = 3; + SignalAcceptReply accept = 4; + SignalHungUpReply hungUp = 5; + SignalRejectReply reject = 6; + SignalGetRoomByGroupIDReply getRoomByGroupID = 7; + SignalGetTokenByRoomIDReply getTokenByRoomID = 8; + } +} + + +message InvitationInfo { + string inviterUserID = 1; + repeated string inviteeUserIDList = 2; + string customData = 3; + string groupID = 4; + string roomID = 5; + int32 timeout = 6; + string mediaType = 7; + int32 platformID = 8; + int32 sessionType = 9; + int32 initiateTime = 10; + repeated string busyLineUserIDList = 11; +} + +message ParticipantMetaData{ + GroupInfo groupInfo = 1; + GroupMemberFullInfo groupMemberInfo = 2; + PublicUserInfo userInfo = 3; +} + +message SignalInviteReq { + string opUserID = 1; + InvitationInfo invitation = 2; + OfflinePushInfo offlinePushInfo = 3; + ParticipantMetaData participant = 4; + +} + +message SignalInviteReply { + string token = 1; + string roomID = 2; + string liveURL = 3; + repeated string busyLineUserIDList = 4; +} + +message SignalInviteInGroupReq { + string opUserID = 1; + InvitationInfo invitation = 2; + OfflinePushInfo offlinePushInfo = 3; + ParticipantMetaData participant = 4; +} + +message SignalInviteInGroupReply { + string token = 1; + string roomID = 2; + string liveURL = 3; + repeated string busyLineUserIDList = 4; +} + +message SignalCancelReq { + string opUserID = 1; + InvitationInfo invitation = 2; + OfflinePushInfo offlinePushInfo = 3; + ParticipantMetaData participant = 4; +} + +message SignalCancelReply { + +} + +message SignalAcceptReq { + string opUserID = 1; + InvitationInfo invitation = 2; + OfflinePushInfo offlinePushInfo = 3; + ParticipantMetaData participant = 4; + int32 opUserPlatformID = 5; +} + +message SignalAcceptReply { + string token = 1; + string roomID = 2; + string liveURL = 3; +} + +message SignalHungUpReq { + string opUserID = 1; + InvitationInfo invitation = 2; + OfflinePushInfo offlinePushInfo = 3; +} + +message SignalHungUpReply { + +} + + +message SignalRejectReq { + string opUserID = 1; + InvitationInfo invitation = 2; + OfflinePushInfo offlinePushInfo = 3; + ParticipantMetaData participant = 4; + int32 opUserPlatformID = 5; +} + +message SignalRejectReply { + +} + +message SignalGetRoomByGroupIDReq { + string opUserID = 1; + string groupID = 2; + ParticipantMetaData participant = 3; +} + +message SignalGetRoomByGroupIDReply { + InvitationInfo invitation = 1; + repeated ParticipantMetaData participant = 2; + string roomID = 3; +} + +message SignalOnRoomParticipantConnectedReq { + InvitationInfo invitation = 1; + repeated ParticipantMetaData participant = 2; + string groupID = 3; +} + +message SignalOnRoomParticipantDisconnectedReq { + InvitationInfo invitation = 1; + repeated ParticipantMetaData participant = 2; + string groupID = 3; +} + +message SignalGetTokenByRoomIDReq { + string roomID = 1; + string opUserID = 2; + ParticipantMetaData participant = 3; + string operationID = 4; +} + +message SignalGetTokenByRoomIDReply { + string token = 1; + string liveURL = 2; +} + + +message DelMsgListReq{ + string opUserID = 1; + string userID = 2; + repeated uint32 seqList = 3; + string operationID = 4; +} + +message DelMsgListResp{ + int32 errCode = 1; + string errMsg = 2; +} + +message SetAppBackgroundStatusReq { + string userID = 1; + bool isBackground = 2; +} + +message SetAppBackgroundStatusResp { + int32 errCode = 1; + string errMsg = 2; +} + +message ExtendMsgSet { + string sourceID = 1; + int32 sessionType = 2; + map extendMsgs = 3; + int64 MaxMsgUpdateTime = 4; + int32 extendMsgNum = 5; + int64 createTime = 6; +} + +message ExtendMsg { + map reactionExtensionList = 1; + string clientMsgID = 2; + int64 msgFirstModifyTime = 3; + string attachedInfo = 4; + string ex = 5; +} + +message KeyValue { + string typeKey = 1; + string value = 2; + int64 latestUpdateTime = 3; +} + + + diff --git a/tools/data-conversion/utils/find_insert.go b/tools/data-conversion/utils/find_insert.go new file mode 100644 index 000000000..4789cd554 --- /dev/null +++ b/tools/data-conversion/utils/find_insert.go @@ -0,0 +1,105 @@ +package utils + +import ( + "fmt" + "log" + "sync" + "sync/atomic" + + "gorm.io/gorm" + "gorm.io/gorm/schema" +) + +func FindAndInsert[V2 any, V3 schema.Tabler](v2db *gorm.DB, v3db *gorm.DB, fn func(V2) (V3, bool)) (string, error) { + const batchSize = 100 + var t V3 + name := t.TableName() + if err := v3db.AutoMigrate(&t); err != nil { + return name, fmt.Errorf("auto migrate v3 %s failed %w", name, err) + } + for i := 0; ; i++ { + var v2s []V2 + if err := v2db.Offset(i * batchSize).Limit(batchSize).Find(&v2s).Error; err != nil { + return name, fmt.Errorf("find v2 %s failed %w", name, err) + } + if len(v2s) == 0 { + return name, nil + } + v3s := make([]V3, 0, len(v2s)) + for _, v := range v2s { + res, ok := fn(v) + if ok { + v3s = append(v3s, res) + } + } + if len(v3s) == 0 { + continue + } + if err := v3db.Create(&v3s).Error; err != nil { + return name, fmt.Errorf("insert v3 %s failed %w", name, err) + } + } +} + +type TakeList []Task + +func (l *TakeList) Append(fn ...Task) { + *l = append(*l, fn...) +} + +type Task func() (string, error) + +func RunTask(concurrency int, tasks TakeList) []string { + if len(tasks) == 0 { + return []string{} + } + if concurrency < 1 { + concurrency = 1 + } + if concurrency > len(tasks) { + concurrency = len(tasks) + } + + taskCh := make(chan func() (string, error), 4) + go func() { + defer close(taskCh) + for i := range tasks { + taskCh <- tasks[i] + } + }() + + var lock sync.Mutex + var failedTables []string + + var wg sync.WaitGroup + wg.Add(concurrency) + var count int64 + + for i := 0; i < concurrency; i++ { + go func() { + defer wg.Done() + for task := range taskCh { + name, err := task() + index := atomic.AddInt64(&count, 1) + if err == nil { + log.Printf("[%d/%d] %s success\n", index, len(tasks), name) + } else { + lock.Lock() + failedTables = append(failedTables, name) + lock.Unlock() + log.Printf("[%d/%d] %s failed %s\n", index, len(tasks), name, err) + return + } + } + }() + } + + wg.Wait() + if len(failedTables) == 0 { + log.Println("all tables success") + } else { + log.Printf("failed tables %d: %+v\n", len(failedTables), failedTables) + } + + return failedTables +} diff --git a/tools/data-conversion/utils/time.go b/tools/data-conversion/utils/time.go new file mode 100644 index 000000000..e2dac4bb8 --- /dev/null +++ b/tools/data-conversion/utils/time.go @@ -0,0 +1,14 @@ +package utils + +import "time" + +func InitTime(ts ...*time.Time) { + for i := range ts { + if ts[i] == nil { + continue + } + if ts[i].IsZero() || ts[i].UnixMicro() < 0 { + *ts[i] = time.UnixMicro(0) + } + } +} diff --git a/tools/imctl/.gitignore b/tools/imctl/.gitignore new file mode 100644 index 000000000..a2e773394 --- /dev/null +++ b/tools/imctl/.gitignore @@ -0,0 +1,64 @@ +# Copyright © 2023 OpenIMSDK. +# +# 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. + +# ============================================================================== +# For the entire design of.gitignore, ignore git commits and ignore files +#=============================================================================== +# + +### OpenIM developer supplement ### +logs +.devcontainer +components +out-test +Dockerfile.cross + +### Makefile ### +tmp/ +bin/ +output/ +_output/ + +### OpenIM Config ### +config/config.yaml +./config/config.yaml +.env +./.env + +### OpenIM deploy ### +deploy/openim_demo +deploy/openim-api +deploy/openim-rpc-msg_gateway +deploy/openim-msgtransfer +deploy/openim-push +deploy/openim_timer_task +deploy/openim-rpc-user +deploy/openim-rpc-friend +deploy/openim-rpc-group +deploy/openim-rpc-msg +deploy/openim-rpc-auth +deploy/Open-IM-SDK-Core + +# files used by the developer +.idea.md +.todo.md +.note.md + +# ============================================================================== +# Created by https://www.toptal.com/developers/gitignore/api/go,git,vim,tags,test,emacs,backup,jetbrains +# Edit at https://www.toptal.com/developers/gitignore?templates=go,git,vim,tags,test,emacs,backup,jetbrains + +cmd/ +internal/ +pkg/ diff --git a/tools/imctl/cmd/genman/README.md b/tools/imctl/cmd/genman/README.md deleted file mode 100644 index 7b46cbefb..000000000 --- a/tools/imctl/cmd/genman/README.md +++ /dev/null @@ -1,49 +0,0 @@ -# OpenIM `man` Module README - -Welcome to the `man` module of OpenIM, the comprehensive guide for using OpenIM's range of powerful commands. Here, you'll find in-depth details for each command, its options, and examples to help you harness the full power of the OpenIM suite. - -## Overview - -OpenIM is a robust instant messaging solution. To ensure users can effectively harness its capabilities, OpenIM provides a suite of commands that serve different functionalities, from the API level to RPC calls and utilities. - -The `man` module ensures that users, both new and experienced, have a reliable source of information and documentation to use these commands effectively. - -## Available Commands - -The OpenIM commands are divided into core services and tools. Below is a brief overview of each: - -### Core Services - -- **openim-api**: Interface to the main functionalities of OpenIM. -- **openim-cmdutils**: Utilities for executing common tasks. -- **openim-crontask**: Schedule and manage routine tasks within OpenIM. -- **openim-msggateway**: Gateway for managing messages within the OpenIM system. -- **openim-msgtransfer**: Handle message transfers across different parts of OpenIM. -- **openim-push**: Service for pushing notifications and updates. -- **openim-rpc-auth**: RPC interface for authentication tasks. -- **openim-rpc-conversation**: RPC service for handling conversations. -- **openim-rpc-friend**: Manage friend lists and related functionalities through RPC. -- **openim-rpc-group**: Group management via RPC. -- **openim-rpc-msg**: Message handling at the RPC level. -- **openim-rpc-third**: Third-party integrations and related tasks through RPC. -- **openim-rpc-user**: User management and tasks via RPC. - -### Tools - -- **changelog**: Track and manage changes in OpenIM. -- **component**: Utilities related to different components within OpenIM. -- **infra**: Infrastructure and backend management tools. -- **ncpu**: Monitor and manage CPU usage and related tasks. -- **yamlfmt**: A tool for formatting and linting YAML files within the OpenIM configuration. - -## How to Use - -To view the manual page for any of the OpenIM commands, use the `man` command followed by the command name. For example: - -``` -man openim-api -``` - -## Contributions - -We welcome contributions to enhance the `man` pages. If you discover inconsistencies, errors, or areas where further details are required, feel free to raise an issue or submit a pull request. \ No newline at end of file diff --git a/tools/imctl/cmd/genman/genman.go b/tools/imctl/cmd/genman/genman.go deleted file mode 100644 index 1de5c68cd..000000000 --- a/tools/imctl/cmd/genman/genman.go +++ /dev/null @@ -1,62 +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 main - -import ( - "fmt" - "os" - - "k8s.io/kubernetes/cmd/genutils" -) - -func main() { - // TODO use os.Args instead of "flags" because "flags" will mess up the man pages! - path := "docs/man/man1" - module := "" - if len(os.Args) == 3 { - path = os.Args[1] - module = os.Args[2] - } else { - fmt.Fprintf(os.Stderr, "usage: %s [output directory] [module] \n", os.Args[0]) - os.Exit(1) - } - - outDir, err := genutils.OutDir(path) - if err != nil { - fmt.Fprintf(os.Stderr, "failed to get output directory: %v\n", err) - os.Exit(1) - } - - // Set environment variables used by command so the output is consistent, - // regardless of where we run. - os.Setenv("HOME", "/home/username") - - // 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 - switch module { - case "openim-api": - } -} diff --git a/tools/imctl/cmd/genopenimdocs/config_flags.go b/tools/imctl/cmd/genopenimdocs/config_flags.go deleted file mode 100644 index efd5297b8..000000000 --- a/tools/imctl/cmd/genopenimdocs/config_flags.go +++ /dev/null @@ -1,243 +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 genericclioptions - -import ( - "flag" - "fmt" - "sync" - "time" - - "github.com/AlekSi/pointer" - "github.com/marmotedu/marmotedu-sdk-go/rest" - "github.com/marmotedu/marmotedu-sdk-go/tools/clientcmd" - "github.com/spf13/pflag" - "github.com/spf13/viper" -) - -// Defines flag for imctl. -const ( - FlagIMConfig = "imconfig" - FlagBearerToken = "user.token" - FlagUsername = "user.username" - FlagPassword = "user.password" - FlagSecretID = "user.secret-id" - FlagSecretKey = "user.secret-key" - FlagCertFile = "user.client-certificate" - FlagKeyFile = "user.client-key" - FlagTLSServerName = "server.tls-server-name" - FlagInsecure = "server.insecure-skip-tls-verify" - FlagCAFile = "server.certificate-authority" - FlagAPIServer = "server.address" - FlagTimeout = "server.timeout" - FlagMaxRetries = "server.max-retries" - FlagRetryInterval = "server.retry-interval" -) - -// RESTClientGetter is an interface that the ConfigFlags describe to provide an easier way to mock for commands -// and eliminate the direct coupling to a struct type. Users may wish to duplicate this type in their own packages -// as per the golang type overlapping. -type RESTClientGetter interface { - // ToRESTConfig returns restconfig - ToRESTConfig() (*rest.Config, error) - // ToRawIMConfigLoader return imconfig loader as-is - ToRawIMConfigLoader() clientcmd.ClientConfig -} - -var _ RESTClientGetter = &ConfigFlags{} - -// ConfigFlags composes the set of values necessary -// for obtaining a REST client config. -type ConfigFlags struct { - IMConfig *string - - BearerToken *string - Username *string - Password *string - SecretID *string - SecretKey *string - - Insecure *bool - TLSServerName *string - CertFile *string - KeyFile *string - CAFile *string - - APIServer *string - Timeout *time.Duration - MaxRetries *int - RetryInterval *time.Duration - - clientConfig clientcmd.ClientConfig - lock sync.Mutex - // If set to true, will use persistent client config and - // propagate the config to the places that need it, rather than - // loading the config multiple times - usePersistentConfig bool -} - -// ToRESTConfig implements RESTClientGetter. -// Returns a REST client configuration based on a provided path -// to a .imconfig file, loading rules, and config flag overrides. -// Expects the AddFlags method to have been called. -func (f *ConfigFlags) ToRESTConfig() (*rest.Config, error) { - return f.ToRawIMConfigLoader().ClientConfig() -} - -// ToRawIMConfigLoader binds config flag values to config overrides -// Returns an interactive clientConfig if the password flag is enabled, -// or a non-interactive clientConfig otherwise. -func (f *ConfigFlags) ToRawIMConfigLoader() clientcmd.ClientConfig { - if f.usePersistentConfig { - return f.toRawIMPersistentConfigLoader() - } - - return f.toRawIMConfigLoader() -} - -func (f *ConfigFlags) toRawIMConfigLoader() clientcmd.ClientConfig { - config := clientcmd.NewConfig() - if err := viper.Unmarshal(&config); err != nil { - panic(err) - } - - return clientcmd.NewClientConfigFromConfig(config) -} - -// toRawIMPersistentConfigLoader binds config flag values to config overrides -// Returns a persistent clientConfig for propagation. -func (f *ConfigFlags) toRawIMPersistentConfigLoader() clientcmd.ClientConfig { - f.lock.Lock() - defer f.lock.Unlock() - - if f.clientConfig == nil { - f.clientConfig = f.toRawIMConfigLoader() - } - - return f.clientConfig -} - -// AddFlags binds client configuration flags to a given flagset. -func (f *ConfigFlags) AddFlags(flags *pflag.FlagSet) { - if f.IMConfig != nil { - flags.StringVar(f.IMConfig, FlagIMConfig, *f.IMConfig, - fmt.Sprintf("Path to the %s file to use for CLI requests", FlagIMConfig)) - } - - if f.BearerToken != nil { - flags.StringVar( - f.BearerToken, - FlagBearerToken, - *f.BearerToken, - "Bearer token for authentication to the API server", - ) - } - - if f.Username != nil { - flags.StringVar(f.Username, FlagUsername, *f.Username, "Username for basic authentication to the API server") - } - - if f.Password != nil { - flags.StringVar(f.Password, FlagPassword, *f.Password, "Password for basic authentication to the API server") - } - - if f.SecretID != nil { - flags.StringVar(f.SecretID, FlagSecretID, *f.SecretID, "SecretID for JWT authentication to the API server") - } - - if f.SecretKey != nil { - flags.StringVar(f.SecretKey, FlagSecretKey, *f.SecretKey, "SecretKey for jwt authentication to the API server") - } - - if f.CertFile != nil { - flags.StringVar(f.CertFile, FlagCertFile, *f.CertFile, "Path to a client certificate file for TLS") - } - if f.KeyFile != nil { - flags.StringVar(f.KeyFile, FlagKeyFile, *f.KeyFile, "Path to a client key file for TLS") - } - if f.TLSServerName != nil { - flags.StringVar(f.TLSServerName, FlagTLSServerName, *f.TLSServerName, ""+ - "Server name to use for server certificate validation. If it is not provided, the hostname used to contact the server is used") - } - if f.Insecure != nil { - flags.BoolVar(f.Insecure, FlagInsecure, *f.Insecure, ""+ - "If true, the server's certificate will not be checked for validity. This will make your HTTPS connections insecure") - } - if f.CAFile != nil { - flags.StringVar(f.CAFile, FlagCAFile, *f.CAFile, "Path to a cert file for the certificate authority") - } - - if f.APIServer != nil { - flags.StringVarP(f.APIServer, FlagAPIServer, "s", *f.APIServer, "The address and port of the IM API server") - } - - if f.Timeout != nil { - flags.DurationVar( - f.Timeout, - FlagTimeout, - *f.Timeout, - "The length of time to wait before giving up on a single server request. Non-zero values should contain a corresponding time unit (e.g. 1s, 2m, 3h). A value of zero means don't timeout requests.", - ) - } - - if f.MaxRetries != nil { - flag.IntVar(f.MaxRetries, FlagMaxRetries, *f.MaxRetries, "Maximum number of retries.") - } - - if f.RetryInterval != nil { - flags.DurationVar( - f.RetryInterval, - FlagRetryInterval, - *f.RetryInterval, - "The interval time between each attempt.", - ) - } -} - -// WithDeprecatedPasswordFlag enables the username and password config flags. -func (f *ConfigFlags) WithDeprecatedPasswordFlag() *ConfigFlags { - f.Username = pointer.ToString("") - f.Password = pointer.ToString("") - - return f -} - -// WithDeprecatedSecretFlag enables the secretID and secretKey config flags. -func (f *ConfigFlags) WithDeprecatedSecretFlag() *ConfigFlags { - f.SecretID = pointer.ToString("") - f.SecretKey = pointer.ToString("") - - return f -} - -// NewConfigFlags returns ConfigFlags with default values set. -func NewConfigFlags(usePersistentConfig bool) *ConfigFlags { - return &ConfigFlags{ - IMConfig: pointer.ToString(""), - - BearerToken: pointer.ToString(""), - Insecure: pointer.ToBool(false), - TLSServerName: pointer.ToString(""), - CertFile: pointer.ToString(""), - KeyFile: pointer.ToString(""), - CAFile: pointer.ToString(""), - - APIServer: pointer.ToString(""), - Timeout: pointer.ToDuration(30 * time.Second), - MaxRetries: pointer.ToInt(0), - RetryInterval: pointer.ToDuration(1 * time.Second), - usePersistentConfig: usePersistentConfig, - } -} diff --git a/tools/imctl/internal/imctl/cmd/cmd.go b/tools/imctl/internal/imctl/cmd/cmd.go deleted file mode 100644 index ced641fd6..000000000 --- a/tools/imctl/internal/imctl/cmd/cmd.go +++ /dev/null @@ -1,146 +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 cmd - -import ( - "flag" - "io" - "os" - - cliflag "github.com/openimsdk/component-base/pkg/cli/flag" - "github.com/spf13/cobra" - "github.com/spf13/viper" - - "github.com/openimsdk/open-im-server/tools/imctl/pkg/cli/genericclioptions" - - cmdutil "github.com/openimsdk/open-im-server/tools/imctl/inernal/iamctl/cmd/util" - "github.com/openimsdk/open-im-server/tools/imctl/internal/imctl/cmd/color" - "github.com/openimsdk/open-im-server/tools/imctl/internal/imctl/cmd/completion" - "github.com/openimsdk/open-im-server/tools/imctl/internal/imctl/cmd/info" - "github.com/openimsdk/open-im-server/tools/imctl/internal/imctl/cmd/jwt" - "github.com/openimsdk/open-im-server/tools/imctl/internal/imctl/cmd/new" - "github.com/openimsdk/open-im-server/tools/imctl/internal/imctl/cmd/options" - "github.com/openimsdk/open-im-server/tools/imctl/internal/imctl/cmd/policy" - "github.com/openimsdk/open-im-server/tools/imctl/internal/imctl/cmd/secret" - "github.com/openimsdk/open-im-server/tools/imctl/internal/imctl/cmd/set" - "github.com/openimsdk/open-im-server/tools/imctl/internal/imctl/cmd/user" - "github.com/openimsdk/open-im-server/tools/imctl/internal/imctl/cmd/validate" - "github.com/openimsdk/open-im-server/tools/imctl/internal/imctl/cmd/version" - "github.com/openimsdk/open-im-server/tools/imctl/internal/imctl/util/templates" - genericapiserver "github.com/openimsdk/open-im-server/tools/imctl/internal/pkg/server" - "github.com/openimsdk/open-im-server/tools/imctl/pkg/cli/genericclioptions" -) - -// NewDefaultIAMCtlCommand creates the `imctl` command with default arguments. -func NewDefaultIMCtlCommand() *cobra.Command { - return NewIMCtlCommand(os.Stdin, os.Stdout, os.Stderr) -} - -// NewIAMCtlCommand returns new initialized instance of 'imctl' root command. -func NewIMCtlCommand(in io.Reader, out, err io.Writer) *cobra.Command { - // Parent command to which all subcommands are added. - cmds := &cobra.Command{ - Use: "imctl", - Short: "imctl controls the IM platform", - Long: templates.LongDesc(` - imctl controls the IM platform, is the client side tool for IM platform. - - Find more information at: - // TODO: add link to docs, from auto scripts and gendocs - https://github.com/openimsdk/open-im-server/tree/main/docs`), - Run: runHelp, - // Hook before and after Run initialize and write profiles to disk, - // respectively. - PersistentPreRunE: func(*cobra.Command, []string) error { - return initProfiling() - }, - PersistentPostRunE: func(*cobra.Command, []string) error { - return flushProfiling() - }, - } - - flags := cmds.PersistentFlags() - flags.SetNormalizeFunc(cliflag.WarnWordSepNormalizeFunc) // Warn for "_" flags - - // Normalize all flags that are coming from other packages or pre-configurations - // a.k.a. change all "_" to "-". e.g. glog package - flags.SetNormalizeFunc(cliflag.WordSepNormalizeFunc) - - addProfilingFlags(flags) - - iamConfigFlags := genericclioptions.NewConfigFlags(true).WithDeprecatedPasswordFlag().WithDeprecatedSecretFlag() - iamConfigFlags.AddFlags(flags) - matchVersionIAMConfigFlags := cmdutil.NewMatchVersionFlags(iamConfigFlags) - matchVersionIAMConfigFlags.AddFlags(cmds.PersistentFlags()) - - _ = viper.BindPFlags(cmds.PersistentFlags()) - cobra.OnInitialize(func() { - genericapiserver.LoadConfig(viper.GetString(genericclioptions.FlagIAMConfig), "iamctl") - }) - cmds.PersistentFlags().AddGoFlagSet(flag.CommandLine) - - f := cmdutil.NewFactory(matchVersionIAMConfigFlags) - - // From this point and forward we get warnings on flags that contain "_" separators - cmds.SetGlobalNormalizationFunc(cliflag.WarnWordSepNormalizeFunc) - - ioStreams := genericclioptions.IOStreams{In: in, Out: out, ErrOut: err} - - groups := templates.CommandGroups{ - { - Message: "Basic Commands:", - Commands: []*cobra.Command{ - info.NewCmdInfo(f, ioStreams), - color.NewCmdColor(f, ioStreams), - new.NewCmdNew(f, ioStreams), - jwt.NewCmdJWT(f, ioStreams), - }, - }, - { - Message: "Identity and Access Management Commands:", - Commands: []*cobra.Command{ - user.NewCmdUser(f, ioStreams), - secret.NewCmdSecret(f, ioStreams), - policy.NewCmdPolicy(f, ioStreams), - }, - }, - { - Message: "Troubleshooting and Debugging Commands:", - Commands: []*cobra.Command{ - validate.NewCmdValidate(f, ioStreams), - }, - }, - { - Message: "Settings Commands:", - Commands: []*cobra.Command{ - set.NewCmdSet(f, ioStreams), - completion.NewCmdCompletion(ioStreams.Out, ""), - }, - }, - } - groups.Add(cmds) - - filters := []string{"options"} - templates.ActsAsRootCommand(cmds, filters, groups...) - - cmds.AddCommand(version.NewCmdVersion(f, ioStreams)) - cmds.AddCommand(options.NewCmdOptions(ioStreams.Out)) - - return cmds -} - -func runHelp(cmd *cobra.Command, args []string) { - _ = cmd.Help() -} diff --git a/tools/imctl/internal/imctl/cmd/color/color.go b/tools/imctl/internal/imctl/cmd/color/color.go deleted file mode 100644 index 551ec379c..000000000 --- a/tools/imctl/internal/imctl/cmd/color/color.go +++ /dev/null @@ -1,352 +0,0 @@ -// Copyright © 2023 OpenIM. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Package color print colors supported by the current terminal. -package color - -import ( - "fmt" - "strings" - - "github.com/fatih/color" - "github.com/olekukonko/tablewriter" - "github.com/openim-sigs/component-base/util/stringutil" - "github.com/spf13/cobra" - - cmdutil "github.com/openimsdk/open-im-server/tools/imctl/internal/imctl/cmd/util" - "github.com/openimsdk/open-im-server/tools/imctl/pkg/cli/genericclioptions" - "github.com/openimsdk/open-im-server/tools/imctl/pkg/util/templates" -) - -// ColorOptions is an options struct to support color subcommands. -type ColorOptions struct { - Type []string - Example bool - - genericclioptions.IOStreams -} - -var ( - colorLong = templates.LongDesc(`Print the colors supported by the current terminal. - -Color lets you use colorized outputs in terms of ANSI Escape Codes in Go (Golang). -It has support for Windows too! The API can be used in several ways, pick one that suits you. - -Find more information at: - https://github.com/fatih/color`) - - colorExample = templates.Examples(` - # Print supported foreground and background colors - imctl color - - # Print supported colors by type - imctl color -t fg-hi - - # Print all supported colors - imctl color -t all`) - - availableTypes = []string{"fg", "fg-hi", "bg", "bg-hi", "base", "all"} - - colorCodeExample = templates.Examples(` -### 1. Standard colors - -// Print with default helper functions -color.Cyan("Prints text in cyan.") - -// A newline will be appended automatically -color.Blue("Prints %s in blue.", "text") - -// These are using the default foreground colors -color.Red("We have red") -color.Magenta("And many others ..") - -### 2. Mix and reuse colors - -// Create a new color object -c := color.New(color.FgCyan).Add(color.Underline) -c.Println("Prints cyan text with an underline.") - -// Or just add them to New() -d := color.New(color.FgCyan, color.Bold) -d.Printf("This prints bold cyan %s\n", "too!.") - -// Mix up foreground and background colors, create new mixes! -red := color.New(color.FgRed) - -boldRed := red.Add(color.Bold) -boldRed.Println("This will print text in bold red.") - -whiteBackground := red.Add(color.BgWhite) -whiteBackground.Println("Red text with white background.") - -### 3. Use your own output (io.Writer) - -// Use your own io.Writer output -color.New(color.FgBlue).Fprintln(myWriter, "blue color!") - -blue := color.New(color.FgBlue) -blue.Fprint(writer, "This will print text in blue.") - -### 4. Custom print functions (PrintFunc) - -// Create a custom print function for convenience -red := color.New(color.FgRed).PrintfFunc() -red("Warning") -red("Error: %s", err) - -// Mix up multiple attributes -notice := color.New(color.Bold, color.FgGreen).PrintlnFunc() -notice("Don't forget this...") - -### 5. Custom fprint functions (FprintFunc) - -blue := color.New(FgBlue).FprintfFunc() -blue(myWriter, "important notice: %s", stars) - -// Mix up with multiple attributes -success := color.New(color.Bold, color.FgGreen).FprintlnFunc() -success(myWriter, "Don't forget this...") - -### 6. Insert into noncolor strings (SprintFunc) - -// Create SprintXxx functions to mix strings with other non-colorized strings: -yellow := color.New(color.FgYellow).SprintFunc() -red := color.New(color.FgRed).SprintFunc() -fmt.Printf("This is a %s and this is %s.\n", yellow("warning"), red("error")) - -info := color.New(color.FgWhite, color.BgGreen).SprintFunc() -fmt.Printf("This %s rocks!\n", info("package")) - -// Use helper functions -fmt.Println("This", color.RedString("warning"), "should be not neglected.") -fmt.Printf("%v %v\n", color.GreenString("Info:"), "an important message.") - -// Windows supported too! Just don't forget to change the output to color.Output -fmt.Fprintf(color.Output, "Windows support: %s", color.GreenString("PASS")) - -### 7. Plug into existing code - -// Use handy standard colors -color.Set(color.FgYellow) - -fmt.Println("Existing text will now be in yellow") -fmt.Printf("This one %s\n", "too") - -color.Unset() // Don't forget to unset - -// You can mix up parameters -color.Set(color.FgMagenta, color.Bold) -defer color.Unset() // Use it in your function - -fmt.Println("All text will now be bold magenta.") - -### 8. Disable/Enable color - -There might be a case where you want to explicitly disable/enable color output. the -go-isatty package will automatically disable color output for non-tty output streams -(for example if the output were piped directly to less) - -Color has support to disable/enable colors both globally and for single color -definitions. For example suppose you have a CLI app and a --no-color bool flag. You -can easily disable the color output with: - - -var flagNoColor = flag.Bool("no-color", false, "Disable color output") - -if *flagNoColor { - color.NoColor = true // disables colorized output -} - -It also has support for single color definitions (local). You can -disable/enable color output on the fly: - -c := color.New(color.FgCyan) -c.Println("Prints cyan text") - -c.DisableColor() -c.Println("This is printed without any color") - -c.EnableColor() -c.Println("This prints again cyan...")`) -) - -// NewColorOptions returns an initialized ColorOptions instance. -func NewColorOptions(ioStreams genericclioptions.IOStreams) *ColorOptions { - return &ColorOptions{ - Type: []string{}, - Example: false, - IOStreams: ioStreams, - } -} - -// NewCmdColor returns new initialized instance of color sub command. -func NewCmdColor(f cmdutil.Factory, ioStreams genericclioptions.IOStreams) *cobra.Command { - o := NewColorOptions(ioStreams) - - cmd := &cobra.Command{ - Use: "color", - DisableFlagsInUseLine: true, - Aliases: []string{}, - Short: "Print colors supported by the current terminal", - TraverseChildren: true, - Long: colorLong, - Example: colorExample, - // NoArgs, ArbitraryArgs, OnlyValidArgs, MinimumArgs, MaximumArgs, ExactArgs, ExactArgs - ValidArgs: []string{}, - Run: func(cmd *cobra.Command, args []string) { - cmdutil.CheckErr(o.Complete(f, cmd, args)) - cmdutil.CheckErr(o.Validate(cmd, args)) - cmdutil.CheckErr(o.Run(args)) - }, - SuggestFor: []string{}, - } - - cmd.Flags().StringSliceVarP(&o.Type, "type", "t", o.Type, - fmt.Sprintf("Specify the color type, available types: `%s`.", strings.Join(availableTypes, ","))) - cmd.Flags().BoolVar(&o.Example, "example", o.Example, "Print code to show how to use color package.") - - return cmd -} - -// Complete completes all the required options. -func (o *ColorOptions) Complete(f cmdutil.Factory, cmd *cobra.Command, args []string) error { - if len(o.Type) == 0 { - o.Type = []string{"fg", "bg"} - - return nil - } - - if stringutil.StringIn("all", o.Type) { - o.Type = []string{"fg", "fg-hi", "bg", "bg-hi", "base"} - } - - return nil -} - -// Validate makes sure there is no discrepency in command options. -func (o *ColorOptions) Validate(cmd *cobra.Command, args []string) error { - for _, t := range o.Type { - if !stringutil.StringIn(t, availableTypes) { - return cmdutil.UsageErrorf(cmd, "--type must be in: %s", strings.Join(availableTypes, ",")) - } - } - - return nil -} - -// Run executes a color subcommand using the specified options. -func (o *ColorOptions) Run(args []string) error { - if o.Example { - fmt.Fprint(o.Out, colorCodeExample+"\n") - - return nil - } - - var data [][]string - - // print table to stdout - table := tablewriter.NewWriter(o.Out) - - // set table attributes - table.SetAutoMergeCells(true) - table.SetRowLine(false) - table.SetBorder(false) - table.SetAutoWrapText(false) - table.SetAutoFormatHeaders(true) - table.SetHeaderAlignment(tablewriter.ALIGN_CENTER) - table.SetAlignment(tablewriter.ALIGN_LEFT) - table.SetHeader([]string{"Category", "Color Name", "Effect"}) - table.SetHeaderColor(tablewriter.Colors{tablewriter.FgGreenColor}, - tablewriter.Colors{tablewriter.FgRedColor}, - tablewriter.Colors{tablewriter.FgCyanColor}) - - for _, t := range o.Type { - switch t { - // Foreground text colors - case "fg": - fg := [][]string{ - {"fg", "black", color.BlackString("color.BlackString")}, - {"fg", "red", color.RedString("color.RedString")}, - {"fg", "green", color.GreenString("color.GreenString")}, - {"fg", "yellow", color.YellowString("color.YellowString")}, - {"fg", "blue", color.BlueString("color.BlueString")}, - {"fg", "magenta", color.MagentaString("color.MagentaString")}, - {"fg", "Cyan", color.CyanString("color.CyanString")}, - {"fg", "white", color.WhiteString("color.WhiteString")}, - } - data = append(data, fg...) - // Foreground Hi-Intensity text colors - case "fg-hi": - fg := [][]string{ - {"fg-hi", "black", color.HiBlackString("color.HiBlackString")}, - {"fg-hi", "red", color.HiRedString("color.HiRedString")}, - {"fg-hi", "green", color.HiGreenString("color.HiGreenString")}, - {"fg-hi", "yellow", color.HiYellowString("color.HiYellowString")}, - {"fg-hi", "blue", color.HiBlueString("color.HiBlueString")}, - {"fg-hi", "magenta", color.HiMagentaString("color.HiMagentaString")}, - {"fg-hi", "Cyan", color.HiCyanString("color.HiCyanString")}, - {"fg-hi", "white", color.HiWhiteString("color.HiWhiteString")}, - } - data = append(data, fg...) - - // Background text colors - case "bg": - bg := [][]string{ - {"bg", "black", color.New(color.FgWhite, color.BgBlack).SprintFunc()("color.BgBlack")}, - {"bg", "red", color.New(color.FgBlack, color.BgRed).SprintFunc()("color.BgRed")}, - {"bg", "greep", color.New(color.FgBlack, color.BgGreen).SprintFunc()("color.BgGreen")}, - {"bg", "yellow", color.New(color.FgWhite, color.BgYellow).SprintFunc()("color.BgYellow")}, - {"bg", "blue", color.New(color.FgWhite, color.BgBlue).SprintFunc()("color.BgBlue")}, - {"bg", "magenta", color.New(color.FgWhite, color.BgMagenta).SprintFunc()("color.BgMagenta")}, - {"bg", "cyan", color.New(color.FgWhite, color.BgCyan).SprintFunc()("color.BgCyan")}, - {"bg", "white", color.New(color.FgBlack, color.BgWhite).SprintFunc()("color.BgWhite")}, - } - data = append(data, bg...) - // Background Hi-Intensity text colors - case "bg-hi": - bghi := [][]string{ - {"bg-hi", "black", color.New(color.FgWhite, color.BgHiBlack).SprintFunc()("color.BgHiBlack")}, - {"bg-hi", "red", color.New(color.FgBlack, color.BgHiRed).SprintFunc()("color.BgHiRed")}, - {"bg-hi", "greep", color.New(color.FgBlack, color.BgHiGreen).SprintFunc()("color.BgHiGreen")}, - {"bg-hi", "yellow", color.New(color.FgWhite, color.BgHiYellow).SprintFunc()("color.BgHiYellow")}, - {"bg-hi", "blue", color.New(color.FgWhite, color.BgHiBlue).SprintFunc()("color.BgHiBlue")}, - {"bg-hi", "magenta", color.New(color.FgWhite, color.BgHiMagenta).SprintFunc()("color.BgHiMagenta")}, - {"bg-hi", "cyan", color.New(color.FgWhite, color.BgHiCyan).SprintFunc()("color.BgHiCyan")}, - {"bg-hi", "white", color.New(color.FgBlack, color.BgHiWhite).SprintFunc()("color.BgHiWhite")}, - } - data = append(data, bghi...) - // Base attributes - case "base": - base := [][]string{ - {"base", "black", color.New(color.FgGreen, color.Reset).SprintFunc()("color.Reset")}, - {"base", "red", color.New(color.FgGreen, color.Bold).SprintFunc()("color.Bold")}, - {"base", "greep", color.New(color.FgGreen, color.Faint).SprintFunc()("color.Faint")}, - {"base", "yellow", color.New(color.FgGreen, color.Italic).SprintFunc()("color.Italic")}, - {"base", "blue", color.New(color.FgGreen, color.Underline).SprintFunc()("color.Underline")}, - {"base", "magenta", color.New(color.FgGreen, color.BlinkSlow).SprintFunc()("color.BlinkSlow")}, - {"base", "cyan", color.New(color.FgGreen, color.BlinkRapid).SprintFunc()("color.BlinkRapid")}, - {"base", "white", color.New(color.FgGreen, color.ReverseVideo).SprintFunc()("color.ReverseVideo")}, - {"base", "white", color.New(color.FgGreen, color.Concealed).SprintFunc()("color.Concealed")}, - {"base", "white", color.New(color.FgGreen, color.CrossedOut).SprintFunc()("color.CrossedOut")}, - } - data = append(data, base...) - default: - } - } - - table.AppendBulk(data) - table.Render() - - return nil -} diff --git a/tools/imctl/internal/imctl/cmd/completion/completion.go b/tools/imctl/internal/imctl/cmd/completion/completion.go deleted file mode 100644 index 6242dbd45..000000000 --- a/tools/imctl/internal/imctl/cmd/completion/completion.go +++ /dev/null @@ -1,283 +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 completion output shell completion code for the specified shell (bash or zsh). -package completion - -import ( - "bytes" - "io" - - "github.com/spf13/cobra" - - cmdutil "github.com/openimsdk/open-im-server/tools/imctl/internal/imctl/cmd/util" - "github.com/openimsdk/open-im-server/tools/imctl/pkg/util/templates" -) - -const defaultBoilerPlate = ` -# 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. -` - -var ( - completionLong = templates.LongDesc(` - Output shell completion code for the specified shell (bash or zsh). - The shell code must be evaluated to provide interactive - completion of imctl commands. This can be done by sourcing it from - the .bash_profile. - - Detailed instructions on how to do this are available here: - http://github.com/marmotedu/iam/docs/installation/imctl.md#enabling-shell-autocompletion - - Note for zsh users: [1] zsh completions are only supported in versions of zsh >= 5.2`) - - completionExample = templates.Examples(` - # Installing bash completion on macOS using homebrew - ## If running Bash 3.2 included with macOS - brew install bash-completion - ## or, if running Bash 4.1+ - brew install bash-completion@2 - ## If imctl is installed via homebrew, this should start working immediately. - ## If you've installed via other means, you may need add the completion to your completion directory - imctl completion bash > $(brew --prefix)/etc/bash_completion.d/imctl - - - # Installing bash completion on Linux - ## If bash-completion is not installed on Linux, please install the 'bash-completion' package - ## via your distribution's package manager. - ## Load the imctl completion code for bash into the current shell - source <(imctl completion bash) - ## Write bash completion code to a file and source if from .bash_profile - imctl completion bash > ~/.iam/completion.bash.inc - printf " - # IAM shell completion - source '$HOME/.iam/completion.bash.inc' - " >> $HOME/.bash_profile - source $HOME/.bash_profile - - # Load the imctl completion code for zsh[1] into the current shell - source <(imctl completion zsh) - # Set the imctl completion code for zsh[1] to autoload on startup - imctl completion zsh > "${fpath[1]}/_imctl"`) -) - -var completionShells = map[string]func(out io.Writer, boilerPlate string, cmd *cobra.Command) error{ - "bash": runCompletionBash, - "zsh": runCompletionZsh, -} - -// NewCmdCompletion creates the `completion` command. -func NewCmdCompletion(out io.Writer, boilerPlate string) *cobra.Command { - shells := []string{} - for s := range completionShells { - shells = append(shells, s) - } - - cmd := &cobra.Command{ - Use: "completion SHELL", - DisableFlagsInUseLine: true, - Short: "Output shell completion code for the specified shell (bash or zsh)", - Long: completionLong, - Example: completionExample, - Run: func(cmd *cobra.Command, args []string) { - err := RunCompletion(out, boilerPlate, cmd, args) - cmdutil.CheckErr(err) - }, - ValidArgs: shells, - } - - return cmd -} - -// RunCompletion checks given arguments and executes command. -func RunCompletion(out io.Writer, boilerPlate string, cmd *cobra.Command, args []string) error { - if len(args) == 0 { - return cmdutil.UsageErrorf(cmd, "Shell not specified.") - } - - if len(args) > 1 { - return cmdutil.UsageErrorf(cmd, "Too many arguments. Expected only the shell type.") - } - - run, found := completionShells[args[0]] - if !found { - return cmdutil.UsageErrorf(cmd, "Unsupported shell type %q.", args[0]) - } - - return run(out, boilerPlate, cmd.Parent()) -} - -func runCompletionBash(out io.Writer, boilerPlate string, imctl *cobra.Command) error { - if len(boilerPlate) == 0 { - boilerPlate = defaultBoilerPlate - } - - if _, err := out.Write([]byte(boilerPlate)); err != nil { - return err - } - - return imctl.GenBashCompletion(out) -} - -func runCompletionZsh(out io.Writer, boilerPlate string, imctl *cobra.Command) error { - zshHead := "#compdef imctl\n" - - if _, err := out.Write([]byte(zshHead)); err != nil { - return err - } - - if len(boilerPlate) == 0 { - boilerPlate = defaultBoilerPlate - } - - if _, err := out.Write([]byte(boilerPlate)); err != nil { - return err - } - - zshInitialization := ` -__imctl_bash_source() { - alias shopt=':' - emulate -L sh - setopt kshglob noshglob braceexpand - - source "$@" -} - -__imctl_type() { - # -t is not supported by zsh - if [ "$1" == "-t" ]; then - shift - - # fake Bash 4 to disable "complete -o nospace". Instead - # "compopt +-o nospace" is used in the code to toggle trailing - # spaces. We don't support that, but leave trailing spaces on - # all the time - if [ "$1" = "__imctl_compopt" ]; then - echo builtin - return 0 - fi - fi - type "$@" -} - -__imctl_compgen() { - local completions w - completions=( $(compgen "$@") ) || return $? - - # filter by given word as prefix - while [[ "$1" = -* && "$1" != -- ]]; do - shift - shift - done - if [[ "$1" == -- ]]; then - shift - fi - for w in "${completions[@]}"; do - if [[ "${w}" = "$1"* ]]; then - echo "${w}" - fi - done -} - -__imctl_compopt() { - true # don't do anything. Not supported by bashcompinit in zsh -} - -__imctl_ltrim_colon_completions() -{ - if [[ "$1" == *:* && "$COMP_WORDBREAKS" == *:* ]]; then - # Remove colon-word prefix from COMPREPLY items - local colon_word=${1%${1##*:}} - local i=${#COMPREPLY[*]} - while [[ $((--i)) -ge 0 ]]; do - COMPREPLY[$i]=${COMPREPLY[$i]#"$colon_word"} - done - fi -} - -__imctl_get_comp_words_by_ref() { - cur="${COMP_WORDS[COMP_CWORD]}" - prev="${COMP_WORDS[${COMP_CWORD}-1]}" - words=("${COMP_WORDS[@]}") - cword=("${COMP_CWORD[@]}") -} - -__imctl_filedir() { - # Don't need to do anything here. - # Otherwise we will get trailing space without "compopt -o nospace" - true -} - -autoload -U +X bashcompinit && bashcompinit - -# use word boundary patterns for BSD or GNU sed -LWORD='[[:<:]]' -RWORD='[[:>:]]' -if sed --help 2>&1 | grep -q 'GNU\|BusyBox'; then - LWORD='\<' - RWORD='\>' -fi - -__imctl_convert_bash_to_zsh() { - sed \ - -e 's/declare -F/whence -w/' \ - -e 's/_get_comp_words_by_ref "\$@"/_get_comp_words_by_ref "\$*"/' \ - -e 's/local \([a-zA-Z0-9_]*\)=/local \1; \1=/' \ - -e 's/flags+=("\(--.*\)=")/flags+=("\1"); two_word_flags+=("\1")/' \ - -e 's/must_have_one_flag+=("\(--.*\)=")/must_have_one_flag+=("\1")/' \ - -e "s/${LWORD}_filedir${RWORD}/__imctl_filedir/g" \ - -e "s/${LWORD}_get_comp_words_by_ref${RWORD}/__imctl_get_comp_words_by_ref/g" \ - -e "s/${LWORD}__ltrim_colon_completions${RWORD}/__imctl_ltrim_colon_completions/g" \ - -e "s/${LWORD}compgen${RWORD}/__imctl_compgen/g" \ - -e "s/${LWORD}compopt${RWORD}/__imctl_compopt/g" \ - -e "s/${LWORD}declare${RWORD}/builtin declare/g" \ - -e "s/\\\$(type${RWORD}/\$(__imctl_type/g" \ - <<'BASH_COMPLETION_EOF' -` - if _, err := out.Write([]byte(zshInitialization)); err != nil { - return err - } - - buf := new(bytes.Buffer) - if err := imctl.GenBashCompletion(buf); err != nil { - return err - } - - if _, err := out.Write(buf.Bytes()); err != nil { - return err - } - - zshTail := ` -BASH_COMPLETION_EOF -} - -__imctl_bash_source <(__imctl_convert_bash_to_zsh) -` - if _, err := out.Write([]byte(zshTail)); err != nil { - return err - } - - return nil -} diff --git a/tools/imctl/internal/imctl/cmd/info/info.go b/tools/imctl/internal/imctl/cmd/info/info.go deleted file mode 100644 index a51c2f4de..000000000 --- a/tools/imctl/internal/imctl/cmd/info/info.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 info print the host information. -package info - -import ( - "fmt" - "reflect" - "strconv" - - hoststat "github.com/likexian/host-stat-go" - "github.com/openim-sigs/component-base/util/iputil" - "github.com/spf13/cobra" - - cmdutil "github.com/openimsdk/open-im-server/tools/imctl/internal/imctl/cmd/util" - "github.com/openimsdk/open-im-server/tools/imctl/pkg/cli/genericclioptions" - "github.com/openimsdk/open-im-server/tools/imctl/pkg/util/templates" -) - -// Info defines the host information struct. -type Info struct { - HostName string - IPAddress string - OSRelease string - CPUCore uint64 - MemTotal string - MemFree string -} - -// InfoOptions is an options struct to support 'info' sub command. -type InfoOptions struct { - genericclioptions.IOStreams -} - -var infoExample = templates.Examples(` - # Print the host information - imctl info`) - -// NewInfoOptions returns an initialized InfoOptions instance. -func NewInfoOptions(ioStreams genericclioptions.IOStreams) *InfoOptions { - return &InfoOptions{ - IOStreams: ioStreams, - } -} - -// NewCmdInfo returns new initialized instance of 'info' sub command. -func NewCmdInfo(f cmdutil.Factory, ioStreams genericclioptions.IOStreams) *cobra.Command { - o := NewInfoOptions(ioStreams) - - cmd := &cobra.Command{ - Use: "info", - DisableFlagsInUseLine: true, - Aliases: []string{}, - Short: "Print the host information", - Long: "Print the host information.", - Example: infoExample, - Run: func(cmd *cobra.Command, args []string) { - cmdutil.CheckErr(o.Run(args)) - }, - SuggestFor: []string{}, - } - - return cmd -} - -// Run executes an info sub command using the specified options. -func (o *InfoOptions) Run(args []string) error { - var info Info - - hostInfo, err := hoststat.GetHostInfo() - if err != nil { - return fmt.Errorf("get host info failed!error:%w", err) - } - - info.HostName = hostInfo.HostName - info.OSRelease = hostInfo.Release + " " + hostInfo.OSBit - - memStat, err := hoststat.GetMemStat() - if err != nil { - return fmt.Errorf("get mem stat failed!error:%w", err) - } - - info.MemTotal = strconv.FormatUint(memStat.MemTotal, 10) + "M" - info.MemFree = strconv.FormatUint(memStat.MemFree, 10) + "M" - info.IPAddress = iputil.GetLocalIP() - - cpuStat, err := hoststat.GetCPUInfo() - if err != nil { - return fmt.Errorf("get cpu stat failed!error:%w", err) - } - - info.CPUCore = cpuStat.CoreCount - - s := reflect.ValueOf(&info).Elem() - typeOfInfo := s.Type() - - for i := 0; i < s.NumField(); i++ { - f := s.Field(i) - - v := fmt.Sprintf("%v", f.Interface()) - if v != "" { - fmt.Fprintf(o.Out, "%12s %v\n", typeOfInfo.Field(i).Name+":", f.Interface()) - } - } - - return nil -} diff --git a/tools/imctl/internal/imctl/cmd/new/new.go b/tools/imctl/internal/imctl/cmd/new/new.go deleted file mode 100644 index 95ec853b1..000000000 --- a/tools/imctl/internal/imctl/cmd/new/new.go +++ /dev/null @@ -1,619 +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 new used to generate demo command code. -// nolint: predeclared -package new - -import ( - "fmt" - "os" - "path/filepath" - "strings" - "text/template" - - "github.com/openim-sigs/component-base/pkg/util/fileutil" - "github.com/spf13/cobra" - "golang.org/x/text/cases" - "golang.org/x/text/language" - - "github.com/openimsdk/open-im-server/tools/imctl/internal/imctl/util/templates" - "github.com/openimsdk/open-im-server/tools/imctl/pkg/cli/genericclioptions" - cmdutil "github.com/openimsdk/open-im-server/tools/imctl/pkg/util" -) - -const ( - newUsageStr = "new CMD_NAME | CMD_NAME CMD_DESCRIPTION" -) - -var ( - newLong = templates.LongDesc(`Used to generate demo command source code file. - -Can use this command generate a command template file, and do some modify based on your needs. -This can improve your R&D efficiency.`) - - newExample = templates.Examples(` - # Create a default 'test' command file without a description - imctl new test - - # Create a default 'test' command file in /tmp/ - imctl new test -d /tmp/ - - # Create a default 'test' command file with a description - imctl new test "This is a test command" - - # Create command 'test' with two subcommands - imctl new -g test "This is a test command with two subcommands"`) - - newUsageErrStr = fmt.Sprintf( - "expected '%s'.\nat least CMD_NAME is a required argument for the new command", - newUsageStr, - ) - - cmdTemplate = `package {{.CommandName}} - -import ( - "fmt" - - "github.com/spf13/cobra" - - cmdutil "github.com/openimsdk/open-im-server/tools/imctl/pkg/util" - "github.com/openimsdk/open-im-server/tools/imctl/internal/imctl/util/templates" - "github.com/openimsdk/open-im-server/tools/imctl/pkg/cli/genericclioptions" -) - -const ( - {{.CommandName}}UsageStr = "{{.CommandName}} USERNAME PASSWORD" - maxStringLength = 17 -) - -// {{.CommandFunctionName}}Options is an options struct to support '{{.CommandName}}' sub command. -type {{.CommandFunctionName}}Options struct { - // options - StringOption string - StringSliceOption []string - IntOption int - BoolOption bool - - // args - Username string - Password string - - genericclioptions.IOStreams -} - -var ( - {{.CommandName}}Long = templates.LongDesc({{.Dot}}A longer description that spans multiple lines and likely contains examples -and usage of using your command. For example: - -Cobra is a CLI library for Go that empowers applications. -This application is a tool to generate the needed files -to quickly create a Cobra application.{{.Dot}}) - - {{.CommandName}}Example = templates.Examples({{.Dot}} - # Print all option values for {{.CommandName}} - imctl {{.CommandName}} marmotedu marmotedupass{{.Dot}}) - - {{.CommandName}}UsageErrStr = fmt.Sprintf("expected '%s'.\nUSERNAME and PASSWORD are required arguments for the {{.CommandName}} command", {{.CommandName}}UsageStr) -) - -// New{{.CommandFunctionName}}Options returns an initialized {{.CommandFunctionName}}Options instance. -func New{{.CommandFunctionName}}Options(ioStreams genericclioptions.IOStreams) *{{.CommandFunctionName}}Options { - return &{{.CommandFunctionName}}Options{ - StringOption: "default", - IOStreams: ioStreams, - } -} - -// NewCmd{{.CommandFunctionName}} returns new initialized instance of '{{.CommandName}}' sub command. -func NewCmd{{.CommandFunctionName}}(f cmdutil.Factory, ioStreams genericclioptions.IOStreams) *cobra.Command { - o := New{{.CommandFunctionName}}Options(ioStreams) - - cmd := &cobra.Command{ - Use: {{.CommandName}}UsageStr, - DisableFlagsInUseLine: true, - Aliases: []string{}, - Short: "{{.CommandDescription}}", - TraverseChildren: true, - Long: {{.CommandName}}Long, - Example: {{.CommandName}}Example, - Run: func(cmd *cobra.Command, args []string) { - cmdutil.CheckErr(o.Complete(f, cmd, args)) - cmdutil.CheckErr(o.Validate(cmd, args)) - cmdutil.CheckErr(o.Run(args)) - }, - SuggestFor: []string{}, - Args: func(cmd *cobra.Command, args []string) error { - // nolint: gomnd // no need - if len(args) < 2 { - return cmdutil.UsageErrorf(cmd, {{.CommandName}}UsageErrStr) - } - - // if need args equal to zero, uncomment the following code - /* - if len(args) != 0 { - return cmdutil.UsageErrorf(cmd, "Unexpected args: %v", args) - } - */ - - return nil - }, - } - - // mark flag as deprecated - _ = cmd.Flags().MarkDeprecated("deprecated-opt", "This flag is deprecated and will be removed in future.") - cmd.Flags().StringVarP(&o.StringOption, "string", "", o.StringOption, "String option.") - cmd.Flags().StringSliceVar(&o.StringSliceOption, "slice", o.StringSliceOption, "String slice option.") - cmd.Flags().IntVarP(&o.IntOption, "int", "i", o.IntOption, "Int option.") - cmd.Flags().BoolVarP(&o.BoolOption, "bool", "b", o.BoolOption, "Bool option.") - - return cmd -} - -// Complete completes all the required options. -func (o *{{.CommandFunctionName}}Options) Complete(f cmdutil.Factory, cmd *cobra.Command, args []string) error { - if o.StringOption != "" { - o.StringOption += "(complete)" - } - - o.Username = args[0] - o.Password = args[1] - - return nil -} - -// Validate makes sure there is no discrepency in command options. -func (o *{{.CommandFunctionName}}Options) Validate(cmd *cobra.Command, args []string) error { - if len(o.StringOption) > maxStringLength { - return cmdutil.UsageErrorf(cmd, "--string length must less than 18") - } - - if o.IntOption < 0 { - return cmdutil.UsageErrorf(cmd, "--int must be a positive integer: %v", o.IntOption) - } - - return nil -} - -// Run executes a {{.CommandName}} sub command using the specified options. -func (o *{{.CommandFunctionName}}Options) Run(args []string) error { - fmt.Fprintf(o.Out, "The following is option values:\n") - fmt.Fprintf(o.Out, "==> --string: %v\n==> --slice: %v\n==> --int: %v\n==> --bool: %v\n", - o.StringOption, o.StringSliceOption, o.IntOption, o.BoolOption) - - fmt.Fprintf(o.Out, "\nThe following is args values:\n") - fmt.Fprintf(o.Out, "==> username: %v\n==> password: %v\n", o.Username, o.Password) - - return nil -} -` - - maincmdTemplate = `package {{.CommandName}} - -import ( - "github.com/spf13/cobra" - "github.com/spf13/viper" - - cmdutil "github.com/openimsdk/open-im-server/tools/imctl/pkg/util" - "github.com/openimsdk/open-im-server/tools/imctl/internal/imctl/util/templates" - "github.com/openimsdk/open-im-server/tools/imctl/pkg/cli/genericclioptions" -) - -const maxStringLength = 17 - -var ( - {{.CommandName}}Long = templates.LongDesc({{.Dot}} - Demo command. - - This commands show you how to implement a command with two sub commands.{{.Dot}}) -) - -// NewCmd{{.CommandFunctionName}} returns new initialized instance of '{{.CommandName}}' sub command. -func NewCmd{{.CommandFunctionName}}(f cmdutil.Factory, ioStreams genericclioptions.IOStreams) *cobra.Command { - cmd := &cobra.Command{ - Use: "{{.CommandName}} SUBCOMMAND", - DisableFlagsInUseLine: true, - Short: "{{.CommandDescription}}", - Long: {{.CommandName}}Long, - Run: cmdutil.DefaultSubCommandRun(ioStreams.ErrOut), - } - - // add subcommands - cmd.AddCommand(NewCmdSubCmd1(f, ioStreams)) - cmd.AddCommand(NewCmdSubCmd2(f, ioStreams)) - - // add persistent flags for '{{.CommandName}}' - cmdutil.AddCleanFlags(cmd) - - // persistent flag, we can get the value in subcommand via {{.Dot}}viper.Get{{.Dot}} - cmd.PersistentFlags().StringP("persistent", "p", "this is a persistent option", "Cobra persistent option.") - - // bind flags with viper - viper.BindPFlag("persistent", cmd.PersistentFlags().Lookup("persistent")) - - return cmd -} -` - subcmd1Template = `package {{.CommandName}} - -import ( - "fmt" - - "github.com/spf13/cobra" - "github.com/spf13/viper" - - cmdutil "github.com/openimsdk/open-im-server/tools/imctl/pkg/util" - "github.com/openimsdk/open-im-server/tools/imctl/internal/imctl/util/templates" - "github.com/openimsdk/open-im-server/tools/imctl/pkg/cli/genericclioptions" -) - -const ( - subcmd1UsageStr = "subcmd1 USERNAME PASSWORD" -) - -// SubCmd1Options is an options struct to support subcmd1 subcommands. -type SubCmd1Options struct { - // options - StringOption string - StringSliceOption []string - IntOption int - BoolOption bool - PersistentOption string - - // args - Username string - Password string - - genericclioptions.IOStreams -} - -var ( - subcmd1Long = templates.LongDesc({{.Dot}}A longer description that spans multiple lines and likely contains examples -and usage of using your command. For example: - -Cobra is a CLI library for Go that empowers applications. -This application is a tool to generate the needed files -to quickly create a Cobra application.{{.Dot}}) - - subcmd1Example = templates.Examples({{.Dot}} - # Print all option values for subcmd1 - imctl {{.CommandName}} subcmd1 marmotedu marmotedupass - - # Print all option values for subcmd1 with --persistent specified - imctl {{.CommandName}} subcmd1 marmotedu marmotedupass --persistent="specified persistent option in command line"{{.Dot}}) - - subcmd1UsageErrStr = fmt.Sprintf("expected '%s'.\nUSERNAME and PASSWORD are required arguments for the subcmd1 command", subcmd1UsageStr) -) - -// NewSubCmd1Options returns an initialized SubCmd1Options instance. -func NewSubCmd1Options(ioStreams genericclioptions.IOStreams) *SubCmd1Options { - return &SubCmd1Options{ - StringOption: "default", - IOStreams: ioStreams, - } -} - -// NewCmdSubCmd1 returns new initialized instance of subcmd1 sub command. -func NewCmdSubCmd1(f cmdutil.Factory, ioStreams genericclioptions.IOStreams) *cobra.Command { - o := NewSubCmd1Options(ioStreams) - - cmd := &cobra.Command{ - Use: "subcmd1 USERNAME PASSWORD", - DisableFlagsInUseLine: true, - Aliases: []string{"sub1"}, - Short: "A brief description of your command", - TraverseChildren: true, - Long: subcmd1Long, - Example: subcmd1Example, - Run: func(cmd *cobra.Command, args []string) { - cmdutil.CheckErr(o.Complete(f, cmd, args)) - cmdutil.CheckErr(o.Validate(cmd, args)) - cmdutil.CheckErr(o.Run(args)) - }, - SuggestFor: []string{}, - Args: func(cmd *cobra.Command, args []string) error { - // nolint: gomnd // no need - if len(args) < 2 { - return cmdutil.UsageErrorf(cmd, subcmd1UsageErrStr) - } - - return nil - }, - } - - // mark flag as deprecated - _ = cmd.Flags().MarkDeprecated("deprecated-opt", "This flag is deprecated and will be removed in future.") - cmd.Flags().StringVarP(&o.StringOption, "string", "", o.StringOption, "String option.") - cmd.Flags().StringSliceVar(&o.StringSliceOption, "slice", o.StringSliceOption, "String slice option.") - cmd.Flags().IntVarP(&o.IntOption, "int", "i", o.IntOption, "Int option.") - cmd.Flags().BoolVarP(&o.BoolOption, "bool", "b", o.BoolOption, "Bool option.") - - return cmd -} - -// Complete completes all the required options. -func (o *SubCmd1Options) Complete(f cmdutil.Factory, cmd *cobra.Command, args []string) error { - if o.StringOption != "" { - o.StringOption += "(complete)" - } - - o.PersistentOption = viper.GetString("persistent") - o.Username = args[0] - o.Password = args[1] - - return nil -} - -// Validate makes sure there is no discrepency in command options. -func (o *SubCmd1Options) Validate(cmd *cobra.Command, args []string) error { - if len(o.StringOption) > maxStringLength { - return cmdutil.UsageErrorf(cmd, "--string length must less than 18") - } - - if o.IntOption < 0 { - return cmdutil.UsageErrorf(cmd, "--int must be a positive integer: %v", o.IntOption) - } - - return nil -} - -// Run executes a subcmd1 subcommand using the specified options. -func (o *SubCmd1Options) Run(args []string) error { - fmt.Fprintf(o.Out, "The following is option values:\n") - fmt.Fprintf(o.Out, "==> --string: %v\n==> --slice: %v\n==> --int: %v\n==> --bool: %v\n==> --persistent: %v\n", - o.StringOption, o.StringSliceOption, o.IntOption, o.BoolOption, o.PersistentOption) - - fmt.Fprintf(o.Out, "\nThe following is args values:\n") - fmt.Fprintf(o.Out, "==> username: %v\n==> password: %v\n", o.Username, o.Password) - return nil -} -` - subcmd2Template = `package {{.CommandName}} - -import ( - "fmt" - - "github.com/spf13/cobra" - - cmdutil "github.com/openimsdk/open-im-server/tools/imctl/pkg/util" - "github.com/openimsdk/open-im-server/tools/imctl/internal/imctl/util/templates" - "github.com/openimsdk/open-im-server/tools/imctl/pkg/cli/genericclioptions" -) - -// SubCmd2Options is an options struct to support subcmd2 subcommands. -type SubCmd2Options struct { - StringOption string - StringSliceOption []string - IntOption int - BoolOption bool - - genericclioptions.IOStreams -} - -var ( - subcmd2Long = templates.LongDesc({{.Dot}}A longer description that spans multiple lines and likely contains examples -and usage of using your command. For example: - -Cobra is a CLI library for Go that empowers applications. -This application is a tool to generate the needed files -to quickly create a Cobra application.{{.Dot}}) - - subcmd2Example = templates.Examples({{.Dot}} - # Print all option values for subcmd2 - imctl {{.CommandName}} subcmd2{{.Dot}}) -) - -// NewSubCmd2Options returns an initialized SubCmd2Options instance. -func NewSubCmd2Options(ioStreams genericclioptions.IOStreams) *SubCmd2Options { - return &SubCmd2Options{ - StringOption: "default", - IOStreams: ioStreams, - } -} - -// NewCmdSubCmd2 returns new initialized instance of subcmd2 sub command. -func NewCmdSubCmd2(f cmdutil.Factory, ioStreams genericclioptions.IOStreams) *cobra.Command { - o := NewSubCmd2Options(ioStreams) - - cmd := &cobra.Command{ - Use: "subcmd2", - DisableFlagsInUseLine: true, - Aliases: []string{"sub2"}, - Short: "A brief description of your command", - TraverseChildren: true, - Long: subcmd2Long, - Example: subcmd2Example, - Run: func(cmd *cobra.Command, args []string) { - cmdutil.CheckErr(o.Complete(f, cmd, args)) - cmdutil.CheckErr(o.Validate(cmd, args)) - cmdutil.CheckErr(o.Run(args)) - }, - SuggestFor: []string{}, - } - - // mark flag as deprecated - cmd.Flags().StringVarP(&o.StringOption, "string", "", o.StringOption, "String option.") - cmd.Flags().StringSliceVar(&o.StringSliceOption, "slice", o.StringSliceOption, "String slice option.") - cmd.Flags().IntVarP(&o.IntOption, "int", "i", o.IntOption, "Int option.") - cmd.Flags().BoolVarP(&o.BoolOption, "bool", "b", o.BoolOption, "Bool option.") - - return cmd -} - -// Complete completes all the required options. -func (o *SubCmd2Options) Complete(f cmdutil.Factory, cmd *cobra.Command, args []string) error { - if len(args) != 0 { - return cmdutil.UsageErrorf(cmd, "Unexpected args: %v", args) - } - - if o.StringOption != "" { - o.StringOption += "(complete)" - } - - return nil -} - -// Validate makes sure there is no discrepency in command options. -func (o *SubCmd2Options) Validate(cmd *cobra.Command, args []string) error { - if len(o.StringOption) > maxStringLength { - return cmdutil.UsageErrorf(cmd, "--string length must less than 18") - } - - if o.IntOption < 0 { - return cmdutil.UsageErrorf(cmd, "--int must be a positive integer: %v", o.IntOption) - } - - return nil -} - -// Run executes a subcmd2 subcommand using the specified options. -func (o *SubCmd2Options) Run(args []string) error { - fmt.Fprintf(o.Out, "The following is option values:\n") - fmt.Fprintf(o.Out, "==> --string: %v\n==> --slice: %v\n==> --int: %v\n==> --bool: %v\n", - o.StringOption, o.StringSliceOption, o.IntOption, o.BoolOption) - return nil -} -` -) - -// NewOptions is an options struct to support 'new' sub command. -type NewOptions struct { - Group bool - Outdir string - - // command template options, will render to command template - CommandName string - CommandDescription string - CommandFunctionName string - Dot string - - genericclioptions.IOStreams -} - -// NewNewOptions returns an initialized NewOptions instance. -func NewNewOptions(ioStreams genericclioptions.IOStreams) *NewOptions { - return &NewOptions{ - Group: false, - Outdir: ".", - CommandDescription: "A brief description of your command", - Dot: "`", - IOStreams: ioStreams, - } -} - -// NewCmdNew returns new initialized instance of 'new' sub command. -func NewCmdNew(f cmdutil.Factory, ioStreams genericclioptions.IOStreams) *cobra.Command { - o := NewNewOptions(ioStreams) - - cmd := &cobra.Command{ - Use: newUsageStr, - DisableFlagsInUseLine: true, - Short: "Generate demo command code", - Long: newLong, - Example: newExample, - Run: func(cmd *cobra.Command, args []string) { - cmdutil.CheckErr(o.Complete(cmd, args)) - cmdutil.CheckErr(o.Validate(cmd)) - cmdutil.CheckErr(o.Run(args)) - }, - Aliases: []string{}, - SuggestFor: []string{}, - } - - cmd.Flags().BoolVarP(&o.Group, "group", "g", o.Group, "Generate two subcommands.") - cmd.Flags().StringVarP(&o.Outdir, "outdir", "d", o.Outdir, "Where to create demo command files.") - - return cmd -} - -// Complete completes all the required options. -func (o *NewOptions) Complete(cmd *cobra.Command, args []string) error { - if len(args) < 1 { - return cmdutil.UsageErrorf(cmd, newUsageErrStr) - } - - o.CommandName = strings.ToLower(args[0]) - if len(args) > 1 { - o.CommandDescription = args[1] - } - - o.CommandFunctionName = cases.Title(language.English).String(o.CommandName) - - return nil -} - -// Validate makes sure there is no discrepency in command options. -func (o *NewOptions) Validate(cmd *cobra.Command) error { - return nil -} - -// Run executes a new sub command using the specified options. -func (o *NewOptions) Run(args []string) error { - if o.Group { - return o.CreateCommandWithSubCommands() - } - - return o.CreateCommand() -} - -// CreateCommand create the command with options. -func (o *NewOptions) CreateCommand() error { - return o.GenerateGoCode(o.CommandName+".go", cmdTemplate) -} - -// CreateCommandWithSubCommands create sub commands with options. -func (o *NewOptions) CreateCommandWithSubCommands() error { - if err := o.GenerateGoCode(o.CommandName+".go", maincmdTemplate); err != nil { - return err - } - - if err := o.GenerateGoCode(o.CommandName+"_subcmd1.go", subcmd1Template); err != nil { - return err - } - - if err := o.GenerateGoCode(o.CommandName+"_subcmd2.go", subcmd2Template); err != nil { - return err - } - - return nil -} - -// GenerateGoCode generate go source file. -func (o *NewOptions) GenerateGoCode(name, codeTemplate string) error { - tmpl, err := template.New("cmd").Parse(codeTemplate) - if err != nil { - return err - } - - err = fileutil.EnsureDirAll(o.Outdir) - if err != nil { - return err - } - - filename := filepath.Join(o.Outdir, name) - fd, err := os.Create(filename) - if err != nil { - return err - } - defer fd.Close() - - err = tmpl.Execute(fd, o) - if err != nil { - return err - } - - fmt.Printf("Command file generated: %s\n", filename) - - return nil -} diff --git a/tools/imctl/internal/imctl/cmd/options/options.go b/tools/imctl/internal/imctl/cmd/options/options.go deleted file mode 100644 index 52e236d13..000000000 --- a/tools/imctl/internal/imctl/cmd/options/options.go +++ /dev/null @@ -1,50 +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 options print a list of global command-line options (applies to all commands). -package options - -import ( - "io" - - "github.com/spf13/cobra" - - "github.com/openimsdk/open-im-server/tools/imctl/pkg/util/templates" -) - -var optionsExample = templates.Examples(` - # Print flags inherited by all commands - iamctl options`) - -// NewCmdOptions implements the options command. -func NewCmdOptions(out io.Writer) *cobra.Command { - cmd := &cobra.Command{ - Use: "options", - Short: "Print the list of flags inherited by all commands", - Long: "Print the list of flags inherited by all commands", - Example: optionsExample, - Run: func(cmd *cobra.Command, args []string) { - _ = cmd.Usage() - }, - } - - // The `options` command needs write its output to the `out` stream - // (typically stdout). Without calling SetOutput here, the Usage() - // function call will fall back to stderr. - cmd.SetOutput(out) - - templates.UseOptionsTemplates(cmd) - - return cmd -} diff --git a/tools/imctl/internal/imctl/cmd/profiling.go b/tools/imctl/internal/imctl/cmd/profiling.go deleted file mode 100644 index f0be6e38c..000000000 --- a/tools/imctl/internal/imctl/cmd/profiling.go +++ /dev/null @@ -1,95 +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 cmd - -import ( - "errors" - "fmt" - "os" - "runtime" - "runtime/pprof" - - "github.com/spf13/pflag" -) - -// profiling configuration variables -var ( - profileName string = "none" // Name of the profile to capture. - profileOutput string = "profile.pprof" // File to write the profile data. -) - -// addProfilingFlags registers profiling related flags to the given FlagSet. -func addProfilingFlags(flags *pflag.FlagSet) { - flags.StringVar( - &profileName, - "profile", - "none", - "Type of profile to capture. Options: none, cpu, heap, goroutine, threadcreate, block, mutex", - ) - flags.StringVar(&profileOutput, "profile-output", "profile.pprof", "File to write the profile data") -} - -// initProfiling sets up profiling based on the user's choice. -// If 'cpu' is selected, it starts the CPU profile. For block and mutex profiles, -// sampling rates are set up. -func initProfiling() error { - switch profileName { - case "none": - return nil - case "cpu": - f, err := os.Create(profileOutput) - if err != nil { - return err - } - return pprof.StartCPUProfile(f) - case "block": - runtime.SetBlockProfileRate(1) // Sampling every block event - return nil - case "mutex": - runtime.SetMutexProfileFraction(1) // Sampling every mutex event - return nil - default: - if profile := pprof.Lookup(profileName); profile == nil { - return fmt.Errorf("unknown profile type: '%s'", profileName) - } - return nil - } -} - -// flushProfiling writes the profiling data to the specified file. -// For heap profiles, it runs the GC before capturing the data. -// It stops the CPU profile if it was started. -func flushProfiling() error { - switch profileName { - case "none": - return nil - case "cpu": - pprof.StopCPUProfile() - return nil - case "heap": - runtime.GC() // Run garbage collection before writing heap profile - fallthrough - default: - profile := pprof.Lookup(profileName) - if profile == nil { - return errors.New("invalid profile type") - } - f, err := os.Create(profileOutput) - if err != nil { - return err - } - return profile.WriteTo(f, 0) - } -} diff --git a/tools/imctl/internal/imctl/cmd/version/version.go b/tools/imctl/internal/imctl/cmd/version/version.go deleted file mode 100644 index c2636bfd2..000000000 --- a/tools/imctl/internal/imctl/cmd/version/version.go +++ /dev/null @@ -1,165 +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 version print the client and server version information. -package version - -import ( - "context" - "errors" - "fmt" - - "github.com/ghodss/yaml" - "github.com/openim-sigs/component-base/pkg/json" - "github.com/openim-sigs/component-base/pkg/version" - "github.com/spf13/cobra" - - "github.com/openimsdk/open-im-server/tools/imctl/internal/imctl/util/templates" - "github.com/openimsdk/open-im-server/tools/imctl/pkg/cli/genericclioptions" - cmdutil "github.com/openimsdk/open-im-server/tools/imctl/pkg/util" -) - -// Version is a struct for version information. -type Version struct { - ClientVersion *version.Info `json:"clientVersion,omitempty" yaml:"clientVersion,omitempty"` - ServerVersion *version.Info `json:"serverVersion,omitempty" yaml:"serverVersion,omitempty"` -} - -var versionExample = templates.Examples(` - # Print the client and server versions for the current context - imctl version`) - -// Options is a struct to support version command. -type Options struct { - ClientOnly bool - Short bool - Output string - - client *restclient.RESTClient - genericclioptions.IOStreams -} - -// NewOptions returns initialized Options. -func NewOptions(ioStreams genericclioptions.IOStreams) *Options { - return &Options{ - IOStreams: ioStreams, - } -} - -// NewCmdVersion returns a cobra command for fetching versions. -func NewCmdVersion(f cmdutil.Factory, ioStreams genericclioptions.IOStreams) *cobra.Command { - o := NewOptions(ioStreams) - cmd := &cobra.Command{ - Use: "version", - Short: "Print the client and server version information", - Long: "Print the client and server version information for the current context", - Example: versionExample, - Run: func(cmd *cobra.Command, args []string) { - cmdutil.CheckErr(o.Complete(f, cmd)) - cmdutil.CheckErr(o.Validate()) - cmdutil.CheckErr(o.Run()) - }, - } - - cmd.Flags().BoolVar( - &o.ClientOnly, - "client", - o.ClientOnly, - "If true, shows client version only (no server required).", - ) - cmd.Flags().BoolVar(&o.Short, "short", o.Short, "If true, print just the version number.") - cmd.Flags().StringVarP(&o.Output, "output", "o", o.Output, "One of 'yaml' or 'json'.") - - return cmd -} - -// Complete completes all the required options. -func (o *Options) Complete(f cmdutil.Factory, cmd *cobra.Command) error { - var err error - if o.ClientOnly { - return nil - } - - o.client, err = f.RESTClient() - if err != nil { - return err - } - - return nil -} - -// Validate validates the provided options. -func (o *Options) Validate() error { - if o.Output != "" && o.Output != "yaml" && o.Output != "json" { - return errors.New(`--output must be 'yaml' or 'json'`) - } - - return nil -} - -// Run executes version command. -func (o *Options) Run() error { - var ( - serverVersion *version.Info - serverErr error - versionInfo Version - ) - - clientVersion := version.Get() - versionInfo.ClientVersion = &clientVersion - - if !o.ClientOnly && o.client != nil { - // Always request fresh data from the server - if err := o.client.Get().AbsPath("/version").Do(context.TODO()).Into(&serverVersion); err != nil { - return err - } - versionInfo.ServerVersion = serverVersion - } - - switch o.Output { - case "": - if o.Short { - fmt.Fprintf(o.Out, "Client Version: %s\n", clientVersion.GitVersion) - - if serverVersion != nil { - fmt.Fprintf(o.Out, "Server Version: %s\n", serverVersion.GitVersion) - } - } else { - fmt.Fprintf(o.Out, "Client Version: %s\n", fmt.Sprintf("%#v", clientVersion)) - if serverVersion != nil { - fmt.Fprintf(o.Out, "Server Version: %s\n", fmt.Sprintf("%#v", *serverVersion)) - } - } - case "yaml": - marshaled, err := yaml.Marshal(&versionInfo) - if err != nil { - return err - } - - fmt.Fprintln(o.Out, string(marshaled)) - case "json": - marshaled, err := json.MarshalIndent(&versionInfo, "", " ") - if err != nil { - return err - } - - fmt.Fprintln(o.Out, string(marshaled)) - default: - // There is a bug in the program if we hit this case. - // However, we follow a policy of never panicking. - return fmt.Errorf("VersionOptions were not validated: --output=%q should have been rejected", o.Output) - } - - return serverErr -} diff --git a/tools/url2im/go.mod b/tools/url2im/go.mod index b1d0a5bac..236af91c7 100644 --- a/tools/url2im/go.mod +++ b/tools/url2im/go.mod @@ -11,9 +11,9 @@ require ( github.com/golang/protobuf v1.5.3 // indirect github.com/kelindar/simd v1.1.2 // indirect github.com/klauspost/cpuid/v2 v2.2.4 // indirect - golang.org/x/net v0.9.0 // indirect - golang.org/x/sys v0.7.0 // indirect - golang.org/x/text v0.9.0 // indirect + golang.org/x/net v0.17.0 // indirect + golang.org/x/sys v0.13.0 // indirect + golang.org/x/text v0.13.0 // indirect google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1 // indirect google.golang.org/grpc v1.56.2 // indirect google.golang.org/protobuf v1.31.0 // indirect diff --git a/tools/url2im/go.sum b/tools/url2im/go.sum index 9985d4828..071d9c3aa 100644 --- a/tools/url2im/go.sum +++ b/tools/url2im/go.sum @@ -14,13 +14,13 @@ github.com/klauspost/cpuid/v2 v2.2.4 h1:acbojRNwl3o09bUq+yDCtZFc1aiwaAAxtcn8YkZX github.com/klauspost/cpuid/v2 v2.2.4/go.mod h1:RVVoqg1df56z8g3pUjL/3lE5UfnlrJX8tyFgg4nqhuY= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/stretchr/testify v1.8.2 h1:+h33VjcLVPDHtOdpUCuF+7gSuG3yGIftsP1YvFihtJ8= -golang.org/x/net v0.9.0 h1:aWJ/m6xSmxWBx+V0XRHTlrYrPG56jKsLdTFmsSsCzOM= -golang.org/x/net v0.9.0/go.mod h1:d48xBJpPfHeWQsugry2m+kC02ZBRGRgulfHnEXEuWns= +golang.org/x/net v0.17.0 h1:pVaXccu2ozPjCXewfr1S7xza/zcXTity9cCdXQYSjIM= +golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= golang.org/x/sys v0.0.0-20220704084225-05e143d24a9e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.7.0 h1:3jlCCIQZPdOYu1h8BkNvLz8Kgwtae2cagcG/VamtZRU= -golang.org/x/sys v0.7.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/text v0.9.0 h1:2sjJmO8cDvYveuX97RDLsxlyUxLl+GHoLxBiRdHllBE= -golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= +golang.org/x/sys v0.13.0 h1:Af8nKPmuFypiUBjVoU9V20FiaFXOcuZI21p0ycVYYGE= +golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k= +golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1 h1:KpwkzHKEF7B9Zxg18WzOa7djJ+Ha5DzthMyZYQfEn2A= google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1/go.mod h1:nKE/iIaLqn2bQwXBg8f1g2Ylh6r5MN5CmZvuzZCgsCU=