Merge remote-tracking branch 'origin/main'

pull/644/head
withchao 2 years ago
commit d08f48ba07

@ -1,5 +1,5 @@
USER=root
PASSWORD=openIM123
MINIO_ENDPOINT=http://127.0.0.1:10005
API_URL=http://127.0.0.1:10002/object/
MINIO_ENDPOINT=http://116.30.3.80:10005
API_URL=http://116.30.3.80:10002/object/
DATA_DIR=./

16
.github/sync.yml vendored

@ -67,6 +67,10 @@ group:
- repos: |
OpenIMSDK/OpenKF@main
OpenIMSDK/openim-miniprogram-demo@main
OpenIMSDK/docs
OpenIMSDK/chat
OpenIMSDK/community
OpenIMSDK/openim-charts
OpenIMSDK/openim-sdk-cpp@main
files:
- source: LICENSE
@ -87,6 +91,18 @@ group:
- source: .github/.codecov.yml
dest: .github/.codecov.yml
replace: false
- source: .github/workflows/cla.yml
dest: .github/workflows/cla.yml
replace: false
- source: .github/workflows/
dest: .github/workflows/
replace: false
- source: .github/workflows/auto-assign-issue.yml
dest: .github/workflows/auto-assign-issue.yml
replace: false
- source: .github/workflows/release.yml
dest: .github/workflows/release.yml
replace: false
- source: ./scripts/githooks/
dest: ./scripts/githooks/
replace: true

@ -0,0 +1,26 @@
name: Assign issue to comment author
on:
issue_comment:
types: [created]
jobs:
assign-issue:
if: contains(github.event.comment.body, '/assign') || contains(github.event.comment.body, '/accept')
runs-on: ubuntu-latest
permissions:
issues: write
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Assign the issue
run: |
export LETASE_MILESTONES=$(curl "https://api.github.com/repos/$OWNER/$REPO/milestones" | jq -r 'last(.[]).title')
gh issue edit ${{ github.event.issue.number }} --add-assignee "${{ github.event.comment.user.login }}"
gh issue edit ${{ github.event.issue.number }} --add-label "triage/accepted"
gh issue edit ${{ github.event.issue.number }} --milestone "$LETASE_MILESTONES"
gh issue comment $ISSUE --body "@${{ github.event.comment.user.login }} Glad to see you accepted this issue🤲, this issue has been assigned to you. <br>I set the milestones for this issue to $LETASE_MILESTONES, we are looking forward to your PR!"
env:
GH_TOKEN: ${{ secrets.REDBOT_GITHUB_TOKEN }}
ISSUE: ${{ github.event.issue.html_url }}
OWNER: ${{ github.repository_owner }}
REPO: ${{ github.event.repository.name }}

@ -0,0 +1,26 @@
name: Assign issue to comment author
on:
issue_comment:
types: [created]
jobs:
assign-issue:
if: contains(github.event.comment.body, '/assign') || contains(github.event.comment.body, '/accept')
runs-on: ubuntu-latest
permissions:
issues: write
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Assign the issue
run: |
export LETASE_MILESTONES=$(curl 'https://api.github.com/repos/kubecub/github-label-syncer/milestones' | jq -r 'last(.[]).title')
gh issue edit ${{ github.event.issue.number }} --add-assignee "${{ github.event.comment.user.login }}"
gh issue edit ${{ github.event.issue.number }} --add-label "triage/accepted"
gh issue edit ${{ github.event.issue.number }} --milestone "$LETASE_MILESTONES"
gh issue comment $ISSUE --body "@${{ github.event.comment.user.login }} Glad to see you accepted this issue🤲, this issue has been assigned to you. I set the milestones for this issue to $LETASE_MILESTONES, We are looking forward to your PR!"
env:
GH_TOKEN: ${{ secrets.REDBOT_GITHUB_TOKEN }}
ISSUE: ${{ github.event.issue.html_url }}
OWNER: ${{ github.repository_owner }}
REPO: ${{ github.event.repository.name }}

@ -0,0 +1,53 @@
name: 'Github Rebot for Cherry Pick when PR is merged'
on:
pull_request_target:
types:
- closed
jobs:
comment:
runs-on: ubuntu-latest
steps:
- name: Comment cherry-pick command
uses: actions/github-script@v5
with:
script: |
const pr = context.payload.pull_request;
if (!pr.merged) {
console.log("PR is not merged. Skipping...");
return;
}
if (!pr.milestone || !pr.milestone.title) {
console.log("Milestone is not set. Skipping...");
return;
}
const milestone = pr.milestone.title;
const ref = `heads/release-${milestone}`;
let branchExists;
try {
await github.rest.git.getRef({
owner: context.repo.owner,
repo: context.repo.repo,
ref: ref
});
branchExists = true;
} catch (error) {
if (error.status === 404) {
console.log(`Branch ${ref} does not exist. Skipping...`);
branchExists = false;
} else {
throw error; // Rethrow if it's another error
}
}
if (!branchExists) {
return;
}
const cherryPickCmd = `/cherry-pick release-${milestone}`;
console.log(`Adding comment: ${cherryPickCmd}`);
await github.rest.issues.createComment({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: pr.number,
body: cherryPickCmd
});
github-token: ${{ secrets.BOT_GITHUB_TOKEN }}

@ -0,0 +1,19 @@
name: Github Rebot for Cherry Pick On Comment
on:
issue_comment:
types: [created]
jobs:
cherry-pick:
name: Cherry Pick
if: github.event.issue.pull_request != '' && contains(github.event.comment.body, '/cherry-pick') && github.event.comment.user.login=='kubbot'
runs-on: ubuntu-latest
steps:
- name: Checkout the latest code
uses: actions/checkout@v2
with:
token: ${{ secrets.BOT_GITHUB_TOKEN }}
fetch-depth: 0 # otherwise, you will fail to push refs to dest repo
- name: Automatic Cherry Pick
uses: vendoo/gha-cherry-pick@v1
env:
GITHUB_TOKEN: ${{ secrets.BOT_GITHUB_TOKEN }}

@ -1,3 +1,17 @@
# Copyright © 2023 OpenIM open source community. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
name: OpenIM Build Docker Images
on:
push:
@ -9,8 +23,7 @@ jobs:
strategy:
matrix:
bin:
- ssserver
- sslocal
- openim-server
steps:
- name: Checkout
uses: actions/checkout@v3

@ -0,0 +1,48 @@
name: "OpenIM CLA Assistant"
on:
issue_comment:
types: [created]
pull_request_target:
types: [opened,closed,synchronize]
# explicitly configure permissions, in case your GITHUB_TOKEN workflow permissions are set to read-only in repository settings
permissions:
actions: write
contents: write
pull-requests: write
statuses: write
env:
# Define Open-IM-Server variables here
OPEN_IM_SERVER_REMOTE_ORGANIZATION: openim-sigs
REMOTE_REPOSITORY: cla
OPEN_IM_SERVER_CLA_DOCUMENT: https://github.com/openim-sigs/cla/blob/main/README.md
OPEN_IM_SERVER_SIGNATURES_PATH: signatures/${{ github.event.repository.name }}/cla.json
OPEN_IM_SERVER_ALLOWLIST: kubbot,bot*
jobs:
CLAAssistant:
runs-on: ubuntu-latest
steps:
- name: "CLA Assistant"
if: (github.event.comment.body == 'recheck' || github.event.comment.body == 'I have read the CLA Document and I hereby sign the CLA') || github.event_name == 'pull_request_target'
uses: contributor-assistant/github-action@v2.3.0
env:
GITHUB_TOKEN: ${{ secrets.BOT_GITHUB_TOKEN }}
PERSONAL_ACCESS_TOKEN: ${{ secrets.REDBOT_GITHUB_TOKEN }}
with:
path-to-signatures: ${{ env.OPEN_IM_SERVER_SIGNATURES_PATH }}
path-to-document: ${{ env.OPEN_IM_SERVER_CLA_DOCUMENT }}
branch: 'main'
allowlist: ${{ env.OPEN_IM_SERVER_ALLOWLIST }}
remote-organization-name: ${{ env.OPEN_IM_SERVER_REMOTE_ORGANIZATION }}
remote-repository-name: ${{ env.REMOTE_REPOSITORY }}
create-file-commit-message: '📚 Docs: Creating file for storing ${{ github.event.repository.name }} CLA Signatures'
custom-notsigned-prcomment: '💕 Thank you for your contribution and please kindly read and sign our [🎯https://github.com/openim-sigs/cla/blob/main/README.md](https://github.com/openim-sigs/cla/blob/main/README.md) <br> '
custom-pr-sign-comment: 'I have read the CLA Document and I hereby sign the CLA'
custom-allsigned-prcomment: '🤖 All Contributors have signed the [${{ github.event.repository.name }} CLA](https://github.com/openim-sigs/cla/blob/main/README.md).<br> The signed information is recorded [🤖here](https://github.com/openim-sigs/cla/tree/main/signatures/${{ env.OPEN_IM_SERVER_ALLOWLIST }}/cla.json)'
# lock-pullrequest-aftermerge: false - if you don't want this bot to automatically lock the pull request after merging (default - true)
# use-dco-flag: true - If you are using DCO instead of CLA

@ -0,0 +1,45 @@
name: deploy for dev
on:
push:
branches:
- 'devops' # Only for the dev branch
paths:
- '.github/workflows/*'
# - '__test__/**' # dev No immediate testing is required
- 'src/**'
- 'Dockerfile'
- 'docker-compose.yml'
- 'bin/*'
jobs:
deploy-dev:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: set ssh key # Temporarily set up ssh key
run: |
mkdir -p ~/.ssh/
# secrets.WFP_ID_RSA set in GitHub
echo "${{secrets.WFP_ID_RSA}}" > ~/.ssh/id_rsa
chmod 600 ~/.ssh/id_rsa
ssh-keyscan "182.92.xxx.xxx" >> ~/.ssh/known_hosts
- name: deploy # Deployment
run: |
ssh work@182.92.xxx.xxx "
# 【Attention】Log in with the 'work' account, manually create /home/work/imooc-lego directory
# Then git clone https://username:password@github.com/imooc-lego/biz-editor-server.git -b dev (private repository, use GitHub username and password)
# Remember to delete origin to avoid exposing GitHub password
cd /home/work/imooc-lego/biz-editor-server;
git remote add origin https://openimbot:${{secrets.WFP_PASSWORD}}@github.com/OpenIMSDK/open-im-server.git;
git checkout dev;
git pull origin dev; # Download the latest code again
git remote remove origin; # Remove origin to avoid exposing GitHub password
# Start docker
docker-compose build editor-server; # Same as the service name in docker-compose.yml
docker-compose up -d;
"
- name: delete ssh key # Delete ssh key
run: rm -rf ~/.ssh/id_rsa

@ -0,0 +1,18 @@
# Copyright © 2023 KubeCub open source community. All rights reserved.
# Licensed under the MIT License (the "License");
# you may not use this file except in compliance with the License.
name: Dependency Review
on: [pull_request]
permissions:
contents: read
jobs:
dependency-review:
runs-on: ubuntu-latest
steps:
- name: 'Checkout Repository'
uses: actions/checkout@v3
- name: 'Dependency Review'
uses: actions/dependency-review-action@v3

@ -0,0 +1,2 @@
# name: OpenIM e2e Test

@ -13,12 +13,12 @@
# limitations under the License.
name: OpenKF golangci-lint
name: OpenIM golangci-lint
on:
push:
branches: [main]
# pull_request:
# branches: [main]
pull_request:
branches: [main]
jobs:
golangci:
name: lint

@ -1,30 +1,31 @@
# name: Run gosec
name: OpenIM Run Gosec
# # gosec is a source code security audit tool for the Go language. It performs a static
# # analysis of the Go code, looking for potential security problems. The main functions of gosec are:
# # 1. Find common security vulnerabilities, such as SQL injection, command injection, and cross-site scripting (XSS).
# # 2. Audit codes according to common security standards and find non-standard codes.
# # 3. Assist the Go language engineer to write safe and reliable code.
# gosec is a source code security audit tool for the Go language. It performs a static
# analysis of the Go code, looking for potential security problems. The main functions of gosec are:
# 1. Find common security vulnerabilities, such as SQL injection, command injection, and cross-site scripting (XSS).
# 2. Audit codes according to common security standards and find non-standard codes.
# 3. Assist the Go language engineer to write safe and reliable code.
# https://github.com/securego/gosec/
on:
push:
branches: "*"
pull_request:
branches: "*"
paths-ignore:
- '*.md'
- '*.yml'
- '.github'
# on:
# push:
# branches: "*"
# pull_request:
# branches: "*"
# paths-ignore:
# - '*.md'
# - '*.yml'
# - '.github'
# jobs:
# golang-security-action:
# runs-on: ubuntu-latest
# env:
# GO111MODULE: on
# steps:
# - name: Check out code
# uses: actions/checkout@v3
# - name: Run Gosec Security Scanner
# uses: securego/gosec@master
# with:
# args: ./...
jobs:
golang-security-action:
runs-on: ubuntu-latest
env:
GO111MODULE: on
steps:
- name: Check out code
uses: actions/checkout@v3
- name: Run Gosec Security Scanner
uses: securego/gosec@master
with:
args: ./...
continue-on-error: true

@ -1,3 +1,17 @@
# Copyright © 2023 OpenIM open source community. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
name: Build Image
on:

@ -0,0 +1,51 @@
name: 'Lock Threads'
on:
schedule:
- cron: '0 * * * *'
workflow_dispatch:
permissions:
issues: write
pull-requests: write
concurrency:
group: lock
jobs:
action:
runs-on: ubuntu-latest
steps:
- uses: dessant/lock-threads@v4
with:
github-token: ${{ secrets.BOT_GITHUB_TOKEN }}
issue-inactive-days: '365'
exclude-issue-created-before: ''
exclude-issue-created-after: ''
exclude-issue-created-between: ''
exclude-issue-closed-before: ''
exclude-issue-closed-after: ''
exclude-issue-closed-between: ''
include-any-issue-labels: ''
include-all-issue-labels: ''
exclude-any-issue-labels: ''
add-issue-labels: ''
remove-issue-labels: ''
issue-comment: ''
issue-lock-reason: 'resolved'
pr-inactive-days: '365'
exclude-pr-created-before: ''
exclude-pr-created-after: ''
exclude-pr-created-between: ''
exclude-pr-closed-before: ''
exclude-pr-closed-after: ''
exclude-pr-closed-between: ''
include-any-pr-labels: ''
include-all-pr-labels: ''
exclude-any-pr-labels: ''
add-pr-labels: ''
remove-pr-labels: ''
pr-comment: ''
pr-lock-reason: 'resolved'
process-only: ''
log-output: false

@ -1,4 +1,4 @@
name: 'OpenCommit Action'
name: 'OpenIM Commit Action'
on:
push:

@ -1,134 +0,0 @@
# Copyright © 2023 OpenIM open source community. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
name: OpenIM CI
on:
push:
branches:
- main
paths-ignore:
- "docs/**"
- "README.md"
- "README_zh-CN.md"
- "CONTRIBUTING.md"
pull_request:
branches:
- main
paths-ignore:
- "README.md"
- "README_zh-CN.md"
- "CONTRIBUTING.md"
- "docs/**"
env:
GO_VERSION: "1.19"
GOLANGCI_VERSION: "v1.50.1"
jobs:
openim:
name: Test with go ${{ matrix.go_version }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
environment:
name: openim
strategy:
matrix:
go_version: ["1.18","1.19","1.20"]
os: [ubuntu-latest]
steps:
- name: Set up Go ${{ matrix.go_version }}
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go_version }}
id: go
- name: Check out code into the Go module directory
uses: actions/checkout@v2
- name: Run go modules tidy
run: |
make tidy
- name: Run go format
run: |
make format
echo "Run go format successfully"
continue-on-error: true
# - name: Generate all necessary files, such as error code files
# run: |
# make generate
# - name: Check syntax and styling of go sources
# run: |
# set -e
# make lint
# - name: Run unit test and get test coverage
# run: |
# make cover
- name: Build source code for host platform
run: |
make build
echo "Build source code for host platform successfully"
# - name: Collect Test Coverage File
# uses: actions/upload-artifact@v1.0.0
# with:
# name: main-output
# path: _output/tmp/coverage.out
# - name: Set up Docker Buildx
# uses: docker/setup-buildx-action@v1
# lint:
# runs-on: ubuntu-20.04
# steps:
# - name: Checkout
# uses: actions/checkout@v3
# with:
# fetch-depth: 0
# - name: Set up Go
# uses: actions/setup-go@v3
# with:
# go-version: ${{ env.GO_VERSION }}
# - name: golangci-lint
# uses: golangci/golangci-lint-action@v3
# with:
# version: ${{ env.GOLANGCI_VERSION }}
# docker-image-tests:
# runs-on: ubuntu-20.04
# steps:
# - name: Checkout
# uses: actions/checkout@v3
# with:
# fetch-depth: 0
# - name: Set up Go
# uses: actions/setup-go@v3
# with:
# go-version: ${{ env.GO_VERSION }}
# - name: Run tests
# run: make build
# - name: Test docker image
# run: |
# docker build -t openim:ci-build .

@ -0,0 +1,168 @@
# Copyright © 2023 OpenIM open source community. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
name: OpenIM CI Aotu Build and Install
on:
push:
branches:
- main
paths-ignore:
- "docs/**"
- "README.md"
- "README_zh-CN.md"
- "CONTRIBUTING.md"
pull_request:
branches:
- main
paths-ignore:
- "README.md"
- "README_zh-CN.md"
- "CONTRIBUTING.md"
- "docs/**"
env:
GO_VERSION: "1.19"
GOLANGCI_VERSION: "v1.50.1"
jobs:
openim:
name: Test with go ${{ matrix.go_version }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
permissions:
# Give the default GITHUB_TOKEN write permission to commit and push the changed files back to the repository.
contents: write
environment:
name: openim
strategy:
matrix:
go_version: ["1.18","1.19","1.20"]
os: [ubuntu-latest]
steps:
- name: Set up Go ${{ matrix.go_version }}
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go_version }}
id: go
- name: Check out code into the Go module directory
uses: actions/checkout@v3
- name: Install Task
uses: arduino/setup-task@v1
with:
version: 2.x
- name: Run go modules tidy
run: |
sudo make tidy
sudo make tools.verify.go-gitlint
echo "Run go modules tidy successfully"
- name: Run go format
run: |
sudo make format
echo "Run go format successfully"
continue-on-error: true
- name: Generate all necessary files, such as error code files
run: |
make generate
echo "Generate all necessary files successfully"
continue-on-error: true
- name: Run unit test and get test coverage
run: |
make cover
echo "Run unit test and get test coverage successfully"
continue-on-error: true
- name: Build source code for host platform
run: |
sudo make build
echo "Build source code for host platform successfully"
- name: OpenIM verify copyright
run: |
sudo make verify-copyright
sudo make add-copyright
echo "OpenIM verify successfully"
continue-on-error: true
- name: Clean all build
run: |
sudo make clean
echo "Clean all build successfully"
- name: push OpenIM
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: "cicd: robot automated Change"
# commit_options: '--no-verify --signoff'
branch: main
# create_branch: true
# # Optional commit user and author settings
# commit_user_name: kubbot # defaults to "github-actions[bot]"
# commit_user_email: 3293172751ysy@gmail.com # defaults to "41898282+github-actions[bot]@users.noreply.github.com"
# commit_author: Kubbot # defaults to author of the commit that triggered the run
continue-on-error: true
- name: Set Current Directory
id: set_directory
run: |
echo "::set-output name=directory::$(pwd)"
continue-on-error: true
- name: Collect Test Coverage File
id: collect_coverage
run: |
cd ${{ steps.set_directory.outputs.directory }}
make cover
echo "::set-output name=coverage_file::./_output/tmp/coverage.out"
continue-on-error: true
- name: Display Test Coverage
run: |
echo "Test Coverage:"
cat ${{ steps.collect_coverage.outputs.coverage_file }}
continue-on-error: true
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
continue-on-error: true
openim-start:
name: Teat OpenIM make install start on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
environment:
name: openim
strategy:
matrix:
go_version: ["1.20"]
os: ["ubuntu-latest"]
steps:
- name: Set up Go ${{ matrix.go_version }}
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go_version }}
id: go
- name: Check out code into the Go module directory
uses: actions/checkout@v2
- name: Run OpenIM make install start
run: |
sudo make install

@ -1,3 +1,17 @@
# Copyright © 2023 OpenIM open source community. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# GitHub recommends pinning actions to a commit SHA.
# To get a newer version, you will need to update the SHA.
# You can also reference a tag or branch, but the action may change without warning.
@ -17,6 +31,6 @@ jobs:
steps:
- uses: alex-page/github-project-automation-plus@v0.8.3
with:
project: OpenIM 2023 Sprint 🔥
project: OpenIM-V3.1
column: In Progress
repo-token: ${{ secrets.BOT_GITHUB_TOKEN }}

@ -1,4 +1,4 @@
name: goreleaser
name: OpenIM Server Release
on:
push:
@ -8,8 +8,8 @@ on:
permissions:
contents: write
# packages: write
# issues: write
packages: write
issues: write
jobs:
goreleaser:
@ -35,3 +35,30 @@ jobs:
# Your GoReleaser Pro key, if you are using the 'goreleaser-pro'
# distribution:
# GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }}
goreleaser-check-pkgs:
runs-on: ubuntu-latest
env:
DOCKER_CLI_EXPERIMENTAL: "enabled"
needs: [ goreleaser ]
if: github.ref == 'refs/heads/main'
strategy:
matrix:
format: [ deb, rpm, apk ]
steps:
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3
with:
fetch-depth: 0
- uses: arduino/setup-task@e26d8975574116b0097a1161e0fe16ba75d84c1c # v1
with:
version: 3.x
repo-token: ${{ secrets.GITHUB_TOKEN }}
- uses: docker/setup-qemu-action@2b82ce82d56a2a04d2637cd93a637ae1b359c0a7 # v2
- uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3
with:
path: |
./_output/dist/*.deb
./_output/dist/*.rpm
./_output/dist/*.apk
key: ${{ github.ref }}
- run: task goreleaser:test:${{ matrix.format }}

@ -48,7 +48,6 @@ jobs:
sudo ./scripts/build_all_service.sh
sudo cat logs/openIM.log 2>/dev/null
shell: bash
continue-on-error: true
- name: Start all services
run: |

2
.gitignore vendored

@ -22,6 +22,7 @@ logs
.devcontainer
components
out-test
Dockerfile.cross
### Makefile ###
tmp/
@ -390,3 +391,4 @@ Sessionx.vim
# End of https://www.toptal.com/developers/gitignore/api/go,git,vim,tags,test,emacs,backup,jetbrains
.idea
dist/

@ -0,0 +1,448 @@
# This is an example .goreleaser.yml file with some sensible defaults.
# Make sure to check the documentation at https://goreleaser.com
before:
hooks:
# You may remove this if you don't use go modules.
- make tidy
- make copyright.add
# you may remove this if you don't need go generate
- go generate ./...
snapshot:
name_template: "{{ incpatch .Version }}-next"
# gomod:
# proxy: true
report_sizes: true
# metadata:
# mod_timestamp: "{{ .CommitTimestamp }}"
builds:
- binary: openim-api
id: openim-api
main: ./cmd/openim-api/main.go
goos:
- darwin
- windows
- linux
goarch:
- s390x
- mips64
- mips64le
- amd64
- ppc64le
- arm64
goarm:
- 6
- 7
- binary: openim-cmdutils
id: openim-cmdutils
main: ./cmd/openim-cmdutils/main.go
goos:
- darwin
- windows
- linux
goarch:
- s390x
- mips64
- mips64le
- amd64
- ppc64le
- arm64
goarm:
- 6
- 7
- binary: openim-crontask
id: openim-crontask
main: ./cmd/openim-crontask/main.go
goos:
- darwin
- windows
- linux
goarch:
- s390x
- mips64
- mips64le
- amd64
- ppc64le
- arm64
goarm:
- 6
- 7
- binary: openim-msggateway
id: openim-msggateway
main: ./cmd/openim-msggateway/main.go
goos:
- darwin
- windows
- linux
goarch:
- s390x
- mips64
- mips64le
- amd64
- ppc64le
- arm64
goarm:
- 6
- 7
- binary: openim-msgtransfer
id: openim-msgtransfer
main: ./cmd/openim-msgtransfer/main.go
goos:
- darwin
- windows
- linux
goarch:
- s390x
- mips64
- mips64le
- amd64
- ppc64le
- arm64
goarm:
- 6
- 7
- binary: openim-push
id: openim-push
main: ./cmd/openim-push/main.go
goos:
- darwin
- windows
- linux
goarch:
- s390x
- mips64
- mips64le
- amd64
- ppc64le
- arm64
goarm:
- 6
- 7
- binary: openim-rpc-auth
id: openim-rpc-auth
main: ./cmd/openim-rpc/openim-rpc-auth/main.go
goos:
- darwin
- windows
- linux
goarch:
- s390x
- mips64
- mips64le
- amd64
- ppc64le
- arm64
goarm:
- 6
- 7
- binary: openim-rpc-conversation
id: openim-rpc-conversation
main: ./cmd/openim-rpc/openim-rpc-conversation/main.go
goos:
- darwin
- windows
- linux
goarch:
- s390x
- mips64
- mips64le
- amd64
- ppc64le
- arm64
goarm:
- 6
- 7
- binary: openim-rpc-friend
id: openim-rpc-friend
main: ./cmd/openim-rpc/openim-rpc-friend/main.go
goos:
- darwin
- windows
- linux
goarch:
- s390x
- mips64
- mips64le
- amd64
- ppc64le
- arm64
goarm:
- 6
- 7
- binary: openim-rpc-group
id: openim-rpc-group
main: ./cmd/openim-rpc/openim-rpc-group/main.go
goos:
- darwin
- windows
- linux
goarch:
- s390x
- mips64
- mips64le
- amd64
- ppc64le
- arm64
goarm:
- 6
- 7
- binary: openim-rpc-msg
id: openim-rpc-msg
main: ./cmd/openim-rpc/openim-rpc-msg/main.go
goos:
- darwin
- windows
- linux
goarch:
- s390x
- mips64
- mips64le
- amd64
- ppc64le
- arm64
goarm:
- 6
- 7
- binary: openim-rpc-third
id: openim-rpc-third
main: ./cmd/openim-rpc/openim-rpc-third/main.go
goos:
- darwin
- windows
- linux
goarch:
- s390x
- mips64
- mips64le
- amd64
- ppc64le
- arm64
goarm:
- 6
- 7
- binary: openim-rpc-user
id: openim-rpc-user
main: ./cmd/openim-rpc/openim-rpc-user/main.go
goos:
- darwin
- windows
- linux
goarch:
- s390x
- mips64
- mips64le
- amd64
- ppc64le
- arm64
goarm:
- 6
- 7
archives:
- format: tar.gz
# this name template makes the OS and Arch compatible with the results of uname.
name_template: >-
{{ .ProjectName }}_
{{- title .Os }}_
{{- if eq .Arch "amd64" }}x86_64
{{- else if eq .Arch "386" }}i386
{{- else }}{{ .Arch }}{{ end }}
{{- if .Arm }}v{{ .Arm }}{{ end }}
# use zip for windows archives
files:
- LICENSE
- README.md
- CHANGELOG/*
- CONTRIBUTING.md
- docs/*
- src: "*.md"
dst: docs
# Strip parent folders when adding files to the archive.
strip_parent: true
# File info.
# Not all fields are supported by all formats available formats.
#
# Default: copied from the source file
info:
# Templates: allowed (since v1.14)
owner: root
# Templates: allowed (since v1.14)
group: root
# Must be in time.RFC3339Nano format.
#
# Templates: allowed (since v1.14)
mtime: "{{ .CommitDate }}"
# File mode.
mode: 0644
format_overrides:
- goos: windows
format: zip
changelog:
sort: asc
use: github
filters:
exclude:
- "^test:"
- "^chore"
- "merge conflict"
- Merge pull request
- Merge remote-tracking branch
- Merge branch
- go mod tidy
groups:
- title: Dependency updates
regexp: '^.*?(feat|fix)\(deps\)!?:.+$'
order: 300
- title: "New Features"
regexp: '^.*?feat(\([[:word:]]+\))??!?:.+$'
order: 100
- title: "Security updates"
regexp: '^.*?sec(\([[:word:]]+\))??!?:.+$'
order: 150
- title: "Bug fixes"
regexp: '^.*?fix(\([[:word:]]+\))??!?:.+$'
order: 200
- title: "Documentation updates"
regexp: ^.*?doc(\([[:word:]]+\))??!?:.+$
order: 400
- title: "Build process updates"
regexp: ^.*?build(\([[:word:]]+\))??!?:.+$
order: 400
- title: Other work
order: 9999
nfpms:
- id: packages
builds:
- openim-api
- openim-cmdutils
- openim-crontask
- openim-msggateway
- openim-msgtransfer
- openim-push
- openim-rpc-auth
- openim-rpc-conversation
- openim-rpc-friend
- openim-rpc-group
- openim-rpc-msg
- openim-rpc-third
- openim-rpc-user
# Your app's vendor.
vendor: OpenIMSDK
homepage: https://github.com/OpenIMSDK/Open-IM-Server
maintainer: kubbot <https://github.com/kubbot>
description: |-
Auto sync github labels
kubbot && openimbot
license: MIT
formats:
- apk
- deb
- rpm
- termux.deb # Since: v1.11
- archlinux # Since: v1.13
dependencies:
- git
recommends:
- golang
# The lines beneath this are called `modelines`. See `:help modeline`
# Feel free to remove those if you don't want/use them.
# yaml-language-server: $schema=https://goreleaser.com/static/schema.json
# vim: set ts=2 sw=2 tw=0 fo=cnqoj
# Default: './dist'
dist: ./_output/dist
# .goreleaser.yaml
milestones:
# You can have multiple milestone configs
-
# Repository for the milestone
# Default is extracted from the origin remote URL
repo:
owner: user
name: repo
# Whether to close the milestone
close: true
# Fail release on errors, such as missing milestone.
fail_on_error: false
# Name of the milestone
#
# Default: '{{ .Tag }}'
name_template: "Current Release"
# publishers:
# - name: "fury.io"
# ids:
# - packages
# dir: "{{ dir .ArtifactPath }}"
# cmd: |
# bash -c '
# if [[ "{{ .Tag }}" =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
# curl -F package=@{{ .ArtifactName }} https://{{ .Env.FURY_TOKEN }}@push.fury.io/{{ .Env.USERNAME }}/
# else
# echo "Skipping deployment: Non-production release detected"
# fi'
checksum:
name_template: "{{ .ProjectName }}_checksums.txt"
algorithm: sha256
release:
footer: |
**Full Changelog**: https://github.com/OpenIMSDK/Open-IM-Server/compare/{{ .PreviousTag }}...{{ .Tag }}
## Helping out
This release is only possible thanks to **all** the support of some **awesome people**!
Want to be one of them?
Contributions to this project are welcome! Please see [CONTRIBUTING.md](https://github.com/OpenIMSDK/Open-IM-Server/blob/main/CONTRIBUTING.md) for details.
<p align="center">
<a href="https://github.com/openimbot/openimbot/blob/main/assets/icon/blue%E9%80%8F%E6%98%8E.png" style="float: left; margin-right: 10px;">
<img src="https://github.com/openimbot/openimbot/blob/main/assets/icon/blue%E9%80%8F%E6%98%8E.png" width="50" height="50" />
</a>
<a href="https://www.openim.online">
<img src="https://github.com/OpenIMSDK/Open-IM-Server/blob/main/assets/logo/openim-logo.png" />
</a>
<a href="https://github.com/openimbot/openimbot/blob/main/assets/icon/red%E9%80%8F%E6%98%8E.png" style="float: right; margin-left: 10px;">
<img src="https://github.com/openimbot/openimbot/blob/main/assets/icon/red%E9%80%8F%E6%98%8E.png" width="50" height="50" />
</a>
</p>
## Contact Us
We value close connections with our users, developers, and contributors here at OpenIMSDK. With a large community and maintainer team, we're always here to help and support you. Whether you're looking to join our community or have any questions or suggestions, we welcome you to get in touch with us.
Our most recommended way to get in touch is through [Slack](https://join.slack.com/t/openimsdk/shared_invite/zt-1tmoj26uf-_FDy3dowVHBiGvLk9e5Xkg). Even if you're in China, Slack is usually not blocked by firewalls, making it an easy way to connect with us. Our Slack community is the ideal place to discuss and share ideas and suggestions with other users and developers of OpenIMSDK. You can ask technical questions, seek help, or share your experiences with other users of OpenIMSDK.
In [OpenIM community is recruiting new members! discussion](https://github.com/orgs/OpenIMSDK/discussions/426) please leave your information, convenient we will better developers around the small gift to send to your hands.
In addition to Slack, we also offer the following ways to get in touch:
+ <a href="https://join.slack.com/t/openimsdk/shared_invite/zt-1tmoj26uf-_FDy3dowVHBiGvLk9e5Xkg" target="_blank"><img src="https://img.shields.io/badge/slack-%40OpenIMSDKCore-informational?logo=slack&style=flat-square"></a>: We also have Slack channels for you to communicate and discuss. To join, visit https://slack.com/ and join our [👀 Open-IM-Server slack](https://join.slack.com/t/openimsdk/shared_invite/zt-1tmoj26uf-_FDy3dowVHBiGvLk9e5Xkg) team channel.
+ <a href="https://mail.google.com/mail/u/0/?fs=1&tf=cm&to=4closetool3@gmail.com" target="_blank"><img src="https://img.shields.io/badge/gmail-%40OOpenIMSDKCore?style=social&logo=gmail"></a>: Get in touch with us on [Gmail](winxu81@gmail.com). If you have any questions or issues that need resolving, or any suggestions and feedback for our open source projects, please feel free to contact us via email.
+ <a href="https://doc.rentsoft.cn/" target="_blank"><img src="https://img.shields.io/badge/%E5%8D%9A%E5%AE%A2-%40OpenIMSDKCore-blue?style=social&logo=Octopus%20Deploy"></a>: Read our [blog](https://doc.rentsoft.cn/). Our blog is a great place to stay up-to-date with Open-IM-Server projects and trends. On the blog, we share our latest developments, tech trends, and other interesting information.
+ <a href="https://github.com/OpenIMSDK/OpenIM-Docs/blob/main/docs/images/WechatIMG20.jpeg" target="_blank"><img src="https://img.shields.io/badge/%E5%BE%AE%E4%BF%A1-OpenIMSDKCore-brightgreen?logo=wechat&style=flat-square"></a>: Add [Wechat](https://github.com/OpenIMSDK/OpenIM-Docs/blob/main/docs/images/WechatIMG20.jpeg) and indicate that you are a user or developer of Open-IM-Server. We will process your request as soon as possible.
Whether you're looking to join our community or have any questions or suggestions, we welcome you to get in touch with us.

@ -130,7 +130,7 @@ To propose PR for the Open-IM-Server item, we assume you have registered a GitHu
```bash
git rebase upstream/main
make link # golangci-lint run -c .golangci.yml
make lint # golangci-lint run -c .golangci.yml
git add -A # add changes to staging
git commit -a -s -m "message for your changes" # -s adds a Signed-off-by trailer
```

@ -63,6 +63,11 @@ build:
multiarch:
@$(MAKE) go.build.multiarch
## install: Install deployment openim ✨
.PHONY: install
install:
@$(MAKE) go.install
## tidy: tidy go.mod ✨
.PHONY: tidy
tidy:

@ -3,6 +3,7 @@
<img src="./assets/logo-gif/openim-logo.gif" width="60%" height="30%"/>
</a>
</p>
<h3 align="center" style="border-bottom: none">
⭐️ Open source Instant Messaging Server ⭐️ <br>
<h3>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 MiB

After

Width:  |  Height:  |  Size: 2.6 MiB

@ -24,8 +24,8 @@ zookeeper:
mysql:
address: [ 127.0.0.1:13306 ] #目前仅支持单机
username: root #用户名
password: openIM123 #密码
username: root
password: openIM123
database: openIM_v3 #不建议修改
maxOpenConn: 1000 #最大连接数
maxIdleConn: 100 #最大空闲连接数
@ -37,14 +37,14 @@ mongo:
uri: #不为空则直接使用该值
address: [ 127.0.0.1:37017 ] #单机时为mongo地址使用分片集群时为mongos地址
database: openIM_v3 #mongo db 默认即可
username: root #用户名
password: openIM123 #密码
username: root
password: openIM123
maxPoolSize: 100
redis:
address: [ 127.0.0.1:16379 ] #
username: #only redis version 6.0+ need username
password: openIM123 #密码
password: openIM123
kafka:
username: #用户名
@ -77,9 +77,9 @@ object:
apiURL: "http://127.0.0.1:10002/object/" #地址需要app能访问到
minio:
bucket: "openim" #不建议修改
endpoint: "http://127.0.0.1:10005" #minio对外服务的ip和端口app要能访问此ip和端口
accessKeyID: "root" #ID
secretAccessKey: "openIM123" #秘钥
endpoint: http://116.30.3.80:10005
accessKeyID: root
secretAccessKey: openIM123
sessionToken: "" #token
cos: #tencent cos
bucketURL: "https://temp-1252357374.cos.ap-chengdu.myqcloud.com"
@ -90,7 +90,7 @@ object:
endpoint: "https://oss-cn-chengdu.aliyuncs.com"
bucket: "demo-9999999"
bucketURL: "https://demo-9999999.oss-cn-chengdu.aliyuncs.com"
accessKeyID: ""
accessKeyID: root
accessKeySecret: ""
sessionToken: ""
@ -167,7 +167,7 @@ retainChatRecords: 365 #mongo保存离线消息
chatRecordsClearTime: "0 2 * * 3" #每周三凌晨2点清理mongo中的过期超过retainChatRecords时间消息这个删除是为了清理满足上个配置retainChatRecords的过期消息不会发送通知仅仅作为清理磁盘使用
msgDestructTime: "0 2 * * *" #消息自动删除时间每天凌晨2点删除过期消息这个删除是为了删除保留时间超过超过会话字段msg_destruct_time的消息。
secret: tuoyun #秘钥获取token时校验
secret: openIM123
tokenPolicy:
expire: 90 #过期时间(天)

@ -25,7 +25,6 @@ require (
github.com/robfig/cron/v3 v3.0.1
github.com/sirupsen/logrus v1.9.2 // indirect
github.com/stretchr/testify v1.8.3
github.com/tencentyun/qcloud-cos-sts-sdk v0.0.0-20210325043845-84a0811633ca
go.mongodb.org/mongo-driver v1.8.3
golang.org/x/image v0.3.0
google.golang.org/api v0.114.0

@ -426,8 +426,6 @@ github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.194/go.mod
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/kms v1.0.194/go.mod h1:yrBKWhChnDqNz1xuXdSbWXG56XawEq0G5j1lg4VwBD4=
github.com/tencentyun/cos-go-sdk-v5 v0.7.41 h1:iU0Li/Np78H4SBna0ECQoF3mpgi6ImLXU+doGzPFXGc=
github.com/tencentyun/cos-go-sdk-v5 v0.7.41/go.mod h1:4dCEtLHGh8QPxHEkgq+nFaky7yZxQuYwgSJM87icDaw=
github.com/tencentyun/qcloud-cos-sts-sdk v0.0.0-20210325043845-84a0811633ca h1:G/aIr3WiUesWHL2YGYgEqjM5tCAJ43Ml+0C18wDkWWs=
github.com/tencentyun/qcloud-cos-sts-sdk v0.0.0-20210325043845-84a0811633ca/go.mod h1:b18KQa4IxHbxeseW1GcZox53d7J0z39VNONTxvvlkXw=
github.com/tidwall/pretty v1.0.0 h1:HsD+QiTn7sK6flMKIvNmpqz1qrpP3Ps6jOKIKMooyg4=
github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk=
github.com/twitchyliquid64/golang-asm v0.15.1 h1:SU5vSMR7hnwNxj24w34ZyCi/FmDZTkS4MhqMhdFk5YI=

@ -1,933 +0,0 @@
# Copyright © 2023 OpenIMSDK open source community. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# This file contains all available configuration options
# with their default values.
# options for analysis running
run:
# default concurrency is a available CPU number
concurrency: 4
# timeout for analysis, e.g. 30s, 5m, default is 1m
timeout: 5m
# exit code when at least one issue was found, default is 1
issues-exit-code: 1
# include test files or not, default is true
tests: true
# list of build tags, all linters use it. Default is empty list.
build-tags:
- mytag
# which dirs to skip: issues from them won't be reported;
# can use regexp here: generated.*, regexp is applied on full path;
# default value is empty list, but default dirs are skipped independently
# from this option's value (see skip-dirs-use-default).
# "/" will be replaced by current OS file path separator to properly work
# on Windows.
skip-dirs:
- util
- .*~
- api/swagger/docs
- server/docs
# default is true. Enables skipping of directories:
# vendor$, third_party$, testdata$, examples$, Godeps$, builtin$
skip-dirs-use-default: true
# which files to skip: they will be analyzed, but issues from them
# won't be reported. Default value is empty list, but there is
# no need to include all autogenerated files, we confidently recognize
# autogenerated files. If it's not please let us know.
# "/" will be replaced by current OS file path separator to properly work
# on Windows.
skip-files:
- ".*\\.my\\.go$"
- _test.go
# by default isn't set. If set we pass it to "go list -mod={option}". From "go help modules":
# If invoked with -mod=readonly, the go command is disallowed from the implicit
# automatic updating of go.mod described above. Instead, it fails when any changes
# to go.mod are needed. This setting is most useful to check that go.mod does
# not need updates, such as in a continuous integration and testing system.
# If invoked with -mod=vendor, the go command assumes that the vendor
# directory holds the correct copies of dependencies and ignores
# the dependency descriptions in go.mod.
#modules-download-mode: release|readonly|vendor
# Allow multiple parallel golangci-lint instances running.
# If false (default) - golangci-lint acquires file lock on start.
allow-parallel-runners: true
# output configuration options
output:
# colored-line-number|line-number|json|tab|checkstyle|code-climate, default is "colored-line-number"
format: colored-line-number
# print lines of code with issue, default is true
print-issued-lines: true
# print linter name in the end of issue text, default is true
print-linter-name: true
# make issues output unique by line, default is true
uniq-by-line: true
# add a prefix to the output file references; default is no prefix
path-prefix: ""
# sorts results by: filepath, line and column
sort-results: true
# all available settings of specific linters
linters-settings:
bidichk:
# The following configurations check for all mentioned invisible unicode
# runes. It can be omitted because all runes are enabled by default.
left-to-right-embedding: true
right-to-left-embedding: true
pop-directional-formatting: true
left-to-right-override: true
right-to-left-override: true
left-to-right-isolate: true
right-to-left-isolate: true
first-strong-isolate: true
pop-directional-isolate: true
dogsled:
# checks assignments with too many blank identifiers; default is 2
max-blank-identifiers: 2
dupl:
# tokens count to trigger issue, 150 by default
threshold: 100
errcheck:
# report about not checking of errors in type assertions: `a := b.(MyStruct)`;
# default is false: such cases aren't reported by default.
check-type-assertions: false
# report about assignment of errors to blank identifier: `num, _ := strconv.Atoi(numStr)`;
# default is false: such cases aren't reported by default.
check-blank: false
# [deprecated] comma-separated list of pairs of the form pkg:regex
# the regex is used to ignore names within pkg. (default "fmt:.*").
# see https://github.com/kisielk/errcheck#the-deprecated-method for details
#ignore: GenMarkdownTree,os:.*,BindPFlags,WriteTo,Help
#ignore: (os\.)?std(out|err)\..*|.*Close|.*Flush|os\.Remove(All)?|.*print(f|ln)?|os\.(Un)?Setenv
# path to a file containing a list of functions to exclude from checking
# see https://github.com/kisielk/errcheck#excluding-functions for details
#exclude: errcheck.txt
errorlint:
# Check whether fmt.Errorf uses the %w verb for formatting errors. See the readme for caveats
errorf: true
# Check for plain type assertions and type switches
asserts: true
# Check for plain error comparisons
comparison: true
exhaustive:
# check switch statements in generated files also
check-generated: false
# indicates that switch statements are to be considered exhaustive if a
# 'default' case is present, even if all enum members aren't listed in the
# switch
default-signifies-exhaustive: false
# enum members matching the supplied regex do not have to be listed in
# switch statements to satisfy exhaustiveness
ignore-enum-members: ""
# consider enums only in package scopes, not in inner scopes
package-scope-only: false
exhaustivestruct:
struct-patterns:
- '*.Test'
- '*.Test2'
- '*.Embedded'
- '*.External'
# forbidigo:
# # Forbid the following identifiers (identifiers are written using regexp):
# forbid:
# - ^print.*$
# - 'fmt\.Print.*'
# - fmt.Println.* # too much log noise
# - ginkgo\\.F.* # these are used just for local development
# # Exclude godoc examples from forbidigo checks. Default is true.
# exclude_godoc_examples: false
funlen:
lines: 150
statements: 50
gci:
# put imports beginning with prefix after 3rd-party packages;
# only support one prefix
# if not set, use goimports.local-prefixes
prefix: github.com/OpenIMSDK/OpenKF
gocognit:
# minimal code complexity to report, 30 by default (but we recommend 10-20)
min-complexity: 30
goconst:
# minimal length of string constant, 3 by default
min-len: 3
# minimal occurrences count to trigger, 3 by default
min-occurrences: 3
# ignore test files, false by default
ignore-tests: false
# look for existing constants matching the values, true by default
match-constant: true
# search also for duplicated numbers, false by default
numbers: false
# minimum value, only works with goconst.numbers, 3 by default
min: 3
# maximum value, only works with goconst.numbers, 3 by default
max: 3
# ignore when constant is not used as function argument, true by default
ignore-calls: true
gocritic:
# Which checks should be enabled; can't be combined with 'disabled-checks';
# See https://go-critic.github.io/overview#checks-overview
# To check which checks are enabled run `GL_DEBUG=gocritic golangci-lint run`
# By default list of stable checks is used.
enabled-checks:
#- rangeValCopy
- nestingreduce
- truncatecmp
- unnamedresult
- ruleguard
# Which checks should be disabled; can't be combined with 'enabled-checks'; default is empty
disabled-checks:
- regexpMust
- ifElseChain
#- exitAfterDefer
# Enable multiple checks by tags, run `GL_DEBUG=gocritic golangci-lint run` to see all tags and checks.
# Empty list by default. See https://github.com/go-critic/go-critic#usage -> section "Tags".
enabled-tags:
- performance
disabled-tags:
- experimental
# Settings passed to gocritic.
# The settings key is the name of a supported gocritic checker.
# The list of supported checkers can be find in https://go-critic.github.io/overview.
settings:
captLocal: # must be valid enabled check name
# whether to restrict checker to params only (default true)
paramsOnly: true
elseif:
# whether to skip balanced if-else pairs (default true)
skipBalanced: true
hugeParam:
# size in bytes that makes the warning trigger (default 80)
sizeThreshold: 80
nestingReduce:
# min number of statements inside a branch to trigger a warning (default 5)
bodyWidth: 5
rangeExprCopy:
# size in bytes that makes the warning trigger (default 512)
sizeThreshold: 512
# whether to check test functions (default true)
skipTestFuncs: true
rangeValCopy:
# size in bytes that makes the warning trigger (default 128)
sizeThreshold: 32
# whether to check test functions (default true)
skipTestFuncs: true
ruleguard:
# path to a gorules file for the ruleguard checker
rules: ''
truncateCmp:
# whether to skip int/uint/uintptr types (default true)
skipArchDependent: true
underef:
# whether to skip (*x).method() calls where x is a pointer receiver (default true)
skipRecvDeref: true
unnamedResult:
# whether to check exported functions
checkExported: true
gocyclo:
# minimal code complexity to report, 30 by default (but we recommend 10-20)
min-complexity: 30
cyclop:
# the maximal code complexity to report
max-complexity: 50
# the maximal average package complexity. If it's higher than 0.0 (float) the check is enabled (default 0.0)
package-average: 0.0
# should ignore tests (default false)
skip-tests: false
godot:
# comments to be checked: `declarations`, `toplevel`, or `all`
scope: declarations
# list of regexps for excluding particular comment lines from check
exclude:
# example: exclude comments which contain numbers
# - '[0-9]+'
# check that each sentence starts with a capital letter
capital: false
godox:
# report any comments starting with keywords, this is useful for TODO or FIXME comments that
# might be left in the code accidentally and should be resolved before merging
keywords: # default keywords are TODO, BUG, and FIXME, these can be overwritten by this setting
#- TODO
- BUG
- FIXME
#- NOTE
- OPTIMIZE # marks code that should be optimized before merging
- HACK # marks hack-arounds that should be removed before merging
gofmt:
# simplify code: gofmt with `-s` option, true by default
simplify: true
gofumpt:
# Select the Go version to target. The default is `1.18`.
lang-version: "1.20"
# Choose whether or not to use the extra rules that are disabled
# by default
extra-rules: false
goheader:
values:
const:
# define here const type values in format k:v, for example:
# COMPANY: MY COMPANY
regexp:
# define here regexp type values, for example
# AUTHOR: .*@mycompany\.com
template: # |-
# put here copyright header template for source code files, for example:
# Note: {{ YEAR }} is a builtin value that returns the year relative to the current machine time.
#
# {{ AUTHOR }} {{ COMPANY }} {{ YEAR }}
# SPDX-License-Identifier: Apache-2.0
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at:
# http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
template-path:
# also as alternative of directive 'template' you may put the path to file with the template source
goimports:
# put imports beginning with prefix after 3rd-party packages;
# it's a comma-separated list of prefixes
local-prefixes: github.com/OpenIMSDK/OpenKF
golint:
# minimal confidence for issues, default is 0.8
min-confidence: 0.9
gomnd:
settings:
mnd:
# the list of enabled checks, see https://github.com/tommy-muehle/go-mnd/#checks for description.
checks: argument,case,condition,operation,return,assign
# ignored-numbers: 1000
# ignored-files: magic_.*.go
# ignored-functions: math.*
gomoddirectives:
# Allow local `replace` directives. Default is false.
replace-local: true
# List of allowed `replace` directives. Default is empty.
replace-allow-list:
- google.golang.org/grpc
# Allow to not explain why the version has been retracted in the `retract` directives. Default is false.
retract-allow-no-explanation: false
# Forbid the use of the `exclude` directives. Default is false.
exclude-forbidden: false
gomodguard:
allowed:
modules: # List of allowed modules
- gorm.io/gorm
- gorm.io/driver/mysql
- k8s.io/klog
# - gopkg.in/yaml.v2
domains: # List of allowed module domains
- google.golang.org
- gopkg.in
- golang.org
- github.com
- go.uber.org
- go.etcd.io
blocked:
versions:
- github.com/MakeNowJust/heredoc:
version: "> 2.0.9"
reason: "use the latest version"
local_replace_directives: false # Set to true to raise lint issues for packages that are loaded from a local path via replace directive
gosec:
# To select a subset of rules to run.
# Available rules: https://github.com/securego/gosec#available-rules
includes:
- G401
- G306
- G101
# To specify a set of rules to explicitly exclude.
# Available rules: https://github.com/securego/gosec#available-rules
excludes:
- G204
# Exclude generated files
exclude-generated: true
# Filter out the issues with a lower severity than the given value. Valid options are: low, medium, high.
severity: "low"
# Filter out the issues with a lower confidence than the given value. Valid options are: low, medium, high.
confidence: "low"
# To specify the configuration of rules.
# The configuration of rules is not fully documented by gosec:
# https://github.com/securego/gosec#configuration
# https://github.com/securego/gosec/blob/569328eade2ccbad4ce2d0f21ee158ab5356a5cf/rules/rulelist.go#L60-L102
config:
G306: "0600"
G101:
pattern: "(?i)example"
ignore_entropy: false
entropy_threshold: "80.0"
per_char_threshold: "3.0"
truncate: "32"
gosimple:
# Select the Go version to target. The default is '1.13'.
go: "1.20"
# https://staticcheck.io/docs/options#checks
checks: [ "all" ]
govet:
# report about shadowed variables
check-shadowing: true
# settings per analyzer
settings:
printf: # analyzer name, run `go tool vet help` to see all analyzers
funcs: # run `go tool vet help printf` to see available settings for `printf` analyzer
- (github.com/golangci/golangci-lint/pkg/logutils.Log).Infof
- (github.com/golangci/golangci-lint/pkg/logutils.Log).Warnf
- (github.com/golangci/golangci-lint/pkg/logutils.Log).Errorf
- (github.com/golangci/golangci-lint/pkg/logutils.Log).Fatalf
# enable or disable analyzers by name
enable:
- atomicalign
enable-all: false
disable:
- shadow
disable-all: false
# depguard:
# list-type: blacklist
# include-go-root: false
# packages:
# - github.com/Sirupsen/logrus
# packages-with-error-message:
# # specify an error message to output when a blacklisted package is used
# - github.com/Sirupsen/logrus: "logging is allowed only by logutils.Log"
ifshort:
# Maximum length of variable declaration measured in number of lines, after which linter won't suggest using short syntax.
# Has higher priority than max-decl-chars.
max-decl-lines: 1
# Maximum length of variable declaration measured in number of characters, after which linter won't suggest using short syntax.
max-decl-chars: 30
importas:
# if set to `true`, force to use alias.
no-unaliased: true
# List of aliases
alias:
# using `servingv1` alias for `knative.dev/serving/pkg/apis/serving/v1` package
- pkg: knative.dev/serving/pkg/apis/serving/v1
alias: servingv1
# using `autoscalingv1alpha1` alias for `knative.dev/serving/pkg/apis/autoscaling/v1alpha1` package
- pkg: knative.dev/serving/pkg/apis/autoscaling/v1alpha1
alias: autoscalingv1alpha1
# You can specify the package path by regular expression,
# and alias by regular expression expansion syntax like below.
# see https://github.com/julz/importas#use-regular-expression for details
- pkg: knative.dev/serving/pkg/apis/(\w+)/(v[\w\d]+)
alias: $1$2
# using `jwt` alias for `github.com/appleboy/gin-jwt/v2` package
jwt: github.com/appleboy/gin-jwt/v2
ireturn:
# ireturn allows using `allow` and `reject` settings at the same time.
# Both settings are lists of the keywords and regular expressions matched to interface or package names.
# keywords:
# - `empty` for `interface{}`
# - `error` for errors
# - `stdlib` for standard library
# - `anon` for anonymous interfaces
# By default, it allows using errors, empty interfaces, anonymous interfaces,
# and interfaces provided by the standard library.
allow:
- anon
- error
- empty
- stdlib
# You can specify idiomatic endings for interface
- (or|er)$
# Reject patterns
reject:
- github.com\/user\/package\/v4\.Type
lll:
# max line length, lines longer will be reported. Default is 120.
# '\t' is counted as 1 character by default, and can be changed with the tab-width option
line-length: 240
# tab width in spaces. Default to 1.
tab-width: 4
maligned:
# print struct with more effective memory layout or not, false by default
suggest-new: true
misspell:
# Correct spellings using locale preferences for US or UK.
# Default is to use a neutral variety of English.
# Setting locale to US will correct the British spelling of 'colour' to 'color'.
locale: US
ignore-words:
- someword
nakedret:
# make an issue if func has more lines of code than this setting and it has naked returns; default is 30
max-func-lines: 30
nestif:
# minimal complexity of if statements to report, 5 by default
min-complexity: 4
nilnil:
# By default, nilnil checks all returned types below.
checked-types:
- ptr
- func
- iface
- map
- chan
nlreturn:
# size of the block (including return statement that is still "OK")
# so no return split required.
block-size: 1
nolintlint:
# Disable to ensure that all nolint directives actually have an effect. Default is true.
allow-unused: false
# Disable to ensure that nolint directives don't have a leading space. Default is true.
allow-leading-space: true
# Exclude following linters from requiring an explanation. Default is [].
allow-no-explanation: [ ]
# Enable to require an explanation of nonzero length after each nolint directive. Default is false.
require-explanation: false
# Enable to require nolint directives to mention the specific linter being suppressed. Default is false.
require-specific: true
prealloc:
# XXX: we don't recommend using this linter before doing performance profiling.
# For most programs usage of prealloc will be a premature optimization.
# Report preallocation suggestions only on simple loops that have no returns/breaks/continues/gotos in them.
# True by default.
simple: true
range-loops: true # Report preallocation suggestions on range loops, true by default
for-loops: false # Report preallocation suggestions on for loops, false by default
promlinter:
# Promlinter cannot infer all metrics name in static analysis.
# Enable strict mode will also include the errors caused by failing to parse the args.
strict: false
# Please refer to https://github.com/yeya24/promlinter#usage for detailed usage.
disabled-linters:
# - "Help"
# - "MetricUnits"
# - "Counter"
# - "HistogramSummaryReserved"
# - "MetricTypeInName"
# - "ReservedChars"
# - "CamelCase"
# - "lintUnitAbbreviations"
predeclared:
# comma-separated list of predeclared identifiers to not report on
ignore: ""
# include method names and field names (i.e., qualified names) in checks
q: false
rowserrcheck:
packages:
- github.com/jmoiron/sqlx
revive:
# see https://github.com/mgechev/revive#available-rules for details.
ignore-generated-header: true
severity: warning
rules:
- name: indent-error-flow
severity: warning
staticcheck:
# Select the Go version to target. The default is '1.13'.
go: "1.16"
# https://staticcheck.io/docs/options#checks
checks: [ "all" ]
stylecheck:
# Select the Go version to target. The default is '1.13'.
go: "1.16"
# https://staticcheck.io/docs/options#checks
checks: [ "all", "-ST1000", "-ST1003", "-ST1016", "-ST1020", "-ST1021", "-ST1022" ]
# https://staticcheck.io/docs/options#dot_import_whitelist
dot-import-whitelist:
- fmt
# https://staticcheck.io/docs/options#initialisms
initialisms: [ "ACL", "API", "ASCII", "CPU", "CSS", "DNS", "EOF", "GUID", "HTML", "HTTP", "HTTPS", "ID", "IP", "JSON", "QPS", "RAM", "RPC", "SLA", "SMTP", "SQL", "SSH", "TCP", "TLS", "TTL", "UDP", "UI", "GID", "UID", "UUID", "URI", "URL", "UTF8", "VM", "XML", "XMPP", "XSRF", "XSS" ]
# https://staticcheck.io/docs/options#http_status_code_whitelist
http-status-code-whitelist: [ "200", "400", "404", "500" ]
tagliatelle:
# check the struck tag name case
case:
# use the struct field name to check the name of the struct tag
use-field-name: true
rules:
# any struct tag type can be used.
# support string case: `camel`, `pascal`, `kebab`, `snake`, `goCamel`, `goPascal`, `goKebab`, `goSnake`, `upper`, `lower`
json: camel
yaml: camel
xml: camel
bson: camel
avro: snake
mapstructure: kebab
testpackage:
# regexp pattern to skip files
skip-regexp: (id|export|internal)_test\.go
thelper:
# The following configurations enable all checks. It can be omitted because all checks are enabled by default.
# You can enable only required checks deleting unnecessary checks.
test:
first: true
name: true
begin: true
benchmark:
first: true
name: true
begin: true
tb:
first: true
name: true
begin: true
tenv:
# The option `all` will run against whole test files (`_test.go`) regardless of method/function signatures.
# By default, only methods that take `*testing.T`, `*testing.B`, and `testing.TB` as arguments are checked.
all: false
unparam:
# Inspect exported functions, default is false. Set to true if no external program/library imports your code.
# XXX: if you enable this setting, unparam will report a lot of false-positives in text editors:
# if it's called for subdir of a project it can't find external interfaces. All text editor integrations
# with golangci-lint call it on a directory with the changed file.
check-exported: false
unused:
# treat code as a program (not a library) and report unused exported identifiers; default is false.
# XXX: if you enable this setting, unused will report a lot of false-positives in text editors:
# if it's called for subdir of a project it can't find funcs usages. All text editor integrations
# with golangci-lint call it on a directory with the changed file.
check-exported: false
whitespace:
multi-if: false # Enforces newlines (or comments) after every multi-line if statement
multi-func: false # Enforces newlines (or comments) after every multi-line function signature
wrapcheck:
# An array of strings that specify substrings of signatures to ignore.
# If this set, it will override the default set of ignored signatures.
# See https://github.com/tomarrell/wrapcheck#configuration for more information.
ignoreSigs:
- .Errorf(
- errors.New(
- errors.Unwrap(
- .Wrap(
- .Wrapf(
- .WithMessage(
- .WithMessagef(
- .WithStack(
ignorePackageGlobs:
- encoding/*
- github.com/pkg/*
wsl:
# If true append is only allowed to be cuddled if appending value is
# matching variables, fields or types on line above. Default is true.
strict-append: true
# Allow calls and assignments to be cuddled as long as the lines have any
# matching variables, fields or types. Default is true.
allow-assign-and-call: true
# Allow assignments to be cuddled with anything. Default is false.
allow-assign-and-anything: false
# Allow multiline assignments to be cuddled. Default is true.
allow-multiline-assign: true
# Allow declarations (var) to be cuddled.
allow-cuddle-declarations: false
# Allow trailing comments in ending of blocks
allow-trailing-comment: false
# Force newlines in end of case at this limit (0 = never).
force-case-trailing-whitespace: 0
# Force cuddling of err checks with err var assignment
force-err-cuddling: false
# Allow leading comments to be separated with empty liens
allow-separated-leading-comment: false
makezero:
# Allow only slices initialized with a length of zero. Default is false.
always: false
# The custom section can be used to define linter plugins to be loaded at runtime. See README doc
# for more info.
#custom:
# Each custom linter should have a unique name.
#example:
# The path to the plugin *.so. Can be absolute or local. Required for each custom linter
#path: /path/to/example.so
# The description of the linter. Optional, just for documentation purposes.
#description: This is an example usage of a plugin linter.
# Intended to point to the repo location of the linter. Optional, just for documentation purposes.
#original-url: github.com/golangci/example-linter
linters:
# please, do not use `enable-all`: it's deprecated and will be removed soon.
# inverted configuration with `enable-all` and `disable` is not scalable during updates of golangci-lint
# enable-all: true
disable-all: true
enable:
- typecheck
- asciicheck
- bodyclose
- cyclop
- deadcode
# - depguard
- dogsled
- dupl
- durationcheck
- errcheck
- errorlint
- exhaustive
- exportloopref
# - forbidigo
- funlen
# - gci
# - gochecknoinits
- gocognit
- goconst
- gocyclo
- godot
- godox
- gofmt
- gofumpt
- goheader
- goimports
- gomoddirectives
- gomodguard
- goprintffuncname
- gosec
- gosimple
- govet
- ifshort
- importas
- ineffassign
- lll
- makezero
- misspell
- nakedret
- nestif
- nilerr
- nlreturn
- noctx
- nolintlint
- paralleltest
- prealloc
- predeclared
- promlinter
- revive
- rowserrcheck
- sqlclosecheck
- staticcheck
- structcheck
- stylecheck
- thelper
- tparallel
- unconvert
- unparam
- unused
- varcheck
- wastedassign
- whitespace
- bidichk
- wastedassign
- golint
- execinquery
- nosprintfhostport
- grouper
- decorder
- errchkjson
- maintidx
#- containedctx
#- tagliatelle
#- nonamedreturns
#- nilnil
#- tenv
#- varnamelen
#- contextcheck
#- errname
#- ForceTypeAssert
#- nilassign
fast: false
issues:
# List of regexps of issue texts to exclude, empty list by default.
# But independently from this option we use default exclude patterns,
# it can be disabled by `exclude-use-default: false`. To list all
# excluded by default patterns execute `golangci-lint run --help`
exclude:
- tools/.*
- test/.*
- third_party/.*
# Excluding configuration per-path, per-linter, per-text and per-source
exclude-rules:
- linters:
- golint
path: (internal/api/.*)\.go # exclude golint for internal/api/... files
- linters:
- revive
path: (log/.*)\.go
- linters:
- wrapcheck
path: (cmd/.*|pkg/.*)\.go
- linters:
- typecheck
#path: (pkg/storage/.*)\.go
path: (internal/.*|pkg/.*)\.go
- path: (cmd/.*|test/.*|tools/.*|internal/pump/pumps/.*)\.go
linters:
- forbidigo
- path: (cmd/[a-z]*/.*|store/.*)\.go
linters:
- dupl
- linters:
- gocritic
text: (hugeParam:|rangeValCopy:)
- path: (cmd/[a-z]*/.*)\.go
linters:
- lll
- path: (validator/.*|code/.*|validator/.*|watcher/watcher/.*)
linters:
- gochecknoinits
- path: (internal/.*/options|internal/pump|pkg/log/options.go|internal/authzserver|tools/)
linters:
- tagliatelle
- path: (pkg/app/.*)\.go
linters:
- deadcode
- unused
- varcheck
- forbidigo
# Exclude some staticcheck messages
- linters:
- staticcheck
text: "SA9003:"
# Exclude lll issues for long lines with go:generate
- linters:
- lll
source: "^//go:generate "
# Independently from option `exclude` we use default exclude patterns,
# it can be disabled by this option. To list all
# excluded by default patterns execute `golangci-lint run --help`.
# Default value for this option is true.
exclude-use-default: true
# The default value is false. If set to true exclude and exclude-rules
# regular expressions become case sensitive.
exclude-case-sensitive: false
# The list of ids of default excludes to include or disable. By default it's empty.
include:
- EXC0002 # disable excluding of issues about comments from golint
# Maximum issues count per one linter. Set to 0 to disable. Default is 50.
max-issues-per-linter: 0
# Maximum count of issues with the same text. Set to 0 to disable. Default is 3.
max-same-issues: 0
# Show only new issues: if there are unstaged changes or untracked files,
# only those changes are analyzed, else only changes in HEAD~ are analyzed.
# It's a super-useful option for integration of golangci-lint into existing
# large codebase. It's not practical to fix all existing issues at the moment
# of integration: much better don't allow issues in new code.
# Default is false.
new: false
# Show only new issues created after git revision `REV`
# new-from-rev: REV
# Show only new issues created in git patch with set file path.
#new-from-patch: path/to/patch/file
# Fix found issues (if it's supported by the linter)
fix: true
severity:
# Default value is empty string.
# Set the default severity for issues. If severity rules are defined and the issues
# do not match or no severity is provided to the rule this will be the default
# severity applied. Severities should match the supported severity names of the
# selected out format.
# - Code climate: https://docs.codeclimate.com/docs/issues#issue-severity
# - Checkstyle: https://checkstyle.sourceforge.io/property_types.html#severity
# - Github: https://help.github.com/en/actions/reference/workflow-commands-for-github-actions#setting-an-error-message
default-severity: error
# The default value is false.
# If set to true severity-rules regular expressions become case sensitive.
case-sensitive: false
# Default value is empty list.
# When a list of severity rules are provided, severity information will be added to lint
# issues. Severity rules have the same filtering capability as exclude rules except you
# are allowed to specify one matcher per severity rule.
# Only affects out formats that support setting severity information.
rules:
- linters:
- dupl
severity: info

@ -1,5 +1,14 @@
#!/usr/bin/env bash
mark=''
for ((ratio=0;${ratio}<=100;ratio+=5))
do
sleep 0.2
printf "progress:[%-40s]%d%%\r" "${mark}" "${ratio}"
mark="##${mark}"
done
echo
set -e
# Change directory to the 'scripts' folder

@ -1,21 +0,0 @@
#!/usr/bin/env bash
internet_ip=`curl ifconfig.me -s`
echo $internet_ip
source .env
echo $MINIO_ENDPOINT
if [ $MINIO_ENDPOINT == "http://127.0.0.1:10005" ]; then
sed -i "s/127.0.0.1/${internet_ip}/" .env
fi
cd scripts ;
chmod +x *.sh ;
./init_pwd.sh
./env_check.sh;
cd .. ;
docker-compose -f im-compose.yaml up -d
docker ps

@ -1,43 +0,0 @@
#!/usr/bin/env bash
# Get the public internet IP address
internet_ip=$(curl ifconfig.me -s)
echo $internet_ip
# Load environment variables from .env file
source .env
echo $MINIO_ENDPOINT
# Replace local IP address with the public IP address in .env file
if [ $API_URL == "http://127.0.0.1:10002/object/" ]; then
sed -i "s/127.0.0.1/${internet_ip}/" .env
fi
if [ $MINIO_ENDPOINT == "http://127.0.0.1:10005" ]; then
sed -i "s/127.0.0.1/${internet_ip}/" .env
fi
# Change directory to scripts folder
cd scripts
chmod +x *.sh
# Execute necessary scripts
./init_pwd.sh
./env_check.sh
# Go back to the previous directory
cd ..
# Check if docker-compose command is available
if command -v docker-compose &> /dev/null
then
docker-compose up -d
else
docker compose up -d
fi
# Change directory to scripts folder again
cd scripts
# Check docker services
./docker_check_service.sh

@ -250,7 +250,6 @@ func (m *MessageApi) BatchSendMsg(c *gin.Context) {
return
}
var recvIDs []string
var err error
if req.IsSendAll {

@ -84,7 +84,13 @@ func (u *UserApi) GetUsersOnlineStatus(c *gin.Context) {
reply, err := msgClient.GetUsersOnlineStatus(c, &req)
if err != nil {
log.ZWarn(c, "GetUsersOnlineStatus rpc err", err)
continue
parseError := apiresp.ParseError(err)
log.ZDebug(c, "errcode bantanger", "errcode", parseError.ErrCode)
if parseError.ErrCode == errs.NoPermissionError {
apiresp.GinError(c, err)
return
}
} else {
wsResult = append(wsResult, reply.SuccessResult...)
}

@ -18,6 +18,8 @@ import (
"context"
"github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/cache"
"github.com/OpenIMSDK/Open-IM-Server/pkg/common/tokenverify"
"github.com/OpenIMSDK/Open-IM-Server/pkg/errs"
"google.golang.org/grpc"
@ -82,6 +84,9 @@ func (s *Server) GetUsersOnlineStatus(
ctx context.Context,
req *msggateway.GetUsersOnlineStatusReq,
) (*msggateway.GetUsersOnlineStatusResp, error) {
if !tokenverify.IsAppManagerUid(ctx) {
return nil, errs.ErrNoPermission.Wrap("only app manager")
}
var resp msggateway.GetUsersOnlineStatusResp
for _, userID := range req.UserIDs {
clients, ok := s.LongConnServer.GetUserAllCons(userID)

@ -16,6 +16,7 @@ package msg
import (
"context"
"github.com/OpenIMSDK/Open-IM-Server/pkg/common/constant"
"github.com/OpenIMSDK/Open-IM-Server/pkg/common/log"
"github.com/OpenIMSDK/Open-IM-Server/pkg/common/mcontext"

@ -33,7 +33,7 @@ type SendMsg struct {
}
type SendMsgReq struct {
RecvID string `json:"recvID" binding:"required_if" message:"recvID is required if sessionType is SingleChatType or NotificationChatType"`
RecvID string `json:"recvID" binding:"required_if" message:"recvID is required if sessionType is SingleChatType or NotificationChatType"`
SendMsg
}

@ -40,9 +40,9 @@ type UserDatabase interface {
Page(ctx context.Context, pageNumber, showNumber int32) (users []*relation.UserModel, count int64, err error)
// 只要有一个存在就为true
IsExist(ctx context.Context, userIDs []string) (exist bool, err error)
//获取所有用户ID
// 获取所有用户ID
GetAllUserID(ctx context.Context, pageNumber, showNumber int32) ([]string, error)
//函数内部先查询db中是否存在存在则什么都不做不存在则插入
// 函数内部先查询db中是否存在存在则什么都不做不存在则插入
InitOnce(ctx context.Context, users []*relation.UserModel) (err error)
// 获取用户总数
CountTotal(ctx context.Context, before *time.Time) (int64, error)

@ -83,7 +83,7 @@ func (u *UserGorm) Page(
return
}
// 获取所有用户ID
// 获取所有用户ID.
func (u *UserGorm) GetAllUserID(ctx context.Context, pageNumber, showNumber int32) (userIDs []string, err error) {
return userIDs, errs.Wrap(u.db(ctx).Limit(int(showNumber)).Offset(int((pageNumber-1)*showNumber)).Pluck("user_id", &userIDs).Error)
}

@ -97,7 +97,6 @@ func (s *ZkClient) GetConnsRemote(serviceName string) (conns []resolver.Address,
func (s *ZkClient) GetConns(ctx context.Context, serviceName string, opts ...grpc.DialOption) ([]grpc.ClientConnInterface, error) {
s.logger.Printf("get conns from client, serviceName: %s", serviceName)
opts = append(s.options, opts...)
s.lock.Lock()
defer s.lock.Unlock()
conns := s.localConns[serviceName]

@ -22,13 +22,14 @@ package auth
import (
context "context"
reflect "reflect"
sync "sync"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (
@ -43,9 +44,9 @@ type UserTokenReq struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Secret string `protobuf:"bytes,1,opt,name=secret,proto3" json:"secret"`
Secret string `protobuf:"bytes,1,opt,name=secret,proto3" json:"secret"`
PlatformID int32 `protobuf:"varint,2,opt,name=platformID,proto3" json:"platformID"`
UserID string `protobuf:"bytes,3,opt,name=userID,proto3" json:"userID"`
UserID string `protobuf:"bytes,3,opt,name=userID,proto3" json:"userID"`
}
func (x *UserTokenReq) Reset() {
@ -106,7 +107,7 @@ type UserTokenResp struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Token string `protobuf:"bytes,2,opt,name=token,proto3" json:"token"`
Token string `protobuf:"bytes,2,opt,name=token,proto3" json:"token"`
ExpireTimeSeconds int64 `protobuf:"varint,3,opt,name=expireTimeSeconds,proto3" json:"expireTimeSeconds"`
}
@ -162,7 +163,7 @@ type ForceLogoutReq struct {
unknownFields protoimpl.UnknownFields
PlatformID int32 `protobuf:"varint,1,opt,name=platformID,proto3" json:"platformID"`
UserID string `protobuf:"bytes,2,opt,name=userID,proto3" json:"userID"`
UserID string `protobuf:"bytes,2,opt,name=userID,proto3" json:"userID"`
}
func (x *ForceLogoutReq) Reset() {
@ -301,8 +302,8 @@ type ParseTokenResp struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
UserID string `protobuf:"bytes,1,opt,name=userID,proto3" json:"userID"`
Platform string `protobuf:"bytes,2,opt,name=platform,proto3" json:"platform"`
UserID string `protobuf:"bytes,1,opt,name=userID,proto3" json:"userID"`
Platform string `protobuf:"bytes,2,opt,name=platform,proto3" json:"platform"`
ExpireTimeSeconds int64 `protobuf:"varint,4,opt,name=expireTimeSeconds,proto3" json:"expireTimeSeconds"`
}

@ -22,14 +22,16 @@ package conversation
import (
context "context"
wrapperspb "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/wrapperspb"
reflect "reflect"
sync "sync"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
wrapperspb "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/wrapperspb"
)
const (
@ -44,23 +46,23 @@ type Conversation struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
OwnerUserID string `protobuf:"bytes,1,opt,name=ownerUserID,proto3" json:"ownerUserID"`
ConversationID string `protobuf:"bytes,2,opt,name=conversationID,proto3" json:"conversationID"`
RecvMsgOpt int32 `protobuf:"varint,3,opt,name=recvMsgOpt,proto3" json:"recvMsgOpt"`
ConversationType int32 `protobuf:"varint,4,opt,name=conversationType,proto3" json:"conversationType"`
UserID string `protobuf:"bytes,5,opt,name=userID,proto3" json:"userID"`
GroupID string `protobuf:"bytes,6,opt,name=groupID,proto3" json:"groupID"`
IsPinned bool `protobuf:"varint,7,opt,name=isPinned,proto3" json:"isPinned"`
AttachedInfo string `protobuf:"bytes,8,opt,name=attachedInfo,proto3" json:"attachedInfo"`
IsPrivateChat bool `protobuf:"varint,9,opt,name=isPrivateChat,proto3" json:"isPrivateChat"`
GroupAtType int32 `protobuf:"varint,10,opt,name=groupAtType,proto3" json:"groupAtType"`
Ex string `protobuf:"bytes,11,opt,name=ex,proto3" json:"ex"`
BurnDuration int32 `protobuf:"varint,12,opt,name=burnDuration,proto3" json:"burnDuration"`
MinSeq int64 `protobuf:"varint,13,opt,name=minSeq,proto3" json:"minSeq"`
MaxSeq int64 `protobuf:"varint,14,opt,name=maxSeq,proto3" json:"maxSeq"`
MsgDestructTime int64 `protobuf:"varint,15,opt,name=msgDestructTime,proto3" json:"msgDestructTime"`
OwnerUserID string `protobuf:"bytes,1,opt,name=ownerUserID,proto3" json:"ownerUserID"`
ConversationID string `protobuf:"bytes,2,opt,name=conversationID,proto3" json:"conversationID"`
RecvMsgOpt int32 `protobuf:"varint,3,opt,name=recvMsgOpt,proto3" json:"recvMsgOpt"`
ConversationType int32 `protobuf:"varint,4,opt,name=conversationType,proto3" json:"conversationType"`
UserID string `protobuf:"bytes,5,opt,name=userID,proto3" json:"userID"`
GroupID string `protobuf:"bytes,6,opt,name=groupID,proto3" json:"groupID"`
IsPinned bool `protobuf:"varint,7,opt,name=isPinned,proto3" json:"isPinned"`
AttachedInfo string `protobuf:"bytes,8,opt,name=attachedInfo,proto3" json:"attachedInfo"`
IsPrivateChat bool `protobuf:"varint,9,opt,name=isPrivateChat,proto3" json:"isPrivateChat"`
GroupAtType int32 `protobuf:"varint,10,opt,name=groupAtType,proto3" json:"groupAtType"`
Ex string `protobuf:"bytes,11,opt,name=ex,proto3" json:"ex"`
BurnDuration int32 `protobuf:"varint,12,opt,name=burnDuration,proto3" json:"burnDuration"`
MinSeq int64 `protobuf:"varint,13,opt,name=minSeq,proto3" json:"minSeq"`
MaxSeq int64 `protobuf:"varint,14,opt,name=maxSeq,proto3" json:"maxSeq"`
MsgDestructTime int64 `protobuf:"varint,15,opt,name=msgDestructTime,proto3" json:"msgDestructTime"`
LatestMsgDestructTime int64 `protobuf:"varint,16,opt,name=latestMsgDestructTime,proto3" json:"latestMsgDestructTime"`
IsMsgDestruct bool `protobuf:"varint,17,opt,name=isMsgDestruct,proto3" json:"isMsgDestruct"`
IsMsgDestruct bool `protobuf:"varint,17,opt,name=isMsgDestruct,proto3" json:"isMsgDestruct"`
}
func (x *Conversation) Reset() {
@ -219,21 +221,21 @@ type ConversationReq struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
ConversationID string `protobuf:"bytes,1,opt,name=conversationID,proto3" json:"conversationID"`
ConversationID string `protobuf:"bytes,1,opt,name=conversationID,proto3" json:"conversationID"`
ConversationType int32 `protobuf:"varint,2,opt,name=conversationType,proto3" json:"conversationType"`
UserID string `protobuf:"bytes,3,opt,name=userID,proto3" json:"userID"`
GroupID string `protobuf:"bytes,4,opt,name=groupID,proto3" json:"groupID"`
RecvMsgOpt *wrapperspb.Int32Value `protobuf:"bytes,5,opt,name=recvMsgOpt,proto3" json:"recvMsgOpt"`
IsPinned *wrapperspb.BoolValue `protobuf:"bytes,6,opt,name=isPinned,proto3" json:"isPinned"`
AttachedInfo *wrapperspb.StringValue `protobuf:"bytes,7,opt,name=attachedInfo,proto3" json:"attachedInfo"`
IsPrivateChat *wrapperspb.BoolValue `protobuf:"bytes,8,opt,name=isPrivateChat,proto3" json:"isPrivateChat"`
Ex *wrapperspb.StringValue `protobuf:"bytes,9,opt,name=ex,proto3" json:"ex"`
BurnDuration *wrapperspb.Int32Value `protobuf:"bytes,10,opt,name=burnDuration,proto3" json:"burnDuration"`
MinSeq *wrapperspb.Int64Value `protobuf:"bytes,11,opt,name=minSeq,proto3" json:"minSeq"`
MaxSeq *wrapperspb.Int64Value `protobuf:"bytes,12,opt,name=maxSeq,proto3" json:"maxSeq"`
GroupAtType *wrapperspb.Int32Value `protobuf:"bytes,13,opt,name=groupAtType,proto3" json:"groupAtType"`
MsgDestructTime *wrapperspb.Int64Value `protobuf:"bytes,14,opt,name=msgDestructTime,proto3" json:"msgDestructTime"`
IsMsgDestruct *wrapperspb.BoolValue `protobuf:"bytes,15,opt,name=isMsgDestruct,proto3" json:"isMsgDestruct"`
UserID string `protobuf:"bytes,3,opt,name=userID,proto3" json:"userID"`
GroupID string `protobuf:"bytes,4,opt,name=groupID,proto3" json:"groupID"`
RecvMsgOpt *wrapperspb.Int32Value `protobuf:"bytes,5,opt,name=recvMsgOpt,proto3" json:"recvMsgOpt"`
IsPinned *wrapperspb.BoolValue `protobuf:"bytes,6,opt,name=isPinned,proto3" json:"isPinned"`
AttachedInfo *wrapperspb.StringValue `protobuf:"bytes,7,opt,name=attachedInfo,proto3" json:"attachedInfo"`
IsPrivateChat *wrapperspb.BoolValue `protobuf:"bytes,8,opt,name=isPrivateChat,proto3" json:"isPrivateChat"`
Ex *wrapperspb.StringValue `protobuf:"bytes,9,opt,name=ex,proto3" json:"ex"`
BurnDuration *wrapperspb.Int32Value `protobuf:"bytes,10,opt,name=burnDuration,proto3" json:"burnDuration"`
MinSeq *wrapperspb.Int64Value `protobuf:"bytes,11,opt,name=minSeq,proto3" json:"minSeq"`
MaxSeq *wrapperspb.Int64Value `protobuf:"bytes,12,opt,name=maxSeq,proto3" json:"maxSeq"`
GroupAtType *wrapperspb.Int32Value `protobuf:"bytes,13,opt,name=groupAtType,proto3" json:"groupAtType"`
MsgDestructTime *wrapperspb.Int64Value `protobuf:"bytes,14,opt,name=msgDestructTime,proto3" json:"msgDestructTime"`
IsMsgDestruct *wrapperspb.BoolValue `protobuf:"bytes,15,opt,name=isMsgDestruct,proto3" json:"isMsgDestruct"`
}
func (x *ConversationReq) Reset() {
@ -464,7 +466,7 @@ type GetConversationReq struct {
unknownFields protoimpl.UnknownFields
ConversationID string `protobuf:"bytes,1,opt,name=conversationID,proto3" json:"conversationID"`
OwnerUserID string `protobuf:"bytes,2,opt,name=ownerUserID,proto3" json:"ownerUserID"`
OwnerUserID string `protobuf:"bytes,2,opt,name=ownerUserID,proto3" json:"ownerUserID"`
}
func (x *GetConversationReq) Reset() {
@ -565,7 +567,7 @@ type GetConversationsReq struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
OwnerUserID string `protobuf:"bytes,1,opt,name=ownerUserID,proto3" json:"ownerUserID"`
OwnerUserID string `protobuf:"bytes,1,opt,name=ownerUserID,proto3" json:"ownerUserID"`
ConversationIDs []string `protobuf:"bytes,2,rep,name=conversationIDs,proto3" json:"conversationIDs"`
}
@ -1042,8 +1044,8 @@ type SetConversationMaxSeqReq struct {
unknownFields protoimpl.UnknownFields
ConversationID string `protobuf:"bytes,1,opt,name=conversationID,proto3" json:"conversationID"`
OwnerUserID []string `protobuf:"bytes,2,rep,name=ownerUserID,proto3" json:"ownerUserID"`
MaxSeq int64 `protobuf:"varint,3,opt,name=maxSeq,proto3" json:"maxSeq"`
OwnerUserID []string `protobuf:"bytes,2,rep,name=ownerUserID,proto3" json:"ownerUserID"`
MaxSeq int64 `protobuf:"varint,3,opt,name=maxSeq,proto3" json:"maxSeq"`
}
func (x *SetConversationMaxSeqReq) Reset() {
@ -1236,7 +1238,7 @@ type SetConversationsReq struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
UserIDs []string `protobuf:"bytes,1,rep,name=userIDs,proto3" json:"userIDs"`
UserIDs []string `protobuf:"bytes,1,rep,name=userIDs,proto3" json:"userIDs"`
Conversation *ConversationReq `protobuf:"bytes,2,opt,name=conversation,proto3" json:"conversation"`
}

@ -21,10 +21,11 @@
package errinfo
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
)
const (
@ -39,11 +40,11 @@ type ErrorInfo struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path"`
Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path"`
Line uint32 `protobuf:"varint,2,opt,name=line,proto3" json:"line"`
Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name"`
Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name"`
Cause string `protobuf:"bytes,4,opt,name=cause,proto3" json:"cause"`
Warp []string `protobuf:"bytes,5,rep,name=warp,proto3" json:"warp"`
Warp []string `protobuf:"bytes,5,rep,name=warp,proto3" json:"warp"`
}
func (x *ErrorInfo) Reset() {

@ -22,14 +22,16 @@ package friend
import (
context "context"
sdkws "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/sdkws"
reflect "reflect"
sync "sync"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
sdkws "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/sdkws"
)
const (
@ -45,7 +47,7 @@ type GetPaginationFriendsReq struct {
unknownFields protoimpl.UnknownFields
Pagination *sdkws.RequestPagination `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination"`
UserID string `protobuf:"bytes,2,opt,name=userID,proto3" json:"userID"`
UserID string `protobuf:"bytes,2,opt,name=userID,proto3" json:"userID"`
}
func (x *GetPaginationFriendsReq) Reset() {
@ -100,7 +102,7 @@ type GetPaginationFriendsResp struct {
unknownFields protoimpl.UnknownFields
FriendsInfo []*sdkws.FriendInfo `protobuf:"bytes,1,rep,name=friendsInfo,proto3" json:"friendsInfo"`
Total int32 `protobuf:"varint,2,opt,name=total,proto3" json:"total"`
Total int32 `protobuf:"varint,2,opt,name=total,proto3" json:"total"`
}
func (x *GetPaginationFriendsResp) Reset() {
@ -155,9 +157,9 @@ type ApplyToAddFriendReq struct {
unknownFields protoimpl.UnknownFields
FromUserID string `protobuf:"bytes,1,opt,name=fromUserID,proto3" json:"fromUserID"`
ToUserID string `protobuf:"bytes,2,opt,name=toUserID,proto3" json:"toUserID"`
ReqMsg string `protobuf:"bytes,3,opt,name=reqMsg,proto3" json:"reqMsg"`
Ex string `protobuf:"bytes,4,opt,name=ex,proto3" json:"ex"`
ToUserID string `protobuf:"bytes,2,opt,name=toUserID,proto3" json:"toUserID"`
ReqMsg string `protobuf:"bytes,3,opt,name=reqMsg,proto3" json:"reqMsg"`
Ex string `protobuf:"bytes,4,opt,name=ex,proto3" json:"ex"`
}
func (x *ApplyToAddFriendReq) Reset() {
@ -263,7 +265,7 @@ type ImportFriendReq struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
OwnerUserID string `protobuf:"bytes,1,opt,name=ownerUserID,proto3" json:"ownerUserID"`
OwnerUserID string `protobuf:"bytes,1,opt,name=ownerUserID,proto3" json:"ownerUserID"`
FriendUserIDs []string `protobuf:"bytes,2,rep,name=friendUserIDs,proto3" json:"friendUserIDs"`
}
@ -356,7 +358,7 @@ type GetPaginationFriendsApplyToReq struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
UserID string `protobuf:"bytes,1,opt,name=userID,proto3" json:"userID"`
UserID string `protobuf:"bytes,1,opt,name=userID,proto3" json:"userID"`
Pagination *sdkws.RequestPagination `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination"`
}
@ -412,7 +414,7 @@ type GetPaginationFriendsApplyToResp struct {
unknownFields protoimpl.UnknownFields
FriendRequests []*sdkws.FriendRequest `protobuf:"bytes,1,rep,name=FriendRequests,proto3" json:"FriendRequests"`
Total int32 `protobuf:"varint,2,opt,name=total,proto3" json:"total"`
Total int32 `protobuf:"varint,2,opt,name=total,proto3" json:"total"`
}
func (x *GetPaginationFriendsApplyToResp) Reset() {
@ -466,7 +468,7 @@ type GetDesignatedFriendsReq struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
OwnerUserID string `protobuf:"bytes,1,opt,name=ownerUserID,proto3" json:"ownerUserID"`
OwnerUserID string `protobuf:"bytes,1,opt,name=ownerUserID,proto3" json:"ownerUserID"`
FriendUserIDs []string `protobuf:"bytes,2,rep,name=friendUserIDs,proto3" json:"friendUserIDs"`
}
@ -754,7 +756,7 @@ type GetPaginationBlacksReq struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
UserID string `protobuf:"bytes,1,opt,name=userID,proto3" json:"userID"`
UserID string `protobuf:"bytes,1,opt,name=userID,proto3" json:"userID"`
Pagination *sdkws.RequestPagination `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination"`
}
@ -1084,7 +1086,7 @@ type DeleteFriendReq struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
OwnerUserID string `protobuf:"bytes,1,opt,name=ownerUserID,proto3" json:"ownerUserID"`
OwnerUserID string `protobuf:"bytes,1,opt,name=ownerUserID,proto3" json:"ownerUserID"`
FriendUserID string `protobuf:"bytes,2,opt,name=friendUserID,proto3" json:"friendUserID"`
}
@ -1178,10 +1180,10 @@ type RespondFriendApplyReq struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
FromUserID string `protobuf:"bytes,1,opt,name=fromUserID,proto3" json:"fromUserID"` //主动发起的申请者
ToUserID string `protobuf:"bytes,2,opt,name=toUserID,proto3" json:"toUserID"` //被动添加者
FromUserID string `protobuf:"bytes,1,opt,name=fromUserID,proto3" json:"fromUserID"` //主动发起的申请者
ToUserID string `protobuf:"bytes,2,opt,name=toUserID,proto3" json:"toUserID"` //被动添加者
HandleResult int32 `protobuf:"varint,3,opt,name=handleResult,proto3" json:"handleResult"`
HandleMsg string `protobuf:"bytes,4,opt,name=handleMsg,proto3" json:"handleMsg"`
HandleMsg string `protobuf:"bytes,4,opt,name=handleMsg,proto3" json:"handleMsg"`
}
func (x *RespondFriendApplyReq) Reset() {
@ -1287,9 +1289,9 @@ type SetFriendRemarkReq struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
OwnerUserID string `protobuf:"bytes,1,opt,name=ownerUserID,proto3" json:"ownerUserID"`
OwnerUserID string `protobuf:"bytes,1,opt,name=ownerUserID,proto3" json:"ownerUserID"`
FriendUserID string `protobuf:"bytes,2,opt,name=friendUserID,proto3" json:"friendUserID"`
Remark string `protobuf:"bytes,3,opt,name=remark,proto3" json:"remark"`
Remark string `protobuf:"bytes,3,opt,name=remark,proto3" json:"remark"`
}
func (x *SetFriendRemarkReq) Reset() {
@ -1388,7 +1390,7 @@ type GetPaginationFriendsApplyFromReq struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
UserID string `protobuf:"bytes,1,opt,name=userID,proto3" json:"userID"`
UserID string `protobuf:"bytes,1,opt,name=userID,proto3" json:"userID"`
Pagination *sdkws.RequestPagination `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination"`
}
@ -1444,7 +1446,7 @@ type GetPaginationFriendsApplyFromResp struct {
unknownFields protoimpl.UnknownFields
FriendRequests []*sdkws.FriendRequest `protobuf:"bytes,1,rep,name=friendRequests,proto3" json:"friendRequests"`
Total int32 `protobuf:"varint,2,opt,name=total,proto3" json:"total"`
Total int32 `protobuf:"varint,2,opt,name=total,proto3" json:"total"`
}
func (x *GetPaginationFriendsApplyFromResp) Reset() {

@ -22,15 +22,17 @@ package group
import (
context "context"
sdkws "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/sdkws"
wrapperspb "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/wrapperspb"
reflect "reflect"
sync "sync"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
sdkws "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/sdkws"
wrapperspb "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/wrapperspb"
)
const (
@ -46,9 +48,9 @@ type CreateGroupReq struct {
unknownFields protoimpl.UnknownFields
MemberUserIDs []string `protobuf:"bytes,1,rep,name=memberUserIDs,proto3" json:"memberUserIDs"`
GroupInfo *sdkws.GroupInfo `protobuf:"bytes,2,opt,name=groupInfo,proto3" json:"groupInfo"`
AdminUserIDs []string `protobuf:"bytes,3,rep,name=adminUserIDs,proto3" json:"adminUserIDs"`
OwnerUserID string `protobuf:"bytes,4,opt,name=ownerUserID,proto3" json:"ownerUserID"` //owner
GroupInfo *sdkws.GroupInfo `protobuf:"bytes,2,opt,name=groupInfo,proto3" json:"groupInfo"`
AdminUserIDs []string `protobuf:"bytes,3,rep,name=adminUserIDs,proto3" json:"adminUserIDs"`
OwnerUserID string `protobuf:"bytes,4,opt,name=ownerUserID,proto3" json:"ownerUserID"` //owner
}
func (x *CreateGroupReq) Reset() {
@ -397,7 +399,7 @@ type GetGroupApplicationListResp struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Total uint32 `protobuf:"varint,1,opt,name=total,proto3" json:"total"`
Total uint32 `protobuf:"varint,1,opt,name=total,proto3" json:"total"`
GroupRequests []*sdkws.GroupRequest `protobuf:"bytes,2,rep,name=groupRequests,proto3" json:"groupRequests"`
}
@ -453,7 +455,7 @@ type GetUserReqApplicationListReq struct {
unknownFields protoimpl.UnknownFields
Pagination *sdkws.RequestPagination `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination"`
UserID string `protobuf:"bytes,2,opt,name=userID,proto3" json:"userID"`
UserID string `protobuf:"bytes,2,opt,name=userID,proto3" json:"userID"`
}
func (x *GetUserReqApplicationListReq) Reset() {
@ -507,7 +509,7 @@ type GetUserReqApplicationListResp struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Total uint32 `protobuf:"varint,1,opt,name=total,proto3" json:"total"`
Total uint32 `protobuf:"varint,1,opt,name=total,proto3" json:"total"`
GroupRequests []*sdkws.GroupRequest `protobuf:"bytes,2,rep,name=groupRequests,proto3" json:"groupRequests"`
}
@ -562,7 +564,7 @@ type TransferGroupOwnerReq struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
GroupID string `protobuf:"bytes,1,opt,name=groupID,proto3" json:"groupID"`
GroupID string `protobuf:"bytes,1,opt,name=groupID,proto3" json:"groupID"`
OldOwnerUserID string `protobuf:"bytes,2,opt,name=oldOwnerUserID,proto3" json:"oldOwnerUserID"`
NewOwnerUserID string `protobuf:"bytes,3,opt,name=newOwnerUserID,proto3" json:"newOwnerUserID"`
}
@ -663,9 +665,9 @@ type JoinGroupReq struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
GroupID string `protobuf:"bytes,1,opt,name=groupID,proto3" json:"groupID"`
ReqMessage string `protobuf:"bytes,2,opt,name=reqMessage,proto3" json:"reqMessage"`
JoinSource int32 `protobuf:"varint,3,opt,name=joinSource,proto3" json:"joinSource"`
GroupID string `protobuf:"bytes,1,opt,name=groupID,proto3" json:"groupID"`
ReqMessage string `protobuf:"bytes,2,opt,name=reqMessage,proto3" json:"reqMessage"`
JoinSource int32 `protobuf:"varint,3,opt,name=joinSource,proto3" json:"joinSource"`
InviterUserID string `protobuf:"bytes,4,opt,name=inviterUserID,proto3" json:"inviterUserID"`
}
@ -772,9 +774,9 @@ type GroupApplicationResponseReq struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
GroupID string `protobuf:"bytes,1,opt,name=groupID,proto3" json:"groupID"`
FromUserID string `protobuf:"bytes,2,opt,name=fromUserID,proto3" json:"fromUserID"` //
HandledMsg string `protobuf:"bytes,3,opt,name=handledMsg,proto3" json:"handledMsg"`
GroupID string `protobuf:"bytes,1,opt,name=groupID,proto3" json:"groupID"`
FromUserID string `protobuf:"bytes,2,opt,name=fromUserID,proto3" json:"fromUserID"` //
HandledMsg string `protobuf:"bytes,3,opt,name=handledMsg,proto3" json:"handledMsg"`
HandleResult int32 `protobuf:"varint,4,opt,name=handleResult,proto3" json:"handleResult"`
}
@ -967,8 +969,8 @@ type GetGroupMemberListReq struct {
unknownFields protoimpl.UnknownFields
Pagination *sdkws.RequestPagination `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination"`
GroupID string `protobuf:"bytes,2,opt,name=groupID,proto3" json:"groupID"`
Filter int32 `protobuf:"varint,3,opt,name=filter,proto3" json:"filter"`
GroupID string `protobuf:"bytes,2,opt,name=groupID,proto3" json:"groupID"`
Filter int32 `protobuf:"varint,3,opt,name=filter,proto3" json:"filter"`
}
func (x *GetGroupMemberListReq) Reset() {
@ -1029,7 +1031,7 @@ type GetGroupMemberListResp struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Total uint32 `protobuf:"varint,1,opt,name=total,proto3" json:"total"`
Total uint32 `protobuf:"varint,1,opt,name=total,proto3" json:"total"`
Members []*sdkws.GroupMemberFullInfo `protobuf:"bytes,2,rep,name=members,proto3" json:"members"`
}
@ -1186,9 +1188,9 @@ type KickGroupMemberReq struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
GroupID string `protobuf:"bytes,1,opt,name=groupID,proto3" json:"groupID"`
GroupID string `protobuf:"bytes,1,opt,name=groupID,proto3" json:"groupID"`
KickedUserIDs []string `protobuf:"bytes,2,rep,name=kickedUserIDs,proto3" json:"kickedUserIDs"`
Reason string `protobuf:"bytes,3,opt,name=reason,proto3" json:"reason"`
Reason string `protobuf:"bytes,3,opt,name=reason,proto3" json:"reason"`
}
func (x *KickGroupMemberReq) Reset() {
@ -1397,8 +1399,8 @@ type InviteUserToGroupReq struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
GroupID string `protobuf:"bytes,1,opt,name=groupID,proto3" json:"groupID"`
Reason string `protobuf:"bytes,2,opt,name=reason,proto3" json:"reason"`
GroupID string `protobuf:"bytes,1,opt,name=groupID,proto3" json:"groupID"`
Reason string `protobuf:"bytes,2,opt,name=reason,proto3" json:"reason"`
InvitedUserIDs []string `protobuf:"bytes,3,rep,name=invitedUserIDs,proto3" json:"invitedUserIDs"`
}
@ -1499,7 +1501,7 @@ type GetGroupAllMemberReq struct {
unknownFields protoimpl.UnknownFields
Pagination *sdkws.RequestPagination `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination"`
GroupID string `protobuf:"bytes,2,opt,name=groupID,proto3" json:"groupID"`
GroupID string `protobuf:"bytes,2,opt,name=groupID,proto3" json:"groupID"`
}
func (x *GetGroupAllMemberReq) Reset() {
@ -1600,9 +1602,9 @@ type CMSGroup struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
GroupInfo *sdkws.GroupInfo `protobuf:"bytes,1,opt,name=groupInfo,proto3" json:"groupInfo"`
GroupInfo *sdkws.GroupInfo `protobuf:"bytes,1,opt,name=groupInfo,proto3" json:"groupInfo"`
GroupOwnerUserName string `protobuf:"bytes,2,opt,name=groupOwnerUserName,proto3" json:"groupOwnerUserName"`
GroupOwnerUserID string `protobuf:"bytes,3,opt,name=groupOwnerUserID,proto3" json:"groupOwnerUserID"`
GroupOwnerUserID string `protobuf:"bytes,3,opt,name=groupOwnerUserID,proto3" json:"groupOwnerUserID"`
}
func (x *CMSGroup) Reset() {
@ -1664,8 +1666,8 @@ type GetGroupsReq struct {
unknownFields protoimpl.UnknownFields
Pagination *sdkws.RequestPagination `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination"`
GroupName string `protobuf:"bytes,2,opt,name=groupName,proto3" json:"groupName"`
GroupID string `protobuf:"bytes,3,opt,name=groupID,proto3" json:"groupID"`
GroupName string `protobuf:"bytes,2,opt,name=groupName,proto3" json:"groupName"`
GroupID string `protobuf:"bytes,3,opt,name=groupID,proto3" json:"groupID"`
}
func (x *GetGroupsReq) Reset() {
@ -1829,8 +1831,8 @@ type GetGroupMembersCMSReq struct {
unknownFields protoimpl.UnknownFields
Pagination *sdkws.RequestPagination `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination"`
GroupID string `protobuf:"bytes,2,opt,name=groupID,proto3" json:"groupID"`
UserName string `protobuf:"bytes,3,opt,name=userName,proto3" json:"userName"`
GroupID string `protobuf:"bytes,2,opt,name=groupID,proto3" json:"groupID"`
UserName string `protobuf:"bytes,3,opt,name=userName,proto3" json:"userName"`
}
func (x *GetGroupMembersCMSReq) Reset() {
@ -1891,7 +1893,7 @@ type GetGroupMembersCMSResp struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Total uint32 `protobuf:"varint,1,opt,name=total,proto3" json:"total"`
Total uint32 `protobuf:"varint,1,opt,name=total,proto3" json:"total"`
Members []*sdkws.GroupMemberFullInfo `protobuf:"bytes,2,rep,name=members,proto3" json:"members"`
}
@ -1946,7 +1948,7 @@ type DismissGroupReq struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
GroupID string `protobuf:"bytes,1,opt,name=groupID,proto3" json:"groupID"`
GroupID string `protobuf:"bytes,1,opt,name=groupID,proto3" json:"groupID"`
DeleteMember bool `protobuf:"varint,2,opt,name=deleteMember,proto3" json:"deleteMember"`
}
@ -2039,8 +2041,8 @@ type MuteGroupMemberReq struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
GroupID string `protobuf:"bytes,1,opt,name=groupID,proto3" json:"groupID"`
UserID string `protobuf:"bytes,2,opt,name=userID,proto3" json:"userID"`
GroupID string `protobuf:"bytes,1,opt,name=groupID,proto3" json:"groupID"`
UserID string `protobuf:"bytes,2,opt,name=userID,proto3" json:"userID"`
MutedSeconds uint32 `protobuf:"varint,3,opt,name=mutedSeconds,proto3" json:"mutedSeconds"`
}
@ -2141,7 +2143,7 @@ type CancelMuteGroupMemberReq struct {
unknownFields protoimpl.UnknownFields
GroupID string `protobuf:"bytes,1,opt,name=groupID,proto3" json:"groupID"`
UserID string `protobuf:"bytes,2,opt,name=userID,proto3" json:"userID"`
UserID string `protobuf:"bytes,2,opt,name=userID,proto3" json:"userID"`
}
func (x *CancelMuteGroupMemberReq) Reset() {
@ -2591,12 +2593,12 @@ type SetGroupMemberInfo struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
GroupID string `protobuf:"bytes,1,opt,name=groupID,proto3" json:"groupID"`
UserID string `protobuf:"bytes,2,opt,name=userID,proto3" json:"userID"`
Nickname *wrapperspb.StringValue `protobuf:"bytes,3,opt,name=nickname,proto3" json:"nickname"`
FaceURL *wrapperspb.StringValue `protobuf:"bytes,4,opt,name=faceURL,proto3" json:"faceURL"`
GroupID string `protobuf:"bytes,1,opt,name=groupID,proto3" json:"groupID"`
UserID string `protobuf:"bytes,2,opt,name=userID,proto3" json:"userID"`
Nickname *wrapperspb.StringValue `protobuf:"bytes,3,opt,name=nickname,proto3" json:"nickname"`
FaceURL *wrapperspb.StringValue `protobuf:"bytes,4,opt,name=faceURL,proto3" json:"faceURL"`
RoleLevel *wrapperspb.Int32Value `protobuf:"bytes,5,opt,name=roleLevel,proto3" json:"roleLevel"`
Ex *wrapperspb.StringValue `protobuf:"bytes,6,opt,name=ex,proto3" json:"ex"`
Ex *wrapperspb.StringValue `protobuf:"bytes,6,opt,name=ex,proto3" json:"ex"`
}
func (x *SetGroupMemberInfo) Reset() {
@ -2810,8 +2812,8 @@ type GroupAbstractInfo struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
GroupID string `protobuf:"bytes,1,opt,name=groupID,proto3" json:"groupID"`
GroupMemberNumber uint32 `protobuf:"varint,2,opt,name=groupMemberNumber,proto3" json:"groupMemberNumber"`
GroupID string `protobuf:"bytes,1,opt,name=groupID,proto3" json:"groupID"`
GroupMemberNumber uint32 `protobuf:"varint,2,opt,name=groupMemberNumber,proto3" json:"groupMemberNumber"`
GroupMemberListHash uint64 `protobuf:"varint,3,opt,name=groupMemberListHash,proto3" json:"groupMemberListHash"`
}
@ -2920,7 +2922,7 @@ type GetUserInGroupMembersReq struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
UserID string `protobuf:"bytes,1,opt,name=userID,proto3" json:"userID"`
UserID string `protobuf:"bytes,1,opt,name=userID,proto3" json:"userID"`
GroupIDs []string `protobuf:"bytes,2,rep,name=groupIDs,proto3" json:"groupIDs"`
}
@ -3116,7 +3118,7 @@ type GetGroupMemberRoleLevelReq struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
GroupID string `protobuf:"bytes,1,opt,name=groupID,proto3" json:"groupID"`
GroupID string `protobuf:"bytes,1,opt,name=groupID,proto3" json:"groupID"`
RoleLevels []int32 `protobuf:"varint,2,rep,packed,name=roleLevels,proto3" json:"roleLevels"`
}
@ -3312,7 +3314,7 @@ type GetGroupMemberCacheReq struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
GroupID string `protobuf:"bytes,1,opt,name=groupID,proto3" json:"groupID"`
GroupID string `protobuf:"bytes,1,opt,name=groupID,proto3" json:"groupID"`
GroupMemberID string `protobuf:"bytes,2,opt,name=groupMemberID,proto3" json:"groupMemberID"`
}
@ -3415,7 +3417,7 @@ type GroupCreateCountReq struct {
unknownFields protoimpl.UnknownFields
Start int64 `protobuf:"varint,1,opt,name=start,proto3" json:"start"`
End int64 `protobuf:"varint,2,opt,name=end,proto3" json:"end"`
End int64 `protobuf:"varint,2,opt,name=end,proto3" json:"end"`
}
func (x *GroupCreateCountReq) Reset() {
@ -3469,9 +3471,9 @@ type GroupCreateCountResp struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Total int64 `protobuf:"varint,1,opt,name=total,proto3" json:"total"`
Total int64 `protobuf:"varint,1,opt,name=total,proto3" json:"total"`
Before int64 `protobuf:"varint,2,opt,name=before,proto3" json:"before"`
Count map[string]int64 `protobuf:"bytes,3,rep,name=count,proto3" json:"count" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"`
Count map[string]int64 `protobuf:"bytes,3,rep,name=count,proto3" json:"count" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"`
}
func (x *GroupCreateCountResp) Reset() {

@ -22,14 +22,16 @@ package msg
import (
context "context"
sdkws "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/sdkws"
reflect "reflect"
sync "sync"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
sdkws "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/sdkws"
)
const (
@ -44,7 +46,7 @@ type MsgDataToMQ struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token"`
Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token"`
MsgData *sdkws.MsgData `protobuf:"bytes,2,opt,name=msgData,proto3" json:"msgData"`
}
@ -146,7 +148,7 @@ type PushMsgDataToMQ struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
MsgData *sdkws.MsgData `protobuf:"bytes,1,opt,name=msgData,proto3" json:"msgData"`
MsgData *sdkws.MsgData `protobuf:"bytes,1,opt,name=msgData,proto3" json:"msgData"`
ConversationID string `protobuf:"bytes,2,opt,name=conversationID,proto3" json:"conversationID"`
}
@ -201,9 +203,9 @@ type MsgDataToMongoByMQ struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
LastSeq int64 `protobuf:"varint,1,opt,name=lastSeq,proto3" json:"lastSeq"`
LastSeq int64 `protobuf:"varint,1,opt,name=lastSeq,proto3" json:"lastSeq"`
ConversationID string `protobuf:"bytes,2,opt,name=conversationID,proto3" json:"conversationID"`
MsgData []*sdkws.MsgData `protobuf:"bytes,3,rep,name=msgData,proto3" json:"msgData"`
MsgData []*sdkws.MsgData `protobuf:"bytes,3,rep,name=msgData,proto3" json:"msgData"`
}
func (x *MsgDataToMongoByMQ) Reset() {
@ -415,7 +417,7 @@ type SendMsgResp struct {
ServerMsgID string `protobuf:"bytes,1,opt,name=serverMsgID,proto3" json:"serverMsgID"`
ClientMsgID string `protobuf:"bytes,2,opt,name=clientMsgID,proto3" json:"clientMsgID"`
SendTime int64 `protobuf:"varint,3,opt,name=sendTime,proto3" json:"sendTime"`
SendTime int64 `protobuf:"varint,3,opt,name=sendTime,proto3" json:"sendTime"`
}
func (x *SendMsgResp) Reset() {
@ -646,7 +648,7 @@ type MsgDataToModifyByMQ struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Messages []*sdkws.MsgData `protobuf:"bytes,1,rep,name=messages,proto3" json:"messages"`
Messages []*sdkws.MsgData `protobuf:"bytes,1,rep,name=messages,proto3" json:"messages"`
ConversationID string `protobuf:"bytes,2,opt,name=conversationID,proto3" json:"conversationID"`
}
@ -778,8 +780,8 @@ type RevokeMsgReq struct {
unknownFields protoimpl.UnknownFields
ConversationID string `protobuf:"bytes,1,opt,name=conversationID,proto3" json:"conversationID"`
Seq int64 `protobuf:"varint,2,opt,name=seq,proto3" json:"seq"`
UserID string `protobuf:"bytes,3,opt,name=userID,proto3" json:"userID"`
Seq int64 `protobuf:"varint,2,opt,name=seq,proto3" json:"seq"`
UserID string `protobuf:"bytes,3,opt,name=userID,proto3" json:"userID"`
}
func (x *RevokeMsgReq) Reset() {
@ -879,8 +881,8 @@ type MarkMsgsAsReadReq struct {
unknownFields protoimpl.UnknownFields
ConversationID string `protobuf:"bytes,1,opt,name=conversationID,proto3" json:"conversationID"`
Seqs []int64 `protobuf:"varint,2,rep,packed,name=seqs,proto3" json:"seqs"`
UserID string `protobuf:"bytes,3,opt,name=userID,proto3" json:"userID"`
Seqs []int64 `protobuf:"varint,2,rep,packed,name=seqs,proto3" json:"seqs"`
UserID string `protobuf:"bytes,3,opt,name=userID,proto3" json:"userID"`
}
func (x *MarkMsgsAsReadReq) Reset() {
@ -980,9 +982,9 @@ type MarkConversationAsReadReq struct {
unknownFields protoimpl.UnknownFields
ConversationID string `protobuf:"bytes,1,opt,name=conversationID,proto3" json:"conversationID"`
UserID string `protobuf:"bytes,2,opt,name=userID,proto3" json:"userID"`
HasReadSeq int64 `protobuf:"varint,3,opt,name=hasReadSeq,proto3" json:"hasReadSeq"`
Seqs []int64 `protobuf:"varint,4,rep,packed,name=seqs,proto3" json:"seqs"`
UserID string `protobuf:"bytes,2,opt,name=userID,proto3" json:"userID"`
HasReadSeq int64 `protobuf:"varint,3,opt,name=hasReadSeq,proto3" json:"hasReadSeq"`
Seqs []int64 `protobuf:"varint,4,rep,packed,name=seqs,proto3" json:"seqs"`
}
func (x *MarkConversationAsReadReq) Reset() {
@ -1089,8 +1091,8 @@ type SetConversationHasReadSeqReq struct {
unknownFields protoimpl.UnknownFields
ConversationID string `protobuf:"bytes,1,opt,name=conversationID,proto3" json:"conversationID"`
UserID string `protobuf:"bytes,2,opt,name=userID,proto3" json:"userID"`
HasReadSeq int64 `protobuf:"varint,3,opt,name=hasReadSeq,proto3" json:"hasReadSeq"`
UserID string `protobuf:"bytes,2,opt,name=userID,proto3" json:"userID"`
HasReadSeq int64 `protobuf:"varint,3,opt,name=hasReadSeq,proto3" json:"hasReadSeq"`
}
func (x *SetConversationHasReadSeqReq) Reset() {
@ -1189,7 +1191,7 @@ type DeleteSyncOpt struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
IsSyncSelf bool `protobuf:"varint,3,opt,name=IsSyncSelf,proto3" json:"IsSyncSelf"`
IsSyncSelf bool `protobuf:"varint,3,opt,name=IsSyncSelf,proto3" json:"IsSyncSelf"`
IsSyncOther bool `protobuf:"varint,4,opt,name=IsSyncOther,proto3" json:"IsSyncOther"`
}
@ -1245,8 +1247,8 @@ type ClearConversationsMsgReq struct {
unknownFields protoimpl.UnknownFields
ConversationIDs []string `protobuf:"bytes,1,rep,name=conversationIDs,proto3" json:"conversationIDs"`
UserID string `protobuf:"bytes,2,opt,name=userID,proto3" json:"userID"`
DeleteSyncOpt *DeleteSyncOpt `protobuf:"bytes,3,opt,name=deleteSyncOpt,proto3" json:"deleteSyncOpt"`
UserID string `protobuf:"bytes,2,opt,name=userID,proto3" json:"userID"`
DeleteSyncOpt *DeleteSyncOpt `protobuf:"bytes,3,opt,name=deleteSyncOpt,proto3" json:"deleteSyncOpt"`
}
func (x *ClearConversationsMsgReq) Reset() {
@ -1345,7 +1347,7 @@ type UserClearAllMsgReq struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
UserID string `protobuf:"bytes,1,opt,name=userID,proto3" json:"userID"`
UserID string `protobuf:"bytes,1,opt,name=userID,proto3" json:"userID"`
DeleteSyncOpt *DeleteSyncOpt `protobuf:"bytes,3,opt,name=deleteSyncOpt,proto3" json:"deleteSyncOpt"`
}
@ -1439,9 +1441,9 @@ type DeleteMsgsReq struct {
unknownFields protoimpl.UnknownFields
ConversationID string `protobuf:"bytes,1,opt,name=conversationID,proto3" json:"conversationID"`
Seqs []int64 `protobuf:"varint,2,rep,packed,name=seqs,proto3" json:"seqs"`
UserID string `protobuf:"bytes,3,opt,name=userID,proto3" json:"userID"`
DeleteSyncOpt *DeleteSyncOpt `protobuf:"bytes,4,opt,name=deleteSyncOpt,proto3" json:"deleteSyncOpt"`
Seqs []int64 `protobuf:"varint,2,rep,packed,name=seqs,proto3" json:"seqs"`
UserID string `protobuf:"bytes,3,opt,name=userID,proto3" json:"userID"`
DeleteSyncOpt *DeleteSyncOpt `protobuf:"bytes,4,opt,name=deleteSyncOpt,proto3" json:"deleteSyncOpt"`
}
func (x *DeleteMsgsReq) Reset() {
@ -1548,7 +1550,7 @@ type DeleteMsgPhysicalReq struct {
unknownFields protoimpl.UnknownFields
ConversationIDs []string `protobuf:"bytes,1,rep,name=conversationIDs,proto3" json:"conversationIDs"`
Timestamp int64 `protobuf:"varint,2,opt,name=timestamp,proto3" json:"timestamp"`
Timestamp int64 `protobuf:"varint,2,opt,name=timestamp,proto3" json:"timestamp"`
}
func (x *DeleteMsgPhysicalReq) Reset() {
@ -1641,7 +1643,7 @@ type DeleteMsgPhysicalBySeqReq struct {
unknownFields protoimpl.UnknownFields
ConversationID string `protobuf:"bytes,1,opt,name=conversationID,proto3" json:"conversationID"`
Seqs []int64 `protobuf:"varint,2,rep,packed,name=seqs,proto3" json:"seqs"`
Seqs []int64 `protobuf:"varint,2,rep,packed,name=seqs,proto3" json:"seqs"`
}
func (x *DeleteMsgPhysicalBySeqReq) Reset() {
@ -1874,7 +1876,7 @@ type Seqs struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
MaxSeq int64 `protobuf:"varint,1,opt,name=maxSeq,proto3" json:"maxSeq"`
MaxSeq int64 `protobuf:"varint,1,opt,name=maxSeq,proto3" json:"maxSeq"`
HasReadSeq int64 `protobuf:"varint,2,opt,name=hasReadSeq,proto3" json:"hasReadSeq"`
}
@ -1976,10 +1978,10 @@ type GetActiveUserReq struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Start int64 `protobuf:"varint,1,opt,name=start,proto3" json:"start"`
End int64 `protobuf:"varint,2,opt,name=end,proto3" json:"end"`
Ase bool `protobuf:"varint,3,opt,name=ase,proto3" json:"ase"`
Group bool `protobuf:"varint,4,opt,name=group,proto3" json:"group"`
Start int64 `protobuf:"varint,1,opt,name=start,proto3" json:"start"`
End int64 `protobuf:"varint,2,opt,name=end,proto3" json:"end"`
Ase bool `protobuf:"varint,3,opt,name=ase,proto3" json:"ase"`
Group bool `protobuf:"varint,4,opt,name=group,proto3" json:"group"`
Pagination *sdkws.RequestPagination `protobuf:"bytes,5,opt,name=pagination,proto3" json:"pagination"`
}
@ -2055,7 +2057,7 @@ type ActiveUser struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
User *sdkws.UserInfo `protobuf:"bytes,1,opt,name=user,proto3" json:"user"`
User *sdkws.UserInfo `protobuf:"bytes,1,opt,name=user,proto3" json:"user"`
Count int64 `protobuf:"varint,2,opt,name=count,proto3" json:"count"`
}
@ -2110,10 +2112,10 @@ type GetActiveUserResp struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
MsgCount int64 `protobuf:"varint,1,opt,name=msgCount,proto3" json:"msgCount"`
MsgCount int64 `protobuf:"varint,1,opt,name=msgCount,proto3" json:"msgCount"`
UserCount int64 `protobuf:"varint,2,opt,name=userCount,proto3" json:"userCount"`
DateCount map[string]int64 `protobuf:"bytes,3,rep,name=dateCount,proto3" json:"dateCount" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"`
Users []*ActiveUser `protobuf:"bytes,4,rep,name=users,proto3" json:"users"`
DateCount map[string]int64 `protobuf:"bytes,3,rep,name=dateCount,proto3" json:"dateCount" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"`
Users []*ActiveUser `protobuf:"bytes,4,rep,name=users,proto3" json:"users"`
}
func (x *GetActiveUserResp) Reset() {
@ -2181,9 +2183,9 @@ type GetActiveGroupReq struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Start int64 `protobuf:"varint,1,opt,name=start,proto3" json:"start"`
End int64 `protobuf:"varint,2,opt,name=end,proto3" json:"end"`
Ase bool `protobuf:"varint,3,opt,name=ase,proto3" json:"ase"`
Start int64 `protobuf:"varint,1,opt,name=start,proto3" json:"start"`
End int64 `protobuf:"varint,2,opt,name=end,proto3" json:"end"`
Ase bool `protobuf:"varint,3,opt,name=ase,proto3" json:"ase"`
Pagination *sdkws.RequestPagination `protobuf:"bytes,4,opt,name=pagination,proto3" json:"pagination"`
}
@ -2252,7 +2254,7 @@ type ActiveGroup struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Group *sdkws.GroupInfo `protobuf:"bytes,1,opt,name=group,proto3" json:"group"`
Group *sdkws.GroupInfo `protobuf:"bytes,1,opt,name=group,proto3" json:"group"`
Count int64 `protobuf:"varint,2,opt,name=count,proto3" json:"count"`
}
@ -2307,10 +2309,10 @@ type GetActiveGroupResp struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
MsgCount int64 `protobuf:"varint,1,opt,name=msgCount,proto3" json:"msgCount"`
MsgCount int64 `protobuf:"varint,1,opt,name=msgCount,proto3" json:"msgCount"`
GroupCount int64 `protobuf:"varint,2,opt,name=groupCount,proto3" json:"groupCount"`
DateCount map[string]int64 `protobuf:"bytes,3,rep,name=dateCount,proto3" json:"dateCount" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"`
Groups []*ActiveGroup `protobuf:"bytes,4,rep,name=groups,proto3" json:"groups"`
DateCount map[string]int64 `protobuf:"bytes,3,rep,name=dateCount,proto3" json:"dateCount" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"`
Groups []*ActiveGroup `protobuf:"bytes,4,rep,name=groups,proto3" json:"groups"`
}
func (x *GetActiveGroupResp) Reset() {
@ -2378,12 +2380,12 @@ type SearchMessageReq struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
SendID string `protobuf:"bytes,1,opt,name=sendID,proto3" json:"sendID"` //发送者ID
RecvID string `protobuf:"bytes,2,opt,name=recvID,proto3" json:"recvID"` //接收者ID
MsgType int32 `protobuf:"varint,3,opt,name=msgType,proto3" json:"msgType"`
SendTime string `protobuf:"bytes,4,opt,name=sendTime,proto3" json:"sendTime"`
SendID string `protobuf:"bytes,1,opt,name=sendID,proto3" json:"sendID"` //发送者ID
RecvID string `protobuf:"bytes,2,opt,name=recvID,proto3" json:"recvID"` //接收者ID
MsgType int32 `protobuf:"varint,3,opt,name=msgType,proto3" json:"msgType"`
SendTime string `protobuf:"bytes,4,opt,name=sendTime,proto3" json:"sendTime"`
SessionType int32 `protobuf:"varint,5,opt,name=sessionType,proto3" json:"sessionType"`
Pagination *sdkws.RequestPagination `protobuf:"bytes,6,opt,name=pagination,proto3" json:"pagination"`
Pagination *sdkws.RequestPagination `protobuf:"bytes,6,opt,name=pagination,proto3" json:"pagination"`
}
func (x *SearchMessageReq) Reset() {
@ -2465,7 +2467,7 @@ type SearchMessageResp struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
ChatLogs []*ChatLog `protobuf:"bytes,1,rep,name=chatLogs,proto3" json:"chatLogs"`
ChatLogs []*ChatLog `protobuf:"bytes,1,rep,name=chatLogs,proto3" json:"chatLogs"`
ChatLogsNum int32 `protobuf:"varint,2,opt,name=chatLogsNum,proto3" json:"chatLogsNum"`
}
@ -2520,29 +2522,29 @@ type ChatLog struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
ServerMsgID string `protobuf:"bytes,1,opt,name=serverMsgID,proto3" json:"serverMsgID"`
ClientMsgID string `protobuf:"bytes,2,opt,name=clientMsgID,proto3" json:"clientMsgID"`
SendID string `protobuf:"bytes,3,opt,name=sendID,proto3" json:"sendID"`
RecvID string `protobuf:"bytes,4,opt,name=recvID,proto3" json:"recvID"`
GroupID string `protobuf:"bytes,5,opt,name=groupID,proto3" json:"groupID"`
RecvNickname string `protobuf:"bytes,6,opt,name=recvNickname,proto3" json:"recvNickname"`
SenderPlatformID int32 `protobuf:"varint,7,opt,name=senderPlatformID,proto3" json:"senderPlatformID"`
SenderNickname string `protobuf:"bytes,8,opt,name=senderNickname,proto3" json:"senderNickname"`
SenderFaceURL string `protobuf:"bytes,9,opt,name=senderFaceURL,proto3" json:"senderFaceURL"`
GroupName string `protobuf:"bytes,10,opt,name=groupName,proto3" json:"groupName"`
SessionType int32 `protobuf:"varint,11,opt,name=sessionType,proto3" json:"sessionType"`
MsgFrom int32 `protobuf:"varint,12,opt,name=msgFrom,proto3" json:"msgFrom"`
ContentType int32 `protobuf:"varint,13,opt,name=contentType,proto3" json:"contentType"`
Content string `protobuf:"bytes,14,opt,name=content,proto3" json:"content"`
Status int32 `protobuf:"varint,15,opt,name=status,proto3" json:"status"`
SendTime int64 `protobuf:"varint,16,opt,name=sendTime,proto3" json:"sendTime"`
CreateTime int64 `protobuf:"varint,17,opt,name=createTime,proto3" json:"createTime"`
Ex string `protobuf:"bytes,18,opt,name=ex,proto3" json:"ex"`
GroupFaceURL string `protobuf:"bytes,19,opt,name=groupFaceURL,proto3" json:"groupFaceURL"`
ServerMsgID string `protobuf:"bytes,1,opt,name=serverMsgID,proto3" json:"serverMsgID"`
ClientMsgID string `protobuf:"bytes,2,opt,name=clientMsgID,proto3" json:"clientMsgID"`
SendID string `protobuf:"bytes,3,opt,name=sendID,proto3" json:"sendID"`
RecvID string `protobuf:"bytes,4,opt,name=recvID,proto3" json:"recvID"`
GroupID string `protobuf:"bytes,5,opt,name=groupID,proto3" json:"groupID"`
RecvNickname string `protobuf:"bytes,6,opt,name=recvNickname,proto3" json:"recvNickname"`
SenderPlatformID int32 `protobuf:"varint,7,opt,name=senderPlatformID,proto3" json:"senderPlatformID"`
SenderNickname string `protobuf:"bytes,8,opt,name=senderNickname,proto3" json:"senderNickname"`
SenderFaceURL string `protobuf:"bytes,9,opt,name=senderFaceURL,proto3" json:"senderFaceURL"`
GroupName string `protobuf:"bytes,10,opt,name=groupName,proto3" json:"groupName"`
SessionType int32 `protobuf:"varint,11,opt,name=sessionType,proto3" json:"sessionType"`
MsgFrom int32 `protobuf:"varint,12,opt,name=msgFrom,proto3" json:"msgFrom"`
ContentType int32 `protobuf:"varint,13,opt,name=contentType,proto3" json:"contentType"`
Content string `protobuf:"bytes,14,opt,name=content,proto3" json:"content"`
Status int32 `protobuf:"varint,15,opt,name=status,proto3" json:"status"`
SendTime int64 `protobuf:"varint,16,opt,name=sendTime,proto3" json:"sendTime"`
CreateTime int64 `protobuf:"varint,17,opt,name=createTime,proto3" json:"createTime"`
Ex string `protobuf:"bytes,18,opt,name=ex,proto3" json:"ex"`
GroupFaceURL string `protobuf:"bytes,19,opt,name=groupFaceURL,proto3" json:"groupFaceURL"`
GroupMemberCount uint32 `protobuf:"varint,20,opt,name=groupMemberCount,proto3" json:"groupMemberCount"`
Seq int64 `protobuf:"varint,21,opt,name=seq,proto3" json:"seq"`
GroupOwner string `protobuf:"bytes,22,opt,name=groupOwner,proto3" json:"groupOwner"`
GroupType int32 `protobuf:"varint,23,opt,name=groupType,proto3" json:"groupType"`
Seq int64 `protobuf:"varint,21,opt,name=seq,proto3" json:"seq"`
GroupOwner string `protobuf:"bytes,22,opt,name=groupOwner,proto3" json:"groupOwner"`
GroupType int32 `protobuf:"varint,23,opt,name=groupType,proto3" json:"groupType"`
}
func (x *ChatLog) Reset() {
@ -2744,7 +2746,7 @@ type BatchSendMessageReq struct {
unknownFields protoimpl.UnknownFields
RecvIDList []string `protobuf:"bytes,1,rep,name=recvIDList,proto3" json:"recvIDList"`
MsgData *sdkws.MsgData `protobuf:"bytes,2,opt,name=msgData,proto3" json:"msgData"`
MsgData *sdkws.MsgData `protobuf:"bytes,2,opt,name=msgData,proto3" json:"msgData"`
}
func (x *BatchSendMessageReq) Reset() {

@ -22,14 +22,16 @@ package msggateway
import (
context "context"
sdkws "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/sdkws"
reflect "reflect"
sync "sync"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
sdkws "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/sdkws"
)
const (
@ -44,7 +46,7 @@ type OnlinePushMsgReq struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
MsgData *sdkws.MsgData `protobuf:"bytes,1,opt,name=msgData,proto3" json:"msgData"`
MsgData *sdkws.MsgData `protobuf:"bytes,1,opt,name=msgData,proto3" json:"msgData"`
PushToUserID string `protobuf:"bytes,2,opt,name=pushToUserID,proto3" json:"pushToUserID"`
}
@ -146,8 +148,8 @@ type SingleMsgToUserResults struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
UserID string `protobuf:"bytes,1,opt,name=userID,proto3" json:"userID"`
Resp []*SingleMsgToUserPlatform `protobuf:"bytes,2,rep,name=resp,proto3" json:"resp"`
UserID string `protobuf:"bytes,1,opt,name=userID,proto3" json:"userID"`
Resp []*SingleMsgToUserPlatform `protobuf:"bytes,2,rep,name=resp,proto3" json:"resp"`
OnlinePush bool `protobuf:"varint,3,opt,name=onlinePush,proto3" json:"onlinePush"`
}
@ -209,7 +211,7 @@ type OnlineBatchPushOneMsgReq struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
MsgData *sdkws.MsgData `protobuf:"bytes,1,opt,name=msgData,proto3" json:"msgData"`
MsgData *sdkws.MsgData `protobuf:"bytes,1,opt,name=msgData,proto3" json:"msgData"`
PushToUserIDs []string `protobuf:"bytes,2,rep,name=pushToUserIDs,proto3" json:"pushToUserIDs"`
}
@ -311,8 +313,8 @@ type SingleMsgToUserPlatform struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
ResultCode int64 `protobuf:"varint,1,opt,name=ResultCode,proto3" json:"ResultCode"`
RecvID string `protobuf:"bytes,2,opt,name=RecvID,proto3" json:"RecvID"`
ResultCode int64 `protobuf:"varint,1,opt,name=ResultCode,proto3" json:"ResultCode"`
RecvID string `protobuf:"bytes,2,opt,name=RecvID,proto3" json:"RecvID"`
RecvPlatFormID int32 `protobuf:"varint,3,opt,name=RecvPlatFormID,proto3" json:"RecvPlatFormID"`
}
@ -422,7 +424,7 @@ type GetUsersOnlineStatusResp struct {
unknownFields protoimpl.UnknownFields
SuccessResult []*GetUsersOnlineStatusResp_SuccessResult `protobuf:"bytes,1,rep,name=successResult,proto3" json:"successResult"`
FailedResult []*GetUsersOnlineStatusResp_FailedDetail `protobuf:"bytes,2,rep,name=failedResult,proto3" json:"failedResult"`
FailedResult []*GetUsersOnlineStatusResp_FailedDetail `protobuf:"bytes,2,rep,name=failedResult,proto3" json:"failedResult"`
}
func (x *GetUsersOnlineStatusResp) Reset() {
@ -476,8 +478,8 @@ type SingleDetail struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
UserID string `protobuf:"bytes,1,opt,name=userID,proto3" json:"userID"`
Status string `protobuf:"bytes,2,opt,name=status,proto3" json:"status"`
UserID string `protobuf:"bytes,1,opt,name=userID,proto3" json:"userID"`
Status string `protobuf:"bytes,2,opt,name=status,proto3" json:"status"`
SinglePlatformToken []*SinglePlatformToken `protobuf:"bytes,3,rep,name=singlePlatformToken,proto3" json:"singlePlatformToken"`
}
@ -540,8 +542,8 @@ type SinglePlatformToken struct {
unknownFields protoimpl.UnknownFields
Platform string `protobuf:"bytes,1,opt,name=platform,proto3" json:"platform"`
Total int32 `protobuf:"varint,2,opt,name=total,proto3" json:"total"`
Token []string `protobuf:"bytes,3,rep,name=token,proto3" json:"token"`
Total int32 `protobuf:"varint,2,opt,name=total,proto3" json:"total"`
Token []string `protobuf:"bytes,3,rep,name=token,proto3" json:"token"`
}
func (x *SinglePlatformToken) Reset() {
@ -602,7 +604,7 @@ type KickUserOfflineReq struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
PlatformID int32 `protobuf:"varint,1,opt,name=platformID,proto3" json:"platformID"`
PlatformID int32 `protobuf:"varint,1,opt,name=platformID,proto3" json:"platformID"`
KickUserIDList []string `protobuf:"bytes,2,rep,name=kickUserIDList,proto3" json:"kickUserIDList"`
}
@ -695,9 +697,9 @@ type MultiTerminalLoginCheckReq struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
UserID string `protobuf:"bytes,1,opt,name=userID,proto3" json:"userID"`
UserID string `protobuf:"bytes,1,opt,name=userID,proto3" json:"userID"`
PlatformID int32 `protobuf:"varint,2,opt,name=platformID,proto3" json:"platformID"`
Token string `protobuf:"bytes,3,opt,name=token,proto3" json:"token"`
Token string `protobuf:"bytes,3,opt,name=token,proto3" json:"token"`
OperationID string `protobuf:"bytes,4,opt,name=operationID,proto3" json:"operationID"`
}
@ -804,11 +806,11 @@ type GetUsersOnlineStatusResp_SuccessDetail struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Platform string `protobuf:"bytes,1,opt,name=platform,proto3" json:"platform"`
Status string `protobuf:"bytes,2,opt,name=status,proto3" json:"status"`
ConnID string `protobuf:"bytes,3,opt,name=connID,proto3" json:"connID"`
Platform string `protobuf:"bytes,1,opt,name=platform,proto3" json:"platform"`
Status string `protobuf:"bytes,2,opt,name=status,proto3" json:"status"`
ConnID string `protobuf:"bytes,3,opt,name=connID,proto3" json:"connID"`
IsBackground bool `protobuf:"varint,4,opt,name=isBackground,proto3" json:"isBackground"`
Token string `protobuf:"bytes,5,opt,name=token,proto3" json:"token"`
Token string `protobuf:"bytes,5,opt,name=token,proto3" json:"token"`
}
func (x *GetUsersOnlineStatusResp_SuccessDetail) Reset() {
@ -930,8 +932,8 @@ type GetUsersOnlineStatusResp_SuccessResult struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
UserID string `protobuf:"bytes,1,opt,name=userID,proto3" json:"userID"`
Status string `protobuf:"bytes,2,opt,name=status,proto3" json:"status"`
UserID string `protobuf:"bytes,1,opt,name=userID,proto3" json:"userID"`
Status string `protobuf:"bytes,2,opt,name=status,proto3" json:"status"`
DetailPlatformStatus []*GetUsersOnlineStatusResp_SuccessDetail `protobuf:"bytes,3,rep,name=detailPlatformStatus,proto3" json:"detailPlatformStatus"`
}

@ -22,14 +22,16 @@ package push
import (
context "context"
sdkws "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/sdkws"
reflect "reflect"
sync "sync"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
sdkws "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/sdkws"
)
const (
@ -44,7 +46,7 @@ type PushMsgReq struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
MsgData *sdkws.MsgData `protobuf:"bytes,1,opt,name=msgData,proto3" json:"msgData"`
MsgData *sdkws.MsgData `protobuf:"bytes,1,opt,name=msgData,proto3" json:"msgData"`
ConversationID string `protobuf:"bytes,2,opt,name=conversationID,proto3" json:"conversationID"`
}
@ -137,7 +139,7 @@ type DelUserPushTokenReq struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
UserID string `protobuf:"bytes,1,opt,name=userID,proto3" json:"userID"`
UserID string `protobuf:"bytes,1,opt,name=userID,proto3" json:"userID"`
PlatformID int32 `protobuf:"varint,2,opt,name=platformID,proto3" json:"platformID"`
}

@ -21,11 +21,13 @@
package sdkws
import (
wrapperspb "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/wrapperspb"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
wrapperspb "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/wrapperspb"
)
const (
@ -87,23 +89,23 @@ type GroupInfo struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
GroupID string `protobuf:"bytes,1,opt,name=groupID,proto3" json:"groupID"`
GroupName string `protobuf:"bytes,2,opt,name=groupName,proto3" json:"groupName"`
Notification string `protobuf:"bytes,3,opt,name=notification,proto3" json:"notification"`
Introduction string `protobuf:"bytes,4,opt,name=introduction,proto3" json:"introduction"`
FaceURL string `protobuf:"bytes,5,opt,name=faceURL,proto3" json:"faceURL"`
OwnerUserID string `protobuf:"bytes,6,opt,name=ownerUserID,proto3" json:"ownerUserID"`
CreateTime int64 `protobuf:"varint,7,opt,name=createTime,proto3" json:"createTime"`
MemberCount uint32 `protobuf:"varint,8,opt,name=memberCount,proto3" json:"memberCount"`
Ex string `protobuf:"bytes,9,opt,name=ex,proto3" json:"ex"`
Status int32 `protobuf:"varint,10,opt,name=status,proto3" json:"status"`
CreatorUserID string `protobuf:"bytes,11,opt,name=creatorUserID,proto3" json:"creatorUserID"`
GroupType int32 `protobuf:"varint,12,opt,name=groupType,proto3" json:"groupType"`
NeedVerification int32 `protobuf:"varint,13,opt,name=needVerification,proto3" json:"needVerification"`
LookMemberInfo int32 `protobuf:"varint,14,opt,name=lookMemberInfo,proto3" json:"lookMemberInfo"`
ApplyMemberFriend int32 `protobuf:"varint,15,opt,name=applyMemberFriend,proto3" json:"applyMemberFriend"`
GroupID string `protobuf:"bytes,1,opt,name=groupID,proto3" json:"groupID"`
GroupName string `protobuf:"bytes,2,opt,name=groupName,proto3" json:"groupName"`
Notification string `protobuf:"bytes,3,opt,name=notification,proto3" json:"notification"`
Introduction string `protobuf:"bytes,4,opt,name=introduction,proto3" json:"introduction"`
FaceURL string `protobuf:"bytes,5,opt,name=faceURL,proto3" json:"faceURL"`
OwnerUserID string `protobuf:"bytes,6,opt,name=ownerUserID,proto3" json:"ownerUserID"`
CreateTime int64 `protobuf:"varint,7,opt,name=createTime,proto3" json:"createTime"`
MemberCount uint32 `protobuf:"varint,8,opt,name=memberCount,proto3" json:"memberCount"`
Ex string `protobuf:"bytes,9,opt,name=ex,proto3" json:"ex"`
Status int32 `protobuf:"varint,10,opt,name=status,proto3" json:"status"`
CreatorUserID string `protobuf:"bytes,11,opt,name=creatorUserID,proto3" json:"creatorUserID"`
GroupType int32 `protobuf:"varint,12,opt,name=groupType,proto3" json:"groupType"`
NeedVerification int32 `protobuf:"varint,13,opt,name=needVerification,proto3" json:"needVerification"`
LookMemberInfo int32 `protobuf:"varint,14,opt,name=lookMemberInfo,proto3" json:"lookMemberInfo"`
ApplyMemberFriend int32 `protobuf:"varint,15,opt,name=applyMemberFriend,proto3" json:"applyMemberFriend"`
NotificationUpdateTime int64 `protobuf:"varint,16,opt,name=notificationUpdateTime,proto3" json:"notificationUpdateTime"`
NotificationUserID string `protobuf:"bytes,17,opt,name=notificationUserID,proto3" json:"notificationUserID"`
NotificationUserID string `protobuf:"bytes,17,opt,name=notificationUserID,proto3" json:"notificationUserID"`
}
func (x *GroupInfo) Reset() {
@ -262,14 +264,14 @@ type GroupInfoForSet struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
GroupID string `protobuf:"bytes,1,opt,name=groupID,proto3" json:"groupID"`
GroupName string `protobuf:"bytes,2,opt,name=groupName,proto3" json:"groupName"`
Notification string `protobuf:"bytes,3,opt,name=notification,proto3" json:"notification"`
Introduction string `protobuf:"bytes,4,opt,name=introduction,proto3" json:"introduction"`
FaceURL string `protobuf:"bytes,5,opt,name=faceURL,proto3" json:"faceURL"`
Ex string `protobuf:"bytes,6,opt,name=ex,proto3" json:"ex"`
NeedVerification *wrapperspb.Int32Value `protobuf:"bytes,7,opt,name=needVerification,proto3" json:"needVerification"`
LookMemberInfo *wrapperspb.Int32Value `protobuf:"bytes,8,opt,name=lookMemberInfo,proto3" json:"lookMemberInfo"`
GroupID string `protobuf:"bytes,1,opt,name=groupID,proto3" json:"groupID"`
GroupName string `protobuf:"bytes,2,opt,name=groupName,proto3" json:"groupName"`
Notification string `protobuf:"bytes,3,opt,name=notification,proto3" json:"notification"`
Introduction string `protobuf:"bytes,4,opt,name=introduction,proto3" json:"introduction"`
FaceURL string `protobuf:"bytes,5,opt,name=faceURL,proto3" json:"faceURL"`
Ex string `protobuf:"bytes,6,opt,name=ex,proto3" json:"ex"`
NeedVerification *wrapperspb.Int32Value `protobuf:"bytes,7,opt,name=needVerification,proto3" json:"needVerification"`
LookMemberInfo *wrapperspb.Int32Value `protobuf:"bytes,8,opt,name=lookMemberInfo,proto3" json:"lookMemberInfo"`
ApplyMemberFriend *wrapperspb.Int32Value `protobuf:"bytes,9,opt,name=applyMemberFriend,proto3" json:"applyMemberFriend"`
}
@ -373,18 +375,18 @@ type GroupMemberFullInfo struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
GroupID string `protobuf:"bytes,1,opt,name=groupID,proto3" json:"groupID"`
UserID string `protobuf:"bytes,2,opt,name=userID,proto3" json:"userID"`
RoleLevel int32 `protobuf:"varint,3,opt,name=roleLevel,proto3" json:"roleLevel"`
JoinTime int64 `protobuf:"varint,4,opt,name=joinTime,proto3" json:"joinTime"`
Nickname string `protobuf:"bytes,5,opt,name=nickname,proto3" json:"nickname"`
FaceURL string `protobuf:"bytes,6,opt,name=faceURL,proto3" json:"faceURL"`
GroupID string `protobuf:"bytes,1,opt,name=groupID,proto3" json:"groupID"`
UserID string `protobuf:"bytes,2,opt,name=userID,proto3" json:"userID"`
RoleLevel int32 `protobuf:"varint,3,opt,name=roleLevel,proto3" json:"roleLevel"`
JoinTime int64 `protobuf:"varint,4,opt,name=joinTime,proto3" json:"joinTime"`
Nickname string `protobuf:"bytes,5,opt,name=nickname,proto3" json:"nickname"`
FaceURL string `protobuf:"bytes,6,opt,name=faceURL,proto3" json:"faceURL"`
AppMangerLevel int32 `protobuf:"varint,7,opt,name=appMangerLevel,proto3" json:"appMangerLevel"` //if >0
JoinSource int32 `protobuf:"varint,8,opt,name=joinSource,proto3" json:"joinSource"`
OperatorUserID string `protobuf:"bytes,9,opt,name=operatorUserID,proto3" json:"operatorUserID"`
Ex string `protobuf:"bytes,10,opt,name=ex,proto3" json:"ex"`
MuteEndTime int64 `protobuf:"varint,11,opt,name=muteEndTime,proto3" json:"muteEndTime"`
InviterUserID string `protobuf:"bytes,12,opt,name=inviterUserID,proto3" json:"inviterUserID"`
JoinSource int32 `protobuf:"varint,8,opt,name=joinSource,proto3" json:"joinSource"`
OperatorUserID string `protobuf:"bytes,9,opt,name=operatorUserID,proto3" json:"operatorUserID"`
Ex string `protobuf:"bytes,10,opt,name=ex,proto3" json:"ex"`
MuteEndTime int64 `protobuf:"varint,11,opt,name=muteEndTime,proto3" json:"muteEndTime"`
InviterUserID string `protobuf:"bytes,12,opt,name=inviterUserID,proto3" json:"inviterUserID"`
}
func (x *GroupMemberFullInfo) Reset() {
@ -508,10 +510,10 @@ type PublicUserInfo struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
UserID string `protobuf:"bytes,1,opt,name=userID,proto3" json:"userID"`
UserID string `protobuf:"bytes,1,opt,name=userID,proto3" json:"userID"`
Nickname string `protobuf:"bytes,2,opt,name=nickname,proto3" json:"nickname"`
FaceURL string `protobuf:"bytes,3,opt,name=faceURL,proto3" json:"faceURL"`
Ex string `protobuf:"bytes,4,opt,name=ex,proto3" json:"ex"`
FaceURL string `protobuf:"bytes,3,opt,name=faceURL,proto3" json:"faceURL"`
Ex string `protobuf:"bytes,4,opt,name=ex,proto3" json:"ex"`
}
func (x *PublicUserInfo) Reset() {
@ -579,12 +581,12 @@ type UserInfo struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
UserID string `protobuf:"bytes,1,opt,name=userID,proto3" json:"userID"`
Nickname string `protobuf:"bytes,2,opt,name=nickname,proto3" json:"nickname"`
FaceURL string `protobuf:"bytes,3,opt,name=faceURL,proto3" json:"faceURL"`
Ex string `protobuf:"bytes,4,opt,name=ex,proto3" json:"ex"`
CreateTime int64 `protobuf:"varint,5,opt,name=createTime,proto3" json:"createTime"`
AppMangerLevel int32 `protobuf:"varint,6,opt,name=appMangerLevel,proto3" json:"appMangerLevel"`
UserID string `protobuf:"bytes,1,opt,name=userID,proto3" json:"userID"`
Nickname string `protobuf:"bytes,2,opt,name=nickname,proto3" json:"nickname"`
FaceURL string `protobuf:"bytes,3,opt,name=faceURL,proto3" json:"faceURL"`
Ex string `protobuf:"bytes,4,opt,name=ex,proto3" json:"ex"`
CreateTime int64 `protobuf:"varint,5,opt,name=createTime,proto3" json:"createTime"`
AppMangerLevel int32 `protobuf:"varint,6,opt,name=appMangerLevel,proto3" json:"appMangerLevel"`
GlobalRecvMsgOpt int32 `protobuf:"varint,7,opt,name=globalRecvMsgOpt,proto3" json:"globalRecvMsgOpt"`
}
@ -674,13 +676,13 @@ type FriendInfo struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
OwnerUserID string `protobuf:"bytes,1,opt,name=ownerUserID,proto3" json:"ownerUserID"`
Remark string `protobuf:"bytes,2,opt,name=remark,proto3" json:"remark"`
CreateTime int64 `protobuf:"varint,3,opt,name=createTime,proto3" json:"createTime"`
FriendUser *UserInfo `protobuf:"bytes,4,opt,name=friendUser,proto3" json:"friendUser"`
AddSource int32 `protobuf:"varint,5,opt,name=addSource,proto3" json:"addSource"`
OwnerUserID string `protobuf:"bytes,1,opt,name=ownerUserID,proto3" json:"ownerUserID"`
Remark string `protobuf:"bytes,2,opt,name=remark,proto3" json:"remark"`
CreateTime int64 `protobuf:"varint,3,opt,name=createTime,proto3" json:"createTime"`
FriendUser *UserInfo `protobuf:"bytes,4,opt,name=friendUser,proto3" json:"friendUser"`
AddSource int32 `protobuf:"varint,5,opt,name=addSource,proto3" json:"addSource"`
OperatorUserID string `protobuf:"bytes,6,opt,name=operatorUserID,proto3" json:"operatorUserID"`
Ex string `protobuf:"bytes,7,opt,name=ex,proto3" json:"ex"`
Ex string `protobuf:"bytes,7,opt,name=ex,proto3" json:"ex"`
}
func (x *FriendInfo) Reset() {
@ -769,12 +771,12 @@ type BlackInfo struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
OwnerUserID string `protobuf:"bytes,1,opt,name=ownerUserID,proto3" json:"ownerUserID"`
CreateTime int64 `protobuf:"varint,2,opt,name=createTime,proto3" json:"createTime"`
BlackUserInfo *PublicUserInfo `protobuf:"bytes,3,opt,name=blackUserInfo,proto3" json:"blackUserInfo"`
AddSource int32 `protobuf:"varint,4,opt,name=addSource,proto3" json:"addSource"`
OwnerUserID string `protobuf:"bytes,1,opt,name=ownerUserID,proto3" json:"ownerUserID"`
CreateTime int64 `protobuf:"varint,2,opt,name=createTime,proto3" json:"createTime"`
BlackUserInfo *PublicUserInfo `protobuf:"bytes,3,opt,name=blackUserInfo,proto3" json:"blackUserInfo"`
AddSource int32 `protobuf:"varint,4,opt,name=addSource,proto3" json:"addSource"`
OperatorUserID string `protobuf:"bytes,5,opt,name=operatorUserID,proto3" json:"operatorUserID"`
Ex string `protobuf:"bytes,6,opt,name=ex,proto3" json:"ex"`
Ex string `protobuf:"bytes,6,opt,name=ex,proto3" json:"ex"`
}
func (x *BlackInfo) Reset() {
@ -856,16 +858,16 @@ type GroupRequest struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
UserInfo *PublicUserInfo `protobuf:"bytes,1,opt,name=userInfo,proto3" json:"userInfo"`
GroupInfo *GroupInfo `protobuf:"bytes,2,opt,name=groupInfo,proto3" json:"groupInfo"`
HandleResult int32 `protobuf:"varint,3,opt,name=handleResult,proto3" json:"handleResult"`
ReqMsg string `protobuf:"bytes,4,opt,name=reqMsg,proto3" json:"reqMsg"`
HandleMsg string `protobuf:"bytes,5,opt,name=handleMsg,proto3" json:"handleMsg"`
ReqTime int64 `protobuf:"varint,6,opt,name=reqTime,proto3" json:"reqTime"`
HandleUserID string `protobuf:"bytes,7,opt,name=handleUserID,proto3" json:"handleUserID"`
HandleTime int64 `protobuf:"varint,8,opt,name=handleTime,proto3" json:"handleTime"`
Ex string `protobuf:"bytes,9,opt,name=ex,proto3" json:"ex"`
JoinSource int32 `protobuf:"varint,10,opt,name=joinSource,proto3" json:"joinSource"`
UserInfo *PublicUserInfo `protobuf:"bytes,1,opt,name=userInfo,proto3" json:"userInfo"`
GroupInfo *GroupInfo `protobuf:"bytes,2,opt,name=groupInfo,proto3" json:"groupInfo"`
HandleResult int32 `protobuf:"varint,3,opt,name=handleResult,proto3" json:"handleResult"`
ReqMsg string `protobuf:"bytes,4,opt,name=reqMsg,proto3" json:"reqMsg"`
HandleMsg string `protobuf:"bytes,5,opt,name=handleMsg,proto3" json:"handleMsg"`
ReqTime int64 `protobuf:"varint,6,opt,name=reqTime,proto3" json:"reqTime"`
HandleUserID string `protobuf:"bytes,7,opt,name=handleUserID,proto3" json:"handleUserID"`
HandleTime int64 `protobuf:"varint,8,opt,name=handleTime,proto3" json:"handleTime"`
Ex string `protobuf:"bytes,9,opt,name=ex,proto3" json:"ex"`
JoinSource int32 `protobuf:"varint,10,opt,name=joinSource,proto3" json:"joinSource"`
InviterUserID string `protobuf:"bytes,11,opt,name=inviterUserID,proto3" json:"inviterUserID"`
}
@ -983,19 +985,19 @@ type FriendRequest struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
FromUserID string `protobuf:"bytes,1,opt,name=fromUserID,proto3" json:"fromUserID"`
FromNickname string `protobuf:"bytes,2,opt,name=fromNickname,proto3" json:"fromNickname"`
FromFaceURL string `protobuf:"bytes,3,opt,name=fromFaceURL,proto3" json:"fromFaceURL"`
ToUserID string `protobuf:"bytes,4,opt,name=toUserID,proto3" json:"toUserID"`
ToNickname string `protobuf:"bytes,5,opt,name=toNickname,proto3" json:"toNickname"`
ToFaceURL string `protobuf:"bytes,6,opt,name=toFaceURL,proto3" json:"toFaceURL"`
HandleResult int32 `protobuf:"varint,7,opt,name=handleResult,proto3" json:"handleResult"`
ReqMsg string `protobuf:"bytes,8,opt,name=reqMsg,proto3" json:"reqMsg"`
CreateTime int64 `protobuf:"varint,9,opt,name=createTime,proto3" json:"createTime"`
FromUserID string `protobuf:"bytes,1,opt,name=fromUserID,proto3" json:"fromUserID"`
FromNickname string `protobuf:"bytes,2,opt,name=fromNickname,proto3" json:"fromNickname"`
FromFaceURL string `protobuf:"bytes,3,opt,name=fromFaceURL,proto3" json:"fromFaceURL"`
ToUserID string `protobuf:"bytes,4,opt,name=toUserID,proto3" json:"toUserID"`
ToNickname string `protobuf:"bytes,5,opt,name=toNickname,proto3" json:"toNickname"`
ToFaceURL string `protobuf:"bytes,6,opt,name=toFaceURL,proto3" json:"toFaceURL"`
HandleResult int32 `protobuf:"varint,7,opt,name=handleResult,proto3" json:"handleResult"`
ReqMsg string `protobuf:"bytes,8,opt,name=reqMsg,proto3" json:"reqMsg"`
CreateTime int64 `protobuf:"varint,9,opt,name=createTime,proto3" json:"createTime"`
HandlerUserID string `protobuf:"bytes,10,opt,name=handlerUserID,proto3" json:"handlerUserID"`
HandleMsg string `protobuf:"bytes,11,opt,name=handleMsg,proto3" json:"handleMsg"`
HandleTime int64 `protobuf:"varint,12,opt,name=handleTime,proto3" json:"handleTime"`
Ex string `protobuf:"bytes,13,opt,name=ex,proto3" json:"ex"`
HandleMsg string `protobuf:"bytes,11,opt,name=handleMsg,proto3" json:"handleMsg"`
HandleTime int64 `protobuf:"varint,12,opt,name=handleTime,proto3" json:"handleTime"`
Ex string `protobuf:"bytes,13,opt,name=ex,proto3" json:"ex"`
}
func (x *FriendRequest) Reset() {
@ -1126,8 +1128,8 @@ type PullMessageBySeqsReq struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
UserID string `protobuf:"bytes,1,opt,name=userID,proto3" json:"userID"`
SeqRanges []*SeqRange `protobuf:"bytes,2,rep,name=seqRanges,proto3" json:"seqRanges"`
UserID string `protobuf:"bytes,1,opt,name=userID,proto3" json:"userID"`
SeqRanges []*SeqRange `protobuf:"bytes,2,rep,name=seqRanges,proto3" json:"seqRanges"`
Order PullOrder `protobuf:"varint,3,opt,name=order,proto3,enum=OpenIMServer.sdkws.PullOrder" json:"order"`
}
@ -1190,9 +1192,9 @@ type SeqRange struct {
unknownFields protoimpl.UnknownFields
ConversationID string `protobuf:"bytes,1,opt,name=conversationID,proto3" json:"conversationID"`
Begin int64 `protobuf:"varint,2,opt,name=begin,proto3" json:"begin"`
End int64 `protobuf:"varint,3,opt,name=end,proto3" json:"end"`
Num int64 `protobuf:"varint,4,opt,name=num,proto3" json:"num"`
Begin int64 `protobuf:"varint,2,opt,name=begin,proto3" json:"begin"`
End int64 `protobuf:"varint,3,opt,name=end,proto3" json:"end"`
Num int64 `protobuf:"varint,4,opt,name=num,proto3" json:"num"`
}
func (x *SeqRange) Reset() {
@ -1260,7 +1262,7 @@ type PullMsgs struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Msgs []*MsgData `protobuf:"bytes,1,rep,name=Msgs,proto3" json:"Msgs"`
Msgs []*MsgData `protobuf:"bytes,1,rep,name=Msgs,proto3" json:"Msgs"`
IsEnd bool `protobuf:"varint,2,opt,name=isEnd,proto3" json:"isEnd"`
}
@ -1315,7 +1317,7 @@ type PullMessageBySeqsResp struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Msgs map[string]*PullMsgs `protobuf:"bytes,1,rep,name=msgs,proto3" json:"msgs" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
Msgs map[string]*PullMsgs `protobuf:"bytes,1,rep,name=msgs,proto3" json:"msgs" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
NotificationMsgs map[string]*PullMsgs `protobuf:"bytes,2,rep,name=notificationMsgs,proto3" json:"notificationMsgs" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
}
@ -1474,7 +1476,7 @@ type UserSendMsgResp struct {
ServerMsgID string `protobuf:"bytes,1,opt,name=serverMsgID,proto3" json:"serverMsgID"`
ClientMsgID string `protobuf:"bytes,2,opt,name=clientMsgID,proto3" json:"clientMsgID"`
SendTime int64 `protobuf:"varint,3,opt,name=sendTime,proto3" json:"sendTime"`
SendTime int64 `protobuf:"varint,3,opt,name=sendTime,proto3" json:"sendTime"`
}
func (x *UserSendMsgResp) Reset() {
@ -1535,28 +1537,28 @@ type MsgData struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
SendID string `protobuf:"bytes,1,opt,name=sendID,proto3" json:"sendID"`
RecvID string `protobuf:"bytes,2,opt,name=recvID,proto3" json:"recvID"`
GroupID string `protobuf:"bytes,3,opt,name=groupID,proto3" json:"groupID"`
ClientMsgID string `protobuf:"bytes,4,opt,name=clientMsgID,proto3" json:"clientMsgID"`
ServerMsgID string `protobuf:"bytes,5,opt,name=serverMsgID,proto3" json:"serverMsgID"`
SendID string `protobuf:"bytes,1,opt,name=sendID,proto3" json:"sendID"`
RecvID string `protobuf:"bytes,2,opt,name=recvID,proto3" json:"recvID"`
GroupID string `protobuf:"bytes,3,opt,name=groupID,proto3" json:"groupID"`
ClientMsgID string `protobuf:"bytes,4,opt,name=clientMsgID,proto3" json:"clientMsgID"`
ServerMsgID string `protobuf:"bytes,5,opt,name=serverMsgID,proto3" json:"serverMsgID"`
SenderPlatformID int32 `protobuf:"varint,6,opt,name=senderPlatformID,proto3" json:"senderPlatformID"`
SenderNickname string `protobuf:"bytes,7,opt,name=senderNickname,proto3" json:"senderNickname"`
SenderFaceURL string `protobuf:"bytes,8,opt,name=senderFaceURL,proto3" json:"senderFaceURL"`
SessionType int32 `protobuf:"varint,9,opt,name=sessionType,proto3" json:"sessionType"`
MsgFrom int32 `protobuf:"varint,10,opt,name=msgFrom,proto3" json:"msgFrom"`
ContentType int32 `protobuf:"varint,11,opt,name=contentType,proto3" json:"contentType"`
Content []byte `protobuf:"bytes,12,opt,name=content,proto3" json:"content"`
Seq int64 `protobuf:"varint,14,opt,name=seq,proto3" json:"seq"`
SendTime int64 `protobuf:"varint,15,opt,name=sendTime,proto3" json:"sendTime"`
CreateTime int64 `protobuf:"varint,16,opt,name=createTime,proto3" json:"createTime"`
Status int32 `protobuf:"varint,17,opt,name=status,proto3" json:"status"`
IsRead bool `protobuf:"varint,18,opt,name=isRead,proto3" json:"isRead"`
Options map[string]bool `protobuf:"bytes,19,rep,name=options,proto3" json:"options" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"`
OfflinePushInfo *OfflinePushInfo `protobuf:"bytes,20,opt,name=offlinePushInfo,proto3" json:"offlinePushInfo"`
AtUserIDList []string `protobuf:"bytes,21,rep,name=atUserIDList,proto3" json:"atUserIDList"`
AttachedInfo string `protobuf:"bytes,22,opt,name=attachedInfo,proto3" json:"attachedInfo"`
Ex string `protobuf:"bytes,23,opt,name=ex,proto3" json:"ex"`
SenderNickname string `protobuf:"bytes,7,opt,name=senderNickname,proto3" json:"senderNickname"`
SenderFaceURL string `protobuf:"bytes,8,opt,name=senderFaceURL,proto3" json:"senderFaceURL"`
SessionType int32 `protobuf:"varint,9,opt,name=sessionType,proto3" json:"sessionType"`
MsgFrom int32 `protobuf:"varint,10,opt,name=msgFrom,proto3" json:"msgFrom"`
ContentType int32 `protobuf:"varint,11,opt,name=contentType,proto3" json:"contentType"`
Content []byte `protobuf:"bytes,12,opt,name=content,proto3" json:"content"`
Seq int64 `protobuf:"varint,14,opt,name=seq,proto3" json:"seq"`
SendTime int64 `protobuf:"varint,15,opt,name=sendTime,proto3" json:"sendTime"`
CreateTime int64 `protobuf:"varint,16,opt,name=createTime,proto3" json:"createTime"`
Status int32 `protobuf:"varint,17,opt,name=status,proto3" json:"status"`
IsRead bool `protobuf:"varint,18,opt,name=isRead,proto3" json:"isRead"`
Options map[string]bool `protobuf:"bytes,19,rep,name=options,proto3" json:"options" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"`
OfflinePushInfo *OfflinePushInfo `protobuf:"bytes,20,opt,name=offlinePushInfo,proto3" json:"offlinePushInfo"`
AtUserIDList []string `protobuf:"bytes,21,rep,name=atUserIDList,proto3" json:"atUserIDList"`
AttachedInfo string `protobuf:"bytes,22,opt,name=attachedInfo,proto3" json:"attachedInfo"`
Ex string `protobuf:"bytes,23,opt,name=ex,proto3" json:"ex"`
}
func (x *MsgData) Reset() {
@ -1750,7 +1752,7 @@ type PushMessages struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Msgs map[string]*PullMsgs `protobuf:"bytes,1,rep,name=msgs,proto3" json:"msgs" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
Msgs map[string]*PullMsgs `protobuf:"bytes,1,rep,name=msgs,proto3" json:"msgs" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
NotificationMsgs map[string]*PullMsgs `protobuf:"bytes,2,rep,name=notificationMsgs,proto3" json:"notificationMsgs" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
}
@ -1805,12 +1807,12 @@ type OfflinePushInfo struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title"`
Desc string `protobuf:"bytes,2,opt,name=desc,proto3" json:"desc"`
Ex string `protobuf:"bytes,3,opt,name=ex,proto3" json:"ex"`
IOSPushSound string `protobuf:"bytes,4,opt,name=iOSPushSound,proto3" json:"iOSPushSound"`
Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title"`
Desc string `protobuf:"bytes,2,opt,name=desc,proto3" json:"desc"`
Ex string `protobuf:"bytes,3,opt,name=ex,proto3" json:"ex"`
IOSPushSound string `protobuf:"bytes,4,opt,name=iOSPushSound,proto3" json:"iOSPushSound"`
IOSBadgeCount bool `protobuf:"varint,5,opt,name=iOSBadgeCount,proto3" json:"iOSBadgeCount"`
SignalInfo string `protobuf:"bytes,6,opt,name=signalInfo,proto3" json:"signalInfo"`
SignalInfo string `protobuf:"bytes,6,opt,name=signalInfo,proto3" json:"signalInfo"`
}
func (x *OfflinePushInfo) Reset() {
@ -1892,9 +1894,9 @@ type TipsComm struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Detail []byte `protobuf:"bytes,1,opt,name=detail,proto3" json:"detail"`
Detail []byte `protobuf:"bytes,1,opt,name=detail,proto3" json:"detail"`
DefaultTips string `protobuf:"bytes,2,opt,name=defaultTips,proto3" json:"defaultTips"`
JsonDetail string `protobuf:"bytes,3,opt,name=jsonDetail,proto3" json:"jsonDetail"`
JsonDetail string `protobuf:"bytes,3,opt,name=jsonDetail,proto3" json:"jsonDetail"`
}
func (x *TipsComm) Reset() {
@ -1956,9 +1958,9 @@ type GroupCreatedTips struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Group *GroupInfo `protobuf:"bytes,1,opt,name=group,proto3" json:"group"`
OpUser *GroupMemberFullInfo `protobuf:"bytes,2,opt,name=opUser,proto3" json:"opUser"`
MemberList []*GroupMemberFullInfo `protobuf:"bytes,3,rep,name=memberList,proto3" json:"memberList"`
Group *GroupInfo `protobuf:"bytes,1,opt,name=group,proto3" json:"group"`
OpUser *GroupMemberFullInfo `protobuf:"bytes,2,opt,name=opUser,proto3" json:"opUser"`
MemberList []*GroupMemberFullInfo `protobuf:"bytes,3,rep,name=memberList,proto3" json:"memberList"`
OperationTime int64 `protobuf:"varint,4,opt,name=operationTime,proto3" json:"operationTime"`
GroupOwnerUser *GroupMemberFullInfo `protobuf:"bytes,5,opt,name=groupOwnerUser,proto3" json:"groupOwnerUser"`
}
@ -2036,9 +2038,9 @@ type GroupInfoSetTips struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
OpUser *GroupMemberFullInfo `protobuf:"bytes,1,opt,name=opUser,proto3" json:"opUser"` //who do this
OpUser *GroupMemberFullInfo `protobuf:"bytes,1,opt,name=opUser,proto3" json:"opUser"` //who do this
MuteTime int64 `protobuf:"varint,2,opt,name=muteTime,proto3" json:"muteTime"`
Group *GroupInfo `protobuf:"bytes,3,opt,name=group,proto3" json:"group"`
Group *GroupInfo `protobuf:"bytes,3,opt,name=group,proto3" json:"group"`
}
func (x *GroupInfoSetTips) Reset() {
@ -2100,7 +2102,7 @@ type GroupInfoSetNameTips struct {
unknownFields protoimpl.UnknownFields
OpUser *GroupMemberFullInfo `protobuf:"bytes,1,opt,name=opUser,proto3" json:"opUser"` //who do this
Group *GroupInfo `protobuf:"bytes,2,opt,name=group,proto3" json:"group"`
Group *GroupInfo `protobuf:"bytes,2,opt,name=group,proto3" json:"group"`
}
func (x *GroupInfoSetNameTips) Reset() {
@ -2155,7 +2157,7 @@ type GroupInfoSetAnnouncementTips struct {
unknownFields protoimpl.UnknownFields
OpUser *GroupMemberFullInfo `protobuf:"bytes,1,opt,name=opUser,proto3" json:"opUser"` //who do this
Group *GroupInfo `protobuf:"bytes,2,opt,name=group,proto3" json:"group"`
Group *GroupInfo `protobuf:"bytes,2,opt,name=group,proto3" json:"group"`
}
func (x *GroupInfoSetAnnouncementTips) Reset() {
@ -2210,9 +2212,9 @@ type JoinGroupApplicationTips struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Group *GroupInfo `protobuf:"bytes,1,opt,name=group,proto3" json:"group"`
Group *GroupInfo `protobuf:"bytes,1,opt,name=group,proto3" json:"group"`
Applicant *PublicUserInfo `protobuf:"bytes,2,opt,name=applicant,proto3" json:"applicant"`
ReqMsg string `protobuf:"bytes,3,opt,name=reqMsg,proto3" json:"reqMsg"`
ReqMsg string `protobuf:"bytes,3,opt,name=reqMsg,proto3" json:"reqMsg"`
}
func (x *JoinGroupApplicationTips) Reset() {
@ -2276,8 +2278,8 @@ type MemberQuitTips struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Group *GroupInfo `protobuf:"bytes,1,opt,name=group,proto3" json:"group"`
QuitUser *GroupMemberFullInfo `protobuf:"bytes,2,opt,name=quitUser,proto3" json:"quitUser"`
Group *GroupInfo `protobuf:"bytes,1,opt,name=group,proto3" json:"group"`
QuitUser *GroupMemberFullInfo `protobuf:"bytes,2,opt,name=quitUser,proto3" json:"quitUser"`
OperationTime int64 `protobuf:"varint,3,opt,name=operationTime,proto3" json:"operationTime"`
}
@ -2340,9 +2342,9 @@ type GroupApplicationAcceptedTips struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Group *GroupInfo `protobuf:"bytes,1,opt,name=group,proto3" json:"group"`
OpUser *GroupMemberFullInfo `protobuf:"bytes,2,opt,name=opUser,proto3" json:"opUser"`
HandleMsg string `protobuf:"bytes,4,opt,name=handleMsg,proto3" json:"handleMsg"`
Group *GroupInfo `protobuf:"bytes,1,opt,name=group,proto3" json:"group"`
OpUser *GroupMemberFullInfo `protobuf:"bytes,2,opt,name=opUser,proto3" json:"opUser"`
HandleMsg string `protobuf:"bytes,4,opt,name=handleMsg,proto3" json:"handleMsg"`
ReceiverAs int32 `protobuf:"varint,5,opt,name=receiverAs,proto3" json:"receiverAs"` // admin(==1) or applicant(==0)
}
@ -2412,9 +2414,9 @@ type GroupApplicationRejectedTips struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Group *GroupInfo `protobuf:"bytes,1,opt,name=group,proto3" json:"group"`
OpUser *GroupMemberFullInfo `protobuf:"bytes,2,opt,name=opUser,proto3" json:"opUser"`
HandleMsg string `protobuf:"bytes,4,opt,name=handleMsg,proto3" json:"handleMsg"`
Group *GroupInfo `protobuf:"bytes,1,opt,name=group,proto3" json:"group"`
OpUser *GroupMemberFullInfo `protobuf:"bytes,2,opt,name=opUser,proto3" json:"opUser"`
HandleMsg string `protobuf:"bytes,4,opt,name=handleMsg,proto3" json:"handleMsg"`
ReceiverAs int32 `protobuf:"varint,5,opt,name=receiverAs,proto3" json:"receiverAs"` // admin(==1) or applicant(==0)
}
@ -2484,9 +2486,9 @@ type GroupOwnerTransferredTips struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Group *GroupInfo `protobuf:"bytes,1,opt,name=group,proto3" json:"group"`
OpUser *GroupMemberFullInfo `protobuf:"bytes,2,opt,name=opUser,proto3" json:"opUser"`
NewGroupOwner *GroupMemberFullInfo `protobuf:"bytes,3,opt,name=newGroupOwner,proto3" json:"newGroupOwner"`
Group *GroupInfo `protobuf:"bytes,1,opt,name=group,proto3" json:"group"`
OpUser *GroupMemberFullInfo `protobuf:"bytes,2,opt,name=opUser,proto3" json:"opUser"`
NewGroupOwner *GroupMemberFullInfo `protobuf:"bytes,3,opt,name=newGroupOwner,proto3" json:"newGroupOwner"`
OperationTime int64 `protobuf:"varint,4,opt,name=operationTime,proto3" json:"operationTime"`
}
@ -2556,8 +2558,8 @@ type MemberKickedTips struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Group *GroupInfo `protobuf:"bytes,1,opt,name=group,proto3" json:"group"`
OpUser *GroupMemberFullInfo `protobuf:"bytes,2,opt,name=opUser,proto3" json:"opUser"`
Group *GroupInfo `protobuf:"bytes,1,opt,name=group,proto3" json:"group"`
OpUser *GroupMemberFullInfo `protobuf:"bytes,2,opt,name=opUser,proto3" json:"opUser"`
KickedUserList []*GroupMemberFullInfo `protobuf:"bytes,3,rep,name=kickedUserList,proto3" json:"kickedUserList"`
OperationTime int64 `protobuf:"varint,4,opt,name=operationTime,proto3" json:"operationTime"`
}
@ -2628,10 +2630,10 @@ type MemberInvitedTips struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Group *GroupInfo `protobuf:"bytes,1,opt,name=group,proto3" json:"group"`
OpUser *GroupMemberFullInfo `protobuf:"bytes,2,opt,name=opUser,proto3" json:"opUser"`
Group *GroupInfo `protobuf:"bytes,1,opt,name=group,proto3" json:"group"`
OpUser *GroupMemberFullInfo `protobuf:"bytes,2,opt,name=opUser,proto3" json:"opUser"`
InvitedUserList []*GroupMemberFullInfo `protobuf:"bytes,3,rep,name=invitedUserList,proto3" json:"invitedUserList"`
OperationTime int64 `protobuf:"varint,4,opt,name=operationTime,proto3" json:"operationTime"`
OperationTime int64 `protobuf:"varint,4,opt,name=operationTime,proto3" json:"operationTime"`
}
func (x *MemberInvitedTips) Reset() {
@ -2700,8 +2702,8 @@ type MemberEnterTips struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Group *GroupInfo `protobuf:"bytes,1,opt,name=group,proto3" json:"group"`
EntrantUser *GroupMemberFullInfo `protobuf:"bytes,2,opt,name=entrantUser,proto3" json:"entrantUser"`
Group *GroupInfo `protobuf:"bytes,1,opt,name=group,proto3" json:"group"`
EntrantUser *GroupMemberFullInfo `protobuf:"bytes,2,opt,name=entrantUser,proto3" json:"entrantUser"`
OperationTime int64 `protobuf:"varint,3,opt,name=operationTime,proto3" json:"operationTime"`
}
@ -2763,8 +2765,8 @@ type GroupDismissedTips struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Group *GroupInfo `protobuf:"bytes,1,opt,name=group,proto3" json:"group"`
OpUser *GroupMemberFullInfo `protobuf:"bytes,2,opt,name=opUser,proto3" json:"opUser"`
Group *GroupInfo `protobuf:"bytes,1,opt,name=group,proto3" json:"group"`
OpUser *GroupMemberFullInfo `protobuf:"bytes,2,opt,name=opUser,proto3" json:"opUser"`
OperationTime int64 `protobuf:"varint,3,opt,name=operationTime,proto3" json:"operationTime"`
}
@ -2826,11 +2828,11 @@ type GroupMemberMutedTips struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Group *GroupInfo `protobuf:"bytes,1,opt,name=group,proto3" json:"group"`
OpUser *GroupMemberFullInfo `protobuf:"bytes,2,opt,name=opUser,proto3" json:"opUser"`
Group *GroupInfo `protobuf:"bytes,1,opt,name=group,proto3" json:"group"`
OpUser *GroupMemberFullInfo `protobuf:"bytes,2,opt,name=opUser,proto3" json:"opUser"`
OperationTime int64 `protobuf:"varint,3,opt,name=operationTime,proto3" json:"operationTime"`
MutedUser *GroupMemberFullInfo `protobuf:"bytes,4,opt,name=mutedUser,proto3" json:"mutedUser"`
MutedSeconds uint32 `protobuf:"varint,5,opt,name=mutedSeconds,proto3" json:"mutedSeconds"`
MutedUser *GroupMemberFullInfo `protobuf:"bytes,4,opt,name=mutedUser,proto3" json:"mutedUser"`
MutedSeconds uint32 `protobuf:"varint,5,opt,name=mutedSeconds,proto3" json:"mutedSeconds"`
}
func (x *GroupMemberMutedTips) Reset() {
@ -2905,10 +2907,10 @@ type GroupMemberCancelMutedTips struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Group *GroupInfo `protobuf:"bytes,1,opt,name=group,proto3" json:"group"`
OpUser *GroupMemberFullInfo `protobuf:"bytes,2,opt,name=opUser,proto3" json:"opUser"`
Group *GroupInfo `protobuf:"bytes,1,opt,name=group,proto3" json:"group"`
OpUser *GroupMemberFullInfo `protobuf:"bytes,2,opt,name=opUser,proto3" json:"opUser"`
OperationTime int64 `protobuf:"varint,3,opt,name=operationTime,proto3" json:"operationTime"`
MutedUser *GroupMemberFullInfo `protobuf:"bytes,4,opt,name=mutedUser,proto3" json:"mutedUser"`
MutedUser *GroupMemberFullInfo `protobuf:"bytes,4,opt,name=mutedUser,proto3" json:"mutedUser"`
}
func (x *GroupMemberCancelMutedTips) Reset() {
@ -2976,8 +2978,8 @@ type GroupMutedTips struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Group *GroupInfo `protobuf:"bytes,1,opt,name=group,proto3" json:"group"`
OpUser *GroupMemberFullInfo `protobuf:"bytes,2,opt,name=opUser,proto3" json:"opUser"`
Group *GroupInfo `protobuf:"bytes,1,opt,name=group,proto3" json:"group"`
OpUser *GroupMemberFullInfo `protobuf:"bytes,2,opt,name=opUser,proto3" json:"opUser"`
OperationTime int64 `protobuf:"varint,3,opt,name=operationTime,proto3" json:"operationTime"`
}
@ -3039,8 +3041,8 @@ type GroupCancelMutedTips struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Group *GroupInfo `protobuf:"bytes,1,opt,name=group,proto3" json:"group"`
OpUser *GroupMemberFullInfo `protobuf:"bytes,2,opt,name=opUser,proto3" json:"opUser"`
Group *GroupInfo `protobuf:"bytes,1,opt,name=group,proto3" json:"group"`
OpUser *GroupMemberFullInfo `protobuf:"bytes,2,opt,name=opUser,proto3" json:"opUser"`
OperationTime int64 `protobuf:"varint,3,opt,name=operationTime,proto3" json:"operationTime"`
}
@ -3102,10 +3104,10 @@ type GroupMemberInfoSetTips struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Group *GroupInfo `protobuf:"bytes,1,opt,name=group,proto3" json:"group"`
OpUser *GroupMemberFullInfo `protobuf:"bytes,2,opt,name=opUser,proto3" json:"opUser"`
Group *GroupInfo `protobuf:"bytes,1,opt,name=group,proto3" json:"group"`
OpUser *GroupMemberFullInfo `protobuf:"bytes,2,opt,name=opUser,proto3" json:"opUser"`
OperationTime int64 `protobuf:"varint,3,opt,name=operationTime,proto3" json:"operationTime"`
ChangedUser *GroupMemberFullInfo `protobuf:"bytes,4,opt,name=changedUser,proto3" json:"changedUser"`
ChangedUser *GroupMemberFullInfo `protobuf:"bytes,4,opt,name=changedUser,proto3" json:"changedUser"`
}
func (x *GroupMemberInfoSetTips) Reset() {
@ -3173,8 +3175,8 @@ type FriendApplication struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
AddTime int64 `protobuf:"varint,1,opt,name=addTime,proto3" json:"addTime"`
AddSource string `protobuf:"bytes,2,opt,name=addSource,proto3" json:"addSource"`
AddTime int64 `protobuf:"varint,1,opt,name=addTime,proto3" json:"addTime"`
AddSource string `protobuf:"bytes,2,opt,name=addSource,proto3" json:"addSource"`
AddWording string `protobuf:"bytes,3,opt,name=addWording,proto3" json:"addWording"`
}
@ -3237,7 +3239,7 @@ type FromToUserID struct {
unknownFields protoimpl.UnknownFields
FromUserID string `protobuf:"bytes,1,opt,name=fromUserID,proto3" json:"fromUserID"`
ToUserID string `protobuf:"bytes,2,opt,name=toUserID,proto3" json:"toUserID"`
ToUserID string `protobuf:"bytes,2,opt,name=toUserID,proto3" json:"toUserID"`
}
func (x *FromToUserID) Reset() {
@ -3341,7 +3343,7 @@ type FriendApplicationApprovedTips struct {
unknownFields protoimpl.UnknownFields
FromToUserID *FromToUserID `protobuf:"bytes,1,opt,name=fromToUserID,proto3" json:"fromToUserID"` //from同意者to请求发起者
HandleMsg string `protobuf:"bytes,2,opt,name=handleMsg,proto3" json:"handleMsg"`
HandleMsg string `protobuf:"bytes,2,opt,name=handleMsg,proto3" json:"handleMsg"`
}
func (x *FriendApplicationApprovedTips) Reset() {
@ -3397,7 +3399,7 @@ type FriendApplicationRejectedTips struct {
unknownFields protoimpl.UnknownFields
FromToUserID *FromToUserID `protobuf:"bytes,1,opt,name=fromToUserID,proto3" json:"fromToUserID"` //from拒绝者to请求发起者
HandleMsg string `protobuf:"bytes,2,opt,name=handleMsg,proto3" json:"handleMsg"`
HandleMsg string `protobuf:"bytes,2,opt,name=handleMsg,proto3" json:"handleMsg"`
}
func (x *FriendApplicationRejectedTips) Reset() {
@ -3452,9 +3454,9 @@ type FriendAddedTips struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Friend *FriendInfo `protobuf:"bytes,1,opt,name=friend,proto3" json:"friend"`
Friend *FriendInfo `protobuf:"bytes,1,opt,name=friend,proto3" json:"friend"`
OperationTime int64 `protobuf:"varint,2,opt,name=operationTime,proto3" json:"operationTime"`
OpUser *PublicUserInfo `protobuf:"bytes,3,opt,name=opUser,proto3" json:"opUser"` //who do this
OpUser *PublicUserInfo `protobuf:"bytes,3,opt,name=opUser,proto3" json:"opUser"` //who do this
}
func (x *FriendAddedTips) Reset() {
@ -3753,7 +3755,7 @@ type ConversationUpdateTips struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
UserID string `protobuf:"bytes,1,opt,name=userID,proto3" json:"userID"`
UserID string `protobuf:"bytes,1,opt,name=userID,proto3" json:"userID"`
ConversationIDList []string `protobuf:"bytes,2,rep,name=conversationIDList,proto3" json:"conversationIDList"`
}
@ -3808,8 +3810,8 @@ type ConversationSetPrivateTips struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
RecvID string `protobuf:"bytes,1,opt,name=recvID,proto3" json:"recvID"`
SendID string `protobuf:"bytes,2,opt,name=sendID,proto3" json:"sendID"`
RecvID string `protobuf:"bytes,1,opt,name=recvID,proto3" json:"recvID"`
SendID string `protobuf:"bytes,2,opt,name=sendID,proto3" json:"sendID"`
IsPrivate bool `protobuf:"varint,3,opt,name=isPrivate,proto3" json:"isPrivate"`
}
@ -3871,9 +3873,9 @@ type ConversationHasReadTips struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
UserID string `protobuf:"bytes,1,opt,name=userID,proto3" json:"userID"`
ConversationID string `protobuf:"bytes,2,opt,name=conversationID,proto3" json:"conversationID"`
HasReadSeq int64 `protobuf:"varint,3,opt,name=hasReadSeq,proto3" json:"hasReadSeq"`
UserID string `protobuf:"bytes,1,opt,name=userID,proto3" json:"userID"`
ConversationID string `protobuf:"bytes,2,opt,name=conversationID,proto3" json:"conversationID"`
HasReadSeq int64 `protobuf:"varint,3,opt,name=hasReadSeq,proto3" json:"hasReadSeq"`
UnreadCountTime int64 `protobuf:"varint,4,opt,name=unreadCountTime,proto3" json:"unreadCountTime"`
}
@ -4037,8 +4039,8 @@ type DeleteMessageTips struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
OpUserID string `protobuf:"bytes,1,opt,name=opUserID,proto3" json:"opUserID"`
UserID string `protobuf:"bytes,2,opt,name=userID,proto3" json:"userID"`
OpUserID string `protobuf:"bytes,1,opt,name=opUserID,proto3" json:"opUserID"`
UserID string `protobuf:"bytes,2,opt,name=userID,proto3" json:"userID"`
Seqs []int64 `protobuf:"varint,3,rep,packed,name=seqs,proto3" json:"seqs"`
}
@ -4100,11 +4102,11 @@ type RevokeMsgTips struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
RevokerUserID string `protobuf:"bytes,1,opt,name=revokerUserID,proto3" json:"revokerUserID"`
ClientMsgID string `protobuf:"bytes,2,opt,name=clientMsgID,proto3" json:"clientMsgID"`
RevokeTime int64 `protobuf:"varint,3,opt,name=revokeTime,proto3" json:"revokeTime"`
SesstionType int32 `protobuf:"varint,5,opt,name=sesstionType,proto3" json:"sesstionType"`
Seq int64 `protobuf:"varint,6,opt,name=seq,proto3" json:"seq"`
RevokerUserID string `protobuf:"bytes,1,opt,name=revokerUserID,proto3" json:"revokerUserID"`
ClientMsgID string `protobuf:"bytes,2,opt,name=clientMsgID,proto3" json:"clientMsgID"`
RevokeTime int64 `protobuf:"varint,3,opt,name=revokeTime,proto3" json:"revokeTime"`
SesstionType int32 `protobuf:"varint,5,opt,name=sesstionType,proto3" json:"sesstionType"`
Seq int64 `protobuf:"varint,6,opt,name=seq,proto3" json:"seq"`
ConversationID string `protobuf:"bytes,7,opt,name=conversationID,proto3" json:"conversationID"`
}
@ -4187,17 +4189,17 @@ type MessageRevokedContent struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
RevokerID string `protobuf:"bytes,1,opt,name=revokerID,proto3" json:"revokerID"`
RevokerRole int32 `protobuf:"varint,2,opt,name=revokerRole,proto3" json:"revokerRole"`
ClientMsgID string `protobuf:"bytes,3,opt,name=clientMsgID,proto3" json:"clientMsgID"`
RevokerNickname string `protobuf:"bytes,4,opt,name=revokerNickname,proto3" json:"revokerNickname"`
RevokeTime int64 `protobuf:"varint,5,opt,name=revokeTime,proto3" json:"revokeTime"`
SourceMessageSendTime int64 `protobuf:"varint,6,opt,name=sourceMessageSendTime,proto3" json:"sourceMessageSendTime"`
SourceMessageSendID string `protobuf:"bytes,7,opt,name=sourceMessageSendID,proto3" json:"sourceMessageSendID"`
RevokerID string `protobuf:"bytes,1,opt,name=revokerID,proto3" json:"revokerID"`
RevokerRole int32 `protobuf:"varint,2,opt,name=revokerRole,proto3" json:"revokerRole"`
ClientMsgID string `protobuf:"bytes,3,opt,name=clientMsgID,proto3" json:"clientMsgID"`
RevokerNickname string `protobuf:"bytes,4,opt,name=revokerNickname,proto3" json:"revokerNickname"`
RevokeTime int64 `protobuf:"varint,5,opt,name=revokeTime,proto3" json:"revokeTime"`
SourceMessageSendTime int64 `protobuf:"varint,6,opt,name=sourceMessageSendTime,proto3" json:"sourceMessageSendTime"`
SourceMessageSendID string `protobuf:"bytes,7,opt,name=sourceMessageSendID,proto3" json:"sourceMessageSendID"`
SourceMessageSenderNickname string `protobuf:"bytes,8,opt,name=sourceMessageSenderNickname,proto3" json:"sourceMessageSenderNickname"`
SessionType int32 `protobuf:"varint,10,opt,name=sessionType,proto3" json:"sessionType"`
Seq int64 `protobuf:"varint,11,opt,name=seq,proto3" json:"seq"`
Ex string `protobuf:"bytes,12,opt,name=ex,proto3" json:"ex"`
SessionType int32 `protobuf:"varint,10,opt,name=sessionType,proto3" json:"sessionType"`
Seq int64 `protobuf:"varint,11,opt,name=seq,proto3" json:"seq"`
Ex string `protobuf:"bytes,12,opt,name=ex,proto3" json:"ex"`
}
func (x *MessageRevokedContent) Reset() {
@ -4314,7 +4316,7 @@ type ClearConversationTips struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
UserID string `protobuf:"bytes,1,opt,name=userID,proto3" json:"userID"`
UserID string `protobuf:"bytes,1,opt,name=userID,proto3" json:"userID"`
ConversationIDs []string `protobuf:"bytes,2,rep,name=conversationIDs,proto3" json:"conversationIDs"`
}
@ -4369,9 +4371,9 @@ type DeleteMsgsTips struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
UserID string `protobuf:"bytes,1,opt,name=userID,proto3" json:"userID"`
UserID string `protobuf:"bytes,1,opt,name=userID,proto3" json:"userID"`
ConversationID string `protobuf:"bytes,2,opt,name=conversationID,proto3" json:"conversationID"`
Seqs []int64 `protobuf:"varint,3,rep,packed,name=seqs,proto3" json:"seqs"`
Seqs []int64 `protobuf:"varint,3,rep,packed,name=seqs,proto3" json:"seqs"`
}
func (x *DeleteMsgsTips) Reset() {
@ -4433,9 +4435,9 @@ type MarkAsReadTips struct {
unknownFields protoimpl.UnknownFields
MarkAsReadUserID string `protobuf:"bytes,1,opt,name=markAsReadUserID,proto3" json:"markAsReadUserID"`
ConversationID string `protobuf:"bytes,2,opt,name=conversationID,proto3" json:"conversationID"`
Seqs []int64 `protobuf:"varint,3,rep,packed,name=seqs,proto3" json:"seqs"`
HasReadSeq int64 `protobuf:"varint,4,opt,name=hasReadSeq,proto3" json:"hasReadSeq"`
ConversationID string `protobuf:"bytes,2,opt,name=conversationID,proto3" json:"conversationID"`
Seqs []int64 `protobuf:"varint,3,rep,packed,name=seqs,proto3" json:"seqs"`
HasReadSeq int64 `protobuf:"varint,4,opt,name=hasReadSeq,proto3" json:"hasReadSeq"`
}
func (x *MarkAsReadTips) Reset() {
@ -4503,7 +4505,7 @@ type SetAppBackgroundStatusReq struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
UserID string `protobuf:"bytes,1,opt,name=userID,proto3" json:"userID"`
UserID string `protobuf:"bytes,1,opt,name=userID,proto3" json:"userID"`
IsBackground bool `protobuf:"varint,2,opt,name=isBackground,proto3" json:"isBackground"`
}

@ -21,9 +21,10 @@
package statistics
import (
reflect "reflect"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
)
const (

@ -22,13 +22,14 @@ package third
import (
context "context"
reflect "reflect"
sync "sync"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (
@ -43,7 +44,7 @@ type KeyValues struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key"`
Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key"`
Values []string `protobuf:"bytes,2,rep,name=values,proto3" json:"values"`
}
@ -99,9 +100,9 @@ type SignPart struct {
unknownFields protoimpl.UnknownFields
PartNumber int32 `protobuf:"varint,1,opt,name=partNumber,proto3" json:"partNumber"`
Url string `protobuf:"bytes,2,opt,name=url,proto3" json:"url"`
Query []*KeyValues `protobuf:"bytes,3,rep,name=query,proto3" json:"query"`
Header []*KeyValues `protobuf:"bytes,4,rep,name=header,proto3" json:"header"`
Url string `protobuf:"bytes,2,opt,name=url,proto3" json:"url"`
Query []*KeyValues `protobuf:"bytes,3,rep,name=query,proto3" json:"query"`
Header []*KeyValues `protobuf:"bytes,4,rep,name=header,proto3" json:"header"`
}
func (x *SignPart) Reset() {
@ -169,10 +170,10 @@ type AuthSignParts struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url"`
Query []*KeyValues `protobuf:"bytes,2,rep,name=query,proto3" json:"query"`
Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url"`
Query []*KeyValues `protobuf:"bytes,2,rep,name=query,proto3" json:"query"`
Header []*KeyValues `protobuf:"bytes,3,rep,name=header,proto3" json:"header"`
Parts []*SignPart `protobuf:"bytes,4,rep,name=parts,proto3" json:"parts"`
Parts []*SignPart `protobuf:"bytes,4,rep,name=parts,proto3" json:"parts"`
}
func (x *AuthSignParts) Reset() {
@ -280,7 +281,7 @@ type PartLimitResp struct {
MinPartSize int64 `protobuf:"varint,1,opt,name=minPartSize,proto3" json:"minPartSize"`
MaxPartSize int64 `protobuf:"varint,2,opt,name=maxPartSize,proto3" json:"maxPartSize"`
MaxNumSize int32 `protobuf:"varint,3,opt,name=maxNumSize,proto3" json:"maxNumSize"`
MaxNumSize int32 `protobuf:"varint,3,opt,name=maxNumSize,proto3" json:"maxNumSize"`
}
func (x *PartLimitResp) Reset() {
@ -435,12 +436,12 @@ type InitiateMultipartUploadReq struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Hash string `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash"`
Size int64 `protobuf:"varint,2,opt,name=size,proto3" json:"size"`
PartSize int64 `protobuf:"varint,3,opt,name=partSize,proto3" json:"partSize"`
MaxParts int32 `protobuf:"varint,4,opt,name=maxParts,proto3" json:"maxParts"`
Cause string `protobuf:"bytes,5,opt,name=cause,proto3" json:"cause"`
Name string `protobuf:"bytes,6,opt,name=name,proto3" json:"name"`
Hash string `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash"`
Size int64 `protobuf:"varint,2,opt,name=size,proto3" json:"size"`
PartSize int64 `protobuf:"varint,3,opt,name=partSize,proto3" json:"partSize"`
MaxParts int32 `protobuf:"varint,4,opt,name=maxParts,proto3" json:"maxParts"`
Cause string `protobuf:"bytes,5,opt,name=cause,proto3" json:"cause"`
Name string `protobuf:"bytes,6,opt,name=name,proto3" json:"name"`
ContentType string `protobuf:"bytes,7,opt,name=contentType,proto3" json:"contentType"`
}
@ -530,9 +531,9 @@ type UploadInfo struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
UploadID string `protobuf:"bytes,1,opt,name=uploadID,proto3" json:"uploadID"`
PartSize int64 `protobuf:"varint,2,opt,name=partSize,proto3" json:"partSize"`
Sign *AuthSignParts `protobuf:"bytes,3,opt,name=sign,proto3" json:"sign"`
UploadID string `protobuf:"bytes,1,opt,name=uploadID,proto3" json:"uploadID"`
PartSize int64 `protobuf:"varint,2,opt,name=partSize,proto3" json:"partSize"`
Sign *AuthSignParts `protobuf:"bytes,3,opt,name=sign,proto3" json:"sign"`
ExpireTime int64 `protobuf:"varint,4,opt,name=expireTime,proto3" json:"expireTime"`
}
@ -601,7 +602,7 @@ type InitiateMultipartUploadResp struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url"`
Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url"`
Upload *UploadInfo `protobuf:"bytes,2,opt,name=upload,proto3" json:"upload"`
}
@ -656,7 +657,7 @@ type AuthSignReq struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
UploadID string `protobuf:"bytes,1,opt,name=uploadID,proto3" json:"uploadID"`
UploadID string `protobuf:"bytes,1,opt,name=uploadID,proto3" json:"uploadID"`
PartNumbers []int32 `protobuf:"varint,2,rep,packed,name=partNumbers,proto3" json:"partNumbers"`
}
@ -711,10 +712,10 @@ type AuthSignResp struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url"`
Query []*KeyValues `protobuf:"bytes,2,rep,name=query,proto3" json:"query"`
Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url"`
Query []*KeyValues `protobuf:"bytes,2,rep,name=query,proto3" json:"query"`
Header []*KeyValues `protobuf:"bytes,3,rep,name=header,proto3" json:"header"`
Parts []*SignPart `protobuf:"bytes,4,rep,name=parts,proto3" json:"parts"`
Parts []*SignPart `protobuf:"bytes,4,rep,name=parts,proto3" json:"parts"`
}
func (x *AuthSignResp) Reset() {
@ -782,11 +783,11 @@ type CompleteMultipartUploadReq struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
UploadID string `protobuf:"bytes,1,opt,name=uploadID,proto3" json:"uploadID"`
Parts []string `protobuf:"bytes,2,rep,name=parts,proto3" json:"parts"`
Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name"`
UploadID string `protobuf:"bytes,1,opt,name=uploadID,proto3" json:"uploadID"`
Parts []string `protobuf:"bytes,2,rep,name=parts,proto3" json:"parts"`
Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name"`
ContentType string `protobuf:"bytes,4,opt,name=contentType,proto3" json:"contentType"`
Cause string `protobuf:"bytes,5,opt,name=cause,proto3" json:"cause"`
Cause string `protobuf:"bytes,5,opt,name=cause,proto3" json:"cause"`
}
func (x *CompleteMultipartUploadReq) Reset() {
@ -955,7 +956,7 @@ type AccessURLResp struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url"`
Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url"`
ExpireTime int64 `protobuf:"varint,2,opt,name=expireTime,proto3" json:"expireTime"`
}
@ -1011,8 +1012,8 @@ type FcmUpdateTokenReq struct {
unknownFields protoimpl.UnknownFields
PlatformID int32 `protobuf:"varint,1,opt,name=platformID,proto3" json:"platformID"`
FcmToken string `protobuf:"bytes,2,opt,name=fcmToken,proto3" json:"fcmToken"`
Account string `protobuf:"bytes,3,opt,name=account,proto3" json:"account"`
FcmToken string `protobuf:"bytes,2,opt,name=fcmToken,proto3" json:"fcmToken"`
Account string `protobuf:"bytes,3,opt,name=account,proto3" json:"account"`
ExpireTime int64 `protobuf:"varint,4,opt,name=expireTime,proto3" json:"expireTime"`
}
@ -1119,7 +1120,7 @@ type SetAppBadgeReq struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
UserID string `protobuf:"bytes,1,opt,name=userID,proto3" json:"userID"`
UserID string `protobuf:"bytes,1,opt,name=userID,proto3" json:"userID"`
AppUnreadCount int32 `protobuf:"varint,2,opt,name=appUnreadCount,proto3" json:"appUnreadCount"`
}

@ -22,15 +22,17 @@ package user
import (
context "context"
conversation "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/conversation"
sdkws "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/sdkws"
reflect "reflect"
sync "sync"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
conversation "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/conversation"
sdkws "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/sdkws"
)
const (
@ -92,7 +94,7 @@ type GetAllUserIDResp struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Total int32 `protobuf:"varint,1,opt,name=total,proto3" json:"total"`
Total int32 `protobuf:"varint,1,opt,name=total,proto3" json:"total"`
UserIDs []string `protobuf:"bytes,2,rep,name=userIDs,proto3" json:"userIDs"`
}
@ -420,7 +422,7 @@ type SetGlobalRecvMessageOptReq struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
UserID string `protobuf:"bytes,1,opt,name=userID,proto3" json:"userID"`
UserID string `protobuf:"bytes,1,opt,name=userID,proto3" json:"userID"`
GlobalRecvMsgOpt int32 `protobuf:"varint,3,opt,name=globalRecvMsgOpt,proto3" json:"globalRecvMsgOpt"`
}
@ -513,9 +515,9 @@ type SetConversationReq struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Conversation *conversation.Conversation `protobuf:"bytes,1,opt,name=conversation,proto3" json:"conversation"`
Conversation *conversation.Conversation `protobuf:"bytes,1,opt,name=conversation,proto3" json:"conversation"`
NotificationType int32 `protobuf:"varint,2,opt,name=notificationType,proto3" json:"notificationType"`
OperationID string `protobuf:"bytes,3,opt,name=operationID,proto3" json:"operationID"`
OperationID string `protobuf:"bytes,3,opt,name=operationID,proto3" json:"operationID"`
}
func (x *SetConversationReq) Reset() {
@ -614,11 +616,11 @@ type SetRecvMsgOptReq struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
OwnerUserID string `protobuf:"bytes,1,opt,name=ownerUserID,proto3" json:"ownerUserID"`
ConversationID string `protobuf:"bytes,2,opt,name=conversationID,proto3" json:"conversationID"`
RecvMsgOpt int32 `protobuf:"varint,3,opt,name=recvMsgOpt,proto3" json:"recvMsgOpt"`
OwnerUserID string `protobuf:"bytes,1,opt,name=ownerUserID,proto3" json:"ownerUserID"`
ConversationID string `protobuf:"bytes,2,opt,name=conversationID,proto3" json:"conversationID"`
RecvMsgOpt int32 `protobuf:"varint,3,opt,name=recvMsgOpt,proto3" json:"recvMsgOpt"`
NotificationType int32 `protobuf:"varint,4,opt,name=notificationType,proto3" json:"notificationType"`
OperationID string `protobuf:"bytes,5,opt,name=operationID,proto3" json:"operationID"`
OperationID string `protobuf:"bytes,5,opt,name=operationID,proto3" json:"operationID"`
}
func (x *SetRecvMsgOptReq) Reset() {
@ -732,8 +734,8 @@ type GetConversationReq struct {
unknownFields protoimpl.UnknownFields
ConversationID string `protobuf:"bytes,1,opt,name=conversationID,proto3" json:"conversationID"`
OwnerUserID string `protobuf:"bytes,2,opt,name=ownerUserID,proto3" json:"ownerUserID"`
OperationID string `protobuf:"bytes,3,opt,name=operationID,proto3" json:"operationID"`
OwnerUserID string `protobuf:"bytes,2,opt,name=ownerUserID,proto3" json:"ownerUserID"`
OperationID string `protobuf:"bytes,3,opt,name=operationID,proto3" json:"operationID"`
}
func (x *GetConversationReq) Reset() {
@ -841,9 +843,9 @@ type GetConversationsReq struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
OwnerUserID string `protobuf:"bytes,1,opt,name=ownerUserID,proto3" json:"ownerUserID"`
OwnerUserID string `protobuf:"bytes,1,opt,name=ownerUserID,proto3" json:"ownerUserID"`
ConversationIDs []string `protobuf:"bytes,2,rep,name=conversationIDs,proto3" json:"conversationIDs"`
OperationID string `protobuf:"bytes,3,opt,name=operationID,proto3" json:"operationID"`
OperationID string `protobuf:"bytes,3,opt,name=operationID,proto3" json:"operationID"`
}
func (x *GetConversationsReq) Reset() {
@ -1053,10 +1055,10 @@ type BatchSetConversationsReq struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Conversations []*conversation.Conversation `protobuf:"bytes,1,rep,name=conversations,proto3" json:"conversations"`
OwnerUserID string `protobuf:"bytes,2,opt,name=OwnerUserID,proto3" json:"OwnerUserID"`
Conversations []*conversation.Conversation `protobuf:"bytes,1,rep,name=conversations,proto3" json:"conversations"`
OwnerUserID string `protobuf:"bytes,2,opt,name=OwnerUserID,proto3" json:"OwnerUserID"`
NotificationType int32 `protobuf:"varint,3,opt,name=notificationType,proto3" json:"notificationType"`
OperationID string `protobuf:"bytes,4,opt,name=OperationID,proto3" json:"OperationID"`
OperationID string `protobuf:"bytes,4,opt,name=OperationID,proto3" json:"OperationID"`
}
func (x *BatchSetConversationsReq) Reset() {
@ -1125,7 +1127,7 @@ type BatchSetConversationsResp struct {
unknownFields protoimpl.UnknownFields
Success []string `protobuf:"bytes,2,rep,name=Success,proto3" json:"Success"`
Failed []string `protobuf:"bytes,3,rep,name=Failed,proto3" json:"Failed"`
Failed []string `protobuf:"bytes,3,rep,name=Failed,proto3" json:"Failed"`
}
func (x *BatchSetConversationsResp) Reset() {
@ -1227,7 +1229,7 @@ type GetPaginationUsersResp struct {
unknownFields protoimpl.UnknownFields
Total int32 `protobuf:"varint,1,opt,name=total,proto3" json:"total"`
Users []*sdkws.UserInfo `protobuf:"bytes,2,rep,name=users,proto3" json:"users"`
Users []*sdkws.UserInfo `protobuf:"bytes,2,rep,name=users,proto3" json:"users"`
}
func (x *GetPaginationUsersResp) Reset() {
@ -1282,7 +1284,7 @@ type UserRegisterReq struct {
unknownFields protoimpl.UnknownFields
Secret string `protobuf:"bytes,1,opt,name=secret,proto3" json:"secret"`
Users []*sdkws.UserInfo `protobuf:"bytes,2,rep,name=users,proto3" json:"users"`
Users []*sdkws.UserInfo `protobuf:"bytes,2,rep,name=users,proto3" json:"users"`
}
func (x *UserRegisterReq) Reset() {
@ -1469,7 +1471,7 @@ type UserRegisterCountReq struct {
unknownFields protoimpl.UnknownFields
Start int64 `protobuf:"varint,1,opt,name=start,proto3" json:"start"`
End int64 `protobuf:"varint,2,opt,name=end,proto3" json:"end"`
End int64 `protobuf:"varint,2,opt,name=end,proto3" json:"end"`
}
func (x *UserRegisterCountReq) Reset() {
@ -1523,9 +1525,9 @@ type UserRegisterCountResp struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Total int64 `protobuf:"varint,1,opt,name=total,proto3" json:"total"`
Total int64 `protobuf:"varint,1,opt,name=total,proto3" json:"total"`
Before int64 `protobuf:"varint,2,opt,name=before,proto3" json:"before"`
Count map[string]int64 `protobuf:"bytes,3,rep,name=count,proto3" json:"count" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"`
Count map[string]int64 `protobuf:"bytes,3,rep,name=count,proto3" json:"count" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"`
}
func (x *UserRegisterCountResp) Reset() {
@ -1586,7 +1588,7 @@ type AccountCheckRespSingleUserStatus struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
UserID string `protobuf:"bytes,1,opt,name=userID,proto3" json:"userID"`
UserID string `protobuf:"bytes,1,opt,name=userID,proto3" json:"userID"`
AccountStatus string `protobuf:"bytes,2,opt,name=accountStatus,proto3" json:"accountStatus"`
}

@ -21,10 +21,11 @@
package wrapperspb
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
)
const (

@ -1,80 +0,0 @@
#!/usr/bin/env bash
# Copyright © 2023 OpenIM. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#Include shell font styles and some basic information
OPENIM_ROOT=$(dirname "${BASH_SOURCE[0]}")/..
# Include necessary files
source "$(dirname "${BASH_SOURCE[0]}")/../scripts.sh"
# Include specific functions and variables
source "$(dirname "${BASH_SOURCE[0]}")/../scripts/style_info.sh" \
"$OPENIM_ROOT/scripts/path_info.sh"
bin_dir="$BIN_DIR"
logs_dir="$OPENIM_ROOT/logs"
sdk_db_dir="$OPENIM_ROOT/sdk/db/"
#Automatically created when there is no bin, logs folder
if [ ! -d $bin_dir ]; then
mkdir -p $bin_dir
fi
if [ ! -d $logs_dir ]; then
mkdir -p $logs_dir
fi
if [ ! -d $sdk_db_dir ]; then
mkdir -p $sdk_db_dir
fi
#begin path
begin_path=$PWD
build_pid_array=()
for ((i = 0; i < ${#service_source_root[*]}; i++)); do
cd $begin_path
service_path=${service_source_root[$i]}
cd $service_path
make install > /dev/null &
build_pid=$!
build_pid_array[i]=$build_pid
done
echo "wait all build finish....."
success_num=0
for ((i = 0; i < ${#service_source_root[*]}; i++)); do
echo "wait pid: " ${build_pid_array[i]} ${service_names[$i]}
wait ${build_pid_array[i]}
stat=$?
echo ${service_names[$i]} "pid: " ${build_pid_array[i]} "stat: " $stat
if [ $stat == 0 ]
then
echo -e "${GREEN_PREFIX}${service_names[$i]} successfully be built ${COLOR_SUFFIX}\n"
let success_num=$success_num+1
else
echo -e "${RED_PREFIX}${service_names[$i]} build failed ${COLOR_SUFFIX}\n"
exit -1
fi
done
echo "success_num" $success_num "service num:" ${#service_source_root[*]}
if [ $success_num == ${#service_source_root[*]} ]
then
echo -e ${BACKGROUND_GREEN}"all services build success"${COLOR_SUFFIX}
fi

@ -13,21 +13,96 @@
# See the License for the specific language governing permissions and
# limitations under the License.
echo "docker-compose ps..........................."
cd ..
# Include shell font styles and some basic information
SCRIPTS_ROOT=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
OPENIM_ROOT=$(dirname "${BASH_SOURCE[0]}")/..
if command -v docker-compose &> /dev/null
then
source "$SCRIPTS_ROOT/style_info.sh"
echo -e "${GREEN_PREFIX}=========> Check docker-compose status ${COLOR_SUFFIX} \n"
trap 'onCtrlC' INT
function onCtrlC() {
kill -9 "${do_sth_pid}" "${progress_pid}" "${countdown_pid}"
echo
echo 'Ctrl+C is captured'
exit 1
}
cd "$OPENIM_ROOT"
if command -v docker-compose &> /dev/null; then
docker-compose ps
else
docker compose ps
fi
progress() {
local _main_pid="$1"
local _length=20
local _ratio=1
local _colors=("31" "32" "33" "34" "35" "36" "37")
local _wave=("▁" "▂" "▃" "▄" "▅" "▆" "▇" "█" "▇" "▆" "▅" "▄" "▃" "▂")
while pgrep -P "$_main_pid" &> /dev/null; do
local _mark='>'
local _progress_bar=
for ((i = 1; i <= _length; i++)); do
if ((i > _ratio)); then
_mark='-'
fi
_progress_bar="${_progress_bar}${_mark}"
done
local _color_idx=$((_ratio % ${#_colors[@]}))
local _color_prefix="\033[${_colors[_color_idx]}m"
local _reset_suffix="\033[0m"
local _wave_idx=$((_ratio % ${#_wave[@]}))
local _wave_progress=${_wave[_wave_idx]}
printf "Progress: ${_color_prefix}${_progress_bar}${_reset_suffix} ${_wave_progress} Countdown: %2ds \r" "$_countdown"
((_ratio++))
((_ratio > _length)) && _ratio=1
sleep 0.1
done
}
countdown() {
local _duration="$1"
for ((i = _duration; i >= 1; i--)); do
printf "\rCountdown: %2ds \r" "$i"
sleep 1
done
printf "\rCountdown: %2ds \r" "$_duration"
}
do_sth() {
echo "++++++++++++++++++++++++"
progress $$ &
local _progress_pid=$!
local _countdown=30
countdown "$_countdown" &
local _countdown_pid=$!
sleep 30
kill "$_progress_pid" "$_countdown_pid"
"${SCRIPTS_ROOT}/check_all.sh"
echo -e "${PURPLE_PREFIX}=========> Check docker-compose status ${COLOR_SUFFIX} \n"
}
set -e
cd scripts
echo "check OpenIM................................"
do_sth &
do_sth_pid=$(jobs -p | tail -1)
sleep 30
./check_all.sh
progress "${do_sth_pid}" &
progress_pid=$(jobs -p | tail -1)
wait "${do_sth_pid}"
printf "Progress: done \n"

@ -13,7 +13,16 @@
# See the License for the specific language governing permissions and
# limitations under the License.
source ./style_info.sh
#Include shell font styles and some basic information
SCRIPTS_ROOT=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
OPENIM_ROOT=$(dirname "${SCRIPTS_ROOT}")/..
#Include shell font styles and some basic information
source $SCRIPTS_ROOT/style_info.sh
source $SCRIPTS_ROOT/path_info.sh
source $SCRIPTS_ROOT/function.sh
cd $SCRIPTS_ROOT
echo -e "check time synchronize.................................."
t=`curl http://time.akamai.com/?iso -s`
@ -27,7 +36,6 @@ else
fi
echo -e "check login user........................................"
user=`whoami`
if [ $user == "root" ] ; then
@ -36,8 +44,6 @@ else
echo -e ${RED_PREFIX}"Warning: The current user is not root "${COLOR_SUFFIX}
fi
echo -e "check docker............................................"
docker_running=`systemctl status docker | grep running | grep active | wc -l`

@ -14,7 +14,18 @@
# See the License for the specific language governing permissions and
# limitations under the License.
source ../.env
#Include shell font styles and some basic information
SCRIPTS_ROOT=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
OPENIM_ROOT=$(dirname "${SCRIPTS_ROOT}")/..
#Include shell font styles and some basic information
source $SCRIPTS_ROOT/style_info.sh
source $SCRIPTS_ROOT/path_info.sh
source $SCRIPTS_ROOT/function.sh
cd $SCRIPTS_ROOT
source $OPENIM_ROOT/.env
# Check if PASSWORD only contains letters and numbers
if [[ "$PASSWORD" =~ ^[a-zA-Z0-9]+$ ]]
@ -25,16 +36,18 @@ else
exit
fi
echo "your user is:$USER"
echo "your password is:$PASSWORD"
echo "your minio endPoint is:$MINIO_ENDPOINT"
echo "your data dir is $DATA_DIR"
echo ""
echo -e "===> ${PURPLE_PREFIX} you user is:$USER ${COLOR_SUFFIX}"
echo -e "===> ${PURPLE_PREFIX} you password is:$PASSWORD ${COLOR_SUFFIX}"
echo -e "===> ${PURPLE_PREFIX} you minio endpoint is:$MINIO_ENDPOINT ${COLOR_SUFFIX}"
echo -e "===> ${PURPLE_PREFIX} you api url is:$API_URL ${COLOR_SUFFIX}"
echo ""
# Specify the config file
config_file='../config/config.yaml'
config_file=${OPENIM_ROOT}/config/config.yaml
# Load variables from .env file
source ../.env
source ${OPENIM_ROOT}/.env
# Replace the password and username field for mysql
sed -i "/mysql:/,/database:/ s/password:.*/password: $PASSWORD/" $config_file

@ -0,0 +1,122 @@
# Copyright © 2023 OpenIM. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#Include shell font styles and some basic information
SCRIPTS_ROOT=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
OPENIM_ROOT=$(dirname "${BASH_SOURCE[0]}")/..
# docker-compose.yaml file name
docker_compose_file_name="docker-compose.yaml"
trap 'onCtrlC' INT
function onCtrlC () {
#Capture CTRL+C, terminate the background process of the program when the script is terminated in the form of ctrl+c
kill -9 ${do_sth_pid} ${progress_pid}
echo
echo 'Ctrl+C is captured'
exit 1
}
do_sth() {
#Main program to run
echo "++++++++++++++++++++++++"
sleep 5
echo "++++++++++++++++++++++++"
sleep 10
}
#Import environment variables
source .env
#Get the public IP address of the local machine
internet_ip=$(curl ifconfig.me -s)
echo -e "\033[1;34mCurrent public IP address: ${internet_ip}\033[0m\n"
#If MINIO_ENDPOINT is "http://127.0.0.1:10005", replace it with the current public IP address
if [[ $MINIO_ENDPOINT == "http://127.0.0.1:10005" ]]; then
sed -i "s/127.0.0.1/${internet_ip}/" .env
fi
do_progress_bar() {
local duration=${1}
local max_progress=20
local current_progress=0
while true; do
((current_progress++))
if [[ $current_progress -gt $max_progress ]]; then
break
fi
sleep "$duration"
echo "=====> Progress: [${current_progress}/${max_progress}]"
done
}
#Start Docker containers
start_docker_containers() {
if command -v docker-compose >/dev/null 2>&1; then
echo -e "\033[1;34mFound docker-compose command, starting docker containers...\033[0m\n"
docker-compose -f ${OPENIM_ROOT}/${docker_compose_file_name} up -d
else
if command -v docker >/dev/null 2>&1; then
echo -e "\033[1;34mFound docker command, starting docker containers...\033[0m\n"
docker compose -f ${OPENIM_ROOT}/${docker_compose_file_name} up -d
else
echo -e "\033[1;31mFailed to find docker-compose or docker command, please make sure they are installed and configured correctly.\033[0m"
return 1
fi
fi
}
#Execute scripts
setup_script() {
chmod +x ${SCRIPTS_ROOT}/*.sh
echo -e "\033[1;34m============>Executing init_pwd.sh script...\033[0m\n"
${SCRIPTS_ROOT}/init_pwd.sh
echo -e "\033[1;34m============>Executing env_check.sh script...\033[0m\n"
${SCRIPTS_ROOT}/env_check.sh
}
setup_script &
#Start Docker containers (timeout 10 seconds)
start_docker_containers
docker_pid=$!
timeout 10s tail --pid=${docker_pid} -f /dev/null
docker_exit_code=$?
if [ $docker_exit_code -eq 0 ]; then
echo -e "\033[1;32m============>Docker containers started successfully!\033[0m\n"
else
echo -e "\033[1;31m============>Failed to start Docker containers, please check the environment configuration and dependencies.\033[0m\n"
exit 1
fi
echo -e "\033[1;34m============>Executing docker_check_service.sh script...\033[0m\n"
#View running Docker containers
echo -e "\033[1;34m============>Viewing running Docker containers...\033[0m\n"
echo ""
docker ps
#Replace the progress bar section with the pv command
echo -e "\033[1;34m============>Starting progress bar...\033[0m\n"
do_progress_bar 0.5 | pv -l -s 20 > /dev/null
echo -e "\033[1;34m============>Progress bar completed.\033[0m\n"
#Execute the main program
do_sth

@ -0,0 +1,82 @@
#!/usr/bin/env bash
# Copyright © 2023 OpenIM. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# Common utilities, variables and checks for all build scripts.
set -o errexit
set -o nounset
set -o pipefail
#Include shell font styles and some basic information
SCRIPTS_ROOT=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
OPENIM_ROOT=$(dirname "${BASH_SOURCE[0]}")/..
source $SCRIPTS_ROOT/style_info.sh
# docker-compose.yaml file name
docker_compose_file_name="docker-compose.yaml"
trap 'onCtrlC' INT
function onCtrlC () {
#Capture CTRL+C, terminate the background process of the program when the script is terminated in the form of ctrl+c
kill -9 ${do_sth_pid} ${progress_pid}
echo
echo 'Ctrl+C is captured'
exit 1
}
# Get the public internet IP address
internet_ip=$(curl ifconfig.me -s)
echo -e "${PURPLE_PREFIX}=========> Your public internet IP address is ${internet_ip} ${COLOR_SUFFIX} \n"
# Load environment variables from .env file
source ${OPENIM_ROOT}/.env
echo -e "${PURPLE_PREFIX}=========> Your minio endpoint is ${MINIO_ENDPOINT} ${COLOR_SUFFIX} \n"
# Change directory to scripts folder
chmod +x ${SCRIPTS_ROOT}/*.sh
# Execute necessary scripts
echo -e "${PURPLE_PREFIX}=========> init_pwd.sh ${COLOR_SUFFIX} \n"
${SCRIPTS_ROOT}/init_pwd.sh
echo -e "${PURPLE_PREFIX}=========> env_check.sh ${COLOR_SUFFIX} \n"
${SCRIPTS_ROOT}/env_check.sh
# Replace local IP address with the public IP address in .env file
if [ $API_URL == "http://127.0.0.1:10002/object/" ]; then
sed -i "s/127.0.0.1/${internet_ip}/" ${OPENIM_ROOT}/.env
fi
if [ $MINIO_ENDPOINT == "http://127.0.0.1:10005" ]; then
sed -i "s/127.0.0.1/${internet_ip}/" ${OPENIM_ROOT}/.env
fi
# Go back to the previous directory
cd ${OPENIM_ROOT}
# Check if docker-compose command is available
if command -v docker-compose &> /dev/null
then
docker-compose up -d
else
docker compose up -d
fi
${SCRIPTS_ROOT}/docker_check_service.sh

@ -131,6 +131,12 @@ go.build.%:
$(BIN_DIR)/platforms/$(OS)/$(ARCH)/$(COMMAND)$(GO_OUT_EXT) $(ROOT_DIR)/cmd/$(COMMAND)/main.go; \
fi
## go.install: Install deployment openim
.PHONY: go.install
go.install:
@echo "===========> Installing deployment openim"
@$(ROOT_DIR)/scripts/install_im_server.sh
## go.multiarch: Build multi-arch binaries
.PHONY: go.build.multiarch
go.build.multiarch: go.build.verify $(foreach p,$(PLATFORMS),$(addprefix go.build., $(addprefix $(p)., $(BINS))))

@ -21,28 +21,12 @@
# https://docs.docker.com/build/building/multi-platform/
#
# PLATFORMS defines the target platforms for the manager image be build to provide support to multiple
# architectures. (i.e. make docker-buildx IMG=myregistry/mypoperator:0.0.1). To use this option you need to:
# - able to use docker buildx . More info: https://docs.docker.com/build/buildx/
# - have enable BuildKit, More info: https://docs.docker.com/develop/develop-images/build_enhancements/
# - be able to push the image for your registry (i.e. if you do not inform a valid value via IMG=<myregistry/image:<tag>> then the export will fail)
# To properly provided solutions that supports more than one platform you should use this option.
PLATFORMS ?= linux/arm64,linux/amd64,linux/s390x,linux/ppc64le
.PHONY: docker-buildx
docker-buildx: test ## Build and push docker image for the manager for cross-platform support
# copy existing Dockerfile and insert --platform=${BUILDPLATFORM} into Dockerfile.cross, and preserve the original Dockerfile
sed -e '1 s/\(^FROM\)/FROM --platform=\$$\{BUILDPLATFORM\}/; t' -e ' 1,// s//FROM --platform=\$$\{BUILDPLATFORM\}/' Dockerfile > Dockerfile.cross
- docker buildx create --name project-v3-builder
docker buildx use project-v3-builder
- docker buildx build --push --platform=$(PLATFORMS) --tag ${IMG} -f Dockerfile.cross .
- docker buildx rm project-v3-builder
rm Dockerfile.cross
DOCKER := docker
DOCKER_SUPPORTED_API_VERSION ?= 1.32|1.40|1.41
REGISTRY_PREFIX ?= cubxxw
BASE_IMAGE = centos:centos8
REGISTRY_PREFIX ?= ghcr.io/OpenIMSDK
IMAGES ?= lvscare
IMAGE_PLAT ?= $(subst $(SPACE),$(COMMA),$(subst _,/,$(PLATFORMS)))
EXTRA_ARGS ?= --no-cache
_DOCKER_BUILD_EXTRA_ARGS :=
@ -60,14 +44,32 @@ IMAGES_DIR ?= $(wildcard ${ROOT_DIR}/build/docker/*)
# Determine images names by stripping out the dir names
IMAGES ?= $(filter-out tools,$(foreach image,${IMAGES_DIR},$(notdir ${image})))
# ifeq (${IMAGES},)
# $(error Could not determine IMAGES, set ROOT_DIR or run in source dir)
# endif
ifeq (${IMAGES},)
$(error Could not determine IMAGES, set ROOT_DIR or run in source dir)
endif
# ==============================================================================
# Image targets
# ==============================================================================
# PLATFORMS defines the target platforms for the manager image be build to provide support to multiple
# architectures. (i.e. make docker-buildx IMG=myregistry/mypoperator:0.0.1). To use this option you need to:
# - able to use docker buildx . More info: https://docs.docker.com/build/buildx/
# - have enable BuildKit, More info: https://docs.docker.com/develop/develop-images/build_enhancements/
# - be able to push the image for your registry (i.e. if you do not inform a valid value via IMG=<myregistry/image:<tag>> then the export will fail)
# To properly provided solutions that supports more than one platform you should use this option.
## Build and push docker image for the manager for cross-platform support
PLATFORMS ?= linux/arm64,linux/amd64,linux/s390x,linux/ppc64le
# copy existing Dockerfile and insert --platform=${BUILDPLATFORM} into Dockerfile.cross, and preserve the original Dockerfile
.PHONY: docker-buildx
docker-buildx:
sed -e '1 s/\(^FROM\)/FROM --platform=\$$\{BUILDPLATFORM\}/; t' -e ' 1,// s//FROM --platform=\$$\{BUILDPLATFORM\}/' Dockerfile > Dockerfile.cross
- $(CONTAINER_TOOL) buildx create --name project-v3-builder
$(CONTAINER_TOOL) buildx use project-v3-builder
- $(CONTAINER_TOOL) buildx build --push --platform=$(PLATFORMS) --tag ${IMAGES} -f Dockerfile.cross .
- $(CONTAINER_TOOL) buildx rm project-v3-builder
rm Dockerfile.cross
## image.verify: Verify docker version
.PHONY: image.verify
image.verify:
@ -93,31 +95,32 @@ image.daemon.verify:
# More info: https://docs.docker.com/develop/develop-images/build_enhancements/
## image.build: Build docker images
.PHONY: image.build
image.build: image.verify go.build.verify $(addprefix image.build., $(addprefix $(IMAGE_PLAT)., $(IMAGES)))
image.build: image.verify $(addprefix image.build., $(addprefix $(PLATFORM)., $(IMAGES)))
## image.build.multiarch: Build docker images for all platforms
.PHONY: image.build.multiarch
image.build.multiarch: image.verify go.build.verify $(foreach p,$(PLATFORMS),$(addprefix image.build., $(addprefix $(p)., $(IMAGES))))
image.build.multiarch: image.verify $(foreach p,$(PLATFORMS),$(addprefix image.build., $(addprefix $(p)., $(IMAGES))))
## image.build.%: Build docker image for a specific platform
.PHONY: image.build.%
image.build.%: go.build.%
image.build.%: go.bin.%
$(eval IMAGE := $(COMMAND))
$(eval IMAGE_PLAT := $(subst _,/,$(PLATFORM)))
@echo "===========> Building docker image $(IMAGE) $(VERSION) for $(IMAGE_PLAT)"
@mkdir -p $(TMP_DIR)/$(IMAGE)
@cat $(ROOT_DIR)/build/docker/$(IMAGE)/Dockerfile\
| sed "s#BASE_IMAGE#$(BASE_IMAGE)#g" >$(TMP_DIR)/$(IMAGE)/Dockerfile
@cp $(OUTPUT_DIR)/platforms/$(IMAGE_PLAT)/$(IMAGE) $(TMP_DIR)/$(IMAGE)/
@DST_DIR=$(TMP_DIR)/$(IMAGE) $(ROOT_DIR)/build/docker/$(IMAGE)/build.sh 2>/dev/null || true
$(eval BUILD_SUFFIX := $(_DOCKER_BUILD_EXTRA_ARGS) --pull -t $(REGISTRY_PREFIX)/$(IMAGE)-$(ARCH):$(VERSION) $(TMP_DIR)/$(IMAGE))
@if [ $(shell $(GO) env GOARCH) != $(ARCH) ] ; then \
$(MAKE) image.daemon.verify ;\
$(DOCKER) build --platform $(IMAGE_PLAT) $(BUILD_SUFFIX) ; \
$(eval ARCH := $(word 2,$(subst _, ,$(PLATFORM))))
@echo "===========> Building LOCAL docker image $(IMAGE) $(VERSION) for $(IMAGE_PLAT)"
@mkdir -p $(TMP_DIR)/$(IMAGE)/$(PLATFORM)
@cat $(ROOT_DIR)/docker/$(IMAGE)/Dockerfile\
>$(TMP_DIR)/$(IMAGE)/Dockerfile
@cp $(BIN_DIR)/$(PLATFORM)/$(IMAGE) $(TMP_DIR)/$(IMAGE)/$(PLATFORM)
$(eval BUILD_SUFFIX := --load --pull -t $(REGISTRY_PREFIX)/$(IMAGE):$(VERSION) $(TMP_DIR)/$(IMAGE))
$(eval BUILD_SUFFIX_ARM := --load --pull -t $(REGISTRY_PREFIX)/$(IMAGE).$(ARCH):$(VERSION) $(TMP_DIR)/$(IMAGE))
@if [ "$(ARCH)" == "amd64" ]; then \
echo "===========> Creating LOCAL docker image tag $(REGISTRY_PREFIX)/$(IMAGE):$(VERSION) for $(ARCH)"; \
$(DOCKER) buildx build --platform $(IMAGE_PLAT) $(BUILD_SUFFIX); \
else \
$(DOCKER) build $(BUILD_SUFFIX) ; \
echo "===========> Creating LOCAL docker image tag $(REGISTRY_PREFIX)/$(IMAGE).$(ARCH):$(VERSION) for $(ARCH)"; \
$(DOCKER) buildx build --platform $(IMAGE_PLAT) $(BUILD_SUFFIX_ARM); \
fi
@rm -rf $(TMP_DIR)/$(IMAGE)
# https://docs.docker.com/build/building/multi-platform/
# busybox image supports amd64, arm32v5, arm32v6, arm32v7, arm64v8, i386, ppc64le, and s390x

@ -130,6 +130,11 @@ install.gsemver:
install.git-chglog:
@$(GO) install github.com/git-chglog/git-chglog/cmd/git-chglog@latest
## install.ko: Install ko, used to build go program into container images
.PHONY: install.ko
install.ko:
@$(GO) install github.com/google/ko@latest
## install.github-release: Install github-release, used to create github release
.PHONY: install.github-release
install.github-release:
@ -149,6 +154,11 @@ install.coscli:
install.coscmd:
@if which pip &>/dev/null; then pip install coscmd; else pip3 install coscmd; fi
## install.minio: Install minio, used to upload files to minio
.PHONY: install.minio
install.minio:
@$(GO) install github.com/minio/minio@latest
## install.delve: Install delve, used to debug go program
.PHONY: install.delve
install.delve:

@ -13,6 +13,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
# Common utilities, variables and checks for all build scripts.
#Include shell font styles and some basic information
SCRIPTS_ROOT=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
OPENIM_ROOT=$(dirname "${BASH_SOURCE[0]}")/..

@ -1 +1,15 @@
#!/usr/bin/env bash
# Copyright © 2023 OpenIM. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

Loading…
Cancel
Save