mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-10-25 20:52:11 +08:00
commit
d626d6b42f
71
.github/workflows/codeql-analysis.yml
vendored
Normal file
71
.github/workflows/codeql-analysis.yml
vendored
Normal file
@ -0,0 +1,71 @@
|
||||
# For most projects, this workflow file will not need changing; you simply need
|
||||
# to commit it to your repository.
|
||||
#
|
||||
# You may wish to alter this file to override the set of languages analyzed,
|
||||
# or to provide custom queries or build logic.
|
||||
#
|
||||
# ******** NOTE ********
|
||||
# We have attempted to detect the languages in your repository. Please check
|
||||
# the `language` matrix defined below to confirm you have the correct set of
|
||||
# supported CodeQL languages.
|
||||
#
|
||||
name: "CodeQL"
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ main ]
|
||||
pull_request:
|
||||
# The branches below must be a subset of the branches above
|
||||
branches: [ main ]
|
||||
schedule:
|
||||
- cron: '23 2 * * 2'
|
||||
|
||||
jobs:
|
||||
analyze:
|
||||
name: Analyze
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
actions: read
|
||||
contents: read
|
||||
security-events: write
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
language: [ 'go' ]
|
||||
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]
|
||||
# Learn more:
|
||||
# https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v2
|
||||
|
||||
# Initializes the CodeQL tools for scanning.
|
||||
- name: Initialize CodeQL
|
||||
uses: github/codeql-action/init@v1
|
||||
with:
|
||||
languages: ${{ matrix.language }}
|
||||
# If you wish to specify custom queries, you can do so here or in a config file.
|
||||
# By default, queries listed here will override any specified in a config file.
|
||||
# Prefix the list here with "+" to use these queries and those in the config file.
|
||||
# queries: ./path/to/local/query, your-org/your-repo/queries@main
|
||||
|
||||
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
|
||||
# If this step fails, then you should remove it and run the build manually (see below)
|
||||
- name: Autobuild
|
||||
uses: github/codeql-action/autobuild@v1
|
||||
|
||||
# ℹ️ Command-line programs to run using the OS shell.
|
||||
# 📚 https://git.io/JvXDl
|
||||
|
||||
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
|
||||
# and modify them (or add more) to build your code if your project
|
||||
# uses a compiled language
|
||||
|
||||
#- run: |
|
||||
# make bootstrap
|
||||
# make release
|
||||
|
||||
- name: Perform CodeQL Analysis
|
||||
uses: github/codeql-action/analyze@v1
|
||||
7
.gitignore
vendored
7
.gitignore
vendored
@ -1,2 +1,9 @@
|
||||
bin
|
||||
logs
|
||||
.devcontainer
|
||||
components
|
||||
logs
|
||||
out-test
|
||||
.github
|
||||
|
||||
tmp
|
||||
|
||||
43
README.md
43
README.md
@ -51,7 +51,7 @@ By deployment of the Open-IM-Server on the customer's server, developers can int
|
||||
|
||||
```
|
||||
#cd Open-IM-server/script
|
||||
|
||||
|
||||
chmod +x *.sh
|
||||
```
|
||||
|
||||
@ -98,11 +98,48 @@ All images are available at https://hub.docker.com/r/lyt1123/open_im_server
|
||||
5. Check service
|
||||
|
||||
```
|
||||
./docker_check_service.sh
|
||||
./docker_check_service.sh
|
||||
```
|
||||
|
||||

|
||||
|
||||
#### How to develop
|
||||
|
||||
1. Install [Go environment](https://golang.org/doc/install). Make sure Go version is at least 1.15.
|
||||
|
||||
2. Install `Nodejs` and `pm2`
|
||||
|
||||
```
|
||||
curl -sL https://deb.nodesource.com/setup_14.x | sudo -E bash -
|
||||
npm install pm2 -g
|
||||
```
|
||||
|
||||
2. Clone the Open-IM project to your server.
|
||||
|
||||
```
|
||||
git clone https://github.com/OpenIMSDK/Open-IM-Server.git --recursive
|
||||
```
|
||||
|
||||
3. Start Service.
|
||||
|
||||
```
|
||||
# run etcd/mongodb/mysql/redis/kafka
|
||||
docker-compose -f docker-compose.local.yaml up -d
|
||||
|
||||
# run open-im services
|
||||
pm2 start app.yaml --watch
|
||||
pm2 ls
|
||||
pm2 logs
|
||||
```
|
||||
|
||||
or try with `docker-compose`
|
||||
|
||||
```
|
||||
docker-compose -f docker-compose.dev.yaml up -d
|
||||
docker-compose -f docker-compose.dev.yaml ps
|
||||
docker-compose -f docker-compose.dev.yaml logs -f
|
||||
```
|
||||
|
||||
### CONFIGURATION INSTRUCTIONS
|
||||
|
||||
> Open-IM configuration is divided into basic component configuration and business internal service configuration. Developers need to fill in the address of each component as the address of their server component when using the product, and ensure that the internal service port of the business is not occupied
|
||||
@ -144,7 +181,7 @@ All images are available at https://hub.docker.com/r/lyt1123/open_im_server
|
||||
- start_all.sh&&stop_all.sh
|
||||
- Total script, start all services and close all services
|
||||
|
||||
## Authentication Clow Chart
|
||||
## Authentication Clow Chart
|
||||
|
||||

|
||||
|
||||
|
||||
41
app.yaml
Normal file
41
app.yaml
Normal file
@ -0,0 +1,41 @@
|
||||
|
||||
apps:
|
||||
- name: open_im_api
|
||||
script: "go run main.go"
|
||||
cwd: "cmd/open_im_api"
|
||||
|
||||
- name: open_im_auth
|
||||
script: "go run main.go"
|
||||
cwd: "cmd/rpc/open_im_auth"
|
||||
|
||||
- name: open_im_offline_msg
|
||||
script: "go run main.go"
|
||||
cwd: "cmd/rpc/open_im_msg"
|
||||
|
||||
- name: open_im_friend
|
||||
script: "go run main.go"
|
||||
cwd: "cmd/rpc/open_im_friend"
|
||||
|
||||
- name: open_im_group
|
||||
script: "go run main.go"
|
||||
cwd: "cmd/rpc/open_im_group"
|
||||
|
||||
- name: open_im_user
|
||||
script: "go run main.go"
|
||||
cwd: "cmd/rpc/open_im_user"
|
||||
|
||||
- name: open_im_push
|
||||
script: "go run main.go"
|
||||
cwd: "cmd/open_im_push"
|
||||
|
||||
- name: open_im_timed_task
|
||||
script: "go run main.go"
|
||||
cwd: "cmd/open_im_timer_task"
|
||||
|
||||
- name: open_im_msg_transfer
|
||||
script: "go run main.go"
|
||||
cwd: "cmd/open_im_msg_transfer"
|
||||
|
||||
- name: open_im_msg_gateway
|
||||
script: "go run main.go"
|
||||
cwd: "cmd/open_im_msg_gateway"
|
||||
1
cmd/Open-IM-SDK-Core
Submodule
1
cmd/Open-IM-SDK-Core
Submodule
@ -0,0 +1 @@
|
||||
Subproject commit a85c10dbffbb797b5b2091e209ff67a5534b9bfc
|
||||
@ -3,10 +3,11 @@
|
||||
BINARY_NAME=open_im_api
|
||||
BIN_DIR=../../bin/
|
||||
|
||||
|
||||
all: gotool build
|
||||
|
||||
build:
|
||||
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build
|
||||
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags="-w -s"
|
||||
|
||||
run:
|
||||
@go run ./
|
||||
|
||||
@ -83,9 +83,10 @@ func main() {
|
||||
//Message
|
||||
chatGroup := r.Group("/chat")
|
||||
{
|
||||
chatGroup.POST("/newest_seq", apiChat.UserNewestSeq)
|
||||
chatGroup.POST("/newest_seq", apiChat.UserGetSeq)
|
||||
chatGroup.POST("/pull_msg", apiChat.UserPullMsg)
|
||||
chatGroup.POST("/send_msg", apiChat.UserSendMsg)
|
||||
chatGroup.POST("/pull_msg_by_seq", apiChat.UserPullMsgBySeqList)
|
||||
}
|
||||
//Manager
|
||||
managementGroup := r.Group("/manager")
|
||||
|
||||
@ -7,8 +7,8 @@ import (
|
||||
)
|
||||
|
||||
func main() {
|
||||
rpcPort := flag.Int("rpc_port", 10500, "rpc listening port")
|
||||
wsPort := flag.Int("ws_port", 10800, "ws listening port")
|
||||
rpcPort := flag.Int("rpc_port", 10400, "rpc listening port")
|
||||
wsPort := flag.Int("ws_port", 17778, "ws listening port")
|
||||
flag.Parse()
|
||||
var wg sync.WaitGroup
|
||||
wg.Add(1)
|
||||
|
||||
@ -3,6 +3,7 @@
|
||||
BINARY_NAME=open_im_msg_transfer
|
||||
BIN_DIR=../../bin/
|
||||
|
||||
|
||||
all: gotool build
|
||||
|
||||
build:
|
||||
|
||||
@ -7,7 +7,7 @@ import (
|
||||
)
|
||||
|
||||
func main() {
|
||||
rpcPort := flag.Int("port", -1, "rpc listening port")
|
||||
rpcPort := flag.Int("port", 10700, "rpc listening port")
|
||||
flag.Parse()
|
||||
var wg sync.WaitGroup
|
||||
wg.Add(1)
|
||||
|
||||
@ -1,42 +0,0 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"Open_IM/pkg/common/config"
|
||||
"Open_IM/pkg/common/db"
|
||||
"fmt"
|
||||
"time"
|
||||
)
|
||||
|
||||
func main() {
|
||||
for {
|
||||
fmt.Println("start delete mongodb expired record")
|
||||
timeUnixBegin := time.Now().Unix()
|
||||
count, _ := db.DB.MgoUserCount()
|
||||
fmt.Println("mongodb record count: ", count)
|
||||
for i := 0; i < count; i++ {
|
||||
time.Sleep(1 * time.Millisecond)
|
||||
uid, _ := db.DB.MgoSkipUID(i)
|
||||
fmt.Println("operate uid: ", uid)
|
||||
err := db.DB.DelUserChat(uid)
|
||||
if err != nil {
|
||||
fmt.Println("operate uid failed: ", uid, err.Error())
|
||||
}
|
||||
}
|
||||
|
||||
timeUnixEnd := time.Now().Unix()
|
||||
costTime := timeUnixEnd - timeUnixBegin
|
||||
if costTime > int64(config.Config.Mongo.DBRetainChatRecords*24*3600) {
|
||||
continue
|
||||
} else {
|
||||
sleepTime := 0
|
||||
if int64(config.Config.Mongo.DBRetainChatRecords*24*3600)-costTime > 24*3600 {
|
||||
sleepTime = 24 * 3600
|
||||
} else {
|
||||
sleepTime = config.Config.Mongo.DBRetainChatRecords*24*3600 - int(costTime)
|
||||
}
|
||||
fmt.Println("sleep: ", sleepTime)
|
||||
time.Sleep(time.Duration(sleepTime) * time.Second)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
25
cmd/open_im_timer_task/Makefile
Normal file
25
cmd/open_im_timer_task/Makefile
Normal file
@ -0,0 +1,25 @@
|
||||
.PHONY: all build run gotool install clean help
|
||||
|
||||
BINARY_NAME=open_im_timer_task
|
||||
BIN_DIR=../../bin/
|
||||
|
||||
all: gotool build
|
||||
|
||||
build:
|
||||
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags="-w -s"
|
||||
|
||||
run:
|
||||
@go run ./
|
||||
|
||||
gotool:
|
||||
go fmt ./
|
||||
go vet ./
|
||||
|
||||
install:
|
||||
make build
|
||||
mv ${BINARY_NAME} ${BIN_DIR}
|
||||
|
||||
clean:
|
||||
@if [ -f ${BINARY_NAME} ] ; then rm ${BINARY_NAME} ; fi
|
||||
|
||||
|
||||
65
cmd/open_im_timer_task/main.go
Normal file
65
cmd/open_im_timer_task/main.go
Normal file
@ -0,0 +1,65 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
commonDB "Open_IM/pkg/common/db"
|
||||
"Open_IM/pkg/common/db/mysql_model/im_mysql_model"
|
||||
"Open_IM/pkg/common/log"
|
||||
"time"
|
||||
)
|
||||
|
||||
func main() {
|
||||
log.NewPrivateLog("timer")
|
||||
//for {
|
||||
// fmt.Println("start delete mongodb expired record")
|
||||
// timeUnixBegin := time.Now().Unix()
|
||||
// count, _ := db.DB.MgoUserCount()
|
||||
// fmt.Println("mongodb record count: ", count)
|
||||
// for i := 0; i < count; i++ {
|
||||
// time.Sleep(1 * time.Millisecond)
|
||||
// uid, _ := db.DB.MgoSkipUID(i)
|
||||
// fmt.Println("operate uid: ", uid)
|
||||
// err := db.DB.DelUserChat(uid)
|
||||
// if err != nil {
|
||||
// fmt.Println("operate uid failed: ", uid, err.Error())
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// timeUnixEnd := time.Now().Unix()
|
||||
// costTime := timeUnixEnd - timeUnixBegin
|
||||
// if costTime > int64(config.Config.Mongo.DBRetainChatRecords*24*3600) {
|
||||
// continue
|
||||
// } else {
|
||||
// sleepTime := 0
|
||||
// if int64(config.Config.Mongo.DBRetainChatRecords*24*3600)-costTime > 24*3600 {
|
||||
// sleepTime = 24 * 3600
|
||||
// } else {
|
||||
// sleepTime = config.Config.Mongo.DBRetainChatRecords*24*3600 - int(costTime)
|
||||
// }
|
||||
// fmt.Println("sleep: ", sleepTime)
|
||||
// time.Sleep(time.Duration(sleepTime) * time.Second)
|
||||
// }
|
||||
//}
|
||||
for {
|
||||
uidList, err := im_mysql_model.SelectAllUID()
|
||||
if err != nil {
|
||||
log.NewError("999999", err.Error())
|
||||
} else {
|
||||
for _, v := range uidList {
|
||||
minSeq, err := commonDB.DB.GetMinSeqFromMongo(v)
|
||||
if err != nil {
|
||||
log.NewError("999999", "get user minSeq err", err.Error(), v)
|
||||
continue
|
||||
} else {
|
||||
err := commonDB.DB.SetUserMinSeq(v, minSeq)
|
||||
if err != nil {
|
||||
log.NewError("999999", "set user minSeq err", err.Error(), v)
|
||||
}
|
||||
}
|
||||
time.Sleep(time.Duration(100) * time.Millisecond)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@ -6,7 +6,7 @@ BIN_DIR=../../../bin/
|
||||
all: gotool build
|
||||
|
||||
build:
|
||||
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build
|
||||
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags="-w -s"
|
||||
|
||||
run:
|
||||
@go run ./
|
||||
|
||||
@ -6,7 +6,7 @@ import (
|
||||
)
|
||||
|
||||
func main() {
|
||||
rpcPort := flag.Int("port", 10600, "RpcToken default listen port 10800")
|
||||
rpcPort := flag.Int("port", 10600, "RpcToken default listen port 10600")
|
||||
flag.Parse()
|
||||
rpcServer := rpcAuth.NewRpcAuthServer(*rpcPort)
|
||||
rpcServer.Run()
|
||||
|
||||
@ -6,7 +6,7 @@ BIN_DIR=../../../bin/
|
||||
all: gotool build
|
||||
|
||||
build:
|
||||
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build
|
||||
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags="-w -s"
|
||||
|
||||
run:
|
||||
@go run ./
|
||||
|
||||
@ -6,7 +6,7 @@ BIN_DIR=../../../bin/
|
||||
all: gotool build
|
||||
|
||||
build:
|
||||
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build
|
||||
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags="-w -s"
|
||||
|
||||
run:
|
||||
@go run ./
|
||||
|
||||
@ -2,13 +2,12 @@ package main
|
||||
|
||||
import (
|
||||
rpcChat "Open_IM/internal/rpc/chat"
|
||||
"Open_IM/pkg/utils"
|
||||
"flag"
|
||||
)
|
||||
|
||||
func main() {
|
||||
rpcPort := flag.String("port", "", "rpc listening port")
|
||||
rpcPort := flag.Int("port", 10300, "rpc listening port")
|
||||
flag.Parse()
|
||||
rpcServer := rpcChat.NewRpcChatServer(utils.StringToInt(*rpcPort))
|
||||
rpcServer := rpcChat.NewRpcChatServer(*rpcPort)
|
||||
rpcServer.Run()
|
||||
}
|
||||
|
||||
@ -6,7 +6,7 @@ BIN_DIR=../../../bin/
|
||||
all: gotool build
|
||||
|
||||
build:
|
||||
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build
|
||||
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags="-w -s"
|
||||
|
||||
run:
|
||||
@go run ./
|
||||
|
||||
147
config/config.dev.yaml
Normal file
147
config/config.dev.yaml
Normal file
@ -0,0 +1,147 @@
|
||||
|
||||
# The class cannot be named by Pascal or camel case.
|
||||
# If it is not used, the corresponding structure will not be set,
|
||||
# and it will not be read naturally.
|
||||
serverversion: 1.0.0
|
||||
#---------------Infrastructure configuration---------------------#
|
||||
etcd:
|
||||
etcdSchema: openIM
|
||||
etcdAddr: [ etcd:2379 ]
|
||||
|
||||
mysql:
|
||||
dbMysqlAddress: [ mysql:3306 ]
|
||||
dbMysqlUserName: root
|
||||
dbMysqlPassword: openIM
|
||||
dbMysqlDatabaseName: openIM
|
||||
dbTableName: eMsg
|
||||
dbMsgTableNum: 1
|
||||
dbMaxOpenConns: 20
|
||||
dbMaxIdleConns: 10
|
||||
dbMaxLifeTime: 120
|
||||
|
||||
mongo:
|
||||
dbAddress: [ mongodb:27017 ]
|
||||
dbDirect: false
|
||||
dbTimeout: 10
|
||||
dbDatabase: openIM
|
||||
dbSource: admin
|
||||
dbUserName:
|
||||
dbPassword:
|
||||
dbMaxPoolSize: 20
|
||||
dbRetainChatRecords: 7
|
||||
|
||||
redis:
|
||||
dbAddress: redis:6379
|
||||
dbMaxIdle: 128
|
||||
dbMaxActive: 0
|
||||
dbIdleTimeout: 120
|
||||
dbPassWord: openIM
|
||||
|
||||
kafka:
|
||||
ws2mschat:
|
||||
addr: [ kafka:9092 ]
|
||||
topic: "ws2ms_chat"
|
||||
ms2pschat:
|
||||
addr: [ kafka:9092 ]
|
||||
topic: "ms2ps_chat"
|
||||
consumergroupid:
|
||||
msgToMongo: mongo
|
||||
msgToMySql: mysql
|
||||
msgToPush: push
|
||||
|
||||
|
||||
|
||||
#---------------Internal service configuration---------------------#
|
||||
|
||||
# The service ip default is empty,
|
||||
# automatically obtain the machine's valid network card ip as the service ip,
|
||||
# otherwise the configuration ip is preferred
|
||||
serverip:
|
||||
|
||||
api:
|
||||
openImApiPort: [ 10000 ]
|
||||
sdk:
|
||||
openImSdkWsPort: [ 30000 ]
|
||||
|
||||
credential:
|
||||
tencent:
|
||||
appID: 1302656840
|
||||
region: ap-chengdu
|
||||
bucket: echat-1302656840
|
||||
secretID: AKIDGNYVChzIQinu7QEgtNp0hnNgqcV8vZTC
|
||||
secretKey: kz15vW83qM6dBUWIq681eBZA0c0vlIbe
|
||||
|
||||
|
||||
rpcport:
|
||||
openImUserPort: [ 10100 ]
|
||||
openImFriendPort: [ 10200 ]
|
||||
openImOfflineMessagePort: [ 10300 ]
|
||||
openImOnlineRelayPort: [ 10400 ]
|
||||
openImGroupPort: [ 10500 ]
|
||||
openImAuthPort: [ 10600 ]
|
||||
openImPushPort: [ 10700 ]
|
||||
|
||||
|
||||
rpcregistername:
|
||||
openImUserName: User
|
||||
openImFriendName: Friend
|
||||
openImOfflineMessageName: OfflineMessage
|
||||
openImPushName: Push
|
||||
openImOnlineMessageRelayName: OnlineMessageRelay
|
||||
openImGroupName: Group
|
||||
openImAuthName: Auth
|
||||
|
||||
log:
|
||||
storageLocation: ../logs/
|
||||
rotationTime: 24
|
||||
remainRotationCount: 5
|
||||
remainLogLevel: 6
|
||||
elasticSearchSwitch: false
|
||||
elasticSearchAddr: [ 127.0.0.1:9201 ]
|
||||
elasticSearchUser: ""
|
||||
elasticSearchPassword: ""
|
||||
|
||||
modulename:
|
||||
longConnSvrName: msg_gateway
|
||||
msgTransferName: msg_transfer
|
||||
pushName: push
|
||||
|
||||
longconnsvr:
|
||||
openImWsPort: [ 17778 ]
|
||||
websocketMaxConnNum: 10000
|
||||
websocketMaxMsgLen: 4096
|
||||
websocketTimeOut: 10
|
||||
|
||||
push:
|
||||
tpns:
|
||||
ios:
|
||||
accessID: 1600018281
|
||||
secretKey: 3cd68a77a95b89e5089a1aca523f318f
|
||||
android:
|
||||
accessID: 111
|
||||
secretKey: 111
|
||||
jpns:
|
||||
appKey: 2783339cee4de379cc798fe1
|
||||
masterSecret: 66e5f309e032c68cc668c28a
|
||||
pushUrl: "https://api.jpush.cn/v3/push"
|
||||
manager:
|
||||
appManagerUid: ["openIM123456","openIM654321"]
|
||||
secrets: ["openIM1","openIM2"]
|
||||
|
||||
secret: tuoyun
|
||||
|
||||
multiloginpolicy:
|
||||
onlyOneTerminalAccess: false
|
||||
mobileAndPCTerminalAccessButOtherTerminalKickEachOther: true
|
||||
allTerminalAccess: false
|
||||
|
||||
#token config
|
||||
tokenpolicy:
|
||||
accessSecret: "open_im_server"
|
||||
# Token effective time seconds as a unit
|
||||
#Seven days 7*24*60*60
|
||||
accessExpire: 604800
|
||||
|
||||
messagecallback:
|
||||
callbackSwitch: false
|
||||
callbackUrl: "http://www.xxx.com/msg/judge"
|
||||
@ -1,16 +1,16 @@
|
||||
# The class cannot be named by Pascal or camel case.
|
||||
# If it is not used, the corresponding structure will not be set,
|
||||
# and it will not be read naturally.
|
||||
|
||||
serverversion: 1.0.3
|
||||
#---------------Infrastructure configuration---------------------#
|
||||
etcd:
|
||||
etcdSchema: openIM
|
||||
etcdAddr: [ 81.68.126.69:2379 ]
|
||||
etcdAddr: [ 127.0.0.1:2379 ]
|
||||
|
||||
mysql:
|
||||
dbMysqlAddress: [ 81.68.126.69:13306 ]
|
||||
dbMysqlUserName: openIM
|
||||
dbMysqlPassword: 12345
|
||||
dbMysqlAddress: [ 127.0.0.1:3306 ]
|
||||
dbMysqlUserName: root
|
||||
dbMysqlPassword: openIM
|
||||
dbMysqlDatabaseName: openIM
|
||||
dbTableName: eMsg
|
||||
dbMsgTableNum: 1
|
||||
@ -19,18 +19,18 @@ mysql:
|
||||
dbMaxLifeTime: 120
|
||||
|
||||
mongo:
|
||||
dbAddress: [ 81.68.126.69:27017 ]
|
||||
dbAddress: [ 127.0.0.1:27017 ]
|
||||
dbDirect: false
|
||||
dbTimeout: 10
|
||||
dbDatabase: openIM
|
||||
dbSource: openIM
|
||||
dbUserName: openIM
|
||||
dbPassword: 12345
|
||||
dbSource: admin
|
||||
dbUserName:
|
||||
dbPassword:
|
||||
dbMaxPoolSize: 20
|
||||
dbRetainChatRecords: 7
|
||||
|
||||
redis:
|
||||
dbAddress: 81.68.126.69:16379
|
||||
dbAddress: 127.0.0.1:6379
|
||||
dbMaxIdle: 128
|
||||
dbMaxActive: 0
|
||||
dbIdleTimeout: 120
|
||||
@ -38,10 +38,10 @@ redis:
|
||||
|
||||
kafka:
|
||||
ws2mschat:
|
||||
addr: [ 81.68.126.69:9092 ]
|
||||
addr: [ 127.0.0.1:9092 ]
|
||||
topic: "ws2ms_chat"
|
||||
ms2pschat:
|
||||
addr: [ 81.68.126.69:9092 ]
|
||||
addr: [ 127.0.0.1:9092 ]
|
||||
topic: "ms2ps_chat"
|
||||
consumergroupid:
|
||||
msgToMongo: mongo
|
||||
@ -74,7 +74,7 @@ credential:
|
||||
rpcport:
|
||||
openImUserPort: [ 10100 ]
|
||||
openImFriendPort: [ 10200 ]
|
||||
openImOfflineMessagePort: [ 10300 ]
|
||||
openImOfflineMessagePort: [ 10300]
|
||||
openImOnlineRelayPort: [ 10400 ]
|
||||
openImGroupPort: [ 10500 ]
|
||||
openImAuthPort: [ 10600 ]
|
||||
@ -119,6 +119,10 @@ push:
|
||||
android:
|
||||
accessID: 111
|
||||
secretKey: 111
|
||||
jpns:
|
||||
appKey: cf47465a368f24c659608e7e
|
||||
masterSecret: 02204efe3f3832947a236ee5
|
||||
pushUrl: "https://api.jpush.cn/v3/push"
|
||||
manager:
|
||||
appManagerUid: ["openIM123456","openIM654321"]
|
||||
secrets: ["openIM1","openIM2"]
|
||||
@ -133,9 +137,8 @@ multiloginpolicy:
|
||||
#token config
|
||||
tokenpolicy:
|
||||
accessSecret: "open_im_server"
|
||||
# Token effective time seconds as a unit
|
||||
#Seven days 7*24*60*60
|
||||
accessExpire: 604800
|
||||
# Token effective time day as a unit
|
||||
accessExpire: 7
|
||||
|
||||
messagecallback:
|
||||
callbackSwitch: false
|
||||
|
||||
11
dev.Dockerfile
Normal file
11
dev.Dockerfile
Normal file
@ -0,0 +1,11 @@
|
||||
FROM golang:1.16 as base
|
||||
|
||||
FROM base as dev
|
||||
|
||||
ENV GO111MODULE=on
|
||||
ENV GOPROXY=https://goproxy.cn,direct
|
||||
|
||||
|
||||
RUN curl -sSfL https://raw.githubusercontent.com/cosmtrek/air/master/install.sh | sh -s -- -b $(go env GOPATH)/bin
|
||||
|
||||
CMD ["air"]
|
||||
381
docker-compose.dev.yaml
Normal file
381
docker-compose.dev.yaml
Normal file
@ -0,0 +1,381 @@
|
||||
version: "3"
|
||||
services:
|
||||
mysql:
|
||||
image: mysql:5.7
|
||||
ports:
|
||||
- 3306:3306
|
||||
container_name: mysql
|
||||
volumes:
|
||||
- ./components/mysql/data:/var/lib/mysql
|
||||
- /etc/localtime:/etc/localtime
|
||||
environment:
|
||||
MYSQL_ROOT_PASSWORD: openIM
|
||||
restart: always
|
||||
|
||||
mongodb:
|
||||
image: mongo:4.0
|
||||
ports:
|
||||
- 27017:27017
|
||||
container_name: mongo
|
||||
volumes:
|
||||
- ./components/mongodb/data:/data/db
|
||||
environment:
|
||||
TZ: Asia/Shanghai
|
||||
restart: always
|
||||
|
||||
redis:
|
||||
image: redis
|
||||
ports:
|
||||
- 6379:6379
|
||||
container_name: redis
|
||||
volumes:
|
||||
- ./components/redis/data:/data
|
||||
#redis config file
|
||||
#- ./components/redis/config/redis.conf:/usr/local/redis/config/redis.conf
|
||||
environment:
|
||||
TZ: Asia/Shanghai
|
||||
restart: always
|
||||
sysctls:
|
||||
net.core.somaxconn: 1024
|
||||
command: redis-server --requirepass openIM --appendonly yes
|
||||
|
||||
|
||||
zookeeper:
|
||||
image: wurstmeister/zookeeper
|
||||
ports:
|
||||
- 2181:2181
|
||||
container_name: zookeeper
|
||||
volumes:
|
||||
- /etc/localtime:/etc/localtime
|
||||
environment:
|
||||
TZ: Asia/Shanghai
|
||||
restart: always
|
||||
|
||||
|
||||
kafka:
|
||||
image: wurstmeister/kafka
|
||||
container_name: kafka
|
||||
restart: always
|
||||
environment:
|
||||
TZ: Asia/Shanghai
|
||||
KAFKA_BROKER_ID: 0
|
||||
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
|
||||
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://kafka:9092
|
||||
KAFKA_LISTENERS: PLAINTEXT://kafka:9092
|
||||
depends_on:
|
||||
- zookeeper
|
||||
links:
|
||||
- zookeeper
|
||||
ports:
|
||||
- 9092:9092
|
||||
|
||||
etcd:
|
||||
image: quay.io/coreos/etcd
|
||||
ports:
|
||||
- 2379:2379
|
||||
- 2380:2380
|
||||
container_name: etcd
|
||||
volumes:
|
||||
- /etc/timezone:/etc/timezone
|
||||
- /etc/localtime:/etc/localtime
|
||||
environment:
|
||||
ETCDCTL_API: 3
|
||||
restart: always
|
||||
command: /usr/local/bin/etcd --name etcd0 --data-dir /etcd-data --listen-client-urls http://0.0.0.0:2379 --advertise-client-urls http://0.0.0.0:2379 --listen-peer-urls http://0.0.0.0:2380 --initial-advertise-peer-urls http://0.0.0.0:2380 --initial-cluster etcd0=http://0.0.0.0:2380 --initial-cluster-token tkn --initial-cluster-state new
|
||||
|
||||
open_im_api:
|
||||
build:
|
||||
dockerfile: dev.Dockerfile
|
||||
context: .
|
||||
target: dev
|
||||
network: host
|
||||
depends_on:
|
||||
- kafka
|
||||
- mysql
|
||||
- mongodb
|
||||
- redis
|
||||
- etcd
|
||||
container_name: open_im_api
|
||||
volumes:
|
||||
- ./cmd:/Open-IM-Server/cmd
|
||||
- ./config/config.dev.yaml:/Open-IM-Server/config/config.yaml
|
||||
- ./internal:/Open-IM-Server/internal
|
||||
- ./pkg:/Open-IM-Server/pkg
|
||||
- ./go.mod:/Open-IM-Server/go.mod
|
||||
- ./go.sum:/Open-IM-Server/go.sum
|
||||
working_dir: /Open-IM-Server/cmd/open_im_api
|
||||
ports:
|
||||
- 10000:10000
|
||||
links:
|
||||
- kafka
|
||||
- mysql
|
||||
- mongodb
|
||||
- redis
|
||||
- etcd
|
||||
|
||||
open_im_auth:
|
||||
build:
|
||||
dockerfile: dev.Dockerfile
|
||||
context: .
|
||||
target: dev
|
||||
network: host
|
||||
depends_on:
|
||||
- kafka
|
||||
- mysql
|
||||
- mongodb
|
||||
- redis
|
||||
- etcd
|
||||
links:
|
||||
- kafka
|
||||
- mysql
|
||||
- mongodb
|
||||
- redis
|
||||
- etcd
|
||||
container_name: open_im_auth
|
||||
volumes:
|
||||
- ./cmd:/Open-IM-Server/cmd
|
||||
- ./config/config.dev.yaml:/Open-IM-Server/config/config.yaml
|
||||
- ./internal:/Open-IM-Server/internal
|
||||
- ./pkg:/Open-IM-Server/pkg
|
||||
- ./go.mod:/Open-IM-Server/go.mod
|
||||
- ./go.sum:/Open-IM-Server/go.sum
|
||||
working_dir: /Open-IM-Server/cmd/rpc/open_im_auth
|
||||
ports:
|
||||
- 10600:10600
|
||||
|
||||
open_im_user:
|
||||
build:
|
||||
dockerfile: dev.Dockerfile
|
||||
context: .
|
||||
target: dev
|
||||
network: host
|
||||
depends_on:
|
||||
- kafka
|
||||
- mysql
|
||||
- mongodb
|
||||
- redis
|
||||
- etcd
|
||||
links:
|
||||
- kafka
|
||||
- mysql
|
||||
- mongodb
|
||||
- redis
|
||||
- etcd
|
||||
container_name: open_im_user
|
||||
volumes:
|
||||
- ./cmd:/Open-IM-Server/cmd
|
||||
- ./config/config.dev.yaml:/Open-IM-Server/config/config.yaml
|
||||
- ./internal:/Open-IM-Server/internal
|
||||
- ./pkg:/Open-IM-Server/pkg
|
||||
- ./go.mod:/Open-IM-Server/go.mod
|
||||
- ./go.sum:/Open-IM-Server/go.sum
|
||||
working_dir: /Open-IM-Server/cmd/rpc/open_im_user
|
||||
ports:
|
||||
- 10100:10100
|
||||
|
||||
open_im_friend:
|
||||
build:
|
||||
dockerfile: dev.Dockerfile
|
||||
context: .
|
||||
target: dev
|
||||
network: host
|
||||
depends_on:
|
||||
- kafka
|
||||
- mysql
|
||||
- mongodb
|
||||
- redis
|
||||
- etcd
|
||||
links:
|
||||
- kafka
|
||||
- mysql
|
||||
- mongodb
|
||||
- redis
|
||||
- etcd
|
||||
container_name: open_im_friend
|
||||
volumes:
|
||||
- ./cmd:/Open-IM-Server/cmd
|
||||
- ./config/config.dev.yaml:/Open-IM-Server/config/config.yaml
|
||||
- ./internal:/Open-IM-Server/internal
|
||||
- ./pkg:/Open-IM-Server/pkg
|
||||
- ./go.mod:/Open-IM-Server/go.mod
|
||||
- ./go.sum:/Open-IM-Server/go.sum
|
||||
working_dir: /Open-IM-Server/cmd/rpc/open_im_friend
|
||||
ports:
|
||||
- 10200:10200
|
||||
|
||||
open_im_group:
|
||||
build:
|
||||
dockerfile: dev.Dockerfile
|
||||
context: .
|
||||
target: dev
|
||||
network: host
|
||||
depends_on:
|
||||
- kafka
|
||||
- mysql
|
||||
- mongodb
|
||||
- redis
|
||||
- etcd
|
||||
links:
|
||||
- kafka
|
||||
- mysql
|
||||
- mongodb
|
||||
- redis
|
||||
- etcd
|
||||
container_name: open_im_group
|
||||
volumes:
|
||||
- ./cmd:/Open-IM-Server/cmd
|
||||
- ./config/config.dev.yaml:/Open-IM-Server/config/config.yaml
|
||||
- ./internal:/Open-IM-Server/internal
|
||||
- ./pkg:/Open-IM-Server/pkg
|
||||
- ./go.mod:/Open-IM-Server/go.mod
|
||||
- ./go.sum:/Open-IM-Server/go.sum
|
||||
working_dir: /Open-IM-Server/cmd/rpc/open_im_group
|
||||
ports:
|
||||
- 10500:10500
|
||||
|
||||
open_im_push:
|
||||
build:
|
||||
dockerfile: dev.Dockerfile
|
||||
context: .
|
||||
target: dev
|
||||
network: host
|
||||
depends_on:
|
||||
- kafka
|
||||
- mysql
|
||||
- mongodb
|
||||
- redis
|
||||
- etcd
|
||||
links:
|
||||
- kafka
|
||||
- mysql
|
||||
- mongodb
|
||||
- redis
|
||||
- etcd
|
||||
container_name: open_im_push
|
||||
volumes:
|
||||
- ./cmd:/Open-IM-Server/cmd
|
||||
- ./config/config.dev.yaml:/Open-IM-Server/config/config.yaml
|
||||
- ./internal:/Open-IM-Server/internal
|
||||
- ./pkg:/Open-IM-Server/pkg
|
||||
- ./go.mod:/Open-IM-Server/go.mod
|
||||
- ./go.sum:/Open-IM-Server/go.sum
|
||||
working_dir: /Open-IM-Server/cmd/open_im_push
|
||||
ports:
|
||||
- 10700:10700
|
||||
|
||||
open_im_timed_task:
|
||||
build:
|
||||
dockerfile: dev.Dockerfile
|
||||
context: .
|
||||
target: dev
|
||||
network: host
|
||||
depends_on:
|
||||
- kafka
|
||||
- mysql
|
||||
- mongodb
|
||||
- redis
|
||||
- etcd
|
||||
links:
|
||||
- kafka
|
||||
- mysql
|
||||
- mongodb
|
||||
- redis
|
||||
- etcd
|
||||
container_name: open_im_timed_task
|
||||
volumes:
|
||||
- ./cmd:/Open-IM-Server/cmd
|
||||
- ./config/config.dev.yaml:/Open-IM-Server/config/config.yaml
|
||||
- ./internal:/Open-IM-Server/internal
|
||||
- ./pkg:/Open-IM-Server/pkg
|
||||
- ./go.mod:/Open-IM-Server/go.mod
|
||||
- ./go.sum:/Open-IM-Server/go.sum
|
||||
working_dir: /Open-IM-Server/cmd/open_im_timer_task
|
||||
|
||||
open_im_offline_msg:
|
||||
build:
|
||||
dockerfile: dev.Dockerfile
|
||||
context: .
|
||||
target: dev
|
||||
network: host
|
||||
depends_on:
|
||||
- kafka
|
||||
- mysql
|
||||
- mongodb
|
||||
- redis
|
||||
- etcd
|
||||
links:
|
||||
- kafka
|
||||
- mysql
|
||||
- mongodb
|
||||
- redis
|
||||
- etcd
|
||||
container_name: open_im_offline_msg
|
||||
volumes:
|
||||
- ./cmd:/Open-IM-Server/cmd
|
||||
- ./config/config.dev.yaml:/Open-IM-Server/config/config.yaml
|
||||
- ./internal:/Open-IM-Server/internal
|
||||
- ./pkg:/Open-IM-Server/pkg
|
||||
- ./go.mod:/Open-IM-Server/go.mod
|
||||
- ./go.sum:/Open-IM-Server/go.sum
|
||||
working_dir: /Open-IM-Server/cmd/rpc/open_im_msg
|
||||
ports:
|
||||
- 10300:10300
|
||||
|
||||
open_im_msg_transfer:
|
||||
build:
|
||||
dockerfile: dev.Dockerfile
|
||||
context: .
|
||||
target: dev
|
||||
network: host
|
||||
depends_on:
|
||||
- kafka
|
||||
- mysql
|
||||
- mongodb
|
||||
- redis
|
||||
- etcd
|
||||
links:
|
||||
- kafka
|
||||
- mysql
|
||||
- mongodb
|
||||
- redis
|
||||
- etcd
|
||||
container_name: open_im_msg_transfer
|
||||
volumes:
|
||||
- ./cmd:/Open-IM-Server/cmd
|
||||
- ./config/config.dev.yaml:/Open-IM-Server/config/config.yaml
|
||||
- ./internal:/Open-IM-Server/internal
|
||||
- ./pkg:/Open-IM-Server/pkg
|
||||
- ./go.mod:/Open-IM-Server/go.mod
|
||||
- ./go.sum:/Open-IM-Server/go.sum
|
||||
working_dir: /Open-IM-Server/cmd/open_im_msg_transfer
|
||||
|
||||
open_im_msg_gateway:
|
||||
build:
|
||||
dockerfile: dev.Dockerfile
|
||||
context: .
|
||||
target: dev
|
||||
network: host
|
||||
depends_on:
|
||||
- kafka
|
||||
- mysql
|
||||
- mongodb
|
||||
- redis
|
||||
- etcd
|
||||
links:
|
||||
- kafka
|
||||
- mysql
|
||||
- mongodb
|
||||
- redis
|
||||
- etcd
|
||||
container_name: open_im_msg_gateway
|
||||
volumes:
|
||||
- ./cmd:/Open-IM-Server/cmd
|
||||
- ./config/config.dev.yaml:/Open-IM-Server/config/config.yaml
|
||||
- ./internal:/Open-IM-Server/internal
|
||||
- ./pkg:/Open-IM-Server/pkg
|
||||
- ./go.mod:/Open-IM-Server/go.mod
|
||||
- ./go.sum:/Open-IM-Server/go.sum
|
||||
working_dir: /Open-IM-Server/cmd/open_im_msg_gateway
|
||||
ports:
|
||||
- 10400:10400
|
||||
- 17778:17778
|
||||
85
docker-compose.local.yaml
Normal file
85
docker-compose.local.yaml
Normal file
@ -0,0 +1,85 @@
|
||||
version: "3"
|
||||
services:
|
||||
mysql:
|
||||
image: mysql:5.7
|
||||
ports:
|
||||
- 3306:3306
|
||||
container_name: mysql
|
||||
volumes:
|
||||
- ./components/mysql/data:/var/lib/mysql
|
||||
- /etc/localtime:/etc/localtime
|
||||
environment:
|
||||
MYSQL_ROOT_PASSWORD: openIM
|
||||
restart: always
|
||||
|
||||
mongodb:
|
||||
image: mongo:4.0
|
||||
ports:
|
||||
- 27017:27017
|
||||
container_name: mongo
|
||||
volumes:
|
||||
- ./components/mongodb/data:/data/db
|
||||
environment:
|
||||
TZ: Asia/Shanghai
|
||||
restart: always
|
||||
|
||||
redis:
|
||||
image: redis
|
||||
ports:
|
||||
- 6379:6379
|
||||
container_name: redis
|
||||
volumes:
|
||||
- ./components/redis/data:/data
|
||||
#redis config file
|
||||
#- ./components/redis/config/redis.conf:/usr/local/redis/config/redis.conf
|
||||
environment:
|
||||
TZ: Asia/Shanghai
|
||||
restart: always
|
||||
sysctls:
|
||||
net.core.somaxconn: 1024
|
||||
command: redis-server --requirepass openIM --appendonly yes
|
||||
|
||||
|
||||
zookeeper:
|
||||
image: wurstmeister/zookeeper
|
||||
ports:
|
||||
- 2181:2181
|
||||
container_name: zookeeper
|
||||
volumes:
|
||||
- /etc/localtime:/etc/localtime
|
||||
environment:
|
||||
TZ: Asia/Shanghai
|
||||
restart: always
|
||||
|
||||
|
||||
kafka:
|
||||
image: wurstmeister/kafka
|
||||
container_name: kafka
|
||||
restart: always
|
||||
environment:
|
||||
TZ: Asia/Shanghai
|
||||
KAFKA_BROKER_ID: 0
|
||||
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
|
||||
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://127.0.0.1:9092
|
||||
KAFKA_LISTENERS: PLAINTEXT://0.0.0.0:9092
|
||||
# network_mode: "host"
|
||||
depends_on:
|
||||
- zookeeper
|
||||
links:
|
||||
- zookeeper
|
||||
ports:
|
||||
- 9092:9092
|
||||
|
||||
etcd:
|
||||
image: quay.io/coreos/etcd
|
||||
ports:
|
||||
- 2379:2379
|
||||
- 2380:2380
|
||||
container_name: etcd
|
||||
volumes:
|
||||
- /etc/timezone:/etc/timezone
|
||||
- /etc/localtime:/etc/localtime
|
||||
environment:
|
||||
ETCDCTL_API: 3
|
||||
restart: always
|
||||
command: /usr/local/bin/etcd --name etcd0 --data-dir /etcd-data --listen-client-urls http://0.0.0.0:2379 --advertise-client-urls http://0.0.0.0:2379 --listen-peer-urls http://0.0.0.0:2380 --initial-advertise-peer-urls http://0.0.0.0:2380 --initial-cluster etcd0=http://0.0.0.0:2380 --initial-cluster-token tkn --initial-cluster-state new
|
||||
@ -15,7 +15,7 @@ services:
|
||||
restart: always
|
||||
|
||||
mongodb:
|
||||
image: mongo
|
||||
image: mongo:4.0
|
||||
ports:
|
||||
- 27017:27017
|
||||
container_name: mongo
|
||||
|
||||
17
go.mod
17
go.mod
@ -6,18 +6,19 @@ require (
|
||||
github.com/Shopify/sarama v1.19.0
|
||||
github.com/Shopify/toxiproxy v2.1.4+incompatible // indirect
|
||||
github.com/antonfisher/nested-logrus-formatter v1.3.0
|
||||
github.com/bwmarrin/snowflake v0.3.0
|
||||
github.com/coreos/go-semver v0.3.0 // indirect
|
||||
github.com/dgrijalva/jwt-go v3.2.0+incompatible
|
||||
github.com/dustin/go-humanize v1.0.0 // indirect
|
||||
github.com/eapache/go-resiliency v1.2.0 // indirect
|
||||
github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21 // indirect
|
||||
github.com/eapache/queue v1.1.0 // indirect
|
||||
github.com/frankban/quicktest v1.11.3 // indirect
|
||||
github.com/frankban/quicktest v1.14.0 // indirect
|
||||
github.com/garyburd/redigo v1.6.2
|
||||
github.com/gin-gonic/gin v1.7.0
|
||||
github.com/go-playground/validator/v10 v10.4.1
|
||||
github.com/golang-jwt/jwt/v4 v4.1.0
|
||||
github.com/golang/protobuf v1.5.2
|
||||
github.com/golang/snappy v0.0.3 // indirect
|
||||
github.com/golang/snappy v0.0.4 // indirect
|
||||
github.com/gorilla/websocket v1.4.2
|
||||
github.com/jinzhu/gorm v1.9.16
|
||||
github.com/jonboulle/clockwork v0.2.2 // indirect
|
||||
@ -28,21 +29,21 @@ require (
|
||||
github.com/mitchellh/mapstructure v1.4.1
|
||||
github.com/nfnt/resize v0.0.0-20180221191011-83c6a9932646
|
||||
github.com/olivere/elastic/v7 v7.0.23
|
||||
github.com/pierrec/lz4 v2.6.0+incompatible // indirect
|
||||
github.com/pierrec/lz4 v2.6.1+incompatible // indirect
|
||||
github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect
|
||||
github.com/rifflock/lfshook v0.0.0-20180920164130-b9218ef580f5
|
||||
github.com/sirupsen/logrus v1.6.0
|
||||
github.com/sirupsen/logrus v1.8.1
|
||||
github.com/stretchr/testify v1.7.0
|
||||
github.com/tencentyun/qcloud-cos-sts-sdk v0.0.0-20210325043845-84a0811633ca
|
||||
github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5 // indirect
|
||||
go.etcd.io/etcd v0.0.0-20200402134248-51bdeb39e698
|
||||
golang.org/x/image v0.0.0-20210220032944-ac19c3e999fb
|
||||
golang.org/x/net v0.0.0-20201110031124-69a78807bb2b
|
||||
golang.org/x/net v0.0.0-20210917221730-978cfadd31cf
|
||||
golang.org/x/tools v0.0.0-20210106214847-113979e3529a // indirect
|
||||
google.golang.org/grpc v1.33.2
|
||||
gopkg.in/mgo.v2 v2.0.0-20190816093944-a6b53ec6cb22
|
||||
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c
|
||||
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b
|
||||
sigs.k8s.io/yaml v1.2.0 // indirect
|
||||
|
||||
)
|
||||
|
||||
replace google.golang.org/grpc => google.golang.org/grpc v1.29.1
|
||||
|
||||
53
go.sum
53
go.sum
@ -15,6 +15,8 @@ github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24
|
||||
github.com/beorn7/perks v1.0.0 h1:HWo1m869IqiPhD389kmkxeTalrjNbbJTC8LXupb+sl0=
|
||||
github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8=
|
||||
github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs=
|
||||
github.com/bwmarrin/snowflake v0.3.0 h1:xm67bEhkKh6ij1790JB83OujPR5CzNe8QuQqAgISZN0=
|
||||
github.com/bwmarrin/snowflake v0.3.0/go.mod h1:NdZxfVWX+oR6y2K0o6qAYv6gIOP9rjG0/E9WsDpxqwE=
|
||||
github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
|
||||
github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc=
|
||||
github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa h1:OaNxuTZr7kxeODyLWsRMC+OD03aFUH+mW6r2d+MWa5Y=
|
||||
@ -25,6 +27,7 @@ github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3Ee
|
||||
github.com/coreos/go-systemd/v22 v22.0.0 h1:XJIw/+VlJ+87J+doOxznsAWIdmWuViOVhkQamW5YV28=
|
||||
github.com/coreos/go-systemd/v22 v22.0.0/go.mod h1:xO0FLkIi5MaZafQlIrOotqXZ90ih+1atmu1JpKERPPk=
|
||||
github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY=
|
||||
github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
|
||||
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
|
||||
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
@ -48,8 +51,8 @@ github.com/erikstmartin/go-testdb v0.0.0-20160219214506-8d10e4a1bae5/go.mod h1:a
|
||||
github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4=
|
||||
github.com/fortytw2/leaktest v1.3.0 h1:u8491cBMTQ8ft8aeV+adlcytMZylmA5nnwwkRZjI8vw=
|
||||
github.com/fortytw2/leaktest v1.3.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g=
|
||||
github.com/frankban/quicktest v1.11.3 h1:8sXhOn0uLys67V8EsXLc6eszDs8VXWxL3iRvebPhedY=
|
||||
github.com/frankban/quicktest v1.11.3/go.mod h1:wRf/ReqHper53s+kmmSZizM8NamnL3IM0I9ntUbOk+k=
|
||||
github.com/frankban/quicktest v1.14.0 h1:+cqqvzZV87b4adx/5ayVOaYZ2CrvM4ejQvUdBzPPUss=
|
||||
github.com/frankban/quicktest v1.14.0/go.mod h1:NeW+ay9A/U67EYXNFA1nPE8e/tnQv/09mUdL/ijj8og=
|
||||
github.com/garyburd/redigo v1.6.2 h1:yE/pwKCrbLpLpQICzYTeZ7JsTA/C53wFTJHaEtRqniM=
|
||||
github.com/garyburd/redigo v1.6.2/go.mod h1:NR3MbYisc3/PwhQ00EMzDiPmrwpPxAn5GI05/YaO1SY=
|
||||
github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04=
|
||||
@ -74,6 +77,8 @@ github.com/godbus/dbus/v5 v5.0.3/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5x
|
||||
github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ=
|
||||
github.com/gogo/protobuf v1.2.1 h1:/s5zKNz0uPFCZ5hddgPdo2TK2TVrUNMn0OOX8/aZMTE=
|
||||
github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4=
|
||||
github.com/golang-jwt/jwt/v4 v4.1.0 h1:XUgk2Ex5veyVFVeLm0xhusUTQybEbexJXrvPNOKkSY0=
|
||||
github.com/golang-jwt/jwt/v4 v4.1.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzwAxVc6locg=
|
||||
github.com/golang-sql/civil v0.0.0-20190719163853-cb61b32ac6fe h1:lXe2qZdvpiX5WZkZR4hgp4KJVfY3nMkvmwbVkpv1rVY=
|
||||
github.com/golang-sql/civil v0.0.0-20190719163853-cb61b32ac6fe/go.mod h1:8vg3r2VgvsThLBIFL93Qb5yWzgyZWhEmBwUJWevAkK0=
|
||||
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q=
|
||||
@ -94,8 +99,8 @@ github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw
|
||||
github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk=
|
||||
github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw=
|
||||
github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY=
|
||||
github.com/golang/snappy v0.0.3 h1:fHPg5GQYlCeLIPB9BZqMVR5nR9A+IM5zcgeTdjMYmLA=
|
||||
github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
|
||||
github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM=
|
||||
github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
|
||||
github.com/google/btree v1.0.0 h1:0udJVsspx3VBr5FwtLhQQtuAsVc79tTq0ocGIPAU6qo=
|
||||
github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
|
||||
github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M=
|
||||
@ -103,9 +108,10 @@ github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMyw
|
||||
github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
|
||||
github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
||||
github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
||||
github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
||||
github.com/google/go-cmp v0.5.5 h1:Khx7svrCpmxxtHBq5j2mp/xVjsi8hQMfNLvJFAlrGgU=
|
||||
github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
||||
github.com/google/go-cmp v0.5.6 h1:BKbKCqvP6I+rmFHt06ZmyQtvB8xAkWdhFyr0ZUNZcxQ=
|
||||
github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
||||
github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
|
||||
github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI=
|
||||
github.com/google/uuid v1.0.0 h1:b4Gk+7WdP/d3HZH8EJsZpvV7EtDOgaZLtnaNGIu1adA=
|
||||
@ -141,15 +147,16 @@ github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7V
|
||||
github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q=
|
||||
github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
|
||||
github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
|
||||
github.com/konsorten/go-windows-terminal-sequences v1.0.3 h1:CE8S1cTafDpPvMhIxNJKvHsGVBgn1xWYf1NbHQhywc8=
|
||||
github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
|
||||
github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc=
|
||||
github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI=
|
||||
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
|
||||
github.com/kr/pretty v0.2.1 h1:Fmg33tUaq4/8ym9TJN1x7sLJnHVwhP33CNkpYV/7rwI=
|
||||
github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI=
|
||||
github.com/kr/pretty v0.3.0 h1:WgNl7dwNpEZ6jJ9k1snq4pZsg7DOEN8hP9Xw0Tsjwk0=
|
||||
github.com/kr/pretty v0.3.0/go.mod h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NBk=
|
||||
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
|
||||
github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE=
|
||||
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
|
||||
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
|
||||
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
|
||||
github.com/leodido/go-urn v1.2.0 h1:hpXL4XnriNwQ/ABnpepYM/1vCLWNDfUNts8dX3xTG6Y=
|
||||
github.com/leodido/go-urn v1.2.0/go.mod h1:+8+nEpDfqqsY+g338gtMEUOtuK+4dEMhiQEgxpxOKII=
|
||||
github.com/lestrrat-go/envload v0.0.0-20180220234015-a3eb8ddeffcc h1:RKf14vYWi2ttpEmkA4aQ3j4u9dStX2t4M8UM6qqNsG8=
|
||||
@ -188,8 +195,8 @@ github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5/go.mod h1:v
|
||||
github.com/olivere/elastic/v7 v7.0.23 h1:b7tjMogDMhf2CisGI+L02LXLVa0ZyE82Z15XfW1e8t8=
|
||||
github.com/olivere/elastic/v7 v7.0.23/go.mod h1:OuWmD2DiuYhddWegBKPWQuelVKBLrW0fa/VUYgxuGTY=
|
||||
github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYrxe9dPLANfrWvHYVTgc=
|
||||
github.com/pierrec/lz4 v2.6.0+incompatible h1:Ix9yFKn1nSPBLFl/yZknTp8TU5G4Ps0JDmguYK6iH1A=
|
||||
github.com/pierrec/lz4 v2.6.0+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY=
|
||||
github.com/pierrec/lz4 v2.6.1+incompatible h1:9UY3+iC23yxF0UfGaYrGplQ+79Rg+h/q9FV9ix19jjM=
|
||||
github.com/pierrec/lz4 v2.6.1+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY=
|
||||
github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
|
||||
github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
|
||||
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
|
||||
@ -214,10 +221,12 @@ github.com/rifflock/lfshook v0.0.0-20180920164130-b9218ef580f5 h1:mZHayPoR0lNmnH
|
||||
github.com/rifflock/lfshook v0.0.0-20180920164130-b9218ef580f5/go.mod h1:GEXHk5HgEKCvEIIrSpFI3ozzG5xOKA2DVlEX/gGnewM=
|
||||
github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg=
|
||||
github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4=
|
||||
github.com/rogpeppe/go-internal v1.6.1 h1:/FiVV8dS/e+YqF2JvO3yXRFbBLTIuSDkuC7aBOAvL+k=
|
||||
github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc=
|
||||
github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo=
|
||||
github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE=
|
||||
github.com/sirupsen/logrus v1.6.0 h1:UBcNElsrwanuuMsnGSlYmtmgbb23qDR5dG+6X6Oo89I=
|
||||
github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88=
|
||||
github.com/sirupsen/logrus v1.8.1 h1:dJKuHgqk1NNQlqoA6BTlM1Wf9DOH3NBjQyu0h9+AZZE=
|
||||
github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0=
|
||||
github.com/smartystreets/assertions v1.1.1/go.mod h1:tcbTF8ujkAEcZ8TElKY+i30BzYlVhC/LOxJk7iOWnoo=
|
||||
github.com/smartystreets/go-aws-auth v0.0.0-20180515143844-0c1422d1fdb9/go.mod h1:SnhjPscd9TpLiy1LpzGSKh3bXCfxxXuqd9xmQJy3slM=
|
||||
github.com/smartystreets/gunit v1.4.2/go.mod h1:ZjM1ozSIMJlAz/ay4SG8PeKF00ckUp+zMHZXV9/bvak=
|
||||
@ -231,8 +240,9 @@ github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+
|
||||
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
|
||||
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
|
||||
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
|
||||
github.com/stretchr/testify v1.6.1 h1:hDPOHmpOpP40lSULcqw7IrRb/u7w6RpDC9399XyoNd0=
|
||||
github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
|
||||
github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY=
|
||||
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
|
||||
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/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U=
|
||||
@ -289,8 +299,9 @@ golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLL
|
||||
golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||
golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
|
||||
golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
|
||||
golang.org/x/net v0.0.0-20201110031124-69a78807bb2b h1:uwuIcX0g4Yl1NC5XAz37xsr2lTtcqevgzYNVt49waME=
|
||||
golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
|
||||
golang.org/x/net v0.0.0-20210917221730-978cfadd31cf h1:R150MpwJIv1MpS0N/pc+NhTM8ajzvlmxlY5OYsrevXQ=
|
||||
golang.org/x/net v0.0.0-20210917221730-978cfadd31cf/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
|
||||
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
|
||||
golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
@ -302,15 +313,20 @@ golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5h
|
||||
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f h1:+Nyd8tzPX9R7BWHguqsrbFdRx3WQ/1ib8I44HXV5yTA=
|
||||
golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210423082822-04245dca01da h1:b3NXsE2LusjYGGjL5bxEVZZORm/YEFFrWFjR8eFrw/c=
|
||||
golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
|
||||
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||
golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
|
||||
golang.org/x/text v0.3.3 h1:cokOdA+Jmi5PJGXLlLllQSgYigAEfHXJAERHVMaCc2k=
|
||||
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||
golang.org/x/text v0.3.6 h1:aRYxNxv6iGQlyVaZmk6ZgYEDa+Jg18DxebPSrd6bg1M=
|
||||
golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||
golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2 h1:+DCIGbF/swA92ohVg0//6X2IVY3KZs6p9mix0ziNYJM=
|
||||
golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
||||
golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
@ -357,8 +373,9 @@ gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v2 v2.2.8 h1:obN1ZagJSUGI0Ek/LBmuj4SNLPfIny3KsKFopxRdj10=
|
||||
gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo=
|
||||
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b h1:h8qDotaEPuJATrMmW04NCwg7v22aHH28wwpauUhK9Oo=
|
||||
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||
honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
|
||||
honnef.co/go/tools v0.0.1-2019.2.3 h1:3JgtbtFHMiCmsznwGVTUWbgGov+pVqnlf1dEJTNAXeM=
|
||||
honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg=
|
||||
|
||||
@ -1,10 +1,10 @@
|
||||
package apiAuth
|
||||
|
||||
import (
|
||||
pbAuth "Open_IM/pkg/proto/auth"
|
||||
"Open_IM/pkg/common/config"
|
||||
"Open_IM/pkg/common/log"
|
||||
"Open_IM/pkg/grpc-etcdv3/getcdv3"
|
||||
pbAuth "Open_IM/pkg/proto/auth"
|
||||
"context"
|
||||
"github.com/gin-gonic/gin"
|
||||
"net/http"
|
||||
@ -49,6 +49,10 @@ func UserRegister(c *gin.Context) {
|
||||
c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()})
|
||||
return
|
||||
}
|
||||
if params.Secret != config.Config.Secret {
|
||||
c.JSON(http.StatusBadRequest, gin.H{"errCode": 401, "errMsg": "not authorized"})
|
||||
return
|
||||
}
|
||||
pbData := newUserRegisterReq(¶ms)
|
||||
|
||||
log.Info("", "", "api user_register is server, [data: %s]", pbData.String())
|
||||
|
||||
25
internal/api/auth/user_register_test.go
Normal file
25
internal/api/auth/user_register_test.go
Normal file
@ -0,0 +1,25 @@
|
||||
package apiAuth
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"net/http"
|
||||
"net/http/httptest"
|
||||
"testing"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
func init() {
|
||||
gin.SetMode(gin.TestMode)
|
||||
}
|
||||
|
||||
func Test_UserRegister(t *testing.T) {
|
||||
res := httptest.NewRecorder()
|
||||
c, _ := gin.CreateTestContext(res)
|
||||
c.Request, _ = http.NewRequest("POST", "/", bytes.NewBufferString(`{"secret": "tuoyun", "platform": 1, "uid": "3", "name": "1"}`))
|
||||
|
||||
UserRegister(c)
|
||||
|
||||
assert.Equal(t, res.Code, 200)
|
||||
}
|
||||
@ -1,10 +1,10 @@
|
||||
package apiAuth
|
||||
|
||||
import (
|
||||
pbAuth "Open_IM/pkg/proto/auth"
|
||||
"Open_IM/pkg/common/config"
|
||||
"Open_IM/pkg/common/log"
|
||||
"Open_IM/pkg/grpc-etcdv3/getcdv3"
|
||||
pbAuth "Open_IM/pkg/proto/auth"
|
||||
"context"
|
||||
"github.com/gin-gonic/gin"
|
||||
"net/http"
|
||||
@ -37,6 +37,10 @@ func UserToken(c *gin.Context) {
|
||||
c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()})
|
||||
return
|
||||
}
|
||||
if params.Secret != config.Config.Secret {
|
||||
c.JSON(http.StatusBadRequest, gin.H{"errCode": 401, "errMsg": "not authorized"})
|
||||
return
|
||||
}
|
||||
pbData := newUserTokenReq(¶ms)
|
||||
|
||||
log.Info("", "", "api user_token is server, [data: %s]", pbData.String())
|
||||
|
||||
@ -19,7 +19,7 @@ type paramsUserNewestSeq struct {
|
||||
MsgIncr int `json:"msgIncr" binding:"required"`
|
||||
}
|
||||
|
||||
func UserNewestSeq(c *gin.Context) {
|
||||
func UserGetSeq(c *gin.Context) {
|
||||
params := paramsUserNewestSeq{}
|
||||
if err := c.BindJSON(¶ms); err != nil {
|
||||
c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()})
|
||||
@ -31,7 +31,7 @@ func UserNewestSeq(c *gin.Context) {
|
||||
c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": "token validate err"})
|
||||
return
|
||||
}
|
||||
pbData := pbMsg.GetNewSeqReq{}
|
||||
pbData := pbMsg.GetMaxAndMinSeqReq{}
|
||||
pbData.UserID = params.SendID
|
||||
pbData.OperationID = params.OperationID
|
||||
grpcConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImOfflineMessageName)
|
||||
@ -40,7 +40,7 @@ func UserNewestSeq(c *gin.Context) {
|
||||
log.ErrorByKv("get grpcConn err", pbData.OperationID, "args", params)
|
||||
}
|
||||
msgClient := pbMsg.NewChatClient(grpcConn)
|
||||
reply, err := msgClient.GetNewSeq(context.Background(), &pbData)
|
||||
reply, err := msgClient.GetMaxAndMinSeq(context.Background(), &pbData)
|
||||
if err != nil {
|
||||
log.ErrorByKv("rpc call failed to getNewSeq", pbData.OperationID, "err", err, "pbData", pbData.String())
|
||||
return
|
||||
@ -52,7 +52,8 @@ func UserNewestSeq(c *gin.Context) {
|
||||
"msgIncr": params.MsgIncr,
|
||||
"reqIdentifier": params.ReqIdentifier,
|
||||
"data": gin.H{
|
||||
"seq": reply.Seq,
|
||||
"maxSeq": reply.MaxSeq,
|
||||
"minSeq": reply.MinSeq,
|
||||
},
|
||||
})
|
||||
|
||||
@ -70,3 +70,58 @@ func UserPullMsg(c *gin.Context) {
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
type paramsUserPullMsgBySeqList struct {
|
||||
ReqIdentifier int `json:"reqIdentifier" binding:"required"`
|
||||
SendID string `json:"sendID" binding:"required"`
|
||||
OperationID string `json:"operationID" binding:"required"`
|
||||
SeqList []int64 `json:"seqList"`
|
||||
}
|
||||
|
||||
func UserPullMsgBySeqList(c *gin.Context) {
|
||||
params := paramsUserPullMsgBySeqList{}
|
||||
if err := c.BindJSON(¶ms); err != nil {
|
||||
c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()})
|
||||
return
|
||||
}
|
||||
|
||||
token := c.Request.Header.Get("token")
|
||||
if !utils.VerifyToken(token, params.SendID) {
|
||||
c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": "token validate err"})
|
||||
return
|
||||
}
|
||||
pbData := pbChat.PullMessageBySeqListReq{}
|
||||
pbData.UserID = params.SendID
|
||||
pbData.OperationID = params.OperationID
|
||||
pbData.SeqList = params.SeqList
|
||||
|
||||
grpcConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImOfflineMessageName)
|
||||
msgClient := pbChat.NewChatClient(grpcConn)
|
||||
reply, err := msgClient.PullMessageBySeqList(context.Background(), &pbData)
|
||||
if err != nil {
|
||||
log.ErrorByKv("PullMessageBySeqList error", pbData.OperationID, "err", err.Error())
|
||||
return
|
||||
}
|
||||
log.InfoByKv("rpc call success to PullMessageBySeqList", pbData.OperationID, "ReplyArgs", reply.String(), "maxSeq", reply.GetMaxSeq(),
|
||||
"MinSeq", reply.GetMinSeq(), "singLen", len(reply.GetSingleUserMsg()), "groupLen", len(reply.GetGroupUserMsg()))
|
||||
|
||||
msg := make(map[string]interface{})
|
||||
if v := reply.GetSingleUserMsg(); v != nil {
|
||||
msg["single"] = v
|
||||
} else {
|
||||
msg["single"] = []pbChat.GatherFormat{}
|
||||
}
|
||||
if v := reply.GetGroupUserMsg(); v != nil {
|
||||
msg["group"] = v
|
||||
} else {
|
||||
msg["group"] = []pbChat.GatherFormat{}
|
||||
}
|
||||
msg["maxSeq"] = reply.GetMaxSeq()
|
||||
msg["minSeq"] = reply.GetMinSeq()
|
||||
c.JSON(http.StatusOK, gin.H{
|
||||
"errCode": reply.ErrCode,
|
||||
"errMsg": reply.ErrMsg,
|
||||
"reqIdentifier": params.ReqIdentifier,
|
||||
"data": msg,
|
||||
})
|
||||
}
|
||||
|
||||
@ -67,7 +67,7 @@ func UserSendMsg(c *gin.Context) {
|
||||
|
||||
token := c.Request.Header.Get("token")
|
||||
|
||||
log.InfoByKv("Ws call success to sendMsgReq", params.OperationID, "Parameters", params)
|
||||
log.InfoByKv("api call success to sendMsgReq", params.OperationID, "Parameters", params)
|
||||
|
||||
pbData := newUserSendMsgReq(token, ¶ms)
|
||||
log.Info("", "", "api UserSendMsg call start..., [data: %s]", pbData.String())
|
||||
|
||||
@ -1,10 +1,10 @@
|
||||
package friend
|
||||
|
||||
import (
|
||||
pbFriend "Open_IM/pkg/proto/friend"
|
||||
"Open_IM/pkg/common/config"
|
||||
"Open_IM/pkg/common/log"
|
||||
"Open_IM/pkg/grpc-etcdv3/getcdv3"
|
||||
pbFriend "Open_IM/pkg/proto/friend"
|
||||
"context"
|
||||
"github.com/gin-gonic/gin"
|
||||
"net/http"
|
||||
|
||||
@ -35,7 +35,7 @@ type paramsManagementSendMsg struct {
|
||||
SessionType int32 `json:"sessionType" binding:"required"`
|
||||
}
|
||||
|
||||
func newUserSendMsgReq(token string, params *paramsManagementSendMsg) *pbChat.UserSendMsgReq {
|
||||
func newUserSendMsgReq(params *paramsManagementSendMsg) *pbChat.UserSendMsgReq {
|
||||
var newContent string
|
||||
switch params.ContentType {
|
||||
case constant.Text:
|
||||
@ -53,7 +53,6 @@ func newUserSendMsgReq(token string, params *paramsManagementSendMsg) *pbChat.Us
|
||||
}
|
||||
pbData := pbChat.UserSendMsgReq{
|
||||
ReqIdentifier: constant.WSSendMsg,
|
||||
Token: token,
|
||||
SendID: params.SendID,
|
||||
SenderNickName: params.SenderNickName,
|
||||
SenderFaceURL: params.SenderFaceURL,
|
||||
@ -103,15 +102,19 @@ func ManagementSendMsg(c *gin.Context) {
|
||||
}
|
||||
|
||||
token := c.Request.Header.Get("token")
|
||||
if !utils.IsContain(params.SendID, config.Config.Manager.AppManagerUid) {
|
||||
c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": "not appManager", "sendTime": 0, "MsgID": ""})
|
||||
claims, err := utils.ParseToken(token)
|
||||
if err != nil {
|
||||
log.NewError(params.OperationID, "parse token failed", err.Error())
|
||||
c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": "parse token failed", "sendTime": 0, "MsgID": ""})
|
||||
}
|
||||
if !utils.IsContain(claims.UID, config.Config.Manager.AppManagerUid) {
|
||||
c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": "not authorized", "sendTime": 0, "MsgID": ""})
|
||||
return
|
||||
|
||||
}
|
||||
|
||||
log.InfoByKv("Ws call success to ManagementSendMsgReq", params.OperationID, "Parameters", params)
|
||||
|
||||
pbData := newUserSendMsgReq(token, ¶ms)
|
||||
pbData := newUserSendMsgReq(¶ms)
|
||||
log.Info("", "", "api ManagementSendMsg call start..., [data: %s]", pbData.String())
|
||||
|
||||
etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImOfflineMessageName)
|
||||
|
||||
@ -6,62 +6,67 @@ import (
|
||||
"Open_IM/pkg/common/log"
|
||||
"Open_IM/pkg/grpc-etcdv3/getcdv3"
|
||||
pbChat "Open_IM/pkg/proto/chat"
|
||||
open_im_sdk "Open_IM/pkg/proto/sdk_ws"
|
||||
"Open_IM/pkg/utils"
|
||||
"bytes"
|
||||
"context"
|
||||
"encoding/gob"
|
||||
"encoding/json"
|
||||
"github.com/golang/protobuf/proto"
|
||||
"github.com/gorilla/websocket"
|
||||
"runtime"
|
||||
"strings"
|
||||
)
|
||||
|
||||
func (ws *WServer) msgParse(conn *websocket.Conn, jsonMsg []byte) {
|
||||
func (ws *WServer) msgParse(conn *UserConn, binaryMsg []byte) {
|
||||
//ws online debug data
|
||||
//{"ReqIdentifier":1001,"Token":"123","SendID":"c4ca4238a0b923820dcc509a6f75849b","Time":"123","OperationID":"123","MsgIncr":0}
|
||||
//{"ReqIdentifier":1002,"Token":"123","SendID":"c4ca4238a0b923820dcc509a6f75849b","Time":"123","OperationID":"123","MsgIncr":0,"SeqBegin":1,"SeqEnd":6}
|
||||
//{"ReqIdentifier":1003,"Token":"123","SendID":"c4ca4238a0b923820dcc509a6f75849b",
|
||||
//"RecvID":"a87ff679a2f3e71d9181a67b7542122c","ClientMsgID":"2343","Time":"147878787","OperationID":
|
||||
//"123","MsgIncr":0,"SubMsgType":101,"MsgType":100,"MsgFrom":1,"Content":"sdfsdf"}
|
||||
b := bytes.NewBuffer(binaryMsg)
|
||||
m := Req{}
|
||||
if err := json.Unmarshal(jsonMsg, &m); err != nil {
|
||||
dec := gob.NewDecoder(b)
|
||||
err := dec.Decode(&m)
|
||||
if err != nil {
|
||||
log.ErrorByKv("ws json Unmarshal err", "", "err", err.Error())
|
||||
ws.sendErrMsg(conn, 200, err.Error())
|
||||
ws.sendErrMsg(conn, 200, err.Error(), constant.WSDataError, "", "")
|
||||
err = conn.Close()
|
||||
if err != nil {
|
||||
log.NewError("", "ws close err", err.Error())
|
||||
}
|
||||
return
|
||||
}
|
||||
if err := validate.Struct(m); err != nil {
|
||||
log.ErrorByKv("ws args validate err", "", "err", err.Error())
|
||||
ws.sendErrMsg(conn, 201, err.Error())
|
||||
ws.sendErrMsg(conn, 201, err.Error(), m.ReqIdentifier, m.MsgIncr, m.OperationID)
|
||||
return
|
||||
}
|
||||
|
||||
if !utils.VerifyToken(m.Token, m.SendID) {
|
||||
ws.sendErrMsg(conn, 202, "token validate err")
|
||||
return
|
||||
}
|
||||
log.InfoByKv("Basic Info Authentication Success", m.OperationID, "reqIdentifier", m.ReqIdentifier, "sendID", m.SendID)
|
||||
//if !utils.VerifyToken(m.Token, m.SendID) {
|
||||
// ws.sendErrMsg(conn, 202, "token validate err", m.ReqIdentifier, m.MsgIncr,m.OperationID)
|
||||
// return
|
||||
//}
|
||||
log.InfoByKv("Basic Info Authentication Success", m.OperationID, "reqIdentifier", m.ReqIdentifier, "sendID", m.SendID, "msgIncr", m.MsgIncr)
|
||||
|
||||
switch m.ReqIdentifier {
|
||||
case constant.WSGetNewestSeq:
|
||||
ws.newestSeqReq(conn, &m)
|
||||
go ws.getSeqReq(conn, &m)
|
||||
case constant.WSPullMsg:
|
||||
ws.pullMsgReq(conn, &m)
|
||||
go ws.pullMsgReq(conn, &m)
|
||||
case constant.WSSendMsg:
|
||||
ws.sendMsgReq(conn, &m)
|
||||
sendTime := utils.GetCurrentTimestampByNano()
|
||||
go ws.sendMsgReq(conn, &m, sendTime)
|
||||
case constant.WSPullMsgBySeqList:
|
||||
go ws.pullMsgBySeqListReq(conn, &m)
|
||||
default:
|
||||
}
|
||||
log.NewInfo("", "goroutine num is ", runtime.NumGoroutine())
|
||||
}
|
||||
func (ws *WServer) newestSeqResp(conn *websocket.Conn, m *Req, pb *pbChat.GetNewSeqResp) {
|
||||
mReply := make(map[string]interface{})
|
||||
mData := make(map[string]interface{})
|
||||
mReply["reqIdentifier"] = m.ReqIdentifier
|
||||
mReply["msgIncr"] = m.MsgIncr
|
||||
mReply["errCode"] = pb.GetErrCode()
|
||||
mReply["errMsg"] = pb.GetErrMsg()
|
||||
mData["seq"] = pb.GetSeq()
|
||||
mReply["data"] = mData
|
||||
ws.sendMsg(conn, mReply)
|
||||
}
|
||||
func (ws *WServer) newestSeqReq(conn *websocket.Conn, m *Req) {
|
||||
log.InfoByKv("Ws call success to getNewSeq", m.OperationID, "Parameters", m)
|
||||
pbData := pbChat.GetNewSeqReq{}
|
||||
func (ws *WServer) getSeqReq(conn *UserConn, m *Req) {
|
||||
log.NewInfo(m.OperationID, "Ws call success to getNewSeq", m.MsgIncr, m.SendID, m.ReqIdentifier)
|
||||
pbData := pbChat.GetMaxAndMinSeqReq{}
|
||||
nReply := new(pbChat.GetMaxAndMinSeqResp)
|
||||
pbData.UserID = m.SendID
|
||||
pbData.OperationID = m.OperationID
|
||||
grpcConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImOfflineMessageName)
|
||||
@ -69,44 +74,35 @@ func (ws *WServer) newestSeqReq(conn *websocket.Conn, m *Req) {
|
||||
log.ErrorByKv("get grpcConn err", pbData.OperationID, "args", m)
|
||||
}
|
||||
msgClient := pbChat.NewChatClient(grpcConn)
|
||||
reply, err := msgClient.GetNewSeq(context.Background(), &pbData)
|
||||
reply, err := msgClient.GetMaxAndMinSeq(context.Background(), &pbData)
|
||||
if err != nil {
|
||||
log.ErrorByKv("rpc call failed to getNewSeq", pbData.OperationID, "err", err, "pbData", pbData.String())
|
||||
return
|
||||
log.ErrorByKv("rpc call failed to getSeqReq", pbData.OperationID, "err", err, "pbData", pbData.String())
|
||||
nReply.ErrCode = 200
|
||||
nReply.ErrMsg = err.Error()
|
||||
ws.getSeqResp(conn, m, nReply)
|
||||
} else {
|
||||
log.InfoByKv("rpc call success to getSeqReq", pbData.OperationID, "replyData", reply.String())
|
||||
ws.getSeqResp(conn, m, reply)
|
||||
}
|
||||
log.InfoByKv("rpc call success to getNewSeq", pbData.OperationID, "replyData", reply.String())
|
||||
ws.newestSeqResp(conn, m, reply)
|
||||
|
||||
}
|
||||
|
||||
func (ws *WServer) pullMsgResp(conn *websocket.Conn, m *Req, pb *pbChat.PullMessageResp) {
|
||||
mReply := make(map[string]interface{})
|
||||
msg := make(map[string]interface{})
|
||||
mReply["reqIdentifier"] = m.ReqIdentifier
|
||||
mReply["msgIncr"] = m.MsgIncr
|
||||
mReply["errCode"] = pb.GetErrCode()
|
||||
mReply["errMsg"] = pb.GetErrMsg()
|
||||
//空切片
|
||||
if v := pb.GetSingleUserMsg(); v != nil {
|
||||
msg["single"] = v
|
||||
} else {
|
||||
msg["single"] = []pbChat.GatherFormat{}
|
||||
func (ws *WServer) getSeqResp(conn *UserConn, m *Req, pb *pbChat.GetMaxAndMinSeqResp) {
|
||||
var mReplyData open_im_sdk.GetMaxAndMinSeqResp
|
||||
mReplyData.MaxSeq = pb.GetMaxSeq()
|
||||
mReplyData.MinSeq = pb.GetMinSeq()
|
||||
b, _ := proto.Marshal(&mReplyData)
|
||||
mReply := Resp{
|
||||
ReqIdentifier: m.ReqIdentifier,
|
||||
MsgIncr: m.MsgIncr,
|
||||
ErrCode: pb.GetErrCode(),
|
||||
ErrMsg: pb.GetErrMsg(),
|
||||
OperationID: m.OperationID,
|
||||
Data: b,
|
||||
}
|
||||
if v := pb.GetGroupUserMsg(); v != nil {
|
||||
msg["group"] = v
|
||||
} else {
|
||||
msg["group"] = []pbChat.GatherFormat{}
|
||||
}
|
||||
msg["maxSeq"] = pb.GetMaxSeq()
|
||||
msg["minSeq"] = pb.GetMinSeq()
|
||||
mReply["data"] = msg
|
||||
ws.sendMsg(conn, mReply)
|
||||
|
||||
}
|
||||
|
||||
func (ws *WServer) pullMsgReq(conn *websocket.Conn, m *Req) {
|
||||
log.InfoByKv("Ws call success to pullMsgReq", m.OperationID, "Parameters", m)
|
||||
reply := new(pbChat.PullMessageResp)
|
||||
func (ws *WServer) pullMsgReq(conn *UserConn, m *Req) {
|
||||
log.NewInfo(m.OperationID, "Ws call success to pullMsgReq", m.ReqIdentifier, m.MsgIncr, m.SendID)
|
||||
nReply := new(pbChat.PullMessageResp)
|
||||
isPass, errCode, errMsg, data := ws.argsValidate(m, constant.WSPullMsg)
|
||||
if isPass {
|
||||
pbData := pbChat.PullMessageReq{}
|
||||
@ -119,78 +115,169 @@ func (ws *WServer) pullMsgReq(conn *websocket.Conn, m *Req) {
|
||||
reply, err := msgClient.PullMessage(context.Background(), &pbData)
|
||||
if err != nil {
|
||||
log.ErrorByKv("PullMessage error", pbData.OperationID, "err", err.Error())
|
||||
return
|
||||
nReply.ErrCode = 200
|
||||
nReply.ErrMsg = err.Error()
|
||||
ws.pullMsgResp(conn, m, nReply)
|
||||
} else {
|
||||
log.InfoByKv("rpc call success to pullMsgRep", pbData.OperationID, "ReplyArgs", reply.String(), "maxSeq", reply.GetMaxSeq(),
|
||||
"MinSeq", reply.GetMinSeq(), "singLen", len(reply.GetSingleUserMsg()), "groupLen", len(reply.GetGroupUserMsg()))
|
||||
ws.pullMsgResp(conn, m, reply)
|
||||
}
|
||||
log.InfoByKv("rpc call success to pullMsgRep", pbData.OperationID, "ReplyArgs", reply.String(), "maxSeq", reply.GetMaxSeq(),
|
||||
"MinSeq", reply.GetMinSeq(), "singLen", len(reply.GetSingleUserMsg()), "groupLen", len(reply.GetGroupUserMsg()))
|
||||
ws.pullMsgResp(conn, m, reply)
|
||||
} else {
|
||||
reply.ErrCode = errCode
|
||||
reply.ErrMsg = errMsg
|
||||
ws.pullMsgResp(conn, m, reply)
|
||||
nReply.ErrCode = errCode
|
||||
nReply.ErrMsg = errMsg
|
||||
ws.pullMsgResp(conn, m, nReply)
|
||||
}
|
||||
}
|
||||
func (ws *WServer) pullMsgResp(conn *UserConn, m *Req, pb *pbChat.PullMessageResp) {
|
||||
log.NewInfo(m.OperationID, "pullMsgResp come here ", pb.String())
|
||||
var mReplyData open_im_sdk.PullMessageBySeqListResp
|
||||
a, err := json.Marshal(pb.SingleUserMsg)
|
||||
if err != nil {
|
||||
log.NewError(m.OperationID, "GetSingleUserMsg,json marshal,err", err.Error())
|
||||
}
|
||||
log.NewInfo(m.OperationID, "pullMsgResp json is ", len(pb.SingleUserMsg))
|
||||
err = json.Unmarshal(a, &mReplyData.SingleUserMsg)
|
||||
if err != nil {
|
||||
log.NewError(m.OperationID, "SingleUserMsg,json Unmarshal,err", err.Error())
|
||||
}
|
||||
b, err := json.Marshal(pb.GroupUserMsg)
|
||||
if err != nil {
|
||||
log.NewError(m.OperationID, "mReplyData,json marshal,err", err.Error())
|
||||
}
|
||||
err = json.Unmarshal(b, &mReplyData.GroupUserMsg)
|
||||
if err != nil {
|
||||
log.NewError(m.OperationID, "test SingleUserMsg,json Unmarshal,err", err.Error())
|
||||
}
|
||||
c, err := proto.Marshal(&mReplyData)
|
||||
log.NewInfo(m.OperationID, "test info is ", len(mReplyData.SingleUserMsg), mReplyData.SingleUserMsg)
|
||||
|
||||
mReply := Resp{
|
||||
ReqIdentifier: m.ReqIdentifier,
|
||||
MsgIncr: m.MsgIncr,
|
||||
ErrCode: pb.GetErrCode(),
|
||||
ErrMsg: pb.GetErrMsg(),
|
||||
OperationID: m.OperationID,
|
||||
Data: c,
|
||||
}
|
||||
log.NewInfo(m.OperationID, "pullMsgResp all data is ", mReply.ReqIdentifier, mReply.MsgIncr, mReply.ErrCode, mReply.ErrMsg,
|
||||
len(mReply.Data))
|
||||
|
||||
func (ws *WServer) sendMsgResp(conn *websocket.Conn, m *Req, pb *pbChat.UserSendMsgResp) {
|
||||
mReply := make(map[string]interface{})
|
||||
mReplyData := make(map[string]interface{})
|
||||
mReply["reqIdentifier"] = m.ReqIdentifier
|
||||
mReply["msgIncr"] = m.MsgIncr
|
||||
mReply["errCode"] = pb.GetErrCode()
|
||||
mReply["errMsg"] = pb.GetErrMsg()
|
||||
mReplyData["clientMsgID"] = pb.GetClientMsgID()
|
||||
mReplyData["serverMsgID"] = pb.GetServerMsgID()
|
||||
mReply["data"] = mReplyData
|
||||
ws.sendMsg(conn, mReply)
|
||||
}
|
||||
|
||||
func (ws *WServer) sendMsgReq(conn *websocket.Conn, m *Req) {
|
||||
log.InfoByKv("Ws call success to sendMsgReq", m.OperationID, "Parameters", m)
|
||||
reply := new(pbChat.UserSendMsgResp)
|
||||
}
|
||||
func (ws *WServer) pullMsgBySeqListReq(conn *UserConn, m *Req) {
|
||||
log.NewInfo(m.OperationID, "Ws call success to pullMsgBySeqListReq start", m.SendID, m.ReqIdentifier, m.MsgIncr)
|
||||
nReply := new(pbChat.PullMessageResp)
|
||||
isPass, errCode, errMsg, data := ws.argsValidate(m, constant.WSPullMsgBySeqList)
|
||||
log.NewInfo(m.OperationID, "Ws call success to pullMsgBySeqListReq middle", m.SendID, m.ReqIdentifier, m.MsgIncr, data.(open_im_sdk.PullMessageBySeqListReq).SeqList)
|
||||
if isPass {
|
||||
pbData := pbChat.PullMessageBySeqListReq{}
|
||||
pbData.SeqList = data.(open_im_sdk.PullMessageBySeqListReq).SeqList
|
||||
pbData.UserID = m.SendID
|
||||
pbData.OperationID = m.OperationID
|
||||
grpcConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImOfflineMessageName)
|
||||
msgClient := pbChat.NewChatClient(grpcConn)
|
||||
reply, err := msgClient.PullMessageBySeqList(context.Background(), &pbData)
|
||||
if err != nil {
|
||||
log.NewError(pbData.OperationID, "pullMsgBySeqListReq err", err.Error())
|
||||
nReply.ErrCode = 200
|
||||
nReply.ErrMsg = err.Error()
|
||||
ws.pullMsgResp(conn, m, nReply)
|
||||
} else {
|
||||
log.NewInfo(pbData.OperationID, "rpc call success to pullMsgBySeqListReq", reply.String(), reply.GetMaxSeq(), reply.GetMinSeq(), len(reply.GetSingleUserMsg()), len(reply.GetGroupUserMsg()))
|
||||
ws.pullMsgResp(conn, m, reply)
|
||||
}
|
||||
} else {
|
||||
nReply.ErrCode = errCode
|
||||
nReply.ErrMsg = errMsg
|
||||
ws.pullMsgResp(conn, m, nReply)
|
||||
}
|
||||
}
|
||||
func (ws *WServer) sendMsgReq(conn *UserConn, m *Req, sendTime int64) {
|
||||
log.NewInfo(m.OperationID, "Ws call success to sendMsgReq start", m.MsgIncr, m.ReqIdentifier, m.SendID, sendTime)
|
||||
nReply := new(pbChat.UserSendMsgResp)
|
||||
isPass, errCode, errMsg, pData := ws.argsValidate(m, constant.WSSendMsg)
|
||||
if isPass {
|
||||
data := pData.(MsgData)
|
||||
data := pData.(open_im_sdk.UserSendMsgReq)
|
||||
pbData := pbChat.UserSendMsgReq{
|
||||
ReqIdentifier: m.ReqIdentifier,
|
||||
Token: m.Token,
|
||||
SendID: m.SendID,
|
||||
OperationID: m.OperationID,
|
||||
PlatformID: data.PlatformID,
|
||||
SessionType: data.SessionType,
|
||||
MsgFrom: data.MsgFrom,
|
||||
ContentType: data.ContentType,
|
||||
RecvID: data.RecvID,
|
||||
ForceList: data.ForceList,
|
||||
Content: data.Content,
|
||||
Options: utils.MapToJsonString(data.Options),
|
||||
ClientMsgID: data.ClientMsgID,
|
||||
OffLineInfo: utils.MapToJsonString(data.OfflineInfo),
|
||||
ReqIdentifier: m.ReqIdentifier,
|
||||
Token: m.Token,
|
||||
SendID: m.SendID,
|
||||
OperationID: m.OperationID,
|
||||
PlatformID: data.PlatformID,
|
||||
SessionType: data.SessionType,
|
||||
MsgFrom: data.MsgFrom,
|
||||
ContentType: data.ContentType,
|
||||
RecvID: data.RecvID,
|
||||
ForceList: data.ForceList,
|
||||
SenderNickName: data.SenderNickName,
|
||||
SenderFaceURL: data.SenderFaceURL,
|
||||
Content: data.Content,
|
||||
Options: utils.MapIntToJsonString(data.Options),
|
||||
ClientMsgID: data.ClientMsgID,
|
||||
SendTime: sendTime,
|
||||
}
|
||||
log.InfoByKv("Ws call success to sendMsgReq", m.OperationID, "Parameters", m)
|
||||
log.NewInfo(m.OperationID, "Ws call success to sendMsgReq middle", m.ReqIdentifier, m.SendID, m.MsgIncr, data)
|
||||
etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImOfflineMessageName)
|
||||
client := pbChat.NewChatClient(etcdConn)
|
||||
log.Info("", "", "api UserSendMsg call, api call rpc...")
|
||||
reply, _ := client.UserSendMsg(context.Background(), &pbData)
|
||||
log.Info("", "", "api UserSendMsg call end..., [data: %s] [reply: %s]", pbData.String(), reply.String())
|
||||
ws.sendMsgResp(conn, m, reply)
|
||||
reply, err := client.UserSendMsg(context.Background(), &pbData)
|
||||
if err != nil {
|
||||
log.NewError(pbData.OperationID, "UserSendMsg err", err.Error())
|
||||
nReply.ErrCode = 200
|
||||
nReply.ErrMsg = err.Error()
|
||||
ws.sendMsgResp(conn, m, nReply, sendTime)
|
||||
} else {
|
||||
log.NewInfo(pbData.OperationID, "rpc call success to sendMsgReq", reply.String())
|
||||
ws.sendMsgResp(conn, m, reply, sendTime)
|
||||
}
|
||||
|
||||
} else {
|
||||
reply.ErrCode = errCode
|
||||
reply.ErrMsg = errMsg
|
||||
ws.sendMsgResp(conn, m, reply)
|
||||
nReply.ErrCode = errCode
|
||||
nReply.ErrMsg = errMsg
|
||||
ws.sendMsgResp(conn, m, nReply, sendTime)
|
||||
}
|
||||
|
||||
}
|
||||
func (ws *WServer) sendMsgResp(conn *UserConn, m *Req, pb *pbChat.UserSendMsgResp, sendTime int64) {
|
||||
// := make(map[string]interface{})
|
||||
|
||||
func (ws *WServer) sendMsg(conn *websocket.Conn, mReply map[string]interface{}) {
|
||||
bMsg, _ := json.Marshal(mReply)
|
||||
err := ws.writeMsg(conn, websocket.TextMessage, bMsg)
|
||||
if err != nil {
|
||||
log.ErrorByKv("WS WriteMsg error", "", "userIP", conn.RemoteAddr().String(), "userUid", ws.getUserUid(conn), "error", err, "mReply", mReply)
|
||||
var mReplyData open_im_sdk.UserSendMsgResp
|
||||
mReplyData.ClientMsgID = pb.GetClientMsgID()
|
||||
mReplyData.ServerMsgID = pb.GetServerMsgID()
|
||||
mReplyData.SendTime = sendTime
|
||||
b, _ := proto.Marshal(&mReplyData)
|
||||
mReply := Resp{
|
||||
ReqIdentifier: m.ReqIdentifier,
|
||||
MsgIncr: m.MsgIncr,
|
||||
ErrCode: pb.GetErrCode(),
|
||||
ErrMsg: pb.GetErrMsg(),
|
||||
OperationID: m.OperationID,
|
||||
Data: b,
|
||||
}
|
||||
ws.sendMsg(conn, mReply)
|
||||
}
|
||||
|
||||
func (ws *WServer) sendMsg(conn *UserConn, mReply interface{}) {
|
||||
var b bytes.Buffer
|
||||
enc := gob.NewEncoder(&b)
|
||||
err := enc.Encode(mReply)
|
||||
if err != nil {
|
||||
log.NewError(mReply.(Resp).OperationID, mReply.(Resp).ReqIdentifier, mReply.(Resp).ErrCode, mReply.(Resp).ErrMsg, "Encode Msg error", conn.RemoteAddr().String(), ws.getUserUid(conn), err.Error())
|
||||
return
|
||||
}
|
||||
err = ws.writeMsg(conn, websocket.BinaryMessage, b.Bytes())
|
||||
if err != nil {
|
||||
log.NewError(mReply.(Resp).OperationID, mReply.(Resp).ReqIdentifier, mReply.(Resp).ErrCode, mReply.(Resp).ErrMsg, "WS WriteMsg error", conn.RemoteAddr().String(), ws.getUserUid(conn), err.Error())
|
||||
}
|
||||
}
|
||||
func (ws *WServer) sendErrMsg(conn *UserConn, errCode int32, errMsg string, reqIdentifier int32, msgIncr string, operationID string) {
|
||||
mReply := Resp{
|
||||
ReqIdentifier: reqIdentifier,
|
||||
MsgIncr: msgIncr,
|
||||
ErrCode: errCode,
|
||||
ErrMsg: errMsg,
|
||||
OperationID: operationID,
|
||||
}
|
||||
}
|
||||
func (ws *WServer) sendErrMsg(conn *websocket.Conn, errCode int32, errMsg string) {
|
||||
mReply := make(map[string]interface{})
|
||||
mReply["errCode"] = errCode
|
||||
mReply["errMsg"] = errMsg
|
||||
ws.sendMsg(conn, mReply)
|
||||
}
|
||||
|
||||
@ -6,14 +6,18 @@ import (
|
||||
"Open_IM/pkg/common/log"
|
||||
"Open_IM/pkg/grpc-etcdv3/getcdv3"
|
||||
pbRelay "Open_IM/pkg/proto/relay"
|
||||
open_im_sdk "Open_IM/pkg/proto/sdk_ws"
|
||||
"Open_IM/pkg/utils"
|
||||
"bytes"
|
||||
"context"
|
||||
"encoding/json"
|
||||
"encoding/gob"
|
||||
"fmt"
|
||||
"github.com/gorilla/websocket"
|
||||
"google.golang.org/grpc"
|
||||
"github.com/golang/protobuf/proto"
|
||||
"net"
|
||||
"strings"
|
||||
|
||||
"github.com/gorilla/websocket"
|
||||
"google.golang.org/grpc"
|
||||
)
|
||||
|
||||
type RPCServer struct {
|
||||
@ -55,105 +59,87 @@ func (r *RPCServer) MsgToUser(_ context.Context, in *pbRelay.MsgToUserReq) (*pbR
|
||||
log.InfoByKv("PushMsgToUser is arriving", in.OperationID, "args", in.String())
|
||||
var resp []*pbRelay.SingleMsgToUser
|
||||
var RecvID string
|
||||
msg := make(map[string]interface{})
|
||||
mReply := make(map[string]interface{})
|
||||
mReply["reqIdentifier"] = constant.WSPushMsg
|
||||
mReply["errCode"] = 0
|
||||
mReply["errMsg"] = ""
|
||||
msg["sendID"] = in.SendID
|
||||
msg["recvID"] = in.RecvID
|
||||
msg["msgFrom"] = in.MsgFrom
|
||||
msg["contentType"] = in.ContentType
|
||||
msg["sessionType"] = in.SessionType
|
||||
msg["senderNickName"] = in.SenderNickName
|
||||
msg["senderFaceUrl"] = in.SenderFaceURL
|
||||
msg["clientMsgID"] = in.ClientMsgID
|
||||
msg["serverMsgID"] = in.ServerMsgID
|
||||
msg["content"] = in.Content
|
||||
msg["seq"] = in.RecvSeq
|
||||
msg["sendTime"] = in.SendTime
|
||||
msg["senderPlatformID"] = in.PlatformID
|
||||
mReply["data"] = msg
|
||||
bMsg, _ := json.Marshal(mReply)
|
||||
msg := open_im_sdk.MsgData{
|
||||
SendID: in.SendID,
|
||||
RecvID: in.RecvID,
|
||||
MsgFrom: in.MsgFrom,
|
||||
ContentType: in.ContentType,
|
||||
SessionType: in.SessionType,
|
||||
SenderNickName: in.SenderNickName,
|
||||
SenderFaceURL: in.SenderFaceURL,
|
||||
ClientMsgID: in.ClientMsgID,
|
||||
ServerMsgID: in.ServerMsgID,
|
||||
Content: in.Content,
|
||||
Seq: in.RecvSeq,
|
||||
SendTime: in.SendTime,
|
||||
SenderPlatformID: in.PlatformID,
|
||||
}
|
||||
msgBytes, _ := proto.Marshal(&msg)
|
||||
mReply := Resp{
|
||||
ReqIdentifier: constant.WSPushMsg,
|
||||
OperationID: in.OperationID,
|
||||
Data: msgBytes,
|
||||
}
|
||||
var replyBytes bytes.Buffer
|
||||
enc := gob.NewEncoder(&replyBytes)
|
||||
err := enc.Encode(mReply)
|
||||
if err != nil {
|
||||
log.NewError(in.OperationID, "data encode err", err.Error())
|
||||
}
|
||||
switch in.GetSessionType() {
|
||||
case constant.SingleChatType:
|
||||
RecvID = in.GetRecvID()
|
||||
case constant.GroupChatType:
|
||||
RecvID = strings.Split(in.GetRecvID(), " ")[0]
|
||||
}
|
||||
log.InfoByKv("test", in.OperationID, "wsUserToConn", ws.wsUserToConn)
|
||||
for key, conn := range ws.wsUserToConn {
|
||||
UIDAndPID := strings.Split(key, " ")
|
||||
if UIDAndPID[0] == RecvID {
|
||||
resultCode := sendMsgToUser(conn, bMsg, in, UIDAndPID[1], UIDAndPID[0])
|
||||
var tag bool
|
||||
var UIDAndPID []string
|
||||
userIDList := genUidPlatformArray(RecvID)
|
||||
for _, v := range userIDList {
|
||||
UIDAndPID = strings.Split(v, " ")
|
||||
if conn := ws.getUserConn(v); conn != nil {
|
||||
tag = true
|
||||
resultCode := sendMsgToUser(conn, replyBytes.Bytes(), in, UIDAndPID[1], UIDAndPID[0])
|
||||
temp := &pbRelay.SingleMsgToUser{
|
||||
ResultCode: resultCode,
|
||||
RecvID: UIDAndPID[0],
|
||||
RecvPlatFormID: utils.PlatformNameToID(UIDAndPID[1]),
|
||||
}
|
||||
resp = append(resp, temp)
|
||||
} else {
|
||||
temp := &pbRelay.SingleMsgToUser{
|
||||
ResultCode: -1,
|
||||
RecvID: UIDAndPID[0],
|
||||
RecvPlatFormID: utils.PlatformNameToID(UIDAndPID[1]),
|
||||
}
|
||||
resp = append(resp, temp)
|
||||
}
|
||||
}
|
||||
//switch in.GetContentType() {
|
||||
//case constant.SyncSenderMsg:
|
||||
// log.InfoByKv("come sync", in.OperationID, "args", in.String())
|
||||
// RecvID = in.GetSendID()
|
||||
// if in.MsgFrom != constant.SysMsgType {
|
||||
// for key, conn := range ws.wsUserToConn {
|
||||
// UIDAndPID := strings.Split(key, " ")
|
||||
// if UIDAndPID[0] == RecvID && utils.PlatformIDToName(in.GetPlatformID()) != UIDAndPID[1] {
|
||||
// resultCode := sendMsgToUser(conn, bMsg, in, UIDAndPID[1], UIDAndPID[0])
|
||||
// temp := &pbRelay.SingleMsgToUser{
|
||||
// ResultCode: resultCode,
|
||||
// RecvID: UIDAndPID[0],
|
||||
// RecvPlatFormID: utils.PlatformNameToID(UIDAndPID[1]),
|
||||
// }
|
||||
// resp = append(resp, temp)
|
||||
// }
|
||||
//
|
||||
// }
|
||||
// }
|
||||
//default:
|
||||
// log.InfoByKv("not come sync", in.OperationID, "args", in.String())
|
||||
// switch in.SessionType {
|
||||
// case constant.SingleChatType:
|
||||
// log.InfoByKv("come single", in.OperationID, "args", in.String())
|
||||
// RecvID = in.GetRecvID()
|
||||
// case constant.GroupChatType:
|
||||
// RecvID = strings.Split(in.GetRecvID(), " ")[0]
|
||||
// default:
|
||||
// }
|
||||
// log.InfoByKv("come for range", in.OperationID, "args", in.String())
|
||||
//
|
||||
// for key, conn := range ws.wsUserToConn {
|
||||
// UIDAndPID := strings.Split(key, " ")
|
||||
// if UIDAndPID[0] == RecvID {
|
||||
// resultCode := sendMsgToUser(conn, bMsg, in, UIDAndPID[1], UIDAndPID[0])
|
||||
// temp := &pbRelay.SingleMsgToUser{
|
||||
// ResultCode: resultCode,
|
||||
// RecvID: UIDAndPID[0],
|
||||
// RecvPlatFormID: utils.PlatformNameToID(UIDAndPID[1]),
|
||||
// }
|
||||
// resp = append(resp, temp)
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
if !tag {
|
||||
log.NewError(in.OperationID, "push err ,no matched ws conn not in map", in.String())
|
||||
}
|
||||
return &pbRelay.MsgToUserResp{
|
||||
Resp: resp,
|
||||
}, nil
|
||||
}
|
||||
|
||||
func sendMsgToUser(conn *websocket.Conn, bMsg []byte, in *pbRelay.MsgToUserReq, RecvPlatForm, RecvID string) (ResultCode int64) {
|
||||
err := ws.writeMsg(conn, websocket.TextMessage, bMsg)
|
||||
func sendMsgToUser(conn *UserConn, bMsg []byte, in *pbRelay.MsgToUserReq, RecvPlatForm, RecvID string) (ResultCode int64) {
|
||||
err := ws.writeMsg(conn, websocket.BinaryMessage, bMsg)
|
||||
if err != nil {
|
||||
log.ErrorByKv("PushMsgToUser is failed By Ws", "", "Addr", conn.RemoteAddr().String(),
|
||||
"error", err, "senderPlatform", utils.PlatformIDToName(in.PlatformID), "recvPlatform", RecvPlatForm, "args", in.String(), "recvID", RecvID)
|
||||
ResultCode = -2
|
||||
return ResultCode
|
||||
} else {
|
||||
log.InfoByKv("PushMsgToUser is success By Ws", in.OperationID, "args", in.String())
|
||||
log.InfoByKv("PushMsgToUser is success By Ws", in.OperationID, "args", in.String(), "recvPlatForm", RecvPlatForm, "recvID", RecvID)
|
||||
ResultCode = 0
|
||||
return ResultCode
|
||||
}
|
||||
|
||||
}
|
||||
func genUidPlatformArray(uid string) (array []string) {
|
||||
for i := 1; i <= utils.LinuxPlatformID; i++ {
|
||||
array = append(array, uid+" "+utils.PlatformIDToName(int32(i)))
|
||||
}
|
||||
return array
|
||||
}
|
||||
|
||||
@ -9,17 +9,27 @@ package gate
|
||||
import (
|
||||
"Open_IM/pkg/common/constant"
|
||||
"Open_IM/pkg/common/log"
|
||||
"github.com/mitchellh/mapstructure"
|
||||
open_im_sdk "Open_IM/pkg/proto/sdk_ws"
|
||||
"github.com/golang/protobuf/proto"
|
||||
)
|
||||
|
||||
type Req struct {
|
||||
ReqIdentifier int32 `json:"reqIdentifier" validate:"required"`
|
||||
Token string `json:"token" validate:"required"`
|
||||
SendID string `json:"sendID" validate:"required"`
|
||||
OperationID string `json:"operationID" validate:"required"`
|
||||
MsgIncr int32 `json:"msgIncr" validate:"required"`
|
||||
Data map[string]interface{} `json:"data"`
|
||||
ReqIdentifier int32 `json:"reqIdentifier" validate:"required"`
|
||||
Token string `json:"token" `
|
||||
SendID string `json:"sendID" validate:"required"`
|
||||
OperationID string `json:"operationID" validate:"required"`
|
||||
MsgIncr string `json:"msgIncr" validate:"required"`
|
||||
Data []byte `json:"data"`
|
||||
}
|
||||
type Resp struct {
|
||||
ReqIdentifier int32 `json:"reqIdentifier"`
|
||||
MsgIncr string `json:"msgIncr"`
|
||||
OperationID string `json:"operationID"`
|
||||
ErrCode int32 `json:"errCode"`
|
||||
ErrMsg string `json:"errMsg"`
|
||||
Data []byte `json:"data"`
|
||||
}
|
||||
|
||||
type SeqData struct {
|
||||
SeqBegin int64 `mapstructure:"seqBegin" validate:"required"`
|
||||
SeqEnd int64 `mapstructure:"seqEnd" validate:"required"`
|
||||
@ -30,31 +40,64 @@ type MsgData struct {
|
||||
MsgFrom int32 `mapstructure:"msgFrom" validate:"required"`
|
||||
ContentType int32 `mapstructure:"contentType" validate:"required"`
|
||||
RecvID string `mapstructure:"recvID" validate:"required"`
|
||||
ForceList []string `mapstructure:"forceList" validate:"required"`
|
||||
ForceList []string `mapstructure:"forceList"`
|
||||
Content string `mapstructure:"content" validate:"required"`
|
||||
Options map[string]interface{} `mapstructure:"options" validate:"required"`
|
||||
ClientMsgID string `mapstructure:"clientMsgID" validate:"required"`
|
||||
OfflineInfo map[string]interface{} `mapstructure:"offlineInfo" validate:"required"`
|
||||
Ext map[string]interface{} `mapstructure:"ext"`
|
||||
}
|
||||
type MaxSeqResp struct {
|
||||
MaxSeq int64 `json:"maxSeq"`
|
||||
}
|
||||
type PullMessageResp struct {
|
||||
}
|
||||
type SeqListData struct {
|
||||
SeqList []int64 `mapstructure:"seqList" validate:"required"`
|
||||
}
|
||||
|
||||
func (ws *WServer) argsValidate(m *Req, r int32) (isPass bool, errCode int32, errMsg string, data interface{}) {
|
||||
func (ws *WServer) argsValidate(m *Req, r int32) (isPass bool, errCode int32, errMsg string, returnData interface{}) {
|
||||
switch r {
|
||||
case constant.WSPullMsg:
|
||||
data = SeqData{}
|
||||
case constant.WSSendMsg:
|
||||
data = MsgData{}
|
||||
data := open_im_sdk.UserSendMsgReq{}
|
||||
if err := proto.Unmarshal(m.Data, &data); err != nil {
|
||||
log.ErrorByKv("Decode Data struct err", "", "err", err.Error(), "reqIdentifier", r)
|
||||
return false, 203, err.Error(), nil
|
||||
}
|
||||
if err := validate.Struct(data); err != nil {
|
||||
log.ErrorByKv("data args validate err", "", "err", err.Error(), "reqIdentifier", r)
|
||||
return false, 204, err.Error(), nil
|
||||
|
||||
}
|
||||
return true, 0, "", data
|
||||
case constant.WSPullMsgBySeqList:
|
||||
data := open_im_sdk.PullMessageBySeqListReq{}
|
||||
if err := proto.Unmarshal(m.Data, &data); err != nil {
|
||||
log.ErrorByKv("Decode Data struct err", "", "err", err.Error(), "reqIdentifier", r)
|
||||
return false, 203, err.Error(), nil
|
||||
}
|
||||
if err := validate.Struct(data); err != nil {
|
||||
log.ErrorByKv("data args validate err", "", "err", err.Error(), "reqIdentifier", r)
|
||||
return false, 204, err.Error(), nil
|
||||
|
||||
}
|
||||
return true, 0, "", data
|
||||
|
||||
default:
|
||||
}
|
||||
if err := mapstructure.WeakDecode(m.Data, &data); err != nil {
|
||||
log.ErrorByKv("map to Data struct err", "", "err", err.Error(), "reqIdentifier", r)
|
||||
return false, 203, err.Error(), nil
|
||||
} else if err := validate.Struct(data); err != nil {
|
||||
log.ErrorByKv("data args validate err", "", "err", err.Error(), "reqIdentifier", r)
|
||||
return false, 204, err.Error(), nil
|
||||
|
||||
} else {
|
||||
return true, 0, "", data
|
||||
}
|
||||
return false, 204, "args err", nil
|
||||
|
||||
//b := bytes.NewBuffer(m.Data)
|
||||
//dec := gob.NewDecoder(b)
|
||||
//err := dec.Decode(&data)
|
||||
//if err != nil {
|
||||
// log.ErrorByKv("Decode Data struct err", "", "err", err.Error(), "reqIdentifier", r)
|
||||
// return false, 203, err.Error(), nil
|
||||
//}
|
||||
//if err := mapstructure.WeakDecode(m.Data, &data); err != nil {
|
||||
// log.ErrorByKv("map to Data struct err", "", "err", err.Error(), "reqIdentifier", r)
|
||||
// return false, 203, err.Error(), nil
|
||||
//} else
|
||||
|
||||
}
|
||||
|
||||
@ -6,23 +6,28 @@ import (
|
||||
"Open_IM/pkg/utils"
|
||||
"github.com/gorilla/websocket"
|
||||
"net/http"
|
||||
"sync"
|
||||
"time"
|
||||
)
|
||||
|
||||
type UserConn struct {
|
||||
*websocket.Conn
|
||||
w *sync.Mutex
|
||||
}
|
||||
type WServer struct {
|
||||
wsAddr string
|
||||
wsMaxConnNum int
|
||||
wsUpGrader *websocket.Upgrader
|
||||
wsConnToUser map[*websocket.Conn]string
|
||||
wsUserToConn map[string]*websocket.Conn
|
||||
wsConnToUser map[*UserConn]string
|
||||
wsUserToConn map[string]*UserConn
|
||||
}
|
||||
|
||||
func (ws *WServer) onInit(wsPort int) {
|
||||
ip := utils.ServerIP
|
||||
ws.wsAddr = ip + ":" + utils.IntToString(wsPort)
|
||||
ws.wsMaxConnNum = config.Config.LongConnSvr.WebsocketMaxConnNum
|
||||
ws.wsConnToUser = make(map[*websocket.Conn]string)
|
||||
ws.wsUserToConn = make(map[string]*websocket.Conn)
|
||||
ws.wsConnToUser = make(map[*UserConn]string)
|
||||
ws.wsUserToConn = make(map[string]*UserConn)
|
||||
ws.wsUpGrader = &websocket.Upgrader{
|
||||
HandshakeTimeout: time.Duration(config.Config.LongConnSvr.WebsocketTimeOut) * time.Second,
|
||||
ReadBufferSize: config.Config.LongConnSvr.WebsocketMaxMsgLen,
|
||||
@ -49,35 +54,39 @@ func (ws *WServer) wsHandler(w http.ResponseWriter, r *http.Request) {
|
||||
//Connection mapping relationship,
|
||||
//userID+" "+platformID->conn
|
||||
SendID := query["sendID"][0] + " " + utils.PlatformIDToName(int32(utils.StringToInt64(query["platformID"][0])))
|
||||
ws.addUserConn(SendID, conn)
|
||||
go ws.readMsg(conn)
|
||||
//Initialize a lock for each user
|
||||
newConn := &UserConn{conn, new(sync.Mutex)}
|
||||
ws.addUserConn(SendID, newConn)
|
||||
go ws.readMsg(newConn)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func (ws *WServer) readMsg(conn *websocket.Conn) {
|
||||
func (ws *WServer) readMsg(conn *UserConn) {
|
||||
for {
|
||||
msgType, msg, err := conn.ReadMessage()
|
||||
messageType, msg, err := conn.ReadMessage()
|
||||
if messageType == websocket.PingMessage {
|
||||
log.NewInfo("", "this is a pingMessage")
|
||||
}
|
||||
if err != nil {
|
||||
log.ErrorByKv("WS ReadMsg error", "", "userIP", conn.RemoteAddr().String(), "userUid", ws.getUserUid(conn), "error", err)
|
||||
ws.delUserConn(conn)
|
||||
return
|
||||
} else {
|
||||
log.ErrorByKv("test", "", "msgType", msgType, "userIP", conn.RemoteAddr().String(), "userUid", ws.getUserUid(conn))
|
||||
//log.ErrorByKv("test", "", "msgType", msgType, "userIP", conn.RemoteAddr().String(), "userUid", ws.getUserUid(conn))
|
||||
}
|
||||
ws.msgParse(conn, msg)
|
||||
//ws.writeMsg(conn, 1, chat)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
func (ws *WServer) writeMsg(conn *websocket.Conn, a int, msg []byte) error {
|
||||
rwLock.Lock()
|
||||
defer rwLock.Unlock()
|
||||
func (ws *WServer) writeMsg(conn *UserConn, a int, msg []byte) error {
|
||||
conn.w.Lock()
|
||||
defer conn.w.Unlock()
|
||||
return conn.WriteMessage(a, msg)
|
||||
|
||||
}
|
||||
func (ws *WServer) addUserConn(uid string, conn *websocket.Conn) {
|
||||
func (ws *WServer) addUserConn(uid string, conn *UserConn) {
|
||||
rwLock.Lock()
|
||||
defer rwLock.Unlock()
|
||||
if oldConn, ok := ws.wsUserToConn[uid]; ok {
|
||||
@ -95,7 +104,7 @@ func (ws *WServer) addUserConn(uid string, conn *websocket.Conn) {
|
||||
|
||||
}
|
||||
|
||||
func (ws *WServer) delUserConn(conn *websocket.Conn) {
|
||||
func (ws *WServer) delUserConn(conn *UserConn) {
|
||||
rwLock.Lock()
|
||||
defer rwLock.Unlock()
|
||||
var uidPlatform string
|
||||
@ -111,12 +120,12 @@ func (ws *WServer) delUserConn(conn *websocket.Conn) {
|
||||
}
|
||||
err := conn.Close()
|
||||
if err != nil {
|
||||
log.ErrorByKv("close err", "", "uid", uidPlatform, "conn", conn)
|
||||
log.ErrorByKv("close err", "", "uid", uidPlatform)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
func (ws *WServer) getUserConn(uid string) *websocket.Conn {
|
||||
func (ws *WServer) getUserConn(uid string) *UserConn {
|
||||
rwLock.RLock()
|
||||
defer rwLock.RUnlock()
|
||||
if conn, ok := ws.wsUserToConn[uid]; ok {
|
||||
@ -124,7 +133,7 @@ func (ws *WServer) getUserConn(uid string) *websocket.Conn {
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (ws *WServer) getUserUid(conn *websocket.Conn) string {
|
||||
func (ws *WServer) getUserUid(conn *UserConn) string {
|
||||
rwLock.RLock()
|
||||
defer rwLock.RUnlock()
|
||||
|
||||
|
||||
@ -1,17 +1,22 @@
|
||||
package logic
|
||||
|
||||
import (
|
||||
pbMsg "Open_IM/pkg/proto/chat"
|
||||
"Open_IM/pkg/common/db"
|
||||
"Open_IM/pkg/common/db/mysql_model/im_mysql_model"
|
||||
"Open_IM/pkg/common/log"
|
||||
pbMsg "Open_IM/pkg/proto/chat"
|
||||
"Open_IM/pkg/utils"
|
||||
)
|
||||
|
||||
func saveUserChat(uid string, pbMsg *pbMsg.MsgSvrToPushSvrChatMsg) error {
|
||||
time := utils.GetCurrentTimestampByMill()
|
||||
seq, err := db.DB.IncrUserSeq(uid)
|
||||
if err != nil {
|
||||
log.NewError(pbMsg.OperationID, "data insert to redis err", err.Error(), pbMsg.String())
|
||||
return err
|
||||
}
|
||||
pbMsg.RecvSeq = seq
|
||||
log.NewInfo(pbMsg.OperationID, "IncrUserSeq cost time", utils.GetCurrentTimestampByMill()-time)
|
||||
return db.DB.SaveUserChat(uid, pbMsg.SendTime, pbMsg)
|
||||
}
|
||||
|
||||
|
||||
@ -33,6 +33,7 @@ func (mc *HistoryConsumerHandler) Init() {
|
||||
|
||||
func (mc *HistoryConsumerHandler) handleChatWs2Mongo(msg []byte, msgKey string) {
|
||||
log.InfoByKv("chat come mongo!!!", "", "chat", string(msg))
|
||||
time := utils.GetCurrentTimestampByNano()
|
||||
pbData := pbMsg.WSToMsgSvrChatMsg{}
|
||||
err := proto.Unmarshal(msg, &pbData)
|
||||
if err != nil {
|
||||
@ -58,48 +59,53 @@ func (mc *HistoryConsumerHandler) handleChatWs2Mongo(msg []byte, msgKey string)
|
||||
isHistory := utils.GetSwitchFromOptions(Options, "history")
|
||||
//Control whether to store history messages (mysql)
|
||||
isPersist := utils.GetSwitchFromOptions(Options, "persistent")
|
||||
if pbData.SessionType == constant.SingleChatType {
|
||||
log.Info("", "", "msg_transfer chat type = SingleChatType", isHistory, isPersist)
|
||||
switch pbData.SessionType {
|
||||
case constant.SingleChatType:
|
||||
log.NewDebug(pbSaveData.OperationID, "msg_transfer chat type = SingleChatType", isHistory, isPersist)
|
||||
if isHistory {
|
||||
if msgKey == pbSaveData.RecvID {
|
||||
err := saveUserChat(pbData.RecvID, &pbSaveData)
|
||||
if err != nil {
|
||||
log.ErrorByKv("data insert to mongo err", pbSaveData.OperationID, "data", pbSaveData.String(), "err", err.Error())
|
||||
log.NewError(pbSaveData.OperationID, "single data insert to mongo err", err.Error(), pbSaveData.String())
|
||||
return
|
||||
}
|
||||
|
||||
} else if msgKey == pbSaveData.SendID {
|
||||
err := saveUserChat(pbData.SendID, &pbSaveData)
|
||||
if err != nil {
|
||||
log.ErrorByKv("data insert to mongo err", pbSaveData.OperationID, "data", pbSaveData.String(), "err", err.Error())
|
||||
log.NewError(pbSaveData.OperationID, "single data insert to mongo err", err.Error(), pbSaveData.String())
|
||||
return
|
||||
}
|
||||
//if isSenderSync {
|
||||
// pbSaveData.ContentType = constant.SyncSenderMsg
|
||||
// log.WarnByKv("SyncSenderMsg come here", pbData.OperationID, pbSaveData.String())
|
||||
// sendMessageToPush(&pbSaveData)
|
||||
//}
|
||||
|
||||
}
|
||||
|
||||
log.NewDebug(pbSaveData.OperationID, "saveUserChat cost time ", utils.GetCurrentTimestampByNano()-time)
|
||||
}
|
||||
if msgKey == pbSaveData.RecvID {
|
||||
pbSaveData.Options = pbData.Options
|
||||
pbSaveData.OfflineInfo = pbData.OfflineInfo
|
||||
sendMessageToPush(&pbSaveData)
|
||||
go sendMessageToPush(&pbSaveData)
|
||||
log.NewDebug(pbSaveData.OperationID, "sendMessageToPush cost time ", utils.GetCurrentTimestampByNano()-time)
|
||||
}
|
||||
|
||||
log.InfoByKv("msg_transfer handle topic success...", "", "")
|
||||
} else if pbData.SessionType == constant.GroupChatType {
|
||||
log.Info("", "", "msg_transfer chat type = GroupChatType")
|
||||
case constant.GroupChatType:
|
||||
log.NewDebug(pbSaveData.OperationID, "msg_transfer chat type = GroupChatType", isHistory, isPersist)
|
||||
if isHistory {
|
||||
uidAndGroupID := strings.Split(pbData.RecvID, " ")
|
||||
saveUserChat(uidAndGroupID[0], &pbSaveData)
|
||||
err := saveUserChat(uidAndGroupID[0], &pbSaveData)
|
||||
if err != nil {
|
||||
log.NewError(pbSaveData.OperationID, "group data insert to mongo err", pbSaveData.String(), uidAndGroupID[0], err.Error())
|
||||
return
|
||||
}
|
||||
}
|
||||
pbSaveData.Options = pbData.Options
|
||||
pbSaveData.OfflineInfo = pbData.OfflineInfo
|
||||
sendMessageToPush(&pbSaveData)
|
||||
log.InfoByKv("msg_transfer handle topic success...", "", "")
|
||||
} else {
|
||||
log.Error("", "", "msg_transfer recv chat err, chat.MsgFrom = %d", pbData.SessionType)
|
||||
go sendMessageToPush(&pbSaveData)
|
||||
default:
|
||||
log.NewError(pbSaveData.OperationID, "SessionType error", pbSaveData.String())
|
||||
return
|
||||
}
|
||||
|
||||
log.NewDebug(pbSaveData.OperationID, "msg_transfer handle topic data to database success...", pbSaveData.String())
|
||||
}
|
||||
|
||||
func (HistoryConsumerHandler) Setup(_ sarama.ConsumerGroupSession) error { return nil }
|
||||
|
||||
13
internal/push/jpush/common/JGPlatform.go
Normal file
13
internal/push/jpush/common/JGPlatform.go
Normal file
@ -0,0 +1,13 @@
|
||||
package common
|
||||
|
||||
import (
|
||||
"encoding/base64"
|
||||
"fmt"
|
||||
)
|
||||
|
||||
func GetAuthorization(Appkey string, MasterSecret string) string {
|
||||
str := fmt.Sprintf("%s:%s", Appkey, MasterSecret)
|
||||
buf := []byte(str)
|
||||
Authorization := fmt.Sprintf("Basic %s", base64.StdEncoding.EncodeToString(buf))
|
||||
return Authorization
|
||||
}
|
||||
55
internal/push/jpush/push.go
Normal file
55
internal/push/jpush/push.go
Normal file
@ -0,0 +1,55 @@
|
||||
package push
|
||||
|
||||
import (
|
||||
"Open_IM/internal/push/jpush/common"
|
||||
"Open_IM/internal/push/jpush/requestBody"
|
||||
"Open_IM/pkg/common/config"
|
||||
"bytes"
|
||||
"encoding/json"
|
||||
"io/ioutil"
|
||||
"net/http"
|
||||
)
|
||||
|
||||
type JPushResp struct {
|
||||
}
|
||||
|
||||
func JGAccountListPush(accounts []string, content, detailContent, platform string) ([]byte, error) {
|
||||
|
||||
var pf requestBody.Platform
|
||||
_ = pf.SetPlatform(platform)
|
||||
var au requestBody.Audience
|
||||
au.SetAlias(accounts)
|
||||
var no requestBody.Notification
|
||||
no.SetAlert(content)
|
||||
var me requestBody.Message
|
||||
me.SetMsgContent(detailContent)
|
||||
var po requestBody.PushObj
|
||||
po.SetPlatform(&pf)
|
||||
po.SetAudience(&au)
|
||||
po.SetNotification(&no)
|
||||
po.SetMessage(&me)
|
||||
|
||||
con, err := json.Marshal(po)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
client := &http.Client{}
|
||||
|
||||
req, err := http.NewRequest("POST", config.Config.Push.Jpns.PushUrl, bytes.NewBuffer(con))
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
req.Header.Set("Authorization", common.GetAuthorization(config.Config.Push.Jpns.AppKey, config.Config.Push.Jpns.MasterSecret))
|
||||
|
||||
resp, err := client.Do(req)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
defer resp.Body.Close()
|
||||
result, err := ioutil.ReadAll(resp.Body)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return result, nil
|
||||
}
|
||||
53
internal/push/jpush/requestBody/audience.go
Normal file
53
internal/push/jpush/requestBody/audience.go
Normal file
@ -0,0 +1,53 @@
|
||||
package requestBody
|
||||
|
||||
const (
|
||||
TAG = "tag"
|
||||
TAG_AND = "tag_and"
|
||||
TAG_NOT = "tag_not"
|
||||
ALIAS = "alias"
|
||||
REGISTRATION_ID = "registration_id"
|
||||
SEGMENT = "segment"
|
||||
ABTEST = "abtest"
|
||||
)
|
||||
|
||||
type Audience struct {
|
||||
Object interface{}
|
||||
audience map[string][]string
|
||||
}
|
||||
|
||||
func (a *Audience) set(key string, v []string) {
|
||||
if a.audience == nil {
|
||||
a.audience = make(map[string][]string)
|
||||
a.Object = a.audience
|
||||
}
|
||||
|
||||
//v, ok = this.audience[key]
|
||||
//if ok {
|
||||
// return
|
||||
//}
|
||||
a.audience[key] = v
|
||||
}
|
||||
|
||||
func (a *Audience) SetTag(tags []string) {
|
||||
a.set(TAG, tags)
|
||||
}
|
||||
|
||||
func (a *Audience) SetTagAnd(tags []string) {
|
||||
a.set(TAG_AND, tags)
|
||||
}
|
||||
|
||||
func (a *Audience) SetTagNot(tags []string) {
|
||||
a.set(TAG_NOT, tags)
|
||||
}
|
||||
|
||||
func (a *Audience) SetAlias(alias []string) {
|
||||
a.set(ALIAS, alias)
|
||||
}
|
||||
|
||||
func (a *Audience) SetRegistrationId(ids []string) {
|
||||
a.set(REGISTRATION_ID, ids)
|
||||
}
|
||||
|
||||
func (a *Audience) SetAll() {
|
||||
a.Object = "all"
|
||||
}
|
||||
27
internal/push/jpush/requestBody/message.go
Normal file
27
internal/push/jpush/requestBody/message.go
Normal file
@ -0,0 +1,27 @@
|
||||
package requestBody
|
||||
|
||||
type Message struct {
|
||||
MsgContent string `json:"msg_content"`
|
||||
Title string `json:"title,omitempty"`
|
||||
ContentType string `json:"content_type,omitempty"`
|
||||
Extras map[string]interface{} `json:"extras,omitempty"`
|
||||
}
|
||||
|
||||
func (m *Message) SetMsgContent(c string) {
|
||||
m.MsgContent = c
|
||||
}
|
||||
|
||||
func (m *Message) SetTitle(t string) {
|
||||
m.Title = t
|
||||
}
|
||||
|
||||
func (m *Message) SetContentType(c string) {
|
||||
m.ContentType = c
|
||||
}
|
||||
|
||||
func (m *Message) SetExtras(key string, value interface{}) {
|
||||
if m.Extras == nil {
|
||||
m.Extras = make(map[string]interface{})
|
||||
}
|
||||
m.Extras[key] = value
|
||||
}
|
||||
17
internal/push/jpush/requestBody/notification.go
Normal file
17
internal/push/jpush/requestBody/notification.go
Normal file
@ -0,0 +1,17 @@
|
||||
package requestBody
|
||||
|
||||
type Notification struct {
|
||||
Alert string `json:"alert,omitempty"`
|
||||
Android *Android `json:"android,omitempty"`
|
||||
IOS *Ios `json:"ios,omitempty"`
|
||||
}
|
||||
|
||||
type Android struct {
|
||||
}
|
||||
|
||||
type Ios struct {
|
||||
}
|
||||
|
||||
func (n *Notification) SetAlert(alert string) {
|
||||
n.Alert = alert
|
||||
}
|
||||
83
internal/push/jpush/requestBody/platform.go
Normal file
83
internal/push/jpush/requestBody/platform.go
Normal file
@ -0,0 +1,83 @@
|
||||
package requestBody
|
||||
|
||||
import (
|
||||
"Open_IM/pkg/utils"
|
||||
"errors"
|
||||
)
|
||||
|
||||
const (
|
||||
ANDROID = "android"
|
||||
IOS = "ios"
|
||||
QUICKAPP = "quickapp"
|
||||
WINDOWSPHONE = "winphone"
|
||||
ALL = "all"
|
||||
)
|
||||
|
||||
type Platform struct {
|
||||
Os interface{}
|
||||
osArry []string
|
||||
}
|
||||
|
||||
func (p *Platform) Set(os string) error {
|
||||
if p.Os == nil {
|
||||
p.osArry = make([]string, 0, 4)
|
||||
} else {
|
||||
switch p.Os.(type) {
|
||||
case string:
|
||||
return errors.New("platform is all")
|
||||
default:
|
||||
}
|
||||
}
|
||||
|
||||
for _, value := range p.osArry {
|
||||
if os == value {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
switch os {
|
||||
case IOS:
|
||||
fallthrough
|
||||
case ANDROID:
|
||||
fallthrough
|
||||
case QUICKAPP:
|
||||
fallthrough
|
||||
case WINDOWSPHONE:
|
||||
p.osArry = append(p.osArry, os)
|
||||
p.Os = p.osArry
|
||||
default:
|
||||
return errors.New("unknow platform")
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
func (p *Platform) SetPlatform(platform string) error {
|
||||
switch platform {
|
||||
case utils.AndroidPlatformStr:
|
||||
return p.SetAndroid()
|
||||
case utils.IOSPlatformStr:
|
||||
return p.SetIOS()
|
||||
default:
|
||||
return errors.New("platform err")
|
||||
}
|
||||
|
||||
}
|
||||
func (p *Platform) SetIOS() error {
|
||||
return p.Set(IOS)
|
||||
}
|
||||
|
||||
func (p *Platform) SetAndroid() error {
|
||||
return p.Set(ANDROID)
|
||||
}
|
||||
|
||||
func (p *Platform) SetQuickApp() error {
|
||||
return p.Set(QUICKAPP)
|
||||
}
|
||||
|
||||
func (p *Platform) SetWindowsPhone() error {
|
||||
return p.Set(WINDOWSPHONE)
|
||||
}
|
||||
|
||||
func (p *Platform) SetAll() {
|
||||
p.Os = ALL
|
||||
}
|
||||
24
internal/push/jpush/requestBody/pushObj.go
Normal file
24
internal/push/jpush/requestBody/pushObj.go
Normal file
@ -0,0 +1,24 @@
|
||||
package requestBody
|
||||
|
||||
type PushObj struct {
|
||||
Platform interface{} `json:"platform"`
|
||||
Audience interface{} `json:"audience"`
|
||||
Notification interface{} `json:"notification,omitempty"`
|
||||
Message interface{} `json:"message,omitempty"`
|
||||
}
|
||||
|
||||
func (p *PushObj) SetPlatform(pf *Platform) {
|
||||
p.Platform = pf.Os
|
||||
}
|
||||
|
||||
func (p *PushObj) SetAudience(ad *Audience) {
|
||||
p.Audience = ad.Object
|
||||
}
|
||||
|
||||
func (p *PushObj) SetNotification(no *Notification) {
|
||||
p.Notification = no
|
||||
}
|
||||
|
||||
func (p *PushObj) SetMessage(m *Message) {
|
||||
p.Message = m
|
||||
}
|
||||
@ -24,7 +24,7 @@ func Init(rpcPort int) {
|
||||
log.NewPrivateLog(config.Config.ModuleName.PushName)
|
||||
rpcServer.Init(rpcPort)
|
||||
pushCh.Init()
|
||||
pushTerminal = []int32{utils.IOSPlatformID}
|
||||
pushTerminal = []int32{utils.IOSPlatformID, utils.AndroidPlatformID}
|
||||
}
|
||||
func init() {
|
||||
producer = kafka.NewKafkaProducer(config.Config.Kafka.Ws2mschat.Addr, config.Config.Kafka.Ws2mschat.Topic)
|
||||
|
||||
@ -7,33 +7,35 @@
|
||||
package logic
|
||||
|
||||
import (
|
||||
push "Open_IM/internal/push/jpush"
|
||||
rpcChat "Open_IM/internal/rpc/chat"
|
||||
"Open_IM/internal/rpc/user/internal_service"
|
||||
"Open_IM/pkg/common/config"
|
||||
"Open_IM/pkg/common/constant"
|
||||
"Open_IM/pkg/common/log"
|
||||
"Open_IM/pkg/grpc-etcdv3/getcdv3"
|
||||
pbChat "Open_IM/pkg/proto/chat"
|
||||
pbGroup "Open_IM/pkg/proto/group"
|
||||
pbRelay "Open_IM/pkg/proto/relay"
|
||||
pbGetInfo "Open_IM/pkg/proto/user"
|
||||
"Open_IM/pkg/utils"
|
||||
"Open_IM/pkg/grpc-etcdv3/getcdv3"
|
||||
"context"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"strings"
|
||||
)
|
||||
|
||||
type EChatContent struct {
|
||||
SessionType int `json:"chatType"`
|
||||
type OpenIMContent struct {
|
||||
SessionType int `json:"sessionType"`
|
||||
From string `json:"from"`
|
||||
To string `json:"to"`
|
||||
Seq int64 `json:"seq"`
|
||||
}
|
||||
type AtContent struct {
|
||||
Text string `json:"text"`
|
||||
AtUserList []string `json:"atUserList"`
|
||||
IsAtSelf bool `json:"isAtSelf"`
|
||||
}
|
||||
|
||||
func MsgToUser(sendPbData *pbRelay.MsgToUserReq, OfflineInfo, Options string) {
|
||||
var wsResult []*pbRelay.SingleMsgToUser
|
||||
//isShouldOfflinePush := true
|
||||
MOptions := utils.JsonStringToMap(Options) //Control whether to push message to sender's other terminal
|
||||
//isSenderSync := utils.GetSwitchFromOptions(MOptions, "senderSync")
|
||||
isOfflinePush := utils.GetSwitchFromOptions(MOptions, "offlinePush")
|
||||
@ -51,101 +53,61 @@ func MsgToUser(sendPbData *pbRelay.MsgToUserReq, OfflineInfo, Options string) {
|
||||
wsResult = append(wsResult, reply.Resp...)
|
||||
}
|
||||
}
|
||||
log.InfoByKv("push_result", sendPbData.OperationID, "result", wsResult)
|
||||
if isOfflinePush {
|
||||
|
||||
for _, v := range wsResult {
|
||||
if v.ResultCode == 0 {
|
||||
continue
|
||||
}
|
||||
//supported terminal
|
||||
for _, t := range pushTerminal {
|
||||
if v.RecvPlatFormID == t {
|
||||
//Use offline push messaging
|
||||
var UIDList []string
|
||||
UIDList = append(UIDList, sendPbData.RecvID)
|
||||
var sendUIDList []string
|
||||
sendUIDList = append(sendUIDList, sendPbData.SendID)
|
||||
userInfo, err := internal_service.GetUserInfoClient(&pbGetInfo.GetUserInfoReq{UserIDList: sendUIDList, OperationID: sendPbData.OperationID})
|
||||
if err != nil {
|
||||
log.ErrorByArgs(fmt.Sprintf("err=%v,call GetUserInfoClient rpc server failed", err))
|
||||
return
|
||||
}
|
||||
|
||||
customContent := EChatContent{
|
||||
SessionType: int(sendPbData.SessionType),
|
||||
From: sendPbData.SendID,
|
||||
To: sendPbData.RecvID,
|
||||
Seq: sendPbData.RecvSeq,
|
||||
}
|
||||
bCustomContent, _ := json.Marshal(customContent)
|
||||
|
||||
jsonCustomContent := string(bCustomContent)
|
||||
switch sendPbData.ContentType {
|
||||
case constant.Text:
|
||||
IOSAccountListPush(UIDList, userInfo.Data[0].Name, sendPbData.Content, jsonCustomContent)
|
||||
case constant.Picture:
|
||||
IOSAccountListPush(UIDList, userInfo.Data[0].Name, constant.ContentType2PushContent[constant.Picture], jsonCustomContent)
|
||||
case constant.Voice:
|
||||
IOSAccountListPush(UIDList, userInfo.Data[0].Name, constant.ContentType2PushContent[constant.Voice], jsonCustomContent)
|
||||
case constant.Video:
|
||||
IOSAccountListPush(UIDList, userInfo.Data[0].Name, constant.ContentType2PushContent[constant.Video], jsonCustomContent)
|
||||
case constant.File:
|
||||
IOSAccountListPush(UIDList, userInfo.Data[0].Name, constant.ContentType2PushContent[constant.File], jsonCustomContent)
|
||||
default:
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
/*for _, t := range pushTerminal {
|
||||
log.InfoByKv("push_result", sendPbData.OperationID, "result", wsResult, "sendData", sendPbData)
|
||||
if sendPbData.ContentType != constant.Typing && sendPbData.ContentType != constant.HasReadReceipt {
|
||||
if isOfflinePush {
|
||||
for _, v := range wsResult {
|
||||
if v.RecvPlatFormID == t && v.ResultCode == 0 {
|
||||
isShouldOfflinePush = false
|
||||
break
|
||||
if v.ResultCode == 0 {
|
||||
continue
|
||||
}
|
||||
//supported terminal
|
||||
for _, t := range pushTerminal {
|
||||
if v.RecvPlatFormID == t {
|
||||
//Use offline push messaging
|
||||
var UIDList []string
|
||||
UIDList = append(UIDList, v.RecvID)
|
||||
customContent := OpenIMContent{
|
||||
SessionType: int(sendPbData.SessionType),
|
||||
From: sendPbData.SendID,
|
||||
To: sendPbData.RecvID,
|
||||
Seq: sendPbData.RecvSeq,
|
||||
}
|
||||
bCustomContent, _ := json.Marshal(customContent)
|
||||
jsonCustomContent := string(bCustomContent)
|
||||
var content string
|
||||
switch sendPbData.ContentType {
|
||||
case constant.Text:
|
||||
content = constant.ContentType2PushContent[constant.Text]
|
||||
case constant.Picture:
|
||||
content = constant.ContentType2PushContent[constant.Picture]
|
||||
case constant.Voice:
|
||||
content = constant.ContentType2PushContent[constant.Voice]
|
||||
case constant.Video:
|
||||
content = constant.ContentType2PushContent[constant.Video]
|
||||
case constant.File:
|
||||
content = constant.ContentType2PushContent[constant.File]
|
||||
case constant.AtText:
|
||||
a := AtContent{}
|
||||
_ = utils.JsonStringToStruct(sendPbData.Content, &a)
|
||||
if utils.IsContain(v.RecvID, a.AtUserList) {
|
||||
content = constant.ContentType2PushContent[constant.AtText] + constant.ContentType2PushContent[constant.Common]
|
||||
} else {
|
||||
content = constant.ContentType2PushContent[constant.GroupMsg]
|
||||
}
|
||||
default:
|
||||
}
|
||||
pushResult, err := push.JGAccountListPush(UIDList, content, jsonCustomContent, utils.PlatformIDToName(t))
|
||||
if err != nil {
|
||||
log.NewError(sendPbData.OperationID, "offline push error", sendPbData.String(), err.Error(), t)
|
||||
} else {
|
||||
log.NewDebug(sendPbData.OperationID, "offline push return result is ", string(pushResult), sendPbData, t)
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
if isShouldOfflinePush {
|
||||
//Use offline push messaging
|
||||
var UIDList []string
|
||||
UIDList = append(UIDList, sendPbData.RecvID)
|
||||
var sendUIDList []string
|
||||
sendUIDList = append(sendUIDList, sendPbData.SendID)
|
||||
userInfo, err := internal_service.GetUserInfoClient(&pbGetInfo.GetUserInfoReq{UserIDList: sendUIDList, OperationID: sendPbData.OperationID})
|
||||
if err != nil {
|
||||
log.ErrorByArgs(fmt.Sprintf("err=%v,call GetUserInfoClient rpc server failed", err))
|
||||
return
|
||||
}
|
||||
|
||||
customContent := EChatContent{
|
||||
SessionType: int(sendPbData.SessionType),
|
||||
From: sendPbData.SendID,
|
||||
To: sendPbData.RecvID,
|
||||
Seq: sendPbData.RecvSeq,
|
||||
}
|
||||
bCustomContent, _ := json.Marshal(customContent)
|
||||
|
||||
jsonCustomContent := string(bCustomContent)
|
||||
switch sendPbData.ContentType {
|
||||
case constant.Text:
|
||||
IOSAccountListPush(UIDList, userInfo.Data[0].Name, sendPbData.Content, jsonCustomContent)
|
||||
case constant.Picture:
|
||||
IOSAccountListPush(UIDList, userInfo.Data[0].Name, constant.ContentType2PushContent[constant.Picture], jsonCustomContent)
|
||||
case constant.Voice:
|
||||
IOSAccountListPush(UIDList, userInfo.Data[0].Name, constant.ContentType2PushContent[constant.Voice], jsonCustomContent)
|
||||
case constant.Video:
|
||||
IOSAccountListPush(UIDList, userInfo.Data[0].Name, constant.ContentType2PushContent[constant.Video], jsonCustomContent)
|
||||
case constant.File:
|
||||
IOSAccountListPush(UIDList, userInfo.Data[0].Name, constant.ContentType2PushContent[constant.File], jsonCustomContent)
|
||||
default:
|
||||
|
||||
}
|
||||
|
||||
} else {
|
||||
isShouldOfflinePush = true
|
||||
}
|
||||
}*/
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -10,6 +10,9 @@ import (
|
||||
func (rpc *rpcAuth) UserRegister(_ context.Context, pb *pbAuth.UserRegisterReq) (*pbAuth.UserRegisterResp, error) {
|
||||
log.Info("", "", "rpc user_register start, [data: %s]", pb.String())
|
||||
|
||||
//if len(pb.UID) == 0 {
|
||||
// pb.UID = utils.GenID()
|
||||
//}
|
||||
if err := im_mysql_model.UserRegister(pb); err != nil {
|
||||
log.Error("", "", "rpc user_register error, [data: %s] [err: %s]", pb.String(), err.Error())
|
||||
return &pbAuth.UserRegisterResp{Success: false}, err
|
||||
|
||||
@ -18,7 +18,7 @@ func (rpc *rpcAuth) UserToken(_ context.Context, pb *pbAuth.UserTokenReq) (*pbAu
|
||||
}
|
||||
log.Info("", "", "rpc user_token call..., im_mysql_model.AppServerFindFromUserByUserID")
|
||||
|
||||
tokens, expTime, err := utils.CreateToken(pb.UID, "", pb.Platform)
|
||||
tokens, expTime, err := utils.CreateToken(pb.UID, pb.Platform)
|
||||
if err != nil {
|
||||
log.Error("", "", "rpc user_token call..., utils.CreateToken fail [uid: %s] [err: %s]", pb.UID, err.Error())
|
||||
return &pbAuth.UserTokenResp{ErrCode: 500, ErrMsg: err.Error()}, err
|
||||
|
||||
@ -13,35 +13,40 @@ import (
|
||||
pbMsg "Open_IM/pkg/proto/chat"
|
||||
)
|
||||
|
||||
func (rpc *rpcChat) GetNewSeq(_ context.Context, in *pbMsg.GetNewSeqReq) (*pbMsg.GetNewSeqResp, error) {
|
||||
log.InfoByKv("rpc getNewSeq is arriving", in.OperationID, in.String())
|
||||
func (rpc *rpcChat) GetMaxAndMinSeq(_ context.Context, in *pbMsg.GetMaxAndMinSeqReq) (*pbMsg.GetMaxAndMinSeqResp, error) {
|
||||
log.InfoByKv("rpc getMaxAndMinSeq is arriving", in.OperationID, in.String())
|
||||
//seq, err := model.GetBiggestSeqFromReceive(in.UserID)
|
||||
seq, err := commonDB.DB.GetUserSeq(in.UserID)
|
||||
resp := new(pbMsg.GetNewSeqResp)
|
||||
if err == nil {
|
||||
resp.Seq = seq
|
||||
resp.ErrCode = 0
|
||||
resp.ErrMsg = ""
|
||||
return resp, err
|
||||
maxSeq, err1 := commonDB.DB.GetUserMaxSeq(in.UserID)
|
||||
minSeq, err2 := commonDB.DB.GetUserMinSeq(in.UserID)
|
||||
resp := new(pbMsg.GetMaxAndMinSeqResp)
|
||||
if err1 == nil {
|
||||
resp.MaxSeq = maxSeq
|
||||
} else if err1 == redis.ErrNil {
|
||||
resp.MaxSeq = 0
|
||||
} else {
|
||||
if err == redis.ErrNil {
|
||||
resp.Seq = 0
|
||||
} else {
|
||||
log.ErrorByKv("getSeq from redis error", in.OperationID, "args", in.String(), "err", err.Error())
|
||||
resp.Seq = -1
|
||||
}
|
||||
resp.ErrCode = 0
|
||||
resp.ErrMsg = ""
|
||||
return resp, nil
|
||||
log.NewError(in.OperationID, "getMaxSeq from redis error", in.String(), err1.Error())
|
||||
resp.MaxSeq = -1
|
||||
resp.ErrCode = 200
|
||||
resp.ErrMsg = "redis get err"
|
||||
}
|
||||
|
||||
if err2 == nil {
|
||||
resp.MinSeq = minSeq
|
||||
} else if err2 == redis.ErrNil {
|
||||
resp.MinSeq = 0
|
||||
} else {
|
||||
log.NewError(in.OperationID, "getMaxSeq from redis error", in.String(), err2.Error())
|
||||
resp.MinSeq = -1
|
||||
resp.ErrCode = 201
|
||||
resp.ErrMsg = "redis get err"
|
||||
}
|
||||
return resp, nil
|
||||
}
|
||||
func (rpc *rpcChat) PullMessage(_ context.Context, in *pbMsg.PullMessageReq) (*pbMsg.PullMessageResp, error) {
|
||||
log.InfoByKv("rpc pullMessage is arriving", in.OperationID, "args", in.String())
|
||||
resp := new(pbMsg.PullMessageResp)
|
||||
var respSingleMsgFormat []*pbMsg.GatherFormat
|
||||
var respGroupMsgFormat []*pbMsg.GatherFormat
|
||||
SingleMsgFormat, GroupMsgFormat, MaxSeq, MinSeq, err := commonDB.DB.GetUserChat(in.UserID, in.SeqBegin, in.SeqEnd)
|
||||
SingleMsgFormat, GroupMsgFormat, MaxSeq, MinSeq, err := commonDB.DB.GetMsgBySeqRange(in.UserID, in.SeqBegin, in.SeqEnd)
|
||||
if err != nil {
|
||||
log.ErrorByKv("pullMsg data error", in.OperationID, in.String())
|
||||
resp.ErrCode = 1
|
||||
@ -59,6 +64,29 @@ func (rpc *rpcChat) PullMessage(_ context.Context, in *pbMsg.PullMessageReq) (*p
|
||||
GroupUserMsg: respGroupMsgFormat,
|
||||
}, nil
|
||||
}
|
||||
func (rpc *rpcChat) PullMessageBySeqList(_ context.Context, in *pbMsg.PullMessageBySeqListReq) (*pbMsg.PullMessageResp, error) {
|
||||
log.NewInfo(in.OperationID, "rpc PullMessageBySeqList is arriving", in.String())
|
||||
resp := new(pbMsg.PullMessageResp)
|
||||
var respSingleMsgFormat []*pbMsg.GatherFormat
|
||||
var respGroupMsgFormat []*pbMsg.GatherFormat
|
||||
SingleMsgFormat, GroupMsgFormat, MaxSeq, MinSeq, err := commonDB.DB.GetMsgBySeqList(in.UserID, in.SeqList)
|
||||
if err != nil {
|
||||
log.ErrorByKv("PullMessageBySeqList data error", in.OperationID, in.String())
|
||||
resp.ErrCode = 1
|
||||
resp.ErrMsg = err.Error()
|
||||
return resp, nil
|
||||
}
|
||||
respSingleMsgFormat = singleMsgHandleByUser(SingleMsgFormat, in.UserID)
|
||||
respGroupMsgFormat = groupMsgHandleByUser(GroupMsgFormat)
|
||||
return &pbMsg.PullMessageResp{
|
||||
ErrCode: 0,
|
||||
ErrMsg: "",
|
||||
MaxSeq: MaxSeq,
|
||||
MinSeq: MinSeq,
|
||||
SingleUserMsg: respSingleMsgFormat,
|
||||
GroupUserMsg: respGroupMsgFormat,
|
||||
}, nil
|
||||
}
|
||||
func singleMsgHandleByUser(allMsg []*pbMsg.MsgFormat, ownerId string) []*pbMsg.GatherFormat {
|
||||
var userid string
|
||||
var respMsgFormat []*pbMsg.GatherFormat
|
||||
|
||||
@ -42,10 +42,9 @@ type MsgCallBackResp struct {
|
||||
|
||||
func (rpc *rpcChat) UserSendMsg(_ context.Context, pb *pbChat.UserSendMsgReq) (*pbChat.UserSendMsgResp, error) {
|
||||
replay := pbChat.UserSendMsgResp{}
|
||||
log.InfoByKv("sendMsg", pb.OperationID, "args", pb.String())
|
||||
if !utils.VerifyToken(pb.Token, pb.SendID) {
|
||||
return returnMsg(&replay, pb, http.StatusUnauthorized, "token validate err,not authorized", "", 0)
|
||||
}
|
||||
log.NewDebug(pb.OperationID, "rpc sendMsg come here", pb.String())
|
||||
//if !utils.VerifyToken(pb.Token, pb.SendID) {
|
||||
// return returnMsg(&replay, pb, http.StatusUnauthorized, "token validate err,not authorized", "", 0)
|
||||
serverMsgID := GetMsgID(pb.SendID)
|
||||
pbData := pbChat.WSToMsgSvrChatMsg{}
|
||||
pbData.MsgFrom = pb.MsgFrom
|
||||
@ -64,7 +63,11 @@ func (rpc *rpcChat) UserSendMsg(_ context.Context, pb *pbChat.UserSendMsgReq) (*
|
||||
pbData.MsgID = serverMsgID
|
||||
pbData.OperationID = pb.OperationID
|
||||
pbData.Token = pb.Token
|
||||
pbData.SendTime = utils.GetCurrentTimestampByNano()
|
||||
if pb.SendTime == 0 {
|
||||
pbData.SendTime = utils.GetCurrentTimestampByNano()
|
||||
} else {
|
||||
pbData.SendTime = pb.SendTime
|
||||
}
|
||||
m := MsgCallBackResp{}
|
||||
if config.Config.MessageCallBack.CallbackSwitch {
|
||||
bMsg, err := http2.Post(config.Config.MessageCallBack.CallbackUrl, MsgCallBackReq{
|
||||
@ -88,85 +91,77 @@ func (rpc *rpcChat) UserSendMsg(_ context.Context, pb *pbChat.UserSendMsgReq) (*
|
||||
return returnMsg(&replay, pb, m.ResponseErrCode, m.ErrMsg, "", 0)
|
||||
} else {
|
||||
pbData.Content = m.ResponseResult.ModifiedMsg
|
||||
err1 := rpc.sendMsgToKafka(&pbData, pbData.RecvID)
|
||||
err2 := rpc.sendMsgToKafka(&pbData, pbData.SendID)
|
||||
if err1 != nil || err2 != nil {
|
||||
return returnMsg(&replay, pb, 201, "kafka send msg err", "", 0)
|
||||
}
|
||||
return returnMsg(&replay, pb, 0, "", serverMsgID, pbData.SendTime)
|
||||
}
|
||||
}
|
||||
} else {
|
||||
switch pbData.SessionType {
|
||||
case constant.SingleChatType:
|
||||
err1 := rpc.sendMsgToKafka(&pbData, pbData.RecvID)
|
||||
err2 := rpc.sendMsgToKafka(&pbData, pbData.SendID)
|
||||
if err1 != nil || err2 != nil {
|
||||
return returnMsg(&replay, pb, 201, "kafka send msg err", "", 0)
|
||||
}
|
||||
return returnMsg(&replay, pb, 0, "", serverMsgID, pbData.SendTime)
|
||||
case constant.GroupChatType:
|
||||
etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName)
|
||||
client := pbGroup.NewGroupClient(etcdConn)
|
||||
req := &pbGroup.GetGroupAllMemberReq{
|
||||
GroupID: pbData.RecvID,
|
||||
Token: pbData.Token,
|
||||
OperationID: pbData.OperationID,
|
||||
}
|
||||
reply, err := client.GetGroupAllMember(context.Background(), req)
|
||||
}
|
||||
switch pbData.SessionType {
|
||||
case constant.SingleChatType:
|
||||
err1 := rpc.sendMsgToKafka(&pbData, pbData.RecvID)
|
||||
err2 := rpc.sendMsgToKafka(&pbData, pbData.SendID)
|
||||
if err1 != nil || err2 != nil {
|
||||
return returnMsg(&replay, pb, 201, "kafka send msg err", "", 0)
|
||||
}
|
||||
return returnMsg(&replay, pb, 0, "", serverMsgID, pbData.SendTime)
|
||||
case constant.GroupChatType:
|
||||
etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImGroupName)
|
||||
client := pbGroup.NewGroupClient(etcdConn)
|
||||
req := &pbGroup.GetGroupAllMemberReq{
|
||||
GroupID: pbData.RecvID,
|
||||
Token: pbData.Token,
|
||||
OperationID: pbData.OperationID,
|
||||
}
|
||||
reply, err := client.GetGroupAllMember(context.Background(), req)
|
||||
if err != nil {
|
||||
log.Error(pbData.Token, pbData.OperationID, "rpc send_msg getGroupInfo failed, err = %s", err.Error())
|
||||
return returnMsg(&replay, pb, 201, err.Error(), "", 0)
|
||||
}
|
||||
if reply.ErrorCode != 0 {
|
||||
log.Error(pbData.Token, pbData.OperationID, "rpc send_msg getGroupInfo failed, err = %s", reply.ErrorMsg)
|
||||
return returnMsg(&replay, pb, reply.ErrorCode, reply.ErrorMsg, "", 0)
|
||||
}
|
||||
var addUidList []string
|
||||
switch pbData.ContentType {
|
||||
case constant.KickGroupMemberTip:
|
||||
var notification content_struct.NotificationContent
|
||||
var kickContent group.KickGroupMemberReq
|
||||
err := utils.JsonStringToStruct(pbData.Content, ¬ification)
|
||||
if err != nil {
|
||||
log.Error(pbData.Token, pbData.OperationID, "rpc send_msg getGroupInfo failed, err = %s", err.Error())
|
||||
return returnMsg(&replay, pb, 201, err.Error(), "", 0)
|
||||
}
|
||||
if reply.ErrorCode != 0 {
|
||||
log.Error(pbData.Token, pbData.OperationID, "rpc send_msg getGroupInfo failed, err = %s", reply.ErrorMsg)
|
||||
return returnMsg(&replay, pb, reply.ErrorCode, reply.ErrorMsg, "", 0)
|
||||
}
|
||||
var addUidList []string
|
||||
switch pbData.ContentType {
|
||||
case constant.KickGroupMemberTip:
|
||||
var notification content_struct.NotificationContent
|
||||
var kickContent group.KickGroupMemberReq
|
||||
err := utils.JsonStringToStruct(pbData.Content, ¬ification)
|
||||
log.ErrorByKv("json unmarshall err", pbData.OperationID, "err", err.Error())
|
||||
return returnMsg(&replay, pb, 200, err.Error(), "", 0)
|
||||
} else {
|
||||
err := utils.JsonStringToStruct(notification.Detail, &kickContent)
|
||||
if err != nil {
|
||||
log.ErrorByKv("json unmarshall err", pbData.OperationID, "err", err.Error())
|
||||
return returnMsg(&replay, pb, 200, err.Error(), "", 0)
|
||||
} else {
|
||||
err := utils.JsonStringToStruct(notification.Detail, &kickContent)
|
||||
if err != nil {
|
||||
log.ErrorByKv("json unmarshall err", pbData.OperationID, "err", err.Error())
|
||||
return returnMsg(&replay, pb, 200, err.Error(), "", 0)
|
||||
}
|
||||
for _, v := range kickContent.UidListInfo {
|
||||
addUidList = append(addUidList, v.UserId)
|
||||
}
|
||||
}
|
||||
case constant.QuitGroupTip:
|
||||
addUidList = append(addUidList, pbData.SendID)
|
||||
default:
|
||||
}
|
||||
groupID := pbData.RecvID
|
||||
for i, v := range reply.MemberList {
|
||||
pbData.RecvID = v.UserId + " " + groupID
|
||||
err := rpc.sendMsgToKafka(&pbData, utils.IntToString(i))
|
||||
if err != nil {
|
||||
return returnMsg(&replay, pb, 201, "kafka send msg err", "", 0)
|
||||
for _, v := range kickContent.UidListInfo {
|
||||
addUidList = append(addUidList, v.UserId)
|
||||
}
|
||||
}
|
||||
for i, v := range addUidList {
|
||||
pbData.RecvID = v + " " + groupID
|
||||
err := rpc.sendMsgToKafka(&pbData, utils.IntToString(i+1))
|
||||
if err != nil {
|
||||
return returnMsg(&replay, pb, 201, "kafka send msg err", "", 0)
|
||||
}
|
||||
}
|
||||
return returnMsg(&replay, pb, 0, "", serverMsgID, pbData.SendTime)
|
||||
case constant.QuitGroupTip:
|
||||
addUidList = append(addUidList, pbData.SendID)
|
||||
default:
|
||||
|
||||
}
|
||||
groupID := pbData.RecvID
|
||||
for i, v := range reply.MemberList {
|
||||
pbData.RecvID = v.UserId + " " + groupID
|
||||
err := rpc.sendMsgToKafka(&pbData, utils.IntToString(i))
|
||||
if err != nil {
|
||||
return returnMsg(&replay, pb, 201, "kafka send msg err", "", 0)
|
||||
}
|
||||
}
|
||||
for i, v := range addUidList {
|
||||
pbData.RecvID = v + " " + groupID
|
||||
err := rpc.sendMsgToKafka(&pbData, utils.IntToString(i+1))
|
||||
if err != nil {
|
||||
return returnMsg(&replay, pb, 201, "kafka send msg err", "", 0)
|
||||
}
|
||||
}
|
||||
return returnMsg(&replay, pb, 0, "", serverMsgID, pbData.SendTime)
|
||||
default:
|
||||
return returnMsg(&replay, pb, 203, "unkonwn sessionType", "", 0)
|
||||
|
||||
}
|
||||
return returnMsg(&replay, pb, 203, "unkonwn sessionType", "", 0)
|
||||
|
||||
}
|
||||
func (rpc *rpcChat) sendMsgToKafka(m *pbChat.WSToMsgSvrChatMsg, key string) error {
|
||||
|
||||
@ -55,25 +55,33 @@ func (s *friendServer) AddFriend(ctx context.Context, req *pbFriend.AddFriendReq
|
||||
func (s *friendServer) ImportFriend(ctx context.Context, req *pbFriend.ImportFriendReq) (*pbFriend.ImportFriendResp, error) {
|
||||
log.Info(req.Token, req.OperationID, "ImportFriend come here,args=%s", req.String())
|
||||
var resp pbFriend.ImportFriendResp
|
||||
var c pbFriend.CommonResp
|
||||
//Parse token, to find current user information
|
||||
claims, err := utils.ParseToken(req.Token)
|
||||
if err != nil {
|
||||
log.Error(req.Token, req.OperationID, "err=%s,parse token failed", err.Error())
|
||||
return &pbFriend.ImportFriendResp{CommonResp: &pbFriend.CommonResp{ErrorCode: config.ErrAddFriend.ErrCode, ErrorMsg: config.ErrParseToken.ErrMsg}, FailedUidList: req.UidList}, nil
|
||||
c.ErrorCode = config.ErrAddFriend.ErrCode
|
||||
c.ErrorMsg = config.ErrParseToken.ErrMsg
|
||||
return &pbFriend.ImportFriendResp{CommonResp: &c, FailedUidList: req.UidList}, nil
|
||||
}
|
||||
|
||||
if !utils.IsContain(claims.UID, config.Config.Manager.AppManagerUid) {
|
||||
log.Error(req.Token, req.OperationID, "not magager uid", claims.UID)
|
||||
return &pbFriend.ImportFriendResp{CommonResp: &pbFriend.CommonResp{ErrorCode: config.ErrAddFriend.ErrCode, ErrorMsg: "not authorized"}, FailedUidList: req.UidList}, nil
|
||||
log.Error(req.Token, req.OperationID, "not manager uid", claims.UID)
|
||||
c.ErrorCode = config.ErrAddFriend.ErrCode
|
||||
c.ErrorMsg = "not authorized"
|
||||
return &pbFriend.ImportFriendResp{CommonResp: &c, FailedUidList: req.UidList}, nil
|
||||
}
|
||||
if _, err = im_mysql_model.FindUserByUID(req.OwnerUid); err != nil {
|
||||
log.Error(req.Token, req.OperationID, "this user not exists,cant not add friend", req.OwnerUid)
|
||||
return &pbFriend.ImportFriendResp{CommonResp: &pbFriend.CommonResp{ErrorCode: config.ErrAddFriend.ErrCode, ErrorMsg: "this user not exists,cant not add friend"}, FailedUidList: req.UidList}, nil
|
||||
c.ErrorCode = config.ErrAddFriend.ErrCode
|
||||
c.ErrorMsg = "this user not exists,cant not add friend"
|
||||
return &pbFriend.ImportFriendResp{CommonResp: &c, FailedUidList: req.UidList}, nil
|
||||
}
|
||||
for _, v := range req.UidList {
|
||||
if _, err = im_mysql_model.FindUserByUID(v); err != nil {
|
||||
resp.CommonResp.ErrorMsg = "some uid establish failed"
|
||||
resp.CommonResp.ErrorCode = 408
|
||||
if _, fErr := im_mysql_model.FindUserByUID(v); fErr != nil {
|
||||
c.ErrorMsg = "some uid establish failed"
|
||||
c.ErrorCode = 408
|
||||
resp.CommonResp = &c
|
||||
resp.FailedUidList = append(resp.FailedUidList, v)
|
||||
} else {
|
||||
if _, err = im_mysql_model.FindFriendRelationshipFromFriend(req.OwnerUid, v); err != nil {
|
||||
@ -81,18 +89,18 @@ func (s *friendServer) ImportFriend(ctx context.Context, req *pbFriend.ImportFri
|
||||
err1 := im_mysql_model.InsertToFriend(req.OwnerUid, v, 1)
|
||||
if err1 != nil {
|
||||
resp.FailedUidList = append(resp.FailedUidList, v)
|
||||
log.Error(req.Token, req.OperationID, "err=%s,create friendship failed", err.Error())
|
||||
log.NewError(req.OperationID, "err1,create friendship failed", req.OwnerUid, v, err1.Error())
|
||||
}
|
||||
err2 := im_mysql_model.InsertToFriend(v, req.OwnerUid, 1)
|
||||
if err2 != nil {
|
||||
log.Error(req.Token, req.OperationID, "err=%s,create friendship failed", err.Error())
|
||||
log.NewError(req.OperationID, "err2,create friendship failed", v, req.OwnerUid, err2.Error())
|
||||
}
|
||||
if err1 == nil && err2 == nil {
|
||||
var name, faceUrl string
|
||||
n := content_struct.NotificationContent{1, constant.FriendAcceptTip, ""}
|
||||
n := content_struct.NotificationContent{IsDisplay: 1, DefaultTips: constant.FriendAcceptTip}
|
||||
r, err := im_mysql_model.FindUserByUID(v)
|
||||
if err != nil {
|
||||
log.ErrorByKv("get info failed", req.OperationID, "err", err.Error(), "req", req.String())
|
||||
log.NewError(req.OperationID, "get info failed", err.Error(), v)
|
||||
}
|
||||
if r != nil {
|
||||
name, faceUrl = r.Name, r.Icon
|
||||
|
||||
@ -70,6 +70,12 @@ func (s *groupServer) InviteUserToGroup(ctx context.Context, req *pbGroup.Invite
|
||||
return &pbGroup.InviteUserToGroupResp{ErrorCode: config.ErrAccess.ErrCode, ErrorMsg: config.ErrAccess.ErrMsg}, nil
|
||||
}
|
||||
|
||||
groupInfoFromMysql, err := imdb.FindGroupInfoByGroupId(req.GroupID)
|
||||
if err != nil || groupInfoFromMysql == nil {
|
||||
log.NewError(req.OperationID, "get group info error", req.GroupID, req.UidList)
|
||||
return &pbGroup.InviteUserToGroupResp{ErrorCode: config.ErrAccess.ErrCode, ErrorMsg: config.ErrAccess.ErrMsg}, nil
|
||||
}
|
||||
|
||||
//
|
||||
//from User: invite: applicant
|
||||
//to user: invite: invited
|
||||
@ -157,13 +163,13 @@ func (c *inviteUserToGroupReq) ContentToString() string {
|
||||
}
|
||||
|
||||
func (s *groupServer) GetGroupAllMember(ctx context.Context, req *pbGroup.GetGroupAllMemberReq) (*pbGroup.GetGroupAllMemberResp, error) {
|
||||
claims, err := utils.ParseToken(req.Token)
|
||||
if err != nil {
|
||||
log.Error(req.Token, req.OperationID, "err=%s,parse token failed", err.Error())
|
||||
if req.Token != config.Config.Secret {
|
||||
return &pbGroup.GetGroupAllMemberResp{ErrorCode: config.ErrParseToken.ErrCode, ErrorMsg: config.ErrParseToken.ErrMsg}, nil
|
||||
}
|
||||
}
|
||||
//claims, err := utils.ParseToken(req.Token)
|
||||
//if err != nil {
|
||||
// log.Error(req.Token, req.OperationID, "err=%s,parse token failed", err.Error())
|
||||
// if req.Token != config.Config.Secret {
|
||||
// return &pbGroup.GetGroupAllMemberResp{ErrorCode: config.ErrParseToken.ErrCode, ErrorMsg: config.ErrParseToken.ErrMsg}, nil
|
||||
// }
|
||||
//}
|
||||
|
||||
var resp pbGroup.GetGroupAllMemberResp
|
||||
resp.ErrorCode = 0
|
||||
@ -171,7 +177,7 @@ func (s *groupServer) GetGroupAllMember(ctx context.Context, req *pbGroup.GetGro
|
||||
if err != nil {
|
||||
resp.ErrorCode = config.ErrDb.ErrCode
|
||||
resp.ErrorMsg = err.Error()
|
||||
log.Error(claims.UID, req.OperationID, "FindGroupMemberListByGroupId failed, ", err.Error(), "params: ", req.GroupID)
|
||||
log.NewError(req.OperationID, "FindGroupMemberListByGroupId failed,", err.Error(), req.GroupID)
|
||||
return &resp, nil
|
||||
}
|
||||
|
||||
|
||||
68
internal/utils/cors_middleware_test.go
Normal file
68
internal/utils/cors_middleware_test.go
Normal file
@ -0,0 +1,68 @@
|
||||
package utils
|
||||
|
||||
import (
|
||||
"Open_IM/pkg/utils"
|
||||
"net/http"
|
||||
"net/http/httptest"
|
||||
"testing"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
func init() {
|
||||
gin.SetMode(gin.TestMode)
|
||||
}
|
||||
|
||||
func performRequest(r http.Handler, method, origin string) *httptest.ResponseRecorder {
|
||||
return performRequestWithHeaders(r, method, origin, http.Header{})
|
||||
}
|
||||
|
||||
func performRequestWithHeaders(r http.Handler, method, origin string, header http.Header) *httptest.ResponseRecorder {
|
||||
req, _ := http.NewRequest(method, "/", nil)
|
||||
// From go/net/http/request.go:
|
||||
// For incoming requests, the Host header is promoted to the
|
||||
// Request.Host field and removed from the Header map.
|
||||
req.Host = header.Get("Host")
|
||||
header.Del("Host")
|
||||
if len(origin) > 0 {
|
||||
header.Set("Origin", origin)
|
||||
}
|
||||
req.Header = header
|
||||
w := httptest.NewRecorder()
|
||||
r.ServeHTTP(w, req)
|
||||
return w
|
||||
}
|
||||
|
||||
func newTestRouter() *gin.Engine {
|
||||
router := gin.New()
|
||||
router.Use(utils.CorsHandler())
|
||||
router.GET("/", func(c *gin.Context) {
|
||||
c.String(http.StatusOK, "get")
|
||||
})
|
||||
router.POST("/", func(c *gin.Context) {
|
||||
c.String(http.StatusOK, "post")
|
||||
})
|
||||
router.PATCH("/", func(c *gin.Context) {
|
||||
c.String(http.StatusOK, "patch")
|
||||
})
|
||||
|
||||
return router
|
||||
}
|
||||
|
||||
func Test_CorsHandler(t *testing.T) {
|
||||
router := newTestRouter()
|
||||
// no CORS request, origin == ""
|
||||
w := performRequest(router, "GET", "")
|
||||
assert.Equal(t, "get", w.Body.String())
|
||||
assert.Equal(t, w.Header().Get("Access-Control-Allow-Origin"), "*")
|
||||
assert.Equal(t, w.Header().Get("Access-Control-Allow-Methods"), "*")
|
||||
assert.Equal(t, w.Header().Get("Access-Control-Allow-Headers"), "*")
|
||||
assert.Equal(t, w.Header().Get("Access-Control-Expose-Headers"), "Content-Length, Access-Control-Allow-Origin, Access-Control-Allow-Headers,Cache-Control,Content-Language,Content-Type,Expires,Last-Modified,Pragma,FooBar")
|
||||
assert.Equal(t, w.Header().Get("Access-Control-Max-Age"), "172800")
|
||||
assert.Equal(t, w.Header().Get("Access-Control-Allow-Credentials"), "false")
|
||||
assert.Equal(t, w.Header().Get("content-type"), "application/json")
|
||||
|
||||
w = performRequest(router, "OPTIONS", "")
|
||||
assert.Equal(t, w.Body.String(), "\"Options Request!\"")
|
||||
}
|
||||
13
internal/utils/get_server_ip_test.go
Normal file
13
internal/utils/get_server_ip_test.go
Normal file
@ -0,0 +1,13 @@
|
||||
package utils
|
||||
|
||||
import (
|
||||
"Open_IM/pkg/utils"
|
||||
"net"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestServerIP(t *testing.T) {
|
||||
if net.ParseIP(utils.ServerIP) == nil {
|
||||
t.Fail()
|
||||
}
|
||||
}
|
||||
28
internal/utils/id.go
Normal file
28
internal/utils/id.go
Normal file
@ -0,0 +1,28 @@
|
||||
package utils
|
||||
|
||||
import (
|
||||
"github.com/bwmarrin/snowflake"
|
||||
)
|
||||
|
||||
func init() {
|
||||
var err error
|
||||
idGenerator, err = snowflake.NewNode(getNodeNum())
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
}
|
||||
|
||||
func getNodeNum() int64 {
|
||||
return 1
|
||||
}
|
||||
|
||||
var idGenerator *snowflake.Node
|
||||
|
||||
func GenID() string {
|
||||
return idGenerator.Generate().String()
|
||||
}
|
||||
|
||||
func GenIDs(count int) []string {
|
||||
//impl
|
||||
return []string{}
|
||||
}
|
||||
15
internal/utils/id_test.go
Normal file
15
internal/utils/id_test.go
Normal file
@ -0,0 +1,15 @@
|
||||
package utils
|
||||
|
||||
import "testing"
|
||||
|
||||
func TestGenID(t *testing.T) {
|
||||
m := map[string]struct{}{}
|
||||
for i := 0; i < 2000; i++ {
|
||||
got := GenID()
|
||||
if _, ok := m[got]; !ok {
|
||||
m[got] = struct{}{}
|
||||
} else {
|
||||
t.Error("id generate error", got)
|
||||
}
|
||||
}
|
||||
}
|
||||
28
internal/utils/image_test.go
Normal file
28
internal/utils/image_test.go
Normal file
@ -0,0 +1,28 @@
|
||||
package utils
|
||||
|
||||
import (
|
||||
"Open_IM/pkg/utils"
|
||||
"path/filepath"
|
||||
"runtime"
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
var (
|
||||
_, b, _, _ = runtime.Caller(0)
|
||||
// Root folder of this project
|
||||
Root = filepath.Join(filepath.Dir(b), "../..")
|
||||
)
|
||||
|
||||
func Test_GenSmallImage(t *testing.T) {
|
||||
println(Root)
|
||||
err := utils.GenSmallImage(Root+"/docs/open-im-logo.png", Root+"/out-test/open-im-logo-test.png")
|
||||
assert.Nil(t, err)
|
||||
|
||||
err = utils.GenSmallImage(Root+"/docs/open-im-logo.png", "out-test/open-im-logo-test.png")
|
||||
assert.Nil(t, err)
|
||||
|
||||
err = utils.GenSmallImage(Root+"/docs/Architecture.jpg", "out-test/Architecture-test.jpg")
|
||||
assert.Nil(t, err)
|
||||
}
|
||||
82
internal/utils/jwt_token_test.go
Normal file
82
internal/utils/jwt_token_test.go
Normal file
@ -0,0 +1,82 @@
|
||||
package utils
|
||||
|
||||
import (
|
||||
"Open_IM/pkg/common/config"
|
||||
"Open_IM/pkg/utils"
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
func Test_BuildClaims(t *testing.T) {
|
||||
uid := "1"
|
||||
platform := "PC"
|
||||
ttl := int64(-1)
|
||||
claim := utils.BuildClaims(uid, platform, ttl)
|
||||
now := time.Now().Unix()
|
||||
|
||||
assert.Equal(t, claim.UID, uid, "uid should equal")
|
||||
assert.Equal(t, claim.Platform, platform, "platform should equal")
|
||||
assert.Equal(t, claim.RegisteredClaims.ExpiresAt, int64(-1), "StandardClaims.ExpiresAt should be equal")
|
||||
// time difference within 1s
|
||||
assert.Equal(t, claim.RegisteredClaims.IssuedAt, now, "StandardClaims.IssuedAt should be equal")
|
||||
assert.Equal(t, claim.RegisteredClaims.NotBefore, now, "StandardClaims.NotBefore should be equal")
|
||||
|
||||
ttl = int64(60)
|
||||
now = time.Now().Unix()
|
||||
claim = utils.BuildClaims(uid, platform, ttl)
|
||||
// time difference within 1s
|
||||
assert.Equal(t, claim.RegisteredClaims.ExpiresAt, int64(60)+now, "StandardClaims.ExpiresAt should be equal")
|
||||
assert.Equal(t, claim.RegisteredClaims.IssuedAt, now, "StandardClaims.IssuedAt should be equal")
|
||||
assert.Equal(t, claim.RegisteredClaims.NotBefore, now, "StandardClaims.NotBefore should be equal")
|
||||
}
|
||||
|
||||
func Test_CreateToken(t *testing.T) {
|
||||
uid := "1"
|
||||
platform := int32(1)
|
||||
now := time.Now().Unix()
|
||||
|
||||
tokenString, expiresAt, err := utils.CreateToken(uid, platform)
|
||||
|
||||
assert.NotEmpty(t, tokenString)
|
||||
assert.Equal(t, expiresAt, 604800+now)
|
||||
assert.Nil(t, err)
|
||||
}
|
||||
|
||||
func Test_VerifyToken(t *testing.T) {
|
||||
uid := "1"
|
||||
platform := int32(1)
|
||||
tokenString, _, _ := utils.CreateToken(uid, platform)
|
||||
result := utils.VerifyToken(tokenString, uid)
|
||||
assert.True(t, result)
|
||||
result = utils.VerifyToken(tokenString, "2")
|
||||
assert.False(t, result)
|
||||
}
|
||||
|
||||
func Test_ParseRedisInterfaceToken(t *testing.T) {
|
||||
uid := "1"
|
||||
platform := int32(1)
|
||||
tokenString, _, _ := utils.CreateToken(uid, platform)
|
||||
|
||||
claims, err := utils.ParseRedisInterfaceToken([]uint8(tokenString))
|
||||
assert.Nil(t, err)
|
||||
assert.Equal(t, claims.UID, uid)
|
||||
|
||||
// timeout
|
||||
config.Config.TokenPolicy.AccessExpire = -80
|
||||
tokenString, _, _ = utils.CreateToken(uid, platform)
|
||||
claims, err = utils.ParseRedisInterfaceToken([]uint8(tokenString))
|
||||
assert.Equal(t, err, utils.TokenExpired)
|
||||
assert.Nil(t, claims)
|
||||
}
|
||||
|
||||
func Test_ParseToken(t *testing.T) {
|
||||
uid := "1"
|
||||
platform := int32(1)
|
||||
tokenString, _, _ := utils.CreateToken(uid, platform)
|
||||
claims, err := utils.ParseToken(tokenString)
|
||||
if err == nil {
|
||||
assert.Equal(t, claims.UID, uid)
|
||||
}
|
||||
}
|
||||
16
internal/utils/md5_test.go
Normal file
16
internal/utils/md5_test.go
Normal file
@ -0,0 +1,16 @@
|
||||
package utils
|
||||
|
||||
import (
|
||||
"Open_IM/pkg/utils"
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
func Test_Md5(t *testing.T) {
|
||||
result := utils.Md5("go")
|
||||
assert.Equal(t, result, "34d1f91fb2e514b8576fab1a75a89a6b")
|
||||
|
||||
result2 := utils.Md5("go")
|
||||
assert.Equal(t, result, result2)
|
||||
}
|
||||
46
internal/utils/platform_number_id_to_name_test.go
Normal file
46
internal/utils/platform_number_id_to_name_test.go
Normal file
@ -0,0 +1,46 @@
|
||||
package utils
|
||||
|
||||
import (
|
||||
"Open_IM/pkg/utils"
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
func Test_PlatformIDToName(t *testing.T) {
|
||||
assert.Equal(t, utils.PlatformIDToName(1), "IOS")
|
||||
assert.Equal(t, utils.PlatformIDToName(2), "Android")
|
||||
assert.Equal(t, utils.PlatformIDToName(3), "Windows")
|
||||
assert.Equal(t, utils.PlatformIDToName(4), "OSX")
|
||||
assert.Equal(t, utils.PlatformIDToName(5), "Web")
|
||||
assert.Equal(t, utils.PlatformIDToName(6), "MiniWeb")
|
||||
assert.Equal(t, utils.PlatformIDToName(7), "Linux")
|
||||
|
||||
assert.Equal(t, utils.PlatformIDToName(0), "")
|
||||
}
|
||||
|
||||
func Test_PlatformNameToID(t *testing.T) {
|
||||
assert.Equal(t, utils.PlatformNameToID("IOS"), int32(1))
|
||||
assert.Equal(t, utils.PlatformNameToID("Android"), int32(2))
|
||||
assert.Equal(t, utils.PlatformNameToID("Windows"), int32(3))
|
||||
assert.Equal(t, utils.PlatformNameToID("OSX"), int32(4))
|
||||
assert.Equal(t, utils.PlatformNameToID("Web"), int32(5))
|
||||
assert.Equal(t, utils.PlatformNameToID("MiniWeb"), int32(6))
|
||||
assert.Equal(t, utils.PlatformNameToID("Linux"), int32(7))
|
||||
|
||||
assert.Equal(t, utils.PlatformNameToID("UnknownDevice"), int32(0))
|
||||
assert.Equal(t, utils.PlatformNameToID(""), int32(0))
|
||||
}
|
||||
|
||||
func Test_PlatformNameToClass(t *testing.T) {
|
||||
assert.Equal(t, utils.PlatformNameToClass("IOS"), "Mobile")
|
||||
assert.Equal(t, utils.PlatformNameToClass("Android"), "Mobile")
|
||||
assert.Equal(t, utils.PlatformNameToClass("OSX"), "PC")
|
||||
assert.Equal(t, utils.PlatformNameToClass("Windows"), "PC")
|
||||
assert.Equal(t, utils.PlatformNameToClass("Web"), "PC")
|
||||
assert.Equal(t, utils.PlatformNameToClass("MiniWeb"), "Mobile")
|
||||
assert.Equal(t, utils.PlatformNameToClass("Linux"), "PC")
|
||||
|
||||
assert.Equal(t, utils.PlatformNameToClass("UnknownDevice"), "")
|
||||
assert.Equal(t, utils.PlatformNameToClass(""), "")
|
||||
}
|
||||
@ -1,16 +1,26 @@
|
||||
package config
|
||||
|
||||
import (
|
||||
"gopkg.in/yaml.v3"
|
||||
"io/ioutil"
|
||||
|
||||
"gopkg.in/yaml.v3"
|
||||
|
||||
"path/filepath"
|
||||
"runtime"
|
||||
)
|
||||
|
||||
var Config config
|
||||
|
||||
type config struct {
|
||||
ServerIP string `yaml:"serverip"`
|
||||
var (
|
||||
_, b, _, _ = runtime.Caller(0)
|
||||
// Root folder of this project
|
||||
Root = filepath.Join(filepath.Dir(b), "../../..")
|
||||
)
|
||||
|
||||
Api struct {
|
||||
type config struct {
|
||||
ServerIP string `yaml:"serverip"`
|
||||
ServerVersion string `yaml:"serverversion"`
|
||||
Api struct {
|
||||
GinPort []int `yaml:"openImApiPort"`
|
||||
}
|
||||
Sdk struct {
|
||||
@ -110,6 +120,11 @@ type config struct {
|
||||
SecretKey string `yaml:"secretKey"`
|
||||
}
|
||||
}
|
||||
Jpns struct {
|
||||
AppKey string `yaml:"appKey"`
|
||||
MasterSecret string `yaml:"masterSecret"`
|
||||
PushUrl string `yaml:"pushUrl"`
|
||||
}
|
||||
}
|
||||
Manager struct {
|
||||
AppManagerUid []string `yaml:"appManagerUid"`
|
||||
@ -147,14 +162,14 @@ type config struct {
|
||||
}
|
||||
|
||||
func init() {
|
||||
bytes, err := ioutil.ReadFile("config/config.yaml")
|
||||
// if we cd Open-IM-Server/src/utils and run go test
|
||||
// it will panic cannot find config/config.yaml
|
||||
bytes, err := ioutil.ReadFile(Root + "/config/config.yaml")
|
||||
if err != nil {
|
||||
panic(err)
|
||||
return
|
||||
}
|
||||
if err = yaml.Unmarshal(bytes, &Config); err != nil {
|
||||
panic(err)
|
||||
return
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -17,22 +17,27 @@ const (
|
||||
RefuseFriendFlag = -1
|
||||
|
||||
//Websocket Protocol
|
||||
WSGetNewestSeq = 1001
|
||||
WSPullMsg = 1002
|
||||
WSSendMsg = 1003
|
||||
WSPushMsg = 2001
|
||||
WSGetNewestSeq = 1001
|
||||
WSPullMsg = 1002
|
||||
WSSendMsg = 1003
|
||||
WSPullMsgBySeqList = 1004
|
||||
WSPushMsg = 2001
|
||||
WSDataError = 3001
|
||||
|
||||
///ContentType
|
||||
//UserRelated
|
||||
Text = 101
|
||||
Picture = 102
|
||||
Voice = 103
|
||||
Video = 104
|
||||
File = 105
|
||||
AtText = 106
|
||||
Custom = 110
|
||||
Text = 101
|
||||
Picture = 102
|
||||
Voice = 103
|
||||
Video = 104
|
||||
File = 105
|
||||
AtText = 106
|
||||
Custom = 110
|
||||
HasReadReceipt = 112
|
||||
Typing = 113
|
||||
Common = 200
|
||||
GroupMsg = 201
|
||||
|
||||
SyncSenderMsg = 108
|
||||
//SysRelated
|
||||
AcceptFriendApplicationTip = 201
|
||||
AddFriendTip = 202
|
||||
@ -64,10 +69,14 @@ const (
|
||||
)
|
||||
|
||||
var ContentType2PushContent = map[int64]string{
|
||||
Picture: "[picture]",
|
||||
Voice: "[voice]",
|
||||
Video: "[video]",
|
||||
File: "[file]",
|
||||
Picture: "[图片]",
|
||||
Voice: "[语音]",
|
||||
Video: "[视频]",
|
||||
File: "[文件]",
|
||||
Text: "你收到了一条文本消息",
|
||||
AtText: "[有人@你]",
|
||||
GroupMsg: "你收到一条群聊消息",
|
||||
Common: "你收到一条新消息",
|
||||
}
|
||||
|
||||
const FriendAcceptTip = "You have successfully become friends, so start chatting"
|
||||
|
||||
@ -39,6 +39,11 @@ func init() {
|
||||
}
|
||||
DB.mgoSession = mgoSession
|
||||
DB.mgoSession.SetMode(mgo.Monotonic, true)
|
||||
c := DB.mgoSession.DB(config.Config.Mongo.DBDatabase).C(cChat)
|
||||
err = c.EnsureIndexKey("uid")
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
// redis pool init
|
||||
DB.redisPool = &redis.Pool{
|
||||
|
||||
@ -1,17 +1,21 @@
|
||||
package db
|
||||
|
||||
import (
|
||||
pbMsg "Open_IM/pkg/proto/chat"
|
||||
"Open_IM/pkg/common/config"
|
||||
"Open_IM/pkg/common/constant"
|
||||
"Open_IM/pkg/common/log"
|
||||
pbMsg "Open_IM/pkg/proto/chat"
|
||||
"errors"
|
||||
"github.com/garyburd/redigo/redis"
|
||||
"github.com/golang/protobuf/proto"
|
||||
"gopkg.in/mgo.v2/bson"
|
||||
"strconv"
|
||||
"time"
|
||||
)
|
||||
|
||||
const cChat = "chat"
|
||||
const cGroup = "group"
|
||||
const singleGocMsgNum = 5000
|
||||
|
||||
type MsgInfo struct {
|
||||
SendTime int64
|
||||
@ -28,8 +32,8 @@ type GroupMember struct {
|
||||
UIDList []string
|
||||
}
|
||||
|
||||
func (d *DataBases) GetUserChat(uid string, seqBegin, seqEnd int64) (SingleMsg []*pbMsg.MsgFormat, GroupMsg []*pbMsg.MsgFormat, MaxSeq int64, MinSeq int64, err error) {
|
||||
count := 0
|
||||
func (d *DataBases) GetMsgBySeqRange(uid string, seqBegin, seqEnd int64) (SingleMsg []*pbMsg.MsgFormat, GroupMsg []*pbMsg.MsgFormat, MaxSeq int64, MinSeq int64, err error) {
|
||||
var count int64
|
||||
session := d.mgoSession.Clone()
|
||||
if session == nil {
|
||||
return nil, nil, MaxSeq, MinSeq, errors.New("session == nil")
|
||||
@ -76,48 +80,152 @@ func (d *DataBases) GetUserChat(uid string, seqBegin, seqEnd int64) (SingleMsg [
|
||||
GroupMsg = append(GroupMsg, temp)
|
||||
}
|
||||
count++
|
||||
if count == (seqEnd - seqBegin + 1) {
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return SingleMsg, GroupMsg, MaxSeq, MinSeq, nil
|
||||
}
|
||||
func (d *DataBases) GetMinSeqFromMongo(uid string) (MinSeq int64, err error) {
|
||||
var i int64
|
||||
var seqUid string
|
||||
session := d.mgoSession.Clone()
|
||||
if session == nil {
|
||||
return MinSeq, errors.New("session == nil")
|
||||
}
|
||||
defer session.Close()
|
||||
c := session.DB(config.Config.Mongo.DBDatabase).C(cChat)
|
||||
MaxSeq, err := d.GetUserMaxSeq(uid)
|
||||
if err != nil && err != redis.ErrNil {
|
||||
return MinSeq, err
|
||||
}
|
||||
NB := MaxSeq / singleGocMsgNum
|
||||
for i = 0; i <= NB; i++ {
|
||||
seqUid = indexGen(uid, i)
|
||||
n, err := c.Find(bson.M{"uid": seqUid}).Count()
|
||||
if err == nil && n != 0 {
|
||||
if i == 0 {
|
||||
MinSeq = 1
|
||||
} else {
|
||||
MinSeq = i * singleGocMsgNum
|
||||
}
|
||||
break
|
||||
}
|
||||
}
|
||||
return MinSeq, nil
|
||||
}
|
||||
func (d *DataBases) GetMsgBySeqList(uid string, seqList []int64) (SingleMsg []*pbMsg.MsgFormat, GroupMsg []*pbMsg.MsgFormat, MaxSeq int64, MinSeq int64, err error) {
|
||||
allCount := 0
|
||||
singleCount := 0
|
||||
session := d.mgoSession.Clone()
|
||||
if session == nil {
|
||||
return nil, nil, MaxSeq, MinSeq, errors.New("session == nil")
|
||||
}
|
||||
defer session.Close()
|
||||
|
||||
func (d *DataBases) SaveUserChat(uid string, sendTime int64, m proto.Message) error {
|
||||
|
||||
c := session.DB(config.Config.Mongo.DBDatabase).C(cChat)
|
||||
m := func(uid string, seqList []int64) map[string][]int64 {
|
||||
t := make(map[string][]int64)
|
||||
for i := 0; i < len(seqList); i++ {
|
||||
seqUid := getSeqUid(uid, seqList[i])
|
||||
if value, ok := t[seqUid]; !ok {
|
||||
var temp []int64
|
||||
t[seqUid] = append(temp, seqList[i])
|
||||
} else {
|
||||
t[seqUid] = append(value, seqList[i])
|
||||
}
|
||||
}
|
||||
return t
|
||||
}(uid, seqList)
|
||||
sChat := UserChat{}
|
||||
pChat := pbMsg.MsgSvrToPushSvrChatMsg{}
|
||||
for seqUid, value := range m {
|
||||
if err = c.Find(bson.M{"uid": seqUid}).One(&sChat); err != nil {
|
||||
log.NewError("", "not find seqUid", seqUid, value, uid, seqList)
|
||||
continue
|
||||
}
|
||||
singleCount = 0
|
||||
for i := 0; i < len(sChat.Msg); i++ {
|
||||
temp := new(pbMsg.MsgFormat)
|
||||
if err = proto.Unmarshal(sChat.Msg[i].Msg, &pChat); err != nil {
|
||||
log.NewError("", "not find seqUid", seqUid, value, uid, seqList)
|
||||
return nil, nil, MaxSeq, MinSeq, err
|
||||
}
|
||||
if isContainInt64(pChat.RecvSeq, value) {
|
||||
temp.SendID = pChat.SendID
|
||||
temp.RecvID = pChat.RecvID
|
||||
temp.MsgFrom = pChat.MsgFrom
|
||||
temp.Seq = pChat.RecvSeq
|
||||
temp.ServerMsgID = pChat.MsgID
|
||||
temp.SendTime = pChat.SendTime
|
||||
temp.Content = pChat.Content
|
||||
temp.ContentType = pChat.ContentType
|
||||
temp.SenderPlatformID = pChat.PlatformID
|
||||
temp.ClientMsgID = pChat.ClientMsgID
|
||||
temp.SenderFaceURL = pChat.SenderFaceURL
|
||||
temp.SenderNickName = pChat.SenderNickName
|
||||
if pChat.RecvSeq > MaxSeq {
|
||||
MaxSeq = pChat.RecvSeq
|
||||
}
|
||||
if allCount == 0 {
|
||||
MinSeq = pChat.RecvSeq
|
||||
}
|
||||
if pChat.RecvSeq < MinSeq {
|
||||
MinSeq = pChat.RecvSeq
|
||||
}
|
||||
if pChat.SessionType == constant.SingleChatType {
|
||||
SingleMsg = append(SingleMsg, temp)
|
||||
} else {
|
||||
GroupMsg = append(GroupMsg, temp)
|
||||
}
|
||||
allCount++
|
||||
singleCount++
|
||||
if singleCount == len(value) {
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return SingleMsg, GroupMsg, MaxSeq, MinSeq, nil
|
||||
}
|
||||
func (d *DataBases) SaveUserChat(uid string, sendTime int64, m *pbMsg.MsgSvrToPushSvrChatMsg) error {
|
||||
var seqUid string
|
||||
newTime := getCurrentTimestampByMill()
|
||||
session := d.mgoSession.Clone()
|
||||
if session == nil {
|
||||
return errors.New("session == nil")
|
||||
}
|
||||
defer session.Close()
|
||||
|
||||
log.NewInfo("", "get mgoSession cost time", getCurrentTimestampByMill()-newTime)
|
||||
c := session.DB(config.Config.Mongo.DBDatabase).C(cChat)
|
||||
|
||||
n, err := c.Find(bson.M{"uid": uid}).Count()
|
||||
seqUid = getSeqUid(uid, m.RecvSeq)
|
||||
n, err := c.Find(bson.M{"uid": seqUid}).Count()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
log.NewInfo("", "find mgo uid cost time", getCurrentTimestampByMill()-newTime)
|
||||
sMsg := MsgInfo{}
|
||||
sMsg.SendTime = sendTime
|
||||
if sMsg.Msg, err = proto.Marshal(m); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if n == 0 {
|
||||
sChat := UserChat{}
|
||||
sChat.UID = uid
|
||||
sChat.UID = seqUid
|
||||
sChat.Msg = append(sChat.Msg, sMsg)
|
||||
err = c.Insert(&sChat)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
} else {
|
||||
err = c.Update(bson.M{"uid": uid}, bson.M{"$push": bson.M{"msg": sMsg}})
|
||||
err = c.Update(bson.M{"uid": seqUid}, bson.M{"$push": bson.M{"msg": sMsg}})
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
log.NewInfo("", "insert mgo data cost time", getCurrentTimestampByMill()-newTime)
|
||||
return nil
|
||||
}
|
||||
|
||||
@ -231,3 +339,25 @@ func (d *DataBases) DelGroupMember(groupID, uid string) error {
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func getCurrentTimestampByMill() int64 {
|
||||
return time.Now().UnixNano() / 1e6
|
||||
}
|
||||
func getSeqUid(uid string, seq int64) string {
|
||||
seqSuffix := seq / singleGocMsgNum
|
||||
return indexGen(uid, seqSuffix)
|
||||
}
|
||||
func isContainInt64(target int64, List []int64) bool {
|
||||
|
||||
for _, element := range List {
|
||||
|
||||
if target == element {
|
||||
return true
|
||||
}
|
||||
}
|
||||
return false
|
||||
|
||||
}
|
||||
func indexGen(uid string, seqSuffix int64) string {
|
||||
return uid + ":" + strconv.FormatInt(seqSuffix, 10)
|
||||
}
|
||||
|
||||
@ -1,9 +1,9 @@
|
||||
package im_mysql_model
|
||||
|
||||
import (
|
||||
"Open_IM/pkg/proto/group"
|
||||
"Open_IM/pkg/common/db"
|
||||
"Open_IM/pkg/common/log"
|
||||
"Open_IM/pkg/proto/group"
|
||||
"errors"
|
||||
"time"
|
||||
)
|
||||
|
||||
@ -3,7 +3,7 @@ package im_mysql_model
|
||||
import "time"
|
||||
|
||||
type User struct {
|
||||
UID string `gorm:"column:uid"`
|
||||
UID string `gorm:"column:uid;primaryKey;"`
|
||||
Name string `gorm:"column:name"`
|
||||
Icon string `gorm:"column:icon"`
|
||||
Gender int32 `gorm:"column:gender"`
|
||||
|
||||
@ -5,6 +5,7 @@ import (
|
||||
"Open_IM/pkg/common/db"
|
||||
pbAuth "Open_IM/pkg/proto/auth"
|
||||
"Open_IM/pkg/utils"
|
||||
"fmt"
|
||||
_ "github.com/jinzhu/gorm/dialects/mysql"
|
||||
"time"
|
||||
)
|
||||
@ -18,7 +19,7 @@ func init() {
|
||||
pb.Name = "AppManager" + utils.IntToString(k+1)
|
||||
err := UserRegister(&pb)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
fmt.Println("AppManager insert error", err.Error())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -9,6 +9,7 @@ const (
|
||||
userIncrSeq = "REDIS_USER_INCR_SEQ:" // user incr seq
|
||||
appleDeviceToken = "DEVICE_TOKEN"
|
||||
lastGetSeq = "LAST_GET_SEQ"
|
||||
userMinSeq = "REDIS_USER_MIN_SEQ:"
|
||||
)
|
||||
|
||||
func (d *DataBases) Exec(cmd string, key interface{}, args ...interface{}) (interface{}, error) {
|
||||
@ -31,42 +32,55 @@ func (d *DataBases) Exec(cmd string, key interface{}, args ...interface{}) (inte
|
||||
return con.Do(cmd, params...)
|
||||
}
|
||||
|
||||
//执行用户消息的seq自增操作
|
||||
//Perform seq auto-increment operation of user messages
|
||||
func (d *DataBases) IncrUserSeq(uid string) (int64, error) {
|
||||
key := userIncrSeq + uid
|
||||
return redis.Int64(d.Exec("INCR", key))
|
||||
}
|
||||
|
||||
//获取最新的seq
|
||||
func (d *DataBases) GetUserSeq(uid string) (int64, error) {
|
||||
//Get the largest Seq
|
||||
func (d *DataBases) GetUserMaxSeq(uid string) (int64, error) {
|
||||
key := userIncrSeq + uid
|
||||
return redis.Int64(d.Exec("GET", key))
|
||||
}
|
||||
|
||||
//存储苹果的设备token到redis
|
||||
//Set the user's minimum seq
|
||||
func (d *DataBases) SetUserMinSeq(uid string, minSeq int64) (err error) {
|
||||
key := userMinSeq + uid
|
||||
_, err = d.Exec("SET", key, minSeq)
|
||||
return err
|
||||
}
|
||||
|
||||
//Get the smallest Seq
|
||||
func (d *DataBases) GetUserMinSeq(uid string) (int64, error) {
|
||||
key := userMinSeq + uid
|
||||
return redis.Int64(d.Exec("GET", key))
|
||||
}
|
||||
|
||||
//Store Apple's device token to redis
|
||||
func (d *DataBases) SetAppleDeviceToken(accountAddress, value string) (err error) {
|
||||
key := appleDeviceToken + accountAddress
|
||||
_, err = d.Exec("SET", key, value)
|
||||
return err
|
||||
}
|
||||
|
||||
//删除苹果设备token
|
||||
//Delete Apple device token
|
||||
func (d *DataBases) DelAppleDeviceToken(accountAddress string) (err error) {
|
||||
key := appleDeviceToken + accountAddress
|
||||
_, err = d.Exec("DEL", key)
|
||||
return err
|
||||
}
|
||||
|
||||
//记录用户上一次主动拉取Seq的值
|
||||
//Record the last time the user actively pulled the value of Seq
|
||||
func (d *DataBases) SetLastGetSeq(uid string) (err error) {
|
||||
key := lastGetSeq + uid
|
||||
_, err = d.Exec("SET", key)
|
||||
return err
|
||||
}
|
||||
|
||||
//获取用户上一次主动拉取Seq的值
|
||||
//Get the value of the user's last active pull Seq
|
||||
func (d *DataBases) GetLastGetSeq(uid string) (int64, error) {
|
||||
key := userIncrSeq + uid
|
||||
key := lastGetSeq + uid
|
||||
return redis.Int64(d.Exec("GET", key))
|
||||
}
|
||||
|
||||
|
||||
108
pkg/common/log/es_hk.go
Normal file
108
pkg/common/log/es_hk.go
Normal file
@ -0,0 +1,108 @@
|
||||
/*
|
||||
** description("Send logs to elasticsearch hook").
|
||||
** copyright('tuoyun,www.tuoyun.net').
|
||||
** author("fg,Gordon@tuoyun.net").
|
||||
** time(2021/3/26 17:05).
|
||||
*/
|
||||
package log
|
||||
|
||||
import (
|
||||
"Open_IM/pkg/common/config"
|
||||
"context"
|
||||
"fmt"
|
||||
elasticV7 "github.com/olivere/elastic/v7"
|
||||
"github.com/sirupsen/logrus"
|
||||
"log"
|
||||
"os"
|
||||
"strings"
|
||||
"time"
|
||||
)
|
||||
|
||||
//esHook CUSTOMIZED ES hook
|
||||
type esHook struct {
|
||||
moduleName string
|
||||
client *elasticV7.Client
|
||||
}
|
||||
|
||||
//newEsHook Initialization
|
||||
func newEsHook(moduleName string) *esHook {
|
||||
//https://github.com/sohlich/elogrus
|
||||
//client, err := elastic.NewClient(elastic.SetURL("http://localhost:9200"))
|
||||
//if err != nil {
|
||||
// log.Panic(err)
|
||||
//}
|
||||
//hook, err := elogrus.NewAsyncElasticHook(client, "localhost", logrus.DebugLevel, "mylog")
|
||||
//if err != nil {
|
||||
// log.Panic(err)
|
||||
//}
|
||||
es, err := elasticV7.NewClient(
|
||||
elasticV7.SetURL(config.Config.Log.ElasticSearchAddr...),
|
||||
elasticV7.SetBasicAuth(config.Config.Log.ElasticSearchUser, config.Config.Log.ElasticSearchPassword),
|
||||
elasticV7.SetSniff(false),
|
||||
elasticV7.SetHealthcheckInterval(60*time.Second),
|
||||
elasticV7.SetErrorLog(log.New(os.Stderr, "ES:", log.LstdFlags)),
|
||||
)
|
||||
|
||||
if err != nil {
|
||||
log.Fatal("failed to create Elastic V7 Client: ", err)
|
||||
}
|
||||
|
||||
//info, code, err := es.Ping(logConfig.ElasticSearch.EsAddr[0]).Do(context.Background())
|
||||
//if err != nil {
|
||||
// panic(err)
|
||||
//}
|
||||
//fmt.Printf("Elasticsearch returned with code %d and version %s\n", code, info.Version.Number)
|
||||
//
|
||||
//esversion, err := es.ElasticsearchVersion(logConfig.ElasticSearch.EsAddr[0])
|
||||
//if err != nil {
|
||||
// panic(err)
|
||||
//}
|
||||
//fmt.Printf("Elasticsearch version %s\n", esversion)
|
||||
return &esHook{client: es, moduleName: moduleName}
|
||||
}
|
||||
|
||||
//Fire log hook interface 方法
|
||||
func (hook *esHook) Fire(entry *logrus.Entry) error {
|
||||
doc := newEsLog(entry)
|
||||
go hook.sendEs(doc)
|
||||
return nil
|
||||
}
|
||||
|
||||
//Levels log hook interface 方法,此hook影响的日志
|
||||
func (hook *esHook) Levels() []logrus.Level {
|
||||
return logrus.AllLevels
|
||||
}
|
||||
|
||||
//sendEs 异步发送日志到es
|
||||
func (hook *esHook) sendEs(doc appLogDocModel) {
|
||||
defer func() {
|
||||
if r := recover(); r != nil {
|
||||
fmt.Println("send entry to es failed: ", r)
|
||||
}
|
||||
}()
|
||||
_, err := hook.client.Index().Index(hook.moduleName).Type(doc.indexName()).BodyJson(doc).Do(context.Background())
|
||||
if err != nil {
|
||||
log.Println(err)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//appLogDocModel es model
|
||||
type appLogDocModel map[string]interface{}
|
||||
|
||||
func newEsLog(e *logrus.Entry) appLogDocModel {
|
||||
ins := make(map[string]interface{})
|
||||
ins["level"] = strings.ToUpper(e.Level.String())
|
||||
ins["time"] = e.Time.Format("2006-01-02 15:04:05")
|
||||
for kk, vv := range e.Data {
|
||||
ins[kk] = vv
|
||||
}
|
||||
ins["tipInfo"] = e.Message
|
||||
|
||||
return ins
|
||||
}
|
||||
|
||||
// indexName es index name 时间分割
|
||||
func (m *appLogDocModel) indexName() string {
|
||||
return time.Now().Format("2006-01-02")
|
||||
}
|
||||
60
pkg/common/log/file_line_hk.go
Normal file
60
pkg/common/log/file_line_hk.go
Normal file
@ -0,0 +1,60 @@
|
||||
/*
|
||||
** description("get the name and line number of the calling file hook").
|
||||
** copyright('tuoyun,www.tuoyun.net').
|
||||
** author("fg,Gordon@tuoyun.net").
|
||||
** time(2021/3/16 11:26).
|
||||
*/
|
||||
package log
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/sirupsen/logrus"
|
||||
"runtime"
|
||||
"strings"
|
||||
)
|
||||
|
||||
type fileHook struct{}
|
||||
|
||||
func newFileHook() *fileHook {
|
||||
return &fileHook{}
|
||||
}
|
||||
|
||||
func (f *fileHook) Levels() []logrus.Level {
|
||||
return logrus.AllLevels
|
||||
}
|
||||
|
||||
func (f *fileHook) Fire(entry *logrus.Entry) error {
|
||||
entry.Data["FilePath"] = findCaller(5)
|
||||
return nil
|
||||
}
|
||||
|
||||
func findCaller(skip int) string {
|
||||
file := ""
|
||||
line := 0
|
||||
for i := 0; i < 10; i++ {
|
||||
file, line = getCaller(skip + i)
|
||||
if !strings.HasPrefix(file, "log") {
|
||||
break
|
||||
}
|
||||
}
|
||||
return fmt.Sprintf("%s:%d", file, line)
|
||||
}
|
||||
|
||||
func getCaller(skip int) (string, int) {
|
||||
_, file, line, ok := runtime.Caller(skip)
|
||||
if !ok {
|
||||
return "", 0
|
||||
}
|
||||
|
||||
n := 0
|
||||
for i := len(file) - 1; i > 0; i-- {
|
||||
if file[i] == '/' {
|
||||
n++
|
||||
if n >= 2 {
|
||||
file = file[i+1:]
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
return file, line
|
||||
}
|
||||
205
pkg/common/log/logrus.go
Normal file
205
pkg/common/log/logrus.go
Normal file
@ -0,0 +1,205 @@
|
||||
package log
|
||||
|
||||
import (
|
||||
"Open_IM/pkg/common/config"
|
||||
"bufio"
|
||||
"fmt"
|
||||
nested "github.com/antonfisher/nested-logrus-formatter"
|
||||
rotatelogs "github.com/lestrrat-go/file-rotatelogs"
|
||||
"github.com/rifflock/lfshook"
|
||||
"github.com/sirupsen/logrus"
|
||||
"os"
|
||||
"time"
|
||||
)
|
||||
|
||||
var logger *Logger
|
||||
|
||||
type Logger struct {
|
||||
*logrus.Logger
|
||||
Pid int
|
||||
}
|
||||
|
||||
func init() {
|
||||
logger = loggerInit("")
|
||||
|
||||
}
|
||||
func NewPrivateLog(moduleName string) {
|
||||
logger = loggerInit(moduleName)
|
||||
}
|
||||
|
||||
func loggerInit(moduleName string) *Logger {
|
||||
var logger = logrus.New()
|
||||
//All logs will be printed
|
||||
logger.SetLevel(logrus.Level(config.Config.Log.RemainLogLevel))
|
||||
//Close std console output
|
||||
src, err := os.OpenFile(os.DevNull, os.O_APPEND|os.O_WRONLY, os.ModeAppend)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
writer := bufio.NewWriter(src)
|
||||
logger.SetOutput(writer)
|
||||
//Log Console Print Style Setting
|
||||
logger.SetFormatter(&nested.Formatter{
|
||||
TimestampFormat: "2006-01-02 15:04:05.000",
|
||||
HideKeys: false,
|
||||
FieldsOrder: []string{"PID", "FilePath", "OperationID"},
|
||||
})
|
||||
//File name and line number display hook
|
||||
logger.AddHook(newFileHook())
|
||||
|
||||
//Send logs to elasticsearch hook
|
||||
if config.Config.Log.ElasticSearchSwitch {
|
||||
logger.AddHook(newEsHook(moduleName))
|
||||
}
|
||||
//Log file segmentation hook
|
||||
hook := NewLfsHook(time.Duration(config.Config.Log.RotationTime)*time.Hour, config.Config.Log.RemainRotationCount, moduleName)
|
||||
logger.AddHook(hook)
|
||||
return &Logger{
|
||||
logger,
|
||||
os.Getpid(),
|
||||
}
|
||||
}
|
||||
func NewLfsHook(rotationTime time.Duration, maxRemainNum uint, moduleName string) logrus.Hook {
|
||||
lfsHook := lfshook.NewHook(lfshook.WriterMap{
|
||||
logrus.DebugLevel: initRotateLogs(rotationTime, maxRemainNum, "debug", moduleName),
|
||||
logrus.InfoLevel: initRotateLogs(rotationTime, maxRemainNum, "info", moduleName),
|
||||
logrus.WarnLevel: initRotateLogs(rotationTime, maxRemainNum, "warn", moduleName),
|
||||
logrus.ErrorLevel: initRotateLogs(rotationTime, maxRemainNum, "error", moduleName),
|
||||
}, &nested.Formatter{
|
||||
TimestampFormat: "2006-01-02 15:04:05.000",
|
||||
HideKeys: false,
|
||||
FieldsOrder: []string{"PID", "FilePath", "OperationID"},
|
||||
})
|
||||
return lfsHook
|
||||
}
|
||||
func initRotateLogs(rotationTime time.Duration, maxRemainNum uint, level string, moduleName string) *rotatelogs.RotateLogs {
|
||||
if moduleName != "" {
|
||||
moduleName = moduleName + "."
|
||||
}
|
||||
writer, err := rotatelogs.New(
|
||||
config.Config.Log.StorageLocation+moduleName+level+"."+"%Y-%m-%d",
|
||||
rotatelogs.WithRotationTime(rotationTime),
|
||||
rotatelogs.WithRotationCount(maxRemainNum),
|
||||
)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
} else {
|
||||
return writer
|
||||
}
|
||||
}
|
||||
|
||||
//Deprecated
|
||||
func Info(token, OperationID, format string, args ...interface{}) {
|
||||
logger.WithFields(logrus.Fields{
|
||||
"PID": logger.Pid,
|
||||
"OperationID": OperationID,
|
||||
}).Infof(format, args...)
|
||||
|
||||
}
|
||||
|
||||
//Deprecated
|
||||
func Error(token, OperationID, format string, args ...interface{}) {
|
||||
|
||||
logger.WithFields(logrus.Fields{
|
||||
"PID": logger.Pid,
|
||||
"OperationID": OperationID,
|
||||
}).Errorf(format, args...)
|
||||
|
||||
}
|
||||
|
||||
//Deprecated
|
||||
func Debug(token, OperationID, format string, args ...interface{}) {
|
||||
|
||||
logger.WithFields(logrus.Fields{
|
||||
"PID": logger.Pid,
|
||||
"OperationID": OperationID,
|
||||
}).Debugf(format, args...)
|
||||
|
||||
}
|
||||
|
||||
//Deprecated
|
||||
func Warning(token, OperationID, format string, args ...interface{}) {
|
||||
logger.WithFields(logrus.Fields{
|
||||
"PID": logger.Pid,
|
||||
"OperationID": OperationID,
|
||||
}).Warningf(format, args...)
|
||||
|
||||
}
|
||||
|
||||
//Deprecated
|
||||
func InfoByArgs(format string, args ...interface{}) {
|
||||
logger.WithFields(logrus.Fields{}).Infof(format, args)
|
||||
}
|
||||
|
||||
//Deprecated
|
||||
func ErrorByArgs(format string, args ...interface{}) {
|
||||
logger.WithFields(logrus.Fields{}).Errorf(format, args...)
|
||||
}
|
||||
|
||||
//Print log information in k, v format,
|
||||
//kv is best to appear in pairs. tipInfo is the log prompt information for printing,
|
||||
//and kv is the key and value for printing.
|
||||
//Deprecated
|
||||
func InfoByKv(tipInfo, OperationID string, args ...interface{}) {
|
||||
fields := make(logrus.Fields)
|
||||
argsHandle(OperationID, fields, args)
|
||||
logger.WithFields(fields).Info(tipInfo)
|
||||
}
|
||||
|
||||
//Deprecated
|
||||
func ErrorByKv(tipInfo, OperationID string, args ...interface{}) {
|
||||
fields := make(logrus.Fields)
|
||||
argsHandle(OperationID, fields, args)
|
||||
logger.WithFields(fields).Error(tipInfo)
|
||||
}
|
||||
|
||||
//Deprecated
|
||||
func DebugByKv(tipInfo, OperationID string, args ...interface{}) {
|
||||
fields := make(logrus.Fields)
|
||||
argsHandle(OperationID, fields, args)
|
||||
logger.WithFields(fields).Debug(tipInfo)
|
||||
}
|
||||
|
||||
//Deprecated
|
||||
func WarnByKv(tipInfo, OperationID string, args ...interface{}) {
|
||||
fields := make(logrus.Fields)
|
||||
argsHandle(OperationID, fields, args)
|
||||
logger.WithFields(fields).Warn(tipInfo)
|
||||
}
|
||||
|
||||
//internal method
|
||||
func argsHandle(OperationID string, fields logrus.Fields, args []interface{}) {
|
||||
for i := 0; i < len(args); i += 2 {
|
||||
if i+1 < len(args) {
|
||||
fields[fmt.Sprintf("%v", args[i])] = args[i+1]
|
||||
} else {
|
||||
fields[fmt.Sprintf("%v", args[i])] = ""
|
||||
}
|
||||
}
|
||||
fields["OperationID"] = OperationID
|
||||
fields["PID"] = logger.Pid
|
||||
}
|
||||
func NewInfo(OperationID string, args ...interface{}) {
|
||||
logger.WithFields(logrus.Fields{
|
||||
"OperationID": OperationID,
|
||||
"PID": logger.Pid,
|
||||
}).Infoln(args)
|
||||
}
|
||||
func NewError(OperationID string, args ...interface{}) {
|
||||
logger.WithFields(logrus.Fields{
|
||||
"OperationID": OperationID,
|
||||
"PID": logger.Pid,
|
||||
}).Errorln(args)
|
||||
}
|
||||
func NewDebug(OperationID string, args ...interface{}) {
|
||||
logger.WithFields(logrus.Fields{
|
||||
"OperationID": OperationID,
|
||||
"PID": logger.Pid,
|
||||
}).Debugln(args)
|
||||
}
|
||||
func NewWarn(OperationID string, args ...interface{}) {
|
||||
logger.WithFields(logrus.Fields{
|
||||
"OperationID": OperationID,
|
||||
"PID": logger.Pid,
|
||||
}).Warnln(args)
|
||||
}
|
||||
57
pkg/common/log/time_format.go
Normal file
57
pkg/common/log/time_format.go
Normal file
@ -0,0 +1,57 @@
|
||||
/*
|
||||
** description("").
|
||||
** copyright('tuoyun,www.tuoyun.net').
|
||||
** author("fg,Gordon@tuoyun.net").
|
||||
** time(2021/2/22 11:52).
|
||||
*/
|
||||
package log
|
||||
|
||||
import (
|
||||
"strconv"
|
||||
"time"
|
||||
)
|
||||
|
||||
const (
|
||||
TimeOffset = 8 * 3600 //8 hour offset
|
||||
HalfOffset = 12 * 3600 //Half-day hourly offset
|
||||
)
|
||||
|
||||
//Get the current timestamp
|
||||
func GetCurrentTimestamp() int64 {
|
||||
return time.Now().Unix()
|
||||
}
|
||||
|
||||
//Get the current 0 o'clock timestamp
|
||||
func GetCurDayZeroTimestamp() int64 {
|
||||
timeStr := time.Now().Format("2006-01-02")
|
||||
t, _ := time.Parse("2006-01-02", timeStr)
|
||||
return t.Unix() - TimeOffset
|
||||
}
|
||||
|
||||
//Get the timestamp at 12 o'clock on the day
|
||||
func GetCurDayHalfTimestamp() int64 {
|
||||
return GetCurDayZeroTimestamp() + HalfOffset
|
||||
|
||||
}
|
||||
|
||||
//Get the formatted time at 0 o'clock of the day, the format is "2006-01-02_00-00-00"
|
||||
func GetCurDayZeroTimeFormat() string {
|
||||
return time.Unix(GetCurDayZeroTimestamp(), 0).Format("2006-01-02_15-04-05")
|
||||
}
|
||||
|
||||
//Get the formatted time at 12 o'clock of the day, the format is "2006-01-02_12-00-00"
|
||||
func GetCurDayHalfTimeFormat() string {
|
||||
return time.Unix(GetCurDayZeroTimestamp()+HalfOffset, 0).Format("2006-01-02_15-04-05")
|
||||
}
|
||||
func GetTimeStampByFormat(datetime string) string {
|
||||
timeLayout := "2006-01-02 15:04:05" //转化所需模板
|
||||
loc, _ := time.LoadLocation("Local") //获取时区
|
||||
tmp, _ := time.ParseInLocation(timeLayout, datetime, loc)
|
||||
timestamp := tmp.Unix() //转化为时间戳 类型是int64
|
||||
return strconv.FormatInt(timestamp, 10)
|
||||
}
|
||||
|
||||
func TimeStringFormatTimeUnix(timeFormat string, timeSrc string) int64 {
|
||||
tm, _ := time.Parse(timeFormat, timeSrc)
|
||||
return tm.Unix()
|
||||
}
|
||||
@ -3,11 +3,11 @@ package multi_terminal_login
|
||||
import (
|
||||
"Open_IM/internal/push/content_struct"
|
||||
"Open_IM/internal/push/logic"
|
||||
pbChat "Open_IM/pkg/proto/chat"
|
||||
"Open_IM/pkg/common/config"
|
||||
"Open_IM/pkg/common/constant"
|
||||
"Open_IM/pkg/common/db"
|
||||
"Open_IM/pkg/common"
|
||||
pbChat "Open_IM/pkg/proto/chat"
|
||||
"Open_IM/pkg/utils"
|
||||
)
|
||||
|
||||
func MultiTerminalLoginChecker(uid, token string, platformID int32) error {
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// source: auth/auth.proto
|
||||
|
||||
package pbAuth // import "auth"
|
||||
package pbAuth // import "./auth"
|
||||
|
||||
import proto "github.com/golang/protobuf/proto"
|
||||
import fmt "fmt"
|
||||
@ -41,7 +41,7 @@ func (m *UserRegisterReq) Reset() { *m = UserRegisterReq{} }
|
||||
func (m *UserRegisterReq) String() string { return proto.CompactTextString(m) }
|
||||
func (*UserRegisterReq) ProtoMessage() {}
|
||||
func (*UserRegisterReq) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_auth_ef7bd0d2906761f0, []int{0}
|
||||
return fileDescriptor_auth_d2199f7b1388fd2f, []int{0}
|
||||
}
|
||||
func (m *UserRegisterReq) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_UserRegisterReq.Unmarshal(m, b)
|
||||
@ -128,7 +128,7 @@ func (m *UserRegisterResp) Reset() { *m = UserRegisterResp{} }
|
||||
func (m *UserRegisterResp) String() string { return proto.CompactTextString(m) }
|
||||
func (*UserRegisterResp) ProtoMessage() {}
|
||||
func (*UserRegisterResp) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_auth_ef7bd0d2906761f0, []int{1}
|
||||
return fileDescriptor_auth_d2199f7b1388fd2f, []int{1}
|
||||
}
|
||||
func (m *UserRegisterResp) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_UserRegisterResp.Unmarshal(m, b)
|
||||
@ -167,7 +167,7 @@ func (m *UserTokenReq) Reset() { *m = UserTokenReq{} }
|
||||
func (m *UserTokenReq) String() string { return proto.CompactTextString(m) }
|
||||
func (*UserTokenReq) ProtoMessage() {}
|
||||
func (*UserTokenReq) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_auth_ef7bd0d2906761f0, []int{2}
|
||||
return fileDescriptor_auth_d2199f7b1388fd2f, []int{2}
|
||||
}
|
||||
func (m *UserTokenReq) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_UserTokenReq.Unmarshal(m, b)
|
||||
@ -215,7 +215,7 @@ func (m *UserTokenResp) Reset() { *m = UserTokenResp{} }
|
||||
func (m *UserTokenResp) String() string { return proto.CompactTextString(m) }
|
||||
func (*UserTokenResp) ProtoMessage() {}
|
||||
func (*UserTokenResp) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_auth_ef7bd0d2906761f0, []int{3}
|
||||
return fileDescriptor_auth_d2199f7b1388fd2f, []int{3}
|
||||
}
|
||||
func (m *UserTokenResp) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_UserTokenResp.Unmarshal(m, b)
|
||||
@ -375,30 +375,30 @@ var _Auth_serviceDesc = grpc.ServiceDesc{
|
||||
Metadata: "auth/auth.proto",
|
||||
}
|
||||
|
||||
func init() { proto.RegisterFile("auth/auth.proto", fileDescriptor_auth_ef7bd0d2906761f0) }
|
||||
func init() { proto.RegisterFile("auth/auth.proto", fileDescriptor_auth_d2199f7b1388fd2f) }
|
||||
|
||||
var fileDescriptor_auth_ef7bd0d2906761f0 = []byte{
|
||||
// 346 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x92, 0xc1, 0x4e, 0xc2, 0x40,
|
||||
0x10, 0x86, 0xd3, 0x42, 0x0b, 0x0c, 0x22, 0x64, 0x82, 0xba, 0xe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 0xbe, 0x1a, 0x15, 0x32, 0xb8, 0x87, 0x13,
|
||||
0xca, 0x9e, 0x88, 0x0f, 0xbe, 0x21, 0x8f, 0x1d, 0xa8, 0xbe, 0xac, 0xe3, 0xfc, 0x5d, 0xc8, 0x54,
|
||||
0xa7, 0x7a, 0xd1, 0x5e, 0x17, 0xfe, 0xdd, 0xbd, 0xff, 0xe0, 0x0b, 0x1a, 0x07, 0xd5, 0xe6, 0xa2,
|
||||
0x50, 0xca, 0x07, 0xb1, 0xe0, 0xb6, 0xba, 0x90, 0x64, 0x35, 0x94, 0x72, 0xac, 0x96, 0xb6, 0xde,
|
||||
0x2a, 0x32, 0xa5, 0xcb, 0x6d, 0xbf, 0x8c, 0xc0, 0x2e, 0xd4, 0xc3, 0x5d, 0x96, 0x48, 0xbe, 0x98,
|
||||
0x24, 0x29, 0xd7, 0x5d, 0x2b, 0x45, 0x87, 0xe8, 0xfa, 0xdb, 0x81, 0x32, 0x4d, 0x0a, 0x07, 0xc6,
|
||||
0x41, 0xe1, 0x17, 0x2f, 0xfa, 0x66, 0x84, 0xfd, 0x7f, 0xe3, 0xeb, 0xb0, 0xe3, 0x07, 0x2a, 0xc3,
|
||||
0x5b, 0xa8, 0xed, 0x6d, 0x60, 0xfb, 0x30, 0xad, 0xe8, 0x4b, 0xe7, 0xec, 0x08, 0x55, 0xd9, 0xb0,
|
||||
0xf1, 0x56, 0xa7, 0xe5, 0xb9, 0x33, 0x87, 0x33, 0x5f, 0x2f, 0xd1, 0xcd, 0x6f, 0x00, 0x00, 0x00,
|
||||
0xff, 0xff, 0x03, 0x0f, 0xb1, 0xb3, 0x57, 0x02, 0x00, 0x00,
|
||||
var fileDescriptor_auth_d2199f7b1388fd2f = []byte{
|
||||
// 348 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x92, 0x41, 0x4f, 0xf2, 0x40,
|
||||
0x10, 0x86, 0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||
0xe5, 0xc8, 0xa0, 0xf6, 0xb2, 0x9d, 0xcf, 0xb9, 0x52, 0xf4, 0xfa, 0x7a, 0x5c, 0xca, 0xe0, 0x0e,
|
||||
0xfe, 0xeb, 0xec, 0x89, 0x78, 0xe7, 0x1b, 0xed, 0xb1, 0x0b, 0xf5, 0xe7, 0x75, 0x52, 0xbc, 0x09,
|
||||
0x99, 0x51, 0xaa, 0x17, 0xef, 0x75, 0xe9, 0xdf, 0xdd, 0xfb, 0x0f, 0x3e, 0xa1, 0x79, 0x50, 0x6d,
|
||||
0x2e, 0x8a, 0xa4, 0xbc, 0x17, 0x0b, 0x6e, 0xab, 0x4b, 0xa9, 0xad, 0x46, 0x52, 0x8e, 0xd5, 0xd2,
|
||||
0xd6, 0x5b, 0xa5, 0x4d, 0x51, 0xb9, 0xed, 0x97, 0x11, 0xd8, 0x83, 0x7f, 0xd1, 0x2e, 0x4f, 0x25,
|
||||
0x5f, 0x4c, 0xd2, 0x8c, 0x53, 0xd7, 0x2a, 0xf1, 0x21, 0xba, 0xfa, 0x72, 0xa0, 0xaa, 0x27, 0x85,
|
||||
0x03, 0xe3, 0xa0, 0xf4, 0x8b, 0xe7, 0xa1, 0x19, 0x61, 0xf8, 0x67, 0x7c, 0x5d, 0x76, 0xfc, 0x40,
|
||||
0xe5, 0x78, 0x03, 0x8d, 0xbd, 0x0d, 0xec, 0x1c, 0xa6, 0x95, 0x7d, 0xe9, 0x9e, 0x1e, 0xa1, 0x2a,
|
||||
0x1f, 0xb6, 0x5e, 0x9b, 0x21, 0xad, 0xcf, 0xad, 0x39, 0x9e, 0xf9, 0xb4, 0x46, 0xd7, 0x3f, 0x01,
|
||||
0x00, 0x00, 0xff, 0xff, 0x15, 0x5d, 0xc8, 0xb6, 0x59, 0x02, 0x00, 0x00,
|
||||
}
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
syntax = "proto3";
|
||||
package pbAuth;
|
||||
option go_package = "auth;pbAuth";
|
||||
option go_package = "./auth;pbAuth";
|
||||
|
||||
message UserRegisterReq {
|
||||
string UID = 1;
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// source: chat/chat.proto
|
||||
|
||||
package pbChat // import "chat"
|
||||
package pbChat // import "./chat"
|
||||
|
||||
import proto "github.com/golang/protobuf/proto"
|
||||
import fmt "fmt"
|
||||
@ -50,7 +50,7 @@ func (m *WSToMsgSvrChatMsg) Reset() { *m = WSToMsgSvrChatMsg{} }
|
||||
func (m *WSToMsgSvrChatMsg) String() string { return proto.CompactTextString(m) }
|
||||
func (*WSToMsgSvrChatMsg) ProtoMessage() {}
|
||||
func (*WSToMsgSvrChatMsg) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_chat_34beadf7348900d2, []int{0}
|
||||
return fileDescriptor_chat_feb94a5514034c46, []int{0}
|
||||
}
|
||||
func (m *WSToMsgSvrChatMsg) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_WSToMsgSvrChatMsg.Unmarshal(m, b)
|
||||
@ -215,7 +215,7 @@ func (m *MsgSvrToPushSvrChatMsg) Reset() { *m = MsgSvrToPushSvrChatMsg{}
|
||||
func (m *MsgSvrToPushSvrChatMsg) String() string { return proto.CompactTextString(m) }
|
||||
func (*MsgSvrToPushSvrChatMsg) ProtoMessage() {}
|
||||
func (*MsgSvrToPushSvrChatMsg) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_chat_34beadf7348900d2, []int{1}
|
||||
return fileDescriptor_chat_feb94a5514034c46, []int{1}
|
||||
}
|
||||
func (m *MsgSvrToPushSvrChatMsg) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_MsgSvrToPushSvrChatMsg.Unmarshal(m, b)
|
||||
@ -361,7 +361,7 @@ func (m *PullMessageReq) Reset() { *m = PullMessageReq{} }
|
||||
func (m *PullMessageReq) String() string { return proto.CompactTextString(m) }
|
||||
func (*PullMessageReq) ProtoMessage() {}
|
||||
func (*PullMessageReq) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_chat_34beadf7348900d2, []int{2}
|
||||
return fileDescriptor_chat_feb94a5514034c46, []int{2}
|
||||
}
|
||||
func (m *PullMessageReq) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_PullMessageReq.Unmarshal(m, b)
|
||||
@ -425,7 +425,7 @@ func (m *PullMessageResp) Reset() { *m = PullMessageResp{} }
|
||||
func (m *PullMessageResp) String() string { return proto.CompactTextString(m) }
|
||||
func (*PullMessageResp) ProtoMessage() {}
|
||||
func (*PullMessageResp) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_chat_34beadf7348900d2, []int{3}
|
||||
return fileDescriptor_chat_feb94a5514034c46, []int{3}
|
||||
}
|
||||
func (m *PullMessageResp) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_PullMessageResp.Unmarshal(m, b)
|
||||
@ -487,7 +487,61 @@ func (m *PullMessageResp) GetGroupUserMsg() []*GatherFormat {
|
||||
return nil
|
||||
}
|
||||
|
||||
type GetNewSeqReq struct {
|
||||
type PullMessageBySeqListReq struct {
|
||||
UserID string `protobuf:"bytes,1,opt,name=UserID" json:"UserID,omitempty"`
|
||||
OperationID string `protobuf:"bytes,2,opt,name=OperationID" json:"OperationID,omitempty"`
|
||||
SeqList []int64 `protobuf:"varint,3,rep,packed,name=seqList" json:"seqList,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *PullMessageBySeqListReq) Reset() { *m = PullMessageBySeqListReq{} }
|
||||
func (m *PullMessageBySeqListReq) String() string { return proto.CompactTextString(m) }
|
||||
func (*PullMessageBySeqListReq) ProtoMessage() {}
|
||||
func (*PullMessageBySeqListReq) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_chat_feb94a5514034c46, []int{4}
|
||||
}
|
||||
func (m *PullMessageBySeqListReq) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_PullMessageBySeqListReq.Unmarshal(m, b)
|
||||
}
|
||||
func (m *PullMessageBySeqListReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_PullMessageBySeqListReq.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (dst *PullMessageBySeqListReq) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_PullMessageBySeqListReq.Merge(dst, src)
|
||||
}
|
||||
func (m *PullMessageBySeqListReq) XXX_Size() int {
|
||||
return xxx_messageInfo_PullMessageBySeqListReq.Size(m)
|
||||
}
|
||||
func (m *PullMessageBySeqListReq) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_PullMessageBySeqListReq.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_PullMessageBySeqListReq proto.InternalMessageInfo
|
||||
|
||||
func (m *PullMessageBySeqListReq) GetUserID() string {
|
||||
if m != nil {
|
||||
return m.UserID
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *PullMessageBySeqListReq) GetOperationID() string {
|
||||
if m != nil {
|
||||
return m.OperationID
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *PullMessageBySeqListReq) GetSeqList() []int64 {
|
||||
if m != nil {
|
||||
return m.SeqList
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type GetMaxAndMinSeqReq struct {
|
||||
UserID string `protobuf:"bytes,1,opt,name=UserID" json:"UserID,omitempty"`
|
||||
OperationID string `protobuf:"bytes,2,opt,name=OperationID" json:"OperationID,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
@ -495,94 +549,102 @@ type GetNewSeqReq struct {
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *GetNewSeqReq) Reset() { *m = GetNewSeqReq{} }
|
||||
func (m *GetNewSeqReq) String() string { return proto.CompactTextString(m) }
|
||||
func (*GetNewSeqReq) ProtoMessage() {}
|
||||
func (*GetNewSeqReq) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_chat_34beadf7348900d2, []int{4}
|
||||
func (m *GetMaxAndMinSeqReq) Reset() { *m = GetMaxAndMinSeqReq{} }
|
||||
func (m *GetMaxAndMinSeqReq) String() string { return proto.CompactTextString(m) }
|
||||
func (*GetMaxAndMinSeqReq) ProtoMessage() {}
|
||||
func (*GetMaxAndMinSeqReq) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_chat_feb94a5514034c46, []int{5}
|
||||
}
|
||||
func (m *GetNewSeqReq) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_GetNewSeqReq.Unmarshal(m, b)
|
||||
func (m *GetMaxAndMinSeqReq) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_GetMaxAndMinSeqReq.Unmarshal(m, b)
|
||||
}
|
||||
func (m *GetNewSeqReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_GetNewSeqReq.Marshal(b, m, deterministic)
|
||||
func (m *GetMaxAndMinSeqReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_GetMaxAndMinSeqReq.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (dst *GetNewSeqReq) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_GetNewSeqReq.Merge(dst, src)
|
||||
func (dst *GetMaxAndMinSeqReq) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_GetMaxAndMinSeqReq.Merge(dst, src)
|
||||
}
|
||||
func (m *GetNewSeqReq) XXX_Size() int {
|
||||
return xxx_messageInfo_GetNewSeqReq.Size(m)
|
||||
func (m *GetMaxAndMinSeqReq) XXX_Size() int {
|
||||
return xxx_messageInfo_GetMaxAndMinSeqReq.Size(m)
|
||||
}
|
||||
func (m *GetNewSeqReq) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_GetNewSeqReq.DiscardUnknown(m)
|
||||
func (m *GetMaxAndMinSeqReq) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_GetMaxAndMinSeqReq.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_GetNewSeqReq proto.InternalMessageInfo
|
||||
var xxx_messageInfo_GetMaxAndMinSeqReq proto.InternalMessageInfo
|
||||
|
||||
func (m *GetNewSeqReq) GetUserID() string {
|
||||
func (m *GetMaxAndMinSeqReq) GetUserID() string {
|
||||
if m != nil {
|
||||
return m.UserID
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *GetNewSeqReq) GetOperationID() string {
|
||||
func (m *GetMaxAndMinSeqReq) GetOperationID() string {
|
||||
if m != nil {
|
||||
return m.OperationID
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type GetNewSeqResp struct {
|
||||
type GetMaxAndMinSeqResp struct {
|
||||
ErrCode int32 `protobuf:"varint,1,opt,name=ErrCode" json:"ErrCode,omitempty"`
|
||||
ErrMsg string `protobuf:"bytes,2,opt,name=ErrMsg" json:"ErrMsg,omitempty"`
|
||||
Seq int64 `protobuf:"varint,3,opt,name=Seq" json:"Seq,omitempty"`
|
||||
MaxSeq int64 `protobuf:"varint,3,opt,name=MaxSeq" json:"MaxSeq,omitempty"`
|
||||
MinSeq int64 `protobuf:"varint,4,opt,name=MinSeq" json:"MinSeq,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *GetNewSeqResp) Reset() { *m = GetNewSeqResp{} }
|
||||
func (m *GetNewSeqResp) String() string { return proto.CompactTextString(m) }
|
||||
func (*GetNewSeqResp) ProtoMessage() {}
|
||||
func (*GetNewSeqResp) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_chat_34beadf7348900d2, []int{5}
|
||||
func (m *GetMaxAndMinSeqResp) Reset() { *m = GetMaxAndMinSeqResp{} }
|
||||
func (m *GetMaxAndMinSeqResp) String() string { return proto.CompactTextString(m) }
|
||||
func (*GetMaxAndMinSeqResp) ProtoMessage() {}
|
||||
func (*GetMaxAndMinSeqResp) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_chat_feb94a5514034c46, []int{6}
|
||||
}
|
||||
func (m *GetNewSeqResp) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_GetNewSeqResp.Unmarshal(m, b)
|
||||
func (m *GetMaxAndMinSeqResp) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_GetMaxAndMinSeqResp.Unmarshal(m, b)
|
||||
}
|
||||
func (m *GetNewSeqResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_GetNewSeqResp.Marshal(b, m, deterministic)
|
||||
func (m *GetMaxAndMinSeqResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_GetMaxAndMinSeqResp.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (dst *GetNewSeqResp) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_GetNewSeqResp.Merge(dst, src)
|
||||
func (dst *GetMaxAndMinSeqResp) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_GetMaxAndMinSeqResp.Merge(dst, src)
|
||||
}
|
||||
func (m *GetNewSeqResp) XXX_Size() int {
|
||||
return xxx_messageInfo_GetNewSeqResp.Size(m)
|
||||
func (m *GetMaxAndMinSeqResp) XXX_Size() int {
|
||||
return xxx_messageInfo_GetMaxAndMinSeqResp.Size(m)
|
||||
}
|
||||
func (m *GetNewSeqResp) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_GetNewSeqResp.DiscardUnknown(m)
|
||||
func (m *GetMaxAndMinSeqResp) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_GetMaxAndMinSeqResp.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_GetNewSeqResp proto.InternalMessageInfo
|
||||
var xxx_messageInfo_GetMaxAndMinSeqResp proto.InternalMessageInfo
|
||||
|
||||
func (m *GetNewSeqResp) GetErrCode() int32 {
|
||||
func (m *GetMaxAndMinSeqResp) GetErrCode() int32 {
|
||||
if m != nil {
|
||||
return m.ErrCode
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *GetNewSeqResp) GetErrMsg() string {
|
||||
func (m *GetMaxAndMinSeqResp) GetErrMsg() string {
|
||||
if m != nil {
|
||||
return m.ErrMsg
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *GetNewSeqResp) GetSeq() int64 {
|
||||
func (m *GetMaxAndMinSeqResp) GetMaxSeq() int64 {
|
||||
if m != nil {
|
||||
return m.Seq
|
||||
return m.MaxSeq
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *GetMaxAndMinSeqResp) GetMinSeq() int64 {
|
||||
if m != nil {
|
||||
return m.MinSeq
|
||||
}
|
||||
return 0
|
||||
}
|
||||
@ -601,7 +663,7 @@ func (m *GatherFormat) Reset() { *m = GatherFormat{} }
|
||||
func (m *GatherFormat) String() string { return proto.CompactTextString(m) }
|
||||
func (*GatherFormat) ProtoMessage() {}
|
||||
func (*GatherFormat) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_chat_34beadf7348900d2, []int{6}
|
||||
return fileDescriptor_chat_feb94a5514034c46, []int{7}
|
||||
}
|
||||
func (m *GatherFormat) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_GatherFormat.Unmarshal(m, b)
|
||||
@ -669,7 +731,7 @@ func (m *MsgFormat) Reset() { *m = MsgFormat{} }
|
||||
func (m *MsgFormat) String() string { return proto.CompactTextString(m) }
|
||||
func (*MsgFormat) ProtoMessage() {}
|
||||
func (*MsgFormat) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_chat_34beadf7348900d2, []int{7}
|
||||
return fileDescriptor_chat_feb94a5514034c46, []int{8}
|
||||
}
|
||||
func (m *MsgFormat) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_MsgFormat.Unmarshal(m, b)
|
||||
@ -791,6 +853,7 @@ type UserSendMsgReq struct {
|
||||
ClientMsgID string `protobuf:"bytes,15,opt,name=ClientMsgID" json:"ClientMsgID,omitempty"`
|
||||
OffLineInfo string `protobuf:"bytes,16,opt,name=OffLineInfo" json:"OffLineInfo,omitempty"`
|
||||
Ex string `protobuf:"bytes,17,opt,name=Ex" json:"Ex,omitempty"`
|
||||
SendTime int64 `protobuf:"varint,18,opt,name=sendTime" json:"sendTime,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
@ -800,7 +863,7 @@ func (m *UserSendMsgReq) Reset() { *m = UserSendMsgReq{} }
|
||||
func (m *UserSendMsgReq) String() string { return proto.CompactTextString(m) }
|
||||
func (*UserSendMsgReq) ProtoMessage() {}
|
||||
func (*UserSendMsgReq) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_chat_34beadf7348900d2, []int{8}
|
||||
return fileDescriptor_chat_feb94a5514034c46, []int{9}
|
||||
}
|
||||
func (m *UserSendMsgReq) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_UserSendMsgReq.Unmarshal(m, b)
|
||||
@ -939,13 +1002,20 @@ func (m *UserSendMsgReq) GetEx() string {
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *UserSendMsgReq) GetSendTime() int64 {
|
||||
if m != nil {
|
||||
return m.SendTime
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
type UserSendMsgResp struct {
|
||||
ErrCode int32 `protobuf:"varint,1,opt,name=ErrCode" json:"ErrCode,omitempty"`
|
||||
ErrMsg string `protobuf:"bytes,2,opt,name=ErrMsg" json:"ErrMsg,omitempty"`
|
||||
ReqIdentifier int32 `protobuf:"varint,3,opt,name=ReqIdentifier" json:"ReqIdentifier,omitempty"`
|
||||
SendTime int64 `protobuf:"varint,5,opt,name=SendTime" json:"SendTime,omitempty"`
|
||||
ServerMsgID string `protobuf:"bytes,6,opt,name=ServerMsgID" json:"ServerMsgID,omitempty"`
|
||||
ClientMsgID string `protobuf:"bytes,7,opt,name=ClientMsgID" json:"ClientMsgID,omitempty"`
|
||||
ServerMsgID string `protobuf:"bytes,4,opt,name=ServerMsgID" json:"ServerMsgID,omitempty"`
|
||||
ClientMsgID string `protobuf:"bytes,5,opt,name=ClientMsgID" json:"ClientMsgID,omitempty"`
|
||||
SendTime int64 `protobuf:"varint,6,opt,name=sendTime" json:"sendTime,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
@ -955,7 +1025,7 @@ func (m *UserSendMsgResp) Reset() { *m = UserSendMsgResp{} }
|
||||
func (m *UserSendMsgResp) String() string { return proto.CompactTextString(m) }
|
||||
func (*UserSendMsgResp) ProtoMessage() {}
|
||||
func (*UserSendMsgResp) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_chat_34beadf7348900d2, []int{9}
|
||||
return fileDescriptor_chat_feb94a5514034c46, []int{10}
|
||||
}
|
||||
func (m *UserSendMsgResp) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_UserSendMsgResp.Unmarshal(m, b)
|
||||
@ -996,13 +1066,6 @@ func (m *UserSendMsgResp) GetReqIdentifier() int32 {
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *UserSendMsgResp) GetSendTime() int64 {
|
||||
if m != nil {
|
||||
return m.SendTime
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *UserSendMsgResp) GetServerMsgID() string {
|
||||
if m != nil {
|
||||
return m.ServerMsgID
|
||||
@ -1017,13 +1080,21 @@ func (m *UserSendMsgResp) GetClientMsgID() string {
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *UserSendMsgResp) GetSendTime() int64 {
|
||||
if m != nil {
|
||||
return m.SendTime
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func init() {
|
||||
proto.RegisterType((*WSToMsgSvrChatMsg)(nil), "pbChat.WSToMsgSvrChatMsg")
|
||||
proto.RegisterType((*MsgSvrToPushSvrChatMsg)(nil), "pbChat.MsgSvrToPushSvrChatMsg")
|
||||
proto.RegisterType((*PullMessageReq)(nil), "pbChat.PullMessageReq")
|
||||
proto.RegisterType((*PullMessageResp)(nil), "pbChat.PullMessageResp")
|
||||
proto.RegisterType((*GetNewSeqReq)(nil), "pbChat.GetNewSeqReq")
|
||||
proto.RegisterType((*GetNewSeqResp)(nil), "pbChat.GetNewSeqResp")
|
||||
proto.RegisterType((*PullMessageBySeqListReq)(nil), "pbChat.PullMessageBySeqListReq")
|
||||
proto.RegisterType((*GetMaxAndMinSeqReq)(nil), "pbChat.GetMaxAndMinSeqReq")
|
||||
proto.RegisterType((*GetMaxAndMinSeqResp)(nil), "pbChat.GetMaxAndMinSeqResp")
|
||||
proto.RegisterType((*GatherFormat)(nil), "pbChat.GatherFormat")
|
||||
proto.RegisterType((*MsgFormat)(nil), "pbChat.MsgFormat")
|
||||
proto.RegisterType((*UserSendMsgReq)(nil), "pbChat.UserSendMsgReq")
|
||||
@ -1041,8 +1112,9 @@ const _ = grpc.SupportPackageIsVersion4
|
||||
// Client API for Chat service
|
||||
|
||||
type ChatClient interface {
|
||||
GetNewSeq(ctx context.Context, in *GetNewSeqReq, opts ...grpc.CallOption) (*GetNewSeqResp, error)
|
||||
GetMaxAndMinSeq(ctx context.Context, in *GetMaxAndMinSeqReq, opts ...grpc.CallOption) (*GetMaxAndMinSeqResp, error)
|
||||
PullMessage(ctx context.Context, in *PullMessageReq, opts ...grpc.CallOption) (*PullMessageResp, error)
|
||||
PullMessageBySeqList(ctx context.Context, in *PullMessageBySeqListReq, opts ...grpc.CallOption) (*PullMessageResp, error)
|
||||
UserSendMsg(ctx context.Context, in *UserSendMsgReq, opts ...grpc.CallOption) (*UserSendMsgResp, error)
|
||||
}
|
||||
|
||||
@ -1054,9 +1126,9 @@ func NewChatClient(cc *grpc.ClientConn) ChatClient {
|
||||
return &chatClient{cc}
|
||||
}
|
||||
|
||||
func (c *chatClient) GetNewSeq(ctx context.Context, in *GetNewSeqReq, opts ...grpc.CallOption) (*GetNewSeqResp, error) {
|
||||
out := new(GetNewSeqResp)
|
||||
err := grpc.Invoke(ctx, "/pbChat.Chat/GetNewSeq", in, out, c.cc, opts...)
|
||||
func (c *chatClient) GetMaxAndMinSeq(ctx context.Context, in *GetMaxAndMinSeqReq, opts ...grpc.CallOption) (*GetMaxAndMinSeqResp, error) {
|
||||
out := new(GetMaxAndMinSeqResp)
|
||||
err := grpc.Invoke(ctx, "/pbChat.Chat/GetMaxAndMinSeq", in, out, c.cc, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@ -1072,6 +1144,15 @@ func (c *chatClient) PullMessage(ctx context.Context, in *PullMessageReq, opts .
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *chatClient) PullMessageBySeqList(ctx context.Context, in *PullMessageBySeqListReq, opts ...grpc.CallOption) (*PullMessageResp, error) {
|
||||
out := new(PullMessageResp)
|
||||
err := grpc.Invoke(ctx, "/pbChat.Chat/PullMessageBySeqList", in, out, c.cc, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *chatClient) UserSendMsg(ctx context.Context, in *UserSendMsgReq, opts ...grpc.CallOption) (*UserSendMsgResp, error) {
|
||||
out := new(UserSendMsgResp)
|
||||
err := grpc.Invoke(ctx, "/pbChat.Chat/UserSendMsg", in, out, c.cc, opts...)
|
||||
@ -1084,8 +1165,9 @@ func (c *chatClient) UserSendMsg(ctx context.Context, in *UserSendMsgReq, opts .
|
||||
// Server API for Chat service
|
||||
|
||||
type ChatServer interface {
|
||||
GetNewSeq(context.Context, *GetNewSeqReq) (*GetNewSeqResp, error)
|
||||
GetMaxAndMinSeq(context.Context, *GetMaxAndMinSeqReq) (*GetMaxAndMinSeqResp, error)
|
||||
PullMessage(context.Context, *PullMessageReq) (*PullMessageResp, error)
|
||||
PullMessageBySeqList(context.Context, *PullMessageBySeqListReq) (*PullMessageResp, error)
|
||||
UserSendMsg(context.Context, *UserSendMsgReq) (*UserSendMsgResp, error)
|
||||
}
|
||||
|
||||
@ -1093,20 +1175,20 @@ func RegisterChatServer(s *grpc.Server, srv ChatServer) {
|
||||
s.RegisterService(&_Chat_serviceDesc, srv)
|
||||
}
|
||||
|
||||
func _Chat_GetNewSeq_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(GetNewSeqReq)
|
||||
func _Chat_GetMaxAndMinSeq_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(GetMaxAndMinSeqReq)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(ChatServer).GetNewSeq(ctx, in)
|
||||
return srv.(ChatServer).GetMaxAndMinSeq(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/pbChat.Chat/GetNewSeq",
|
||||
FullMethod: "/pbChat.Chat/GetMaxAndMinSeq",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(ChatServer).GetNewSeq(ctx, req.(*GetNewSeqReq))
|
||||
return srv.(ChatServer).GetMaxAndMinSeq(ctx, req.(*GetMaxAndMinSeqReq))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
@ -1129,6 +1211,24 @@ func _Chat_PullMessage_Handler(srv interface{}, ctx context.Context, dec func(in
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Chat_PullMessageBySeqList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(PullMessageBySeqListReq)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(ChatServer).PullMessageBySeqList(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/pbChat.Chat/PullMessageBySeqList",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(ChatServer).PullMessageBySeqList(ctx, req.(*PullMessageBySeqListReq))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Chat_UserSendMsg_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(UserSendMsgReq)
|
||||
if err := dec(in); err != nil {
|
||||
@ -1152,13 +1252,17 @@ var _Chat_serviceDesc = grpc.ServiceDesc{
|
||||
HandlerType: (*ChatServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
MethodName: "GetNewSeq",
|
||||
Handler: _Chat_GetNewSeq_Handler,
|
||||
MethodName: "GetMaxAndMinSeq",
|
||||
Handler: _Chat_GetMaxAndMinSeq_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "PullMessage",
|
||||
Handler: _Chat_PullMessage_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "PullMessageBySeqList",
|
||||
Handler: _Chat_PullMessageBySeqList_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "UserSendMsg",
|
||||
Handler: _Chat_UserSendMsg_Handler,
|
||||
@ -1168,66 +1272,70 @@ var _Chat_serviceDesc = grpc.ServiceDesc{
|
||||
Metadata: "chat/chat.proto",
|
||||
}
|
||||
|
||||
func init() { proto.RegisterFile("chat/chat.proto", fileDescriptor_chat_34beadf7348900d2) }
|
||||
func init() { proto.RegisterFile("chat/chat.proto", fileDescriptor_chat_feb94a5514034c46) }
|
||||
|
||||
var fileDescriptor_chat_34beadf7348900d2 = []byte{
|
||||
// 919 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x56, 0x5f, 0x6b, 0xe3, 0x46,
|
||||
0x10, 0xc7, 0x96, 0x2d, 0x5b, 0xe3, 0xbf, 0x59, 0xae, 0xe9, 0x12, 0x4a, 0x31, 0xe6, 0x5a, 0x4c,
|
||||
0x1f, 0x52, 0xb8, 0xbe, 0x1c, 0x2d, 0xf4, 0xe1, 0x62, 0x27, 0x15, 0x44, 0xb9, 0x20, 0xf9, 0x28,
|
||||
0xf4, 0x4d, 0xe7, 0xac, 0x15, 0x71, 0xb6, 0x24, 0xef, 0x2a, 0x69, 0xfa, 0xd2, 0xaf, 0xd0, 0x7e,
|
||||
0xa4, 0xbe, 0xf6, 0xa3, 0xf4, 0x2b, 0x14, 0x0a, 0x65, 0x77, 0x25, 0x6b, 0x57, 0x72, 0x1c, 0x13,
|
||||
0xc8, 0x4b, 0xc8, 0xfc, 0x34, 0xb3, 0xbb, 0x33, 0xf3, 0x9b, 0xdf, 0x18, 0x06, 0x8b, 0x5b, 0x3f,
|
||||
0xfd, 0x96, 0xff, 0x39, 0x4d, 0x68, 0x9c, 0xc6, 0xc8, 0x4c, 0x3e, 0x9e, 0xdd, 0xfa, 0xe9, 0xf8,
|
||||
0x8f, 0x06, 0x1c, 0xfd, 0xec, 0xcd, 0x63, 0x87, 0x05, 0xde, 0x3d, 0xe5, 0x90, 0xc3, 0x02, 0x74,
|
||||
0x0c, 0xa6, 0x47, 0xa2, 0x1b, 0x7b, 0x8a, 0x6b, 0xa3, 0xda, 0xc4, 0x72, 0x33, 0x8b, 0xe3, 0x2e,
|
||||
0x59, 0xdc, 0xdb, 0x53, 0x5c, 0x97, 0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0xee, 0xa0, 0xb7,
|
||||
0x60, 0x6d, 0x35, 0x10, 0x15, 0xf2, 0xab, 0x08, 0xec, 0xc9, 0x67, 0x3b, 0x50, 0x96, 0xa0, 0x1f,
|
||||
0xa1, 0xa3, 0xac, 0x1c, 0x74, 0x9c, 0x7b, 0xe9, 0x8b, 0xf0, 0xe4, 0xf3, 0x9d, 0xb8, 0x8c, 0x57,
|
||||
0xaa, 0x59, 0xc4, 0xeb, 0x53, 0x57, 0xc4, 0x97, 0x4a, 0xff, 0xae, 0xf7, 0x4b, 0x87, 0xff, 0x30,
|
||||
0xff, 0x41, 0x7e, 0xfe, 0x68, 0x8a, 0x1f, 0xe8, 0xdf, 0xfd, 0x1f, 0x00, 0x00, 0xff, 0xff, 0xfe,
|
||||
0xa0, 0x14, 0x71, 0xb3, 0x0b, 0x00, 0x00,
|
||||
var fileDescriptor_chat_feb94a5514034c46 = []byte{
|
||||
// 981 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x57, 0xdd, 0x6a, 0xe3, 0x46,
|
||||
0x14, 0xc6, 0x92, 0x2d, 0xdb, 0xc7, 0xbf, 0x99, 0x86, 0xec, 0x90, 0x96, 0xd6, 0x88, 0x6d, 0x31,
|
||||
0xbd, 0x48, 0x61, 0x7b, 0x53, 0x5a, 0x58, 0x68, 0x62, 0x27, 0xa8, 0x44, 0xd9, 0x20, 0x7b, 0x29,
|
||||
0xf4, 0x4e, 0x6b, 0x8f, 0x15, 0xb1, 0xb6, 0x24, 0xcf, 0x28, 0x69, 0xf6, 0xa6, 0xaf, 0xd0, 0x97,
|
||||
0xe8, 0x65, 0x5f, 0xa4, 0x8f, 0xd2, 0x57, 0x28, 0x14, 0xca, 0xcc, 0x48, 0xd6, 0xe8, 0xc7, 0x49,
|
||||
0xd8, 0xb2, 0x7b, 0x13, 0x38, 0x9f, 0xce, 0xfc, 0x9c, 0xf3, 0x7d, 0xf3, 0x1d, 0x07, 0x06, 0x8b,
|
||||
0x1b, 0x37, 0xfe, 0x86, 0xff, 0x39, 0x89, 0x68, 0x18, 0x87, 0xc8, 0x88, 0xde, 0x9c, 0xdd, 0xb8,
|
||||
0xb1, 0xf9, 0x7b, 0x1d, 0x0e, 0x7e, 0x9e, 0xcd, 0x43, 0x9b, 0x79, 0xb3, 0x3b, 0xca, 0x21, 0x9b,
|
||||
0x79, 0xe8, 0x08, 0x8c, 0x19, 0x09, 0x96, 0xd6, 0x04, 0xd7, 0x46, 0xb5, 0x71, 0xdb, 0x49, 0x22,
|
||||
0x8e, 0x3b, 0x64, 0x71, 0x67, 0x4d, 0xb0, 0x26, 0x71, 0x19, 0x21, 0x0c, 0xcd, 0xb3, 0x30, 0x88,
|
||||
0x49, 0x10, 0x63, 0x5d, 0x7c, 0x48, 0x43, 0x74, 0x0c, 0x2d, 0xbe, 0x76, 0xee, 0x6f, 0x08, 0xae,
|
||||
0x8f, 0x6a, 0x63, 0xdd, 0xd9, 0xc5, 0x7c, 0x95, 0xcd, 0xbc, 0x73, 0x1a, 0x6e, 0x70, 0x63, 0x54,
|
||||
0x1b, 0x37, 0x9c, 0x34, 0x44, 0x5f, 0x41, 0x9f, 0x67, 0x11, 0x7a, 0xe5, 0x2f, 0xde, 0x5e, 0xb9,
|
||||
0x1b, 0x82, 0x0d, 0xb1, 0x6d, 0x01, 0x45, 0xcf, 0xa1, 0x27, 0x91, 0x73, 0x77, 0x41, 0x5e, 0x3b,
|
||||
0x97, 0xb8, 0x29, 0xd2, 0xf2, 0x20, 0x1a, 0x41, 0x27, 0xb9, 0xce, 0xfc, 0x5d, 0x44, 0x70, 0x4b,
|
||||
0x9c, 0xa5, 0x42, 0x3c, 0x63, 0x46, 0x18, 0xf3, 0xc3, 0x40, 0x64, 0xb4, 0x65, 0x86, 0x02, 0xf1,
|
||||
0x8c, 0x57, 0x11, 0xa1, 0x6e, 0xec, 0x87, 0x81, 0x35, 0xc1, 0x20, 0xce, 0x51, 0x21, 0x74, 0x08,
|
||||
0x0d, 0x9b, 0x79, 0xd6, 0x04, 0x77, 0xc4, 0x37, 0x19, 0x70, 0x74, 0x1e, 0xbe, 0x25, 0x01, 0xee,
|
||||
0x4a, 0x54, 0x04, 0x62, 0xb7, 0xd5, 0x6a, 0xed, 0x07, 0xc4, 0x0a, 0x56, 0x21, 0xee, 0x25, 0xbb,
|
||||
0x65, 0x10, 0xef, 0xcd, 0xab, 0x88, 0xef, 0xcc, 0x70, 0x5f, 0x76, 0x34, 0x09, 0xd1, 0xe7, 0x00,
|
||||
0xd7, 0x6b, 0x37, 0x5e, 0x85, 0x74, 0x63, 0x4d, 0xf0, 0x40, 0x5c, 0x55, 0x41, 0xd0, 0x67, 0xd0,
|
||||
0x3e, 0x0f, 0xe9, 0x82, 0x5c, 0xfa, 0x2c, 0xc6, 0xc3, 0x91, 0x3e, 0x6e, 0x3b, 0x19, 0x20, 0x7a,
|
||||
0xb1, 0xf6, 0x49, 0x10, 0xcb, 0xbb, 0x1e, 0xc8, 0x93, 0x15, 0xc8, 0xfc, 0x47, 0x87, 0x23, 0xa9,
|
||||
0x86, 0x79, 0x78, 0x7d, 0xcb, 0x6e, 0x3e, 0x88, 0x2c, 0x30, 0x34, 0x79, 0xce, 0x8c, 0x6c, 0x13,
|
||||
0x55, 0xa4, 0x61, 0x4e, 0x30, 0x8d, 0xfd, 0x82, 0x31, 0x1e, 0x13, 0x4c, 0xf3, 0x69, 0x82, 0x69,
|
||||
0x3d, 0x41, 0x30, 0xed, 0x47, 0x05, 0x03, 0x8f, 0x0a, 0xa6, 0xf3, 0x80, 0x60, 0xba, 0xaa, 0x60,
|
||||
0x3e, 0xa4, 0x34, 0x0a, 0xe4, 0x0f, 0xcb, 0xe4, 0xff, 0x06, 0xfd, 0xeb, 0xdb, 0xf5, 0xda, 0x26,
|
||||
0x8c, 0xb9, 0x1e, 0x71, 0xc8, 0x96, 0x73, 0xfb, 0x9a, 0x11, 0x9a, 0x71, 0x2e, 0x23, 0xc9, 0xd3,
|
||||
0xf6, 0x94, 0x78, 0x7e, 0x20, 0x58, 0x17, 0x3c, 0xc9, 0x58, 0xea, 0x64, 0x3b, 0x0d, 0x96, 0x82,
|
||||
0x76, 0xdd, 0x49, 0xa2, 0x62, 0x4f, 0xea, 0xa5, 0x9e, 0x98, 0x7f, 0xd7, 0x60, 0x90, 0xbb, 0x00,
|
||||
0x8b, 0x78, 0xbd, 0x53, 0x4a, 0xcf, 0xc2, 0x25, 0x11, 0x57, 0x68, 0x38, 0x69, 0xc8, 0xcf, 0x99,
|
||||
0x52, 0x6a, 0x33, 0x2f, 0xd5, 0x9d, 0x8c, 0x38, 0x6e, 0xbb, 0xf7, 0x5c, 0x5c, 0xc9, 0xf9, 0x32,
|
||||
0x12, 0xb8, 0x1f, 0x64, 0xa2, 0x4b, 0x22, 0xf4, 0x3d, 0xf4, 0x66, 0x7e, 0xe0, 0xad, 0x09, 0xaf,
|
||||
0x8d, 0x6f, 0xd7, 0x18, 0xe9, 0xe3, 0xce, 0x8b, 0xc3, 0x13, 0x69, 0x92, 0x27, 0x17, 0x6e, 0x7c,
|
||||
0x43, 0xe8, 0x79, 0x48, 0x37, 0x6e, 0xec, 0xe4, 0x53, 0xd1, 0x77, 0xd0, 0xbd, 0xa0, 0xe1, 0x6d,
|
||||
0x94, 0x2e, 0x35, 0x1e, 0x58, 0x9a, 0xcb, 0x34, 0x37, 0xf0, 0x4c, 0x29, 0xf5, 0xf4, 0xdd, 0x8c,
|
||||
0x6c, 0xf9, 0x13, 0x7d, 0xa8, 0xe9, 0x85, 0x06, 0x6a, 0x65, 0x51, 0x61, 0x68, 0x32, 0xb9, 0x0f,
|
||||
0xd6, 0x47, 0x3a, 0x7f, 0x58, 0x49, 0x68, 0x5e, 0x01, 0xba, 0x20, 0xb1, 0xed, 0xde, 0xff, 0x18,
|
||||
0x2c, 0x65, 0xdd, 0xff, 0xeb, 0x24, 0xf3, 0x57, 0xf8, 0xa4, 0xb4, 0xdf, 0xc7, 0x60, 0xcb, 0x9c,
|
||||
0x42, 0x57, 0xed, 0x2a, 0xea, 0x83, 0xb6, 0xbb, 0xbe, 0x66, 0x4d, 0xd0, 0x97, 0x50, 0x17, 0xf5,
|
||||
0x6b, 0x82, 0x89, 0x83, 0x94, 0x09, 0x6e, 0x15, 0x92, 0x06, 0xf1, 0xd9, 0xfc, 0x57, 0x83, 0xf6,
|
||||
0x0e, 0x7b, 0x1f, 0x6b, 0x4b, 0xad, 0x48, 0xcf, 0x5b, 0x51, 0xc1, 0x3c, 0xea, 0x7b, 0xcc, 0x83,
|
||||
0xde, 0x09, 0x15, 0x58, 0x13, 0xe1, 0x72, 0x6d, 0x47, 0x85, 0x54, 0xe3, 0x34, 0xf2, 0xc6, 0x39,
|
||||
0x04, 0x9d, 0x77, 0xa4, 0x29, 0x3a, 0xa2, 0x17, 0x0d, 0xb3, 0x55, 0x30, 0xcc, 0xaf, 0x61, 0x28,
|
||||
0x9d, 0x4d, 0xb1, 0x05, 0xe9, 0x66, 0x25, 0xbc, 0xc2, 0x42, 0xe1, 0x69, 0x16, 0xda, 0xd9, 0x67,
|
||||
0xa1, 0x8a, 0xd5, 0x74, 0xcb, 0x56, 0xf3, 0x67, 0x1d, 0xfa, 0x5c, 0x6c, 0x7c, 0x9d, 0xcd, 0x3c,
|
||||
0x2e, 0xc6, 0xe7, 0xd0, 0x73, 0xc8, 0xd6, 0x5a, 0x92, 0x20, 0xf6, 0x57, 0x3e, 0xa1, 0x89, 0x82,
|
||||
0xf2, 0x60, 0x36, 0x52, 0x35, 0x75, 0xa4, 0x66, 0x04, 0xea, 0x39, 0x02, 0x1f, 0xf5, 0x9c, 0x8a,
|
||||
0xc2, 0x1b, 0x4f, 0x2b, 0xdc, 0xa8, 0x2a, 0x3c, 0xef, 0xc1, 0xcd, 0x2a, 0x0f, 0x56, 0x27, 0x47,
|
||||
0xab, 0x3c, 0x39, 0x14, 0x69, 0xb5, 0x1f, 0x94, 0x16, 0x94,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, 0x00, 0x00, 0x00, 0xff, 0xff, 0xc2, 0x44, 0x4e,
|
||||
0x52, 0xce, 0x0c, 0x00, 0x00,
|
||||
}
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
syntax = "proto3";
|
||||
package pbChat;//The package name to which the proto file belongs
|
||||
option go_package = "chat;pbChat";//The generated go pb file is in the current directory, and the package name is pbChat
|
||||
option go_package = "./chat;pbChat";//The generated go pb file is in the current directory, and the package name is pbChat
|
||||
|
||||
message WSToMsgSvrChatMsg{
|
||||
string SendID = 1;
|
||||
@ -58,14 +58,20 @@ message PullMessageResp {
|
||||
repeated GatherFormat SingleUserMsg = 5;
|
||||
repeated GatherFormat GroupUserMsg = 6;
|
||||
}
|
||||
message GetNewSeqReq {
|
||||
message PullMessageBySeqListReq{
|
||||
string UserID = 1;
|
||||
string OperationID = 2;
|
||||
repeated int64 seqList =3;
|
||||
}
|
||||
message GetMaxAndMinSeqReq {
|
||||
string UserID = 1;
|
||||
string OperationID = 2;
|
||||
}
|
||||
message GetNewSeqResp {
|
||||
message GetMaxAndMinSeqResp {
|
||||
int32 ErrCode = 1;
|
||||
string ErrMsg = 2;
|
||||
int64 Seq = 3;
|
||||
int64 MaxSeq = 3;
|
||||
int64 MinSeq = 4;
|
||||
}
|
||||
message GatherFormat{
|
||||
// @inject_tag: json:"id"
|
||||
@ -119,6 +125,7 @@ message UserSendMsgReq {
|
||||
string ClientMsgID = 15;
|
||||
string OffLineInfo = 16;
|
||||
string Ex = 17;
|
||||
int64 sendTime = 18;
|
||||
|
||||
|
||||
}
|
||||
@ -127,13 +134,14 @@ message UserSendMsgResp {
|
||||
int32 ErrCode = 1;
|
||||
string ErrMsg = 2;
|
||||
int32 ReqIdentifier = 3;
|
||||
int64 SendTime = 5;
|
||||
string ServerMsgID = 6;
|
||||
string ClientMsgID = 7;
|
||||
string ServerMsgID = 4;
|
||||
string ClientMsgID = 5;
|
||||
int64 sendTime = 6;
|
||||
|
||||
}
|
||||
service Chat {
|
||||
rpc GetNewSeq(GetNewSeqReq) returns(GetNewSeqResp);
|
||||
rpc GetMaxAndMinSeq(GetMaxAndMinSeqReq) returns(GetMaxAndMinSeqResp);
|
||||
rpc PullMessage(PullMessageReq) returns(PullMessageResp);
|
||||
rpc PullMessageBySeqList(PullMessageBySeqListReq) returns(PullMessageResp);
|
||||
rpc UserSendMsg(UserSendMsgReq) returns(UserSendMsgResp);
|
||||
}
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// source: friend/friend.proto
|
||||
|
||||
package friend // import "friend"
|
||||
package friend // import "./friend"
|
||||
|
||||
import proto "github.com/golang/protobuf/proto"
|
||||
import fmt "fmt"
|
||||
@ -35,7 +35,7 @@ func (m *CommonResp) Reset() { *m = CommonResp{} }
|
||||
func (m *CommonResp) String() string { return proto.CompactTextString(m) }
|
||||
func (*CommonResp) ProtoMessage() {}
|
||||
func (*CommonResp) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_friend_05873114bd399886, []int{0}
|
||||
return fileDescriptor_friend_03bf5fbe59a174aa, []int{0}
|
||||
}
|
||||
func (m *CommonResp) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_CommonResp.Unmarshal(m, b)
|
||||
@ -82,7 +82,7 @@ func (m *GetFriendsInfoReq) Reset() { *m = GetFriendsInfoReq{} }
|
||||
func (m *GetFriendsInfoReq) String() string { return proto.CompactTextString(m) }
|
||||
func (*GetFriendsInfoReq) ProtoMessage() {}
|
||||
func (*GetFriendsInfoReq) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_friend_05873114bd399886, []int{1}
|
||||
return fileDescriptor_friend_03bf5fbe59a174aa, []int{1}
|
||||
}
|
||||
func (m *GetFriendsInfoReq) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_GetFriendsInfoReq.Unmarshal(m, b)
|
||||
@ -136,7 +136,7 @@ func (m *GetFriendInfoResp) Reset() { *m = GetFriendInfoResp{} }
|
||||
func (m *GetFriendInfoResp) String() string { return proto.CompactTextString(m) }
|
||||
func (*GetFriendInfoResp) ProtoMessage() {}
|
||||
func (*GetFriendInfoResp) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_friend_05873114bd399886, []int{2}
|
||||
return fileDescriptor_friend_03bf5fbe59a174aa, []int{2}
|
||||
}
|
||||
func (m *GetFriendInfoResp) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_GetFriendInfoResp.Unmarshal(m, b)
|
||||
@ -198,7 +198,7 @@ func (m *GetFriendData) Reset() { *m = GetFriendData{} }
|
||||
func (m *GetFriendData) String() string { return proto.CompactTextString(m) }
|
||||
func (*GetFriendData) ProtoMessage() {}
|
||||
func (*GetFriendData) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_friend_05873114bd399886, []int{3}
|
||||
return fileDescriptor_friend_03bf5fbe59a174aa, []int{3}
|
||||
}
|
||||
func (m *GetFriendData) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_GetFriendData.Unmarshal(m, b)
|
||||
@ -309,7 +309,7 @@ func (m *AddFriendReq) Reset() { *m = AddFriendReq{} }
|
||||
func (m *AddFriendReq) String() string { return proto.CompactTextString(m) }
|
||||
func (*AddFriendReq) ProtoMessage() {}
|
||||
func (*AddFriendReq) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_friend_05873114bd399886, []int{4}
|
||||
return fileDescriptor_friend_03bf5fbe59a174aa, []int{4}
|
||||
}
|
||||
func (m *AddFriendReq) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_AddFriendReq.Unmarshal(m, b)
|
||||
@ -371,7 +371,7 @@ func (m *ImportFriendReq) Reset() { *m = ImportFriendReq{} }
|
||||
func (m *ImportFriendReq) String() string { return proto.CompactTextString(m) }
|
||||
func (*ImportFriendReq) ProtoMessage() {}
|
||||
func (*ImportFriendReq) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_friend_05873114bd399886, []int{5}
|
||||
return fileDescriptor_friend_03bf5fbe59a174aa, []int{5}
|
||||
}
|
||||
func (m *ImportFriendReq) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_ImportFriendReq.Unmarshal(m, b)
|
||||
@ -431,7 +431,7 @@ func (m *ImportFriendResp) Reset() { *m = ImportFriendResp{} }
|
||||
func (m *ImportFriendResp) String() string { return proto.CompactTextString(m) }
|
||||
func (*ImportFriendResp) ProtoMessage() {}
|
||||
func (*ImportFriendResp) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_friend_05873114bd399886, []int{6}
|
||||
return fileDescriptor_friend_03bf5fbe59a174aa, []int{6}
|
||||
}
|
||||
func (m *ImportFriendResp) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_ImportFriendResp.Unmarshal(m, b)
|
||||
@ -477,7 +477,7 @@ func (m *GetFriendApplyReq) Reset() { *m = GetFriendApplyReq{} }
|
||||
func (m *GetFriendApplyReq) String() string { return proto.CompactTextString(m) }
|
||||
func (*GetFriendApplyReq) ProtoMessage() {}
|
||||
func (*GetFriendApplyReq) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_friend_05873114bd399886, []int{7}
|
||||
return fileDescriptor_friend_03bf5fbe59a174aa, []int{7}
|
||||
}
|
||||
func (m *GetFriendApplyReq) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_GetFriendApplyReq.Unmarshal(m, b)
|
||||
@ -524,7 +524,7 @@ func (m *GetFriendApplyResp) Reset() { *m = GetFriendApplyResp{} }
|
||||
func (m *GetFriendApplyResp) String() string { return proto.CompactTextString(m) }
|
||||
func (*GetFriendApplyResp) ProtoMessage() {}
|
||||
func (*GetFriendApplyResp) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_friend_05873114bd399886, []int{8}
|
||||
return fileDescriptor_friend_03bf5fbe59a174aa, []int{8}
|
||||
}
|
||||
func (m *GetFriendApplyResp) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_GetFriendApplyResp.Unmarshal(m, b)
|
||||
@ -586,7 +586,7 @@ func (m *ApplyUserInfo) Reset() { *m = ApplyUserInfo{} }
|
||||
func (m *ApplyUserInfo) String() string { return proto.CompactTextString(m) }
|
||||
func (*ApplyUserInfo) ProtoMessage() {}
|
||||
func (*ApplyUserInfo) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_friend_05873114bd399886, []int{9}
|
||||
return fileDescriptor_friend_03bf5fbe59a174aa, []int{9}
|
||||
}
|
||||
func (m *ApplyUserInfo) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_ApplyUserInfo.Unmarshal(m, b)
|
||||
@ -695,7 +695,7 @@ func (m *GetFriendListReq) Reset() { *m = GetFriendListReq{} }
|
||||
func (m *GetFriendListReq) String() string { return proto.CompactTextString(m) }
|
||||
func (*GetFriendListReq) ProtoMessage() {}
|
||||
func (*GetFriendListReq) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_friend_05873114bd399886, []int{10}
|
||||
return fileDescriptor_friend_03bf5fbe59a174aa, []int{10}
|
||||
}
|
||||
func (m *GetFriendListReq) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_GetFriendListReq.Unmarshal(m, b)
|
||||
@ -742,7 +742,7 @@ func (m *GetFriendListResp) Reset() { *m = GetFriendListResp{} }
|
||||
func (m *GetFriendListResp) String() string { return proto.CompactTextString(m) }
|
||||
func (*GetFriendListResp) ProtoMessage() {}
|
||||
func (*GetFriendListResp) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_friend_05873114bd399886, []int{11}
|
||||
return fileDescriptor_friend_03bf5fbe59a174aa, []int{11}
|
||||
}
|
||||
func (m *GetFriendListResp) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_GetFriendListResp.Unmarshal(m, b)
|
||||
@ -803,7 +803,7 @@ func (m *UserInfo) Reset() { *m = UserInfo{} }
|
||||
func (m *UserInfo) String() string { return proto.CompactTextString(m) }
|
||||
func (*UserInfo) ProtoMessage() {}
|
||||
func (*UserInfo) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_friend_05873114bd399886, []int{12}
|
||||
return fileDescriptor_friend_03bf5fbe59a174aa, []int{12}
|
||||
}
|
||||
func (m *UserInfo) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_UserInfo.Unmarshal(m, b)
|
||||
@ -907,7 +907,7 @@ func (m *AddBlacklistReq) Reset() { *m = AddBlacklistReq{} }
|
||||
func (m *AddBlacklistReq) String() string { return proto.CompactTextString(m) }
|
||||
func (*AddBlacklistReq) ProtoMessage() {}
|
||||
func (*AddBlacklistReq) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_friend_05873114bd399886, []int{13}
|
||||
return fileDescriptor_friend_03bf5fbe59a174aa, []int{13}
|
||||
}
|
||||
func (m *AddBlacklistReq) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_AddBlacklistReq.Unmarshal(m, b)
|
||||
@ -968,7 +968,7 @@ func (m *RemoveBlacklistReq) Reset() { *m = RemoveBlacklistReq{} }
|
||||
func (m *RemoveBlacklistReq) String() string { return proto.CompactTextString(m) }
|
||||
func (*RemoveBlacklistReq) ProtoMessage() {}
|
||||
func (*RemoveBlacklistReq) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_friend_05873114bd399886, []int{14}
|
||||
return fileDescriptor_friend_03bf5fbe59a174aa, []int{14}
|
||||
}
|
||||
func (m *RemoveBlacklistReq) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_RemoveBlacklistReq.Unmarshal(m, b)
|
||||
@ -1021,7 +1021,7 @@ func (m *GetBlacklistReq) Reset() { *m = GetBlacklistReq{} }
|
||||
func (m *GetBlacklistReq) String() string { return proto.CompactTextString(m) }
|
||||
func (*GetBlacklistReq) ProtoMessage() {}
|
||||
func (*GetBlacklistReq) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_friend_05873114bd399886, []int{15}
|
||||
return fileDescriptor_friend_03bf5fbe59a174aa, []int{15}
|
||||
}
|
||||
func (m *GetBlacklistReq) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_GetBlacklistReq.Unmarshal(m, b)
|
||||
@ -1068,7 +1068,7 @@ func (m *GetBlacklistResp) Reset() { *m = GetBlacklistResp{} }
|
||||
func (m *GetBlacklistResp) String() string { return proto.CompactTextString(m) }
|
||||
func (*GetBlacklistResp) ProtoMessage() {}
|
||||
func (*GetBlacklistResp) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_friend_05873114bd399886, []int{16}
|
||||
return fileDescriptor_friend_03bf5fbe59a174aa, []int{16}
|
||||
}
|
||||
func (m *GetBlacklistResp) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_GetBlacklistResp.Unmarshal(m, b)
|
||||
@ -1122,7 +1122,7 @@ func (m *IsFriendReq) Reset() { *m = IsFriendReq{} }
|
||||
func (m *IsFriendReq) String() string { return proto.CompactTextString(m) }
|
||||
func (*IsFriendReq) ProtoMessage() {}
|
||||
func (*IsFriendReq) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_friend_05873114bd399886, []int{17}
|
||||
return fileDescriptor_friend_03bf5fbe59a174aa, []int{17}
|
||||
}
|
||||
func (m *IsFriendReq) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_IsFriendReq.Unmarshal(m, b)
|
||||
@ -1176,7 +1176,7 @@ func (m *IsFriendResp) Reset() { *m = IsFriendResp{} }
|
||||
func (m *IsFriendResp) String() string { return proto.CompactTextString(m) }
|
||||
func (*IsFriendResp) ProtoMessage() {}
|
||||
func (*IsFriendResp) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_friend_05873114bd399886, []int{18}
|
||||
return fileDescriptor_friend_03bf5fbe59a174aa, []int{18}
|
||||
}
|
||||
func (m *IsFriendResp) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_IsFriendResp.Unmarshal(m, b)
|
||||
@ -1230,7 +1230,7 @@ func (m *IsInBlackListReq) Reset() { *m = IsInBlackListReq{} }
|
||||
func (m *IsInBlackListReq) String() string { return proto.CompactTextString(m) }
|
||||
func (*IsInBlackListReq) ProtoMessage() {}
|
||||
func (*IsInBlackListReq) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_friend_05873114bd399886, []int{19}
|
||||
return fileDescriptor_friend_03bf5fbe59a174aa, []int{19}
|
||||
}
|
||||
func (m *IsInBlackListReq) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_IsInBlackListReq.Unmarshal(m, b)
|
||||
@ -1284,7 +1284,7 @@ func (m *IsInBlackListResp) Reset() { *m = IsInBlackListResp{} }
|
||||
func (m *IsInBlackListResp) String() string { return proto.CompactTextString(m) }
|
||||
func (*IsInBlackListResp) ProtoMessage() {}
|
||||
func (*IsInBlackListResp) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_friend_05873114bd399886, []int{20}
|
||||
return fileDescriptor_friend_03bf5fbe59a174aa, []int{20}
|
||||
}
|
||||
func (m *IsInBlackListResp) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_IsInBlackListResp.Unmarshal(m, b)
|
||||
@ -1338,7 +1338,7 @@ func (m *DeleteFriendReq) Reset() { *m = DeleteFriendReq{} }
|
||||
func (m *DeleteFriendReq) String() string { return proto.CompactTextString(m) }
|
||||
func (*DeleteFriendReq) ProtoMessage() {}
|
||||
func (*DeleteFriendReq) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_friend_05873114bd399886, []int{21}
|
||||
return fileDescriptor_friend_03bf5fbe59a174aa, []int{21}
|
||||
}
|
||||
func (m *DeleteFriendReq) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_DeleteFriendReq.Unmarshal(m, b)
|
||||
@ -1393,7 +1393,7 @@ func (m *AddFriendResponseReq) Reset() { *m = AddFriendResponseReq{} }
|
||||
func (m *AddFriendResponseReq) String() string { return proto.CompactTextString(m) }
|
||||
func (*AddFriendResponseReq) ProtoMessage() {}
|
||||
func (*AddFriendResponseReq) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_friend_05873114bd399886, []int{22}
|
||||
return fileDescriptor_friend_03bf5fbe59a174aa, []int{22}
|
||||
}
|
||||
func (m *AddFriendResponseReq) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_AddFriendResponseReq.Unmarshal(m, b)
|
||||
@ -1455,7 +1455,7 @@ func (m *SetFriendCommentReq) Reset() { *m = SetFriendCommentReq{} }
|
||||
func (m *SetFriendCommentReq) String() string { return proto.CompactTextString(m) }
|
||||
func (*SetFriendCommentReq) ProtoMessage() {}
|
||||
func (*SetFriendCommentReq) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_friend_05873114bd399886, []int{23}
|
||||
return fileDescriptor_friend_03bf5fbe59a174aa, []int{23}
|
||||
}
|
||||
func (m *SetFriendCommentReq) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_SetFriendCommentReq.Unmarshal(m, b)
|
||||
@ -2031,72 +2031,72 @@ var _Friend_serviceDesc = grpc.ServiceDesc{
|
||||
Metadata: "friend/friend.proto",
|
||||
}
|
||||
|
||||
func init() { proto.RegisterFile("friend/friend.proto", fileDescriptor_friend_05873114bd399886) }
|
||||
func init() { proto.RegisterFile("friend/friend.proto", fileDescriptor_friend_03bf5fbe59a174aa) }
|
||||
|
||||
var fileDescriptor_friend_05873114bd399886 = []byte{
|
||||
// 1011 bytes of a gzipped FileDescriptorProto
|
||||
var fileDescriptor_friend_03bf5fbe59a174aa = []byte{
|
||||
// 1013 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x57, 0xcd, 0x6e, 0xdb, 0x46,
|
||||
0x10, 0x86, 0x48, 0xc9, 0x96, 0x46, 0x52, 0x24, 0xaf, 0xdd, 0x96, 0x65, 0x83, 0x42, 0x20, 0x72,
|
||||
0x48, 0x2f, 0x29, 0xe0, 0x22, 0xa7, 0x9c, 0x14, 0xbb, 0x0e, 0xd4, 0x34, 0x08, 0xc0, 0xd8, 0x97,
|
||||
0x16, 0x2d, 0x40, 0x8b, 0x23, 0x85, 0x08, 0xff, 0xc2, 0x65, 0x12, 0xfb, 0xd4, 0x63, 0xcf, 0x7d,
|
||||
0x94, 0xbe, 0x59, 0x1f, 0xa1, 0xd8, 0x59, 0x92, 0xbb, 0xfc, 0x71, 0x1a, 0x54, 0x4e, 0x72, 0x32,
|
||||
0x67, 0x76, 0x3d, 0x3b, 0xdf, 0xcc, 0x7c, 0x33, 0x23, 0x38, 0xdc, 0x64, 0x01, 0xc6, 0xfe, 0xf7,
|
||||
0xf2, 0xcf, 0x83, 0x34, 0x4b, 0xf2, 0x84, 0xed, 0x49, 0xc9, 0x39, 0x03, 0x38, 0x49, 0xa2, 0x28,
|
||||
0x89, 0x5d, 0xe4, 0x29, 0xbb, 0x0b, 0x23, 0xcc, 0xb2, 0x24, 0x3b, 0x49, 0x7c, 0xb4, 0x7a, 0x8b,
|
||||
0xde, 0xfd, 0x81, 0xab, 0x14, 0xcc, 0x86, 0x21, 0x09, 0xcf, 0xf8, 0xd6, 0x32, 0x16, 0xbd, 0xfb,
|
||||
0x23, 0xb7, 0x92, 0x9d, 0xdf, 0xe0, 0xe0, 0x09, 0xe6, 0x67, 0x64, 0x94, 0xaf, 0xe2, 0x4d, 0xe2,
|
||||
0xe2, 0x6b, 0x36, 0x07, 0xf3, 0x4d, 0xe0, 0x93, 0xa1, 0x91, 0x2b, 0x3e, 0xd9, 0x02, 0xc6, 0xcf,
|
||||
0x53, 0xcc, 0xbc, 0x3c, 0x48, 0xe2, 0xd5, 0x69, 0x61, 0x45, 0x57, 0xb1, 0x23, 0x18, 0x9c, 0x27,
|
||||
0xaf, 0x30, 0xb6, 0x4c, 0x3a, 0x93, 0x82, 0x73, 0xa5, 0x99, 0x97, 0xd6, 0x77, 0xf1, 0x96, 0x7d,
|
||||
0x07, 0xfd, 0x53, 0x2f, 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||||
0xf9, 0x34, 0x29, 0x9f, 0xf3, 0x32, 0x9f, 0x8d, 0x54, 0xfe, 0xd3, 0x83, 0xe1, 0x07, 0x64, 0xd1,
|
||||
0xec, 0xc8, 0xa2, 0xf1, 0x99, 0xb2, 0x78, 0x73, 0x2b, 0x6c, 0xb5, 0x3b, 0xe8, 0x6a, 0x77, 0xef,
|
||||
0x60, 0xb6, 0xf4, 0x7d, 0x92, 0xc3, 0x22, 0x65, 0xb7, 0xd7, 0xf1, 0xde, 0xd7, 0x6c, 0x7e, 0x07,
|
||||
0xe6, 0x62, 0x94, 0xbc, 0xc5, 0x8f, 0xf3, 0xb6, 0xb3, 0x82, 0xd9, 0x13, 0xcc, 0x6b, 0xc6, 0x3f,
|
||||
0xa8, 0x16, 0x73, 0xbd, 0x16, 0x49, 0x70, 0x32, 0x98, 0xd7, 0x4d, 0x7d, 0x82, 0x52, 0x44, 0x18,
|
||||
0xaf, 0xb8, 0x1a, 0x04, 0x95, 0x63, 0x3d, 0xcd, 0x31, 0x49, 0xc8, 0x35, 0x06, 0x6f, 0x51, 0x44,
|
||||
0xd8, 0x28, 0x09, 0x59, 0x6a, 0x9a, 0x80, 0xcd, 0x16, 0x60, 0xc7, 0x87, 0x89, 0x7a, 0x66, 0x27,
|
||||
0x58, 0x36, 0x0c, 0xf9, 0xcb, 0x20, 0x3d, 0xbf, 0x4e, 0x25, 0x41, 0x06, 0x6e, 0x25, 0x3b, 0x31,
|
||||
0xcc, 0x57, 0x7a, 0xd5, 0x15, 0xa3, 0x8d, 0x63, 0x2c, 0xa6, 0x41, 0x81, 0xa9, 0x14, 0x6f, 0x01,
|
||||
0x55, 0x00, 0x07, 0x8d, 0xf7, 0x76, 0x85, 0x96, 0x21, 0x4f, 0x93, 0x98, 0x4b, 0x68, 0x43, 0xb7,
|
||||
0x92, 0x9d, 0x5f, 0x61, 0x76, 0x8a, 0x21, 0xe6, 0xf8, 0x11, 0x36, 0x06, 0x27, 0x87, 0x23, 0x6d,
|
||||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0xbd,
|
||||
0x28, 0xf0, 0xed, 0x46, 0xb0, 0x84, 0xc9, 0x56, 0x6b, 0xe7, 0x0a, 0x7c, 0x63, 0x5e, 0xd8, 0x56,
|
||||
0xf7, 0x81, 0x8c, 0x9f, 0xaf, 0xb1, 0x5e, 0x99, 0x68, 0xf4, 0x82, 0x4e, 0xf0, 0x3f, 0xc2, 0x81,
|
||||
0xd7, 0x64, 0x35, 0xbb, 0xdb, 0x51, 0x99, 0x15, 0xe1, 0x3b, 0xcd, 0x9c, 0xc0, 0x9c, 0x37, 0x68,
|
||||
0xca, 0xbe, 0x29, 0xef, 0x75, 0x10, 0xf8, 0x86, 0x5c, 0x4e, 0xf4, 0x95, 0x5f, 0x01, 0x69, 0xfc,
|
||||
0x12, 0x51, 0xb1, 0x68, 0xfe, 0x42, 0x78, 0x3c, 0xfb, 0x65, 0x2a, 0x8f, 0x1e, 0xc9, 0x3f, 0x97,
|
||||
0x7b, 0xf4, 0x2b, 0xfc, 0x87, 0x7f, 0x03, 0x00, 0x00, 0xff, 0xff, 0x85, 0x59, 0x8f, 0x67, 0x9c,
|
||||
0x0f, 0x00, 0x00,
|
||||
0x10, 0x86, 0x48, 0xc9, 0x96, 0x46, 0x72, 0x24, 0xad, 0xdd, 0x96, 0x65, 0x83, 0x42, 0x20, 0x72,
|
||||
0x48, 0x2f, 0x2e, 0xe0, 0x22, 0xa7, 0x9c, 0x14, 0xbb, 0x0e, 0xd4, 0x34, 0x08, 0xc0, 0xd8, 0x97,
|
||||
0x16, 0x2d, 0x40, 0x8b, 0x23, 0x66, 0x11, 0xfe, 0x85, 0xcb, 0x24, 0xf6, 0xa9, 0xc7, 0x9e, 0xfb,
|
||||
0x28, 0x7d, 0xb3, 0x3e, 0x42, 0xb1, 0xbb, 0x24, 0x77, 0xf9, 0xa3, 0x34, 0xa8, 0x1c, 0xe7, 0x24,
|
||||
0xce, 0x70, 0x35, 0x3b, 0xdf, 0xcc, 0x7c, 0x33, 0x43, 0x38, 0xdc, 0x64, 0x14, 0x63, 0xff, 0x7b,
|
||||
0xf9, 0x73, 0x9c, 0x66, 0x49, 0x9e, 0x90, 0x3d, 0x29, 0x39, 0xe7, 0x00, 0xa7, 0x49, 0x14, 0x25,
|
||||
0xb1, 0x8b, 0x2c, 0x25, 0xf7, 0x61, 0x84, 0x59, 0x96, 0x64, 0xa7, 0x89, 0x8f, 0x56, 0x6f, 0xd1,
|
||||
0x7b, 0x38, 0x70, 0x95, 0x82, 0xd8, 0x30, 0x14, 0xc2, 0x73, 0x16, 0x58, 0xc6, 0xa2, 0xf7, 0x70,
|
||||
0xe4, 0x56, 0xb2, 0xf3, 0x1b, 0xcc, 0x9f, 0x62, 0x7e, 0x2e, 0x8c, 0xb2, 0x55, 0xbc, 0x49, 0x5c,
|
||||
0x7c, 0x43, 0x66, 0x60, 0xbe, 0xa5, 0xbe, 0x30, 0x34, 0x72, 0xf9, 0x23, 0x59, 0xc0, 0xf8, 0x45,
|
||||
0x8a, 0x99, 0x97, 0xd3, 0x24, 0x5e, 0x9d, 0x15, 0x56, 0x74, 0x15, 0x39, 0x82, 0xc1, 0x45, 0xf2,
|
||||
0x1a, 0x63, 0xcb, 0x14, 0xef, 0xa4, 0xe0, 0x5c, 0x6b, 0xe6, 0xa5, 0xf5, 0x5d, 0xbc, 0x25, 0xdf,
|
||||
0x41, 0xff, 0xcc, 0xcb, 0x3d, 0x71, 0xc7, 0xf8, 0xe4, 0x8b, 0xe3, 0x22, 0x34, 0xd5, 0x15, 0xfc,
|
||||
0xa5, 0x2b, 0x8e, 0x38, 0x7f, 0x19, 0x70, 0x50, 0xd3, 0x77, 0xa0, 0x22, 0xd0, 0xa7, 0xeb, 0x24,
|
||||
0x2e, 0xae, 0x11, 0xcf, 0x5c, 0x17, 0x7b, 0x11, 0x16, 0x30, 0xc4, 0x33, 0xf9, 0x12, 0xf6, 0x02,
|
||||
0x8c, 0x7d, 0xcc, 0xac, 0xbe, 0xf0, 0xb6, 0x90, 0xb8, 0x3e, 0x4a, 0xae, 0x68, 0x88, 0xd6, 0x40,
|
||||
0x9c, 0x2e, 0x24, 0x1e, 0x8b, 0x2b, 0x9a, 0xe5, 0xaf, 0xac, 0x3d, 0x19, 0x0b, 0x21, 0x70, 0x2d,
|
||||
0x46, 0x1e, 0x0d, 0xad, 0x7d, 0xa9, 0x15, 0x02, 0xb9, 0x07, 0x06, 0x5e, 0x5b, 0x43, 0xa1, 0x32,
|
||||
0xf0, 0x9a, 0x58, 0xb0, 0xbf, 0x4e, 0xa2, 0x08, 0xe3, 0xdc, 0x1a, 0x09, 0x65, 0x29, 0xf2, 0xc0,
|
||||
0x50, 0x26, 0xf1, 0x58, 0x20, 0xfc, 0xa8, 0x64, 0xf2, 0x00, 0x0e, 0x28, 0x5b, 0xc5, 0x4f, 0x42,
|
||||
0x6f, 0xfd, 0xfa, 0x67, 0xca, 0x72, 0x6b, 0x2c, 0x0e, 0xd4, 0x95, 0xce, 0x35, 0x4c, 0x96, 0xbe,
|
||||
0x2f, 0xff, 0x72, 0xab, 0x79, 0x26, 0xdf, 0x02, 0xb8, 0xf8, 0xe6, 0x39, 0x32, 0xe6, 0x05, 0x28,
|
||||
0xa2, 0x34, 0x72, 0x35, 0x8d, 0xf3, 0x07, 0x4c, 0x57, 0x51, 0x9a, 0x64, 0xb9, 0xba, 0xdc, 0x82,
|
||||
0xfd, 0xb7, 0xd4, 0x17, 0xce, 0xf6, 0x16, 0x26, 0x07, 0x5a, 0x88, 0xff, 0xdb, 0x09, 0x1b, 0x86,
|
||||
0x2f, 0xde, 0xc7, 0x98, 0x5d, 0x52, 0xbf, 0x70, 0xa1, 0x92, 0x9d, 0x10, 0x66, 0x75, 0x07, 0x58,
|
||||
0x4a, 0x4e, 0x00, 0xd6, 0x15, 0x87, 0x44, 0x14, 0xc6, 0x27, 0xa4, 0xac, 0x29, 0xc5, 0x2e, 0x57,
|
||||
0x3b, 0xc5, 0x03, 0xbd, 0xf1, 0x68, 0x88, 0xfe, 0x65, 0xe1, 0x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5c, 0x07, 0x81, 0xb7, 0xe4, 0x72, 0xa2, 0xaf, 0xfc, 0x0a, 0x48, 0xe3,
|
||||
0x4b, 0x44, 0xc5, 0xa2, 0xf9, 0x85, 0xf0, 0x64, 0xfe, 0xcb, 0xf4, 0xb8, 0xf8, 0xfe, 0x7e, 0x2c,
|
||||
0x7f, 0xae, 0xf6, 0xc4, 0x77, 0xf8, 0x0f, 0xff, 0x06, 0x00, 0x00, 0xff, 0xff, 0x6e, 0xf2, 0x29,
|
||||
0xc4, 0x9e, 0x0f, 0x00, 0x00,
|
||||
}
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
syntax = "proto3";
|
||||
option go_package = "friend;friend";
|
||||
option go_package = "./friend;friend";
|
||||
package friend;
|
||||
|
||||
message CommonResp{
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// source: group/group.proto
|
||||
|
||||
package group // import "group"
|
||||
package group // import "./group"
|
||||
|
||||
import proto "github.com/golang/protobuf/proto"
|
||||
import fmt "fmt"
|
||||
@ -35,7 +35,7 @@ func (m *CommonResp) Reset() { *m = CommonResp{} }
|
||||
func (m *CommonResp) String() string { return proto.CompactTextString(m) }
|
||||
func (*CommonResp) ProtoMessage() {}
|
||||
func (*CommonResp) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_group_9fd4d73937974f0d, []int{0}
|
||||
return fileDescriptor_group_ed07d0078ff66bfe, []int{0}
|
||||
}
|
||||
func (m *CommonResp) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_CommonResp.Unmarshal(m, b)
|
||||
@ -87,7 +87,7 @@ func (m *CreateGroupReq) Reset() { *m = CreateGroupReq{} }
|
||||
func (m *CreateGroupReq) String() string { return proto.CompactTextString(m) }
|
||||
func (*CreateGroupReq) ProtoMessage() {}
|
||||
func (*CreateGroupReq) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_group_9fd4d73937974f0d, []int{1}
|
||||
return fileDescriptor_group_ed07d0078ff66bfe, []int{1}
|
||||
}
|
||||
func (m *CreateGroupReq) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_CreateGroupReq.Unmarshal(m, b)
|
||||
@ -175,7 +175,7 @@ func (m *GroupAddMemberInfo) Reset() { *m = GroupAddMemberInfo{} }
|
||||
func (m *GroupAddMemberInfo) String() string { return proto.CompactTextString(m) }
|
||||
func (*GroupAddMemberInfo) ProtoMessage() {}
|
||||
func (*GroupAddMemberInfo) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_group_9fd4d73937974f0d, []int{2}
|
||||
return fileDescriptor_group_ed07d0078ff66bfe, []int{2}
|
||||
}
|
||||
func (m *GroupAddMemberInfo) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_GroupAddMemberInfo.Unmarshal(m, b)
|
||||
@ -222,7 +222,7 @@ func (m *CreateGroupResp) Reset() { *m = CreateGroupResp{} }
|
||||
func (m *CreateGroupResp) String() string { return proto.CompactTextString(m) }
|
||||
func (*CreateGroupResp) ProtoMessage() {}
|
||||
func (*CreateGroupResp) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_group_9fd4d73937974f0d, []int{3}
|
||||
return fileDescriptor_group_ed07d0078ff66bfe, []int{3}
|
||||
}
|
||||
func (m *CreateGroupResp) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_CreateGroupResp.Unmarshal(m, b)
|
||||
@ -276,7 +276,7 @@ func (m *GetGroupsInfoReq) Reset() { *m = GetGroupsInfoReq{} }
|
||||
func (m *GetGroupsInfoReq) String() string { return proto.CompactTextString(m) }
|
||||
func (*GetGroupsInfoReq) ProtoMessage() {}
|
||||
func (*GetGroupsInfoReq) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_group_9fd4d73937974f0d, []int{4}
|
||||
return fileDescriptor_group_ed07d0078ff66bfe, []int{4}
|
||||
}
|
||||
func (m *GetGroupsInfoReq) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_GetGroupsInfoReq.Unmarshal(m, b)
|
||||
@ -330,7 +330,7 @@ func (m *GetGroupsInfoResp) Reset() { *m = GetGroupsInfoResp{} }
|
||||
func (m *GetGroupsInfoResp) String() string { return proto.CompactTextString(m) }
|
||||
func (*GetGroupsInfoResp) ProtoMessage() {}
|
||||
func (*GetGroupsInfoResp) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_group_9fd4d73937974f0d, []int{5}
|
||||
return fileDescriptor_group_ed07d0078ff66bfe, []int{5}
|
||||
}
|
||||
func (m *GetGroupsInfoResp) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_GetGroupsInfoResp.Unmarshal(m, b)
|
||||
@ -388,7 +388,7 @@ func (m *SetGroupInfoReq) Reset() { *m = SetGroupInfoReq{} }
|
||||
func (m *SetGroupInfoReq) String() string { return proto.CompactTextString(m) }
|
||||
func (*SetGroupInfoReq) ProtoMessage() {}
|
||||
func (*SetGroupInfoReq) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_group_9fd4d73937974f0d, []int{6}
|
||||
return fileDescriptor_group_ed07d0078ff66bfe, []int{6}
|
||||
}
|
||||
func (m *SetGroupInfoReq) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_SetGroupInfoReq.Unmarshal(m, b)
|
||||
@ -469,7 +469,7 @@ func (m *GetGroupApplicationListReq) Reset() { *m = GetGroupApplicationL
|
||||
func (m *GetGroupApplicationListReq) String() string { return proto.CompactTextString(m) }
|
||||
func (*GetGroupApplicationListReq) ProtoMessage() {}
|
||||
func (*GetGroupApplicationListReq) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_group_9fd4d73937974f0d, []int{7}
|
||||
return fileDescriptor_group_ed07d0078ff66bfe, []int{7}
|
||||
}
|
||||
func (m *GetGroupApplicationListReq) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_GetGroupApplicationListReq.Unmarshal(m, b)
|
||||
@ -529,7 +529,7 @@ func (m *GetGroupApplicationList_Data_User) Reset() { *m = GetGroupAppli
|
||||
func (m *GetGroupApplicationList_Data_User) String() string { return proto.CompactTextString(m) }
|
||||
func (*GetGroupApplicationList_Data_User) ProtoMessage() {}
|
||||
func (*GetGroupApplicationList_Data_User) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_group_9fd4d73937974f0d, []int{8}
|
||||
return fileDescriptor_group_ed07d0078ff66bfe, []int{8}
|
||||
}
|
||||
func (m *GetGroupApplicationList_Data_User) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_GetGroupApplicationList_Data_User.Unmarshal(m, b)
|
||||
@ -673,7 +673,7 @@ func (m *GetGroupApplicationListData) Reset() { *m = GetGroupApplication
|
||||
func (m *GetGroupApplicationListData) String() string { return proto.CompactTextString(m) }
|
||||
func (*GetGroupApplicationListData) ProtoMessage() {}
|
||||
func (*GetGroupApplicationListData) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_group_9fd4d73937974f0d, []int{9}
|
||||
return fileDescriptor_group_ed07d0078ff66bfe, []int{9}
|
||||
}
|
||||
func (m *GetGroupApplicationListData) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_GetGroupApplicationListData.Unmarshal(m, b)
|
||||
@ -720,7 +720,7 @@ func (m *GetGroupApplicationListResp) Reset() { *m = GetGroupApplication
|
||||
func (m *GetGroupApplicationListResp) String() string { return proto.CompactTextString(m) }
|
||||
func (*GetGroupApplicationListResp) ProtoMessage() {}
|
||||
func (*GetGroupApplicationListResp) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_group_9fd4d73937974f0d, []int{10}
|
||||
return fileDescriptor_group_ed07d0078ff66bfe, []int{10}
|
||||
}
|
||||
func (m *GetGroupApplicationListResp) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_GetGroupApplicationListResp.Unmarshal(m, b)
|
||||
@ -775,7 +775,7 @@ func (m *TransferGroupOwnerReq) Reset() { *m = TransferGroupOwnerReq{} }
|
||||
func (m *TransferGroupOwnerReq) String() string { return proto.CompactTextString(m) }
|
||||
func (*TransferGroupOwnerReq) ProtoMessage() {}
|
||||
func (*TransferGroupOwnerReq) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_group_9fd4d73937974f0d, []int{11}
|
||||
return fileDescriptor_group_ed07d0078ff66bfe, []int{11}
|
||||
}
|
||||
func (m *TransferGroupOwnerReq) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_TransferGroupOwnerReq.Unmarshal(m, b)
|
||||
@ -835,7 +835,7 @@ func (m *TransferGroupOwnerResp) Reset() { *m = TransferGroupOwnerResp{}
|
||||
func (m *TransferGroupOwnerResp) String() string { return proto.CompactTextString(m) }
|
||||
func (*TransferGroupOwnerResp) ProtoMessage() {}
|
||||
func (*TransferGroupOwnerResp) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_group_9fd4d73937974f0d, []int{12}
|
||||
return fileDescriptor_group_ed07d0078ff66bfe, []int{12}
|
||||
}
|
||||
func (m *TransferGroupOwnerResp) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_TransferGroupOwnerResp.Unmarshal(m, b)
|
||||
@ -883,7 +883,7 @@ func (m *JoinGroupReq) Reset() { *m = JoinGroupReq{} }
|
||||
func (m *JoinGroupReq) String() string { return proto.CompactTextString(m) }
|
||||
func (*JoinGroupReq) ProtoMessage() {}
|
||||
func (*JoinGroupReq) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_group_9fd4d73937974f0d, []int{13}
|
||||
return fileDescriptor_group_ed07d0078ff66bfe, []int{13}
|
||||
}
|
||||
func (m *JoinGroupReq) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_JoinGroupReq.Unmarshal(m, b)
|
||||
@ -956,7 +956,7 @@ func (m *GroupApplicationResponseReq) Reset() { *m = GroupApplicationRes
|
||||
func (m *GroupApplicationResponseReq) String() string { return proto.CompactTextString(m) }
|
||||
func (*GroupApplicationResponseReq) ProtoMessage() {}
|
||||
func (*GroupApplicationResponseReq) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_group_9fd4d73937974f0d, []int{14}
|
||||
return fileDescriptor_group_ed07d0078ff66bfe, []int{14}
|
||||
}
|
||||
func (m *GroupApplicationResponseReq) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_GroupApplicationResponseReq.Unmarshal(m, b)
|
||||
@ -1093,7 +1093,7 @@ func (m *GroupApplicationResponseResp) Reset() { *m = GroupApplicationRe
|
||||
func (m *GroupApplicationResponseResp) String() string { return proto.CompactTextString(m) }
|
||||
func (*GroupApplicationResponseResp) ProtoMessage() {}
|
||||
func (*GroupApplicationResponseResp) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_group_9fd4d73937974f0d, []int{15}
|
||||
return fileDescriptor_group_ed07d0078ff66bfe, []int{15}
|
||||
}
|
||||
func (m *GroupApplicationResponseResp) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_GroupApplicationResponseResp.Unmarshal(m, b)
|
||||
@ -1141,7 +1141,7 @@ func (m *SetOwnerGroupNickNameReq) Reset() { *m = SetOwnerGroupNickNameR
|
||||
func (m *SetOwnerGroupNickNameReq) String() string { return proto.CompactTextString(m) }
|
||||
func (*SetOwnerGroupNickNameReq) ProtoMessage() {}
|
||||
func (*SetOwnerGroupNickNameReq) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_group_9fd4d73937974f0d, []int{16}
|
||||
return fileDescriptor_group_ed07d0078ff66bfe, []int{16}
|
||||
}
|
||||
func (m *SetOwnerGroupNickNameReq) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_SetOwnerGroupNickNameReq.Unmarshal(m, b)
|
||||
@ -1202,7 +1202,7 @@ func (m *QuitGroupReq) Reset() { *m = QuitGroupReq{} }
|
||||
func (m *QuitGroupReq) String() string { return proto.CompactTextString(m) }
|
||||
func (*QuitGroupReq) ProtoMessage() {}
|
||||
func (*QuitGroupReq) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_group_9fd4d73937974f0d, []int{17}
|
||||
return fileDescriptor_group_ed07d0078ff66bfe, []int{17}
|
||||
}
|
||||
func (m *QuitGroupReq) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_QuitGroupReq.Unmarshal(m, b)
|
||||
@ -1262,7 +1262,7 @@ func (m *GroupApplicationUserInfo) Reset() { *m = GroupApplicationUserIn
|
||||
func (m *GroupApplicationUserInfo) String() string { return proto.CompactTextString(m) }
|
||||
func (*GroupApplicationUserInfo) ProtoMessage() {}
|
||||
func (*GroupApplicationUserInfo) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_group_9fd4d73937974f0d, []int{18}
|
||||
return fileDescriptor_group_ed07d0078ff66bfe, []int{18}
|
||||
}
|
||||
func (m *GroupApplicationUserInfo) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_GroupApplicationUserInfo.Unmarshal(m, b)
|
||||
@ -1360,7 +1360,7 @@ func (m *GroupMemberFullInfo) Reset() { *m = GroupMemberFullInfo{} }
|
||||
func (m *GroupMemberFullInfo) String() string { return proto.CompactTextString(m) }
|
||||
func (*GroupMemberFullInfo) ProtoMessage() {}
|
||||
func (*GroupMemberFullInfo) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_group_9fd4d73937974f0d, []int{19}
|
||||
return fileDescriptor_group_ed07d0078ff66bfe, []int{19}
|
||||
}
|
||||
func (m *GroupMemberFullInfo) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_GroupMemberFullInfo.Unmarshal(m, b)
|
||||
@ -1430,7 +1430,7 @@ func (m *GetGroupMemberListReq) Reset() { *m = GetGroupMemberListReq{} }
|
||||
func (m *GetGroupMemberListReq) String() string { return proto.CompactTextString(m) }
|
||||
func (*GetGroupMemberListReq) ProtoMessage() {}
|
||||
func (*GetGroupMemberListReq) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_group_9fd4d73937974f0d, []int{20}
|
||||
return fileDescriptor_group_ed07d0078ff66bfe, []int{20}
|
||||
}
|
||||
func (m *GetGroupMemberListReq) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_GetGroupMemberListReq.Unmarshal(m, b)
|
||||
@ -1499,7 +1499,7 @@ func (m *GetGroupMemberListResp) Reset() { *m = GetGroupMemberListResp{}
|
||||
func (m *GetGroupMemberListResp) String() string { return proto.CompactTextString(m) }
|
||||
func (*GetGroupMemberListResp) ProtoMessage() {}
|
||||
func (*GetGroupMemberListResp) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_group_9fd4d73937974f0d, []int{21}
|
||||
return fileDescriptor_group_ed07d0078ff66bfe, []int{21}
|
||||
}
|
||||
func (m *GetGroupMemberListResp) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_GetGroupMemberListResp.Unmarshal(m, b)
|
||||
@ -1561,7 +1561,7 @@ func (m *GetGroupMembersInfoReq) Reset() { *m = GetGroupMembersInfoReq{}
|
||||
func (m *GetGroupMembersInfoReq) String() string { return proto.CompactTextString(m) }
|
||||
func (*GetGroupMembersInfoReq) ProtoMessage() {}
|
||||
func (*GetGroupMembersInfoReq) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_group_9fd4d73937974f0d, []int{22}
|
||||
return fileDescriptor_group_ed07d0078ff66bfe, []int{22}
|
||||
}
|
||||
func (m *GetGroupMembersInfoReq) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_GetGroupMembersInfoReq.Unmarshal(m, b)
|
||||
@ -1622,7 +1622,7 @@ func (m *GetGroupMembersInfoResp) Reset() { *m = GetGroupMembersInfoResp
|
||||
func (m *GetGroupMembersInfoResp) String() string { return proto.CompactTextString(m) }
|
||||
func (*GetGroupMembersInfoResp) ProtoMessage() {}
|
||||
func (*GetGroupMembersInfoResp) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_group_9fd4d73937974f0d, []int{23}
|
||||
return fileDescriptor_group_ed07d0078ff66bfe, []int{23}
|
||||
}
|
||||
func (m *GetGroupMembersInfoResp) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_GetGroupMembersInfoResp.Unmarshal(m, b)
|
||||
@ -1678,7 +1678,7 @@ func (m *KickGroupMemberReq) Reset() { *m = KickGroupMemberReq{} }
|
||||
func (m *KickGroupMemberReq) String() string { return proto.CompactTextString(m) }
|
||||
func (*KickGroupMemberReq) ProtoMessage() {}
|
||||
func (*KickGroupMemberReq) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_group_9fd4d73937974f0d, []int{24}
|
||||
return fileDescriptor_group_ed07d0078ff66bfe, []int{24}
|
||||
}
|
||||
func (m *KickGroupMemberReq) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_KickGroupMemberReq.Unmarshal(m, b)
|
||||
@ -1745,7 +1745,7 @@ func (m *Id2Result) Reset() { *m = Id2Result{} }
|
||||
func (m *Id2Result) String() string { return proto.CompactTextString(m) }
|
||||
func (*Id2Result) ProtoMessage() {}
|
||||
func (*Id2Result) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_group_9fd4d73937974f0d, []int{25}
|
||||
return fileDescriptor_group_ed07d0078ff66bfe, []int{25}
|
||||
}
|
||||
func (m *Id2Result) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_Id2Result.Unmarshal(m, b)
|
||||
@ -1792,7 +1792,7 @@ func (m *KickGroupMemberResp) Reset() { *m = KickGroupMemberResp{} }
|
||||
func (m *KickGroupMemberResp) String() string { return proto.CompactTextString(m) }
|
||||
func (*KickGroupMemberResp) ProtoMessage() {}
|
||||
func (*KickGroupMemberResp) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_group_9fd4d73937974f0d, []int{26}
|
||||
return fileDescriptor_group_ed07d0078ff66bfe, []int{26}
|
||||
}
|
||||
func (m *KickGroupMemberResp) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_KickGroupMemberResp.Unmarshal(m, b)
|
||||
@ -1845,7 +1845,7 @@ func (m *GetJoinedGroupListReq) Reset() { *m = GetJoinedGroupListReq{} }
|
||||
func (m *GetJoinedGroupListReq) String() string { return proto.CompactTextString(m) }
|
||||
func (*GetJoinedGroupListReq) ProtoMessage() {}
|
||||
func (*GetJoinedGroupListReq) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_group_9fd4d73937974f0d, []int{27}
|
||||
return fileDescriptor_group_ed07d0078ff66bfe, []int{27}
|
||||
}
|
||||
func (m *GetJoinedGroupListReq) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_GetJoinedGroupListReq.Unmarshal(m, b)
|
||||
@ -1897,7 +1897,7 @@ func (m *GroupInfo) Reset() { *m = GroupInfo{} }
|
||||
func (m *GroupInfo) String() string { return proto.CompactTextString(m) }
|
||||
func (*GroupInfo) ProtoMessage() {}
|
||||
func (*GroupInfo) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_group_9fd4d73937974f0d, []int{28}
|
||||
return fileDescriptor_group_ed07d0078ff66bfe, []int{28}
|
||||
}
|
||||
func (m *GroupInfo) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_GroupInfo.Unmarshal(m, b)
|
||||
@ -1986,7 +1986,7 @@ func (m *GetJoinedGroupListResp) Reset() { *m = GetJoinedGroupListResp{}
|
||||
func (m *GetJoinedGroupListResp) String() string { return proto.CompactTextString(m) }
|
||||
func (*GetJoinedGroupListResp) ProtoMessage() {}
|
||||
func (*GetJoinedGroupListResp) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_group_9fd4d73937974f0d, []int{29}
|
||||
return fileDescriptor_group_ed07d0078ff66bfe, []int{29}
|
||||
}
|
||||
func (m *GetJoinedGroupListResp) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_GetJoinedGroupListResp.Unmarshal(m, b)
|
||||
@ -2042,7 +2042,7 @@ func (m *InviteUserToGroupReq) Reset() { *m = InviteUserToGroupReq{} }
|
||||
func (m *InviteUserToGroupReq) String() string { return proto.CompactTextString(m) }
|
||||
func (*InviteUserToGroupReq) ProtoMessage() {}
|
||||
func (*InviteUserToGroupReq) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_group_9fd4d73937974f0d, []int{30}
|
||||
return fileDescriptor_group_ed07d0078ff66bfe, []int{30}
|
||||
}
|
||||
func (m *InviteUserToGroupReq) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_InviteUserToGroupReq.Unmarshal(m, b)
|
||||
@ -2110,7 +2110,7 @@ func (m *InviteUserToGroupResp) Reset() { *m = InviteUserToGroupResp{} }
|
||||
func (m *InviteUserToGroupResp) String() string { return proto.CompactTextString(m) }
|
||||
func (*InviteUserToGroupResp) ProtoMessage() {}
|
||||
func (*InviteUserToGroupResp) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_group_9fd4d73937974f0d, []int{31}
|
||||
return fileDescriptor_group_ed07d0078ff66bfe, []int{31}
|
||||
}
|
||||
func (m *InviteUserToGroupResp) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_InviteUserToGroupResp.Unmarshal(m, b)
|
||||
@ -2164,7 +2164,7 @@ func (m *GetGroupAllMemberReq) Reset() { *m = GetGroupAllMemberReq{} }
|
||||
func (m *GetGroupAllMemberReq) String() string { return proto.CompactTextString(m) }
|
||||
func (*GetGroupAllMemberReq) ProtoMessage() {}
|
||||
func (*GetGroupAllMemberReq) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_group_9fd4d73937974f0d, []int{32}
|
||||
return fileDescriptor_group_ed07d0078ff66bfe, []int{32}
|
||||
}
|
||||
func (m *GetGroupAllMemberReq) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_GetGroupAllMemberReq.Unmarshal(m, b)
|
||||
@ -2218,7 +2218,7 @@ func (m *GetGroupAllMemberResp) Reset() { *m = GetGroupAllMemberResp{} }
|
||||
func (m *GetGroupAllMemberResp) String() string { return proto.CompactTextString(m) }
|
||||
func (*GetGroupAllMemberResp) ProtoMessage() {}
|
||||
func (*GetGroupAllMemberResp) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_group_9fd4d73937974f0d, []int{33}
|
||||
return fileDescriptor_group_ed07d0078ff66bfe, []int{33}
|
||||
}
|
||||
func (m *GetGroupAllMemberResp) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_GetGroupAllMemberResp.Unmarshal(m, b)
|
||||
@ -2799,116 +2799,116 @@ var _Group_serviceDesc = grpc.ServiceDesc{
|
||||
Metadata: "group/group.proto",
|
||||
}
|
||||
|
||||
func init() { proto.RegisterFile("group/group.proto", fileDescriptor_group_9fd4d73937974f0d) }
|
||||
func init() { proto.RegisterFile("group/group.proto", fileDescriptor_group_ed07d0078ff66bfe) }
|
||||
|
||||
var fileDescriptor_group_9fd4d73937974f0d = []byte{
|
||||
// 1717 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x59, 0xcd, 0x6e, 0xdc, 0x46,
|
||||
0x12, 0x06, 0x67, 0x38, 0x92, 0xa6, 0xf4, 0xdf, 0xb2, 0x64, 0xee, 0x58, 0x2b, 0xc8, 0xbd, 0xc6,
|
||||
0x42, 0xd8, 0x83, 0x17, 0x90, 0x91, 0x00, 0x4e, 0x7c, 0x88, 0x2d, 0x59, 0xb2, 0x9c, 0x58, 0xb2,
|
||||
0x29, 0xf9, 0x92, 0x8b, 0x4d, 0x0f, 0x5b, 0x63, 0x5a, 0x33, 0xe4, 0x88, 0xe4, 0xc4, 0x4e, 0x2e,
|
||||
0x81, 0x83, 0x00, 0xf9, 0x43, 0x90, 0x83, 0x4f, 0x49, 0x5e, 0x20, 0xa7, 0x3c, 0x41, 0xde, 0x26,
|
||||
0x2f, 0x12, 0x74, 0xf5, 0x0f, 0x9b, 0x7f, 0x23, 0x43, 0x0a, 0xe2, 0xcb, 0x80, 0x55, 0x5d, 0xdd,
|
||||
0x5d, 0x55, 0x5d, 0xf5, 0x75, 0x55, 0x0f, 0x2c, 0xf6, 0xe2, 0x68, 0x34, 0xfc, 0x3f, 0xfe, 0x5e,
|
||||
0x1f, 0xc6, 0x51, 0x1a, 0x91, 0x16, 0x12, 0x74, 0x07, 0x60, 0x2b, 0x1a, 0x0c, 0xa2, 0xd0, 0x65,
|
||||
0xc9, 0x90, 0xac, 0x42, 0xfb, 0x6e, 0x1c, 0x47, 0xf1, 0x56, 0xe4, 0x33, 0xc7, 0x5a, 0xb7, 0x36,
|
||||
0x5a, 0x6e, 0xc6, 0x20, 0x1d, 0x98, 0x42, 0xe2, 0x41, 0xd2, 0x73, 0x1a, 0xeb, 0xd6, 0x46, 0xdb,
|
||||
0xd5, 0x34, 0x7d, 0xd3, 0x80, 0xb9, 0xad, 0x98, 0x79, 0x29, 0xdb, 0xe5, 0xeb, 0xba, 0xec, 0x94,
|
||||
0xdc, 0x04, 0x18, 0xb0, 0xc1, 0x33, 0x16, 0x7f, 0x12, 0x24, 0xa9, 0x63, 0xad, 0x37, 0x37, 0xa6,
|
||||
0x37, 0xff, 0x75, 0x5d, 0xe8, 0x80, 0x42, 0xb7, 0x7d, 0xff, 0x01, 0x0a, 0xec, 0x85, 0xc7, 0x91,
|
||||
0x6b, 0x08, 0x73, 0x3d, 0x50, 0x6e, 0xdf, 0x1b, 0x30, 0xb9, 0x55, 0xc6, 0x20, 0x14, 0x66, 0x82,
|
||||
0x30, 0x8d, 0x23, 0x7f, 0xd4, 0x4d, 0x83, 0x28, 0x74, 0x9a, 0x28, 0x90, 0xe3, 0x71, 0x99, 0x30,
|
||||
0x4a, 0x83, 0xe3, 0xa0, 0xeb, 0xa1, 0x8c, 0x2d, 0x64, 0x4c, 0x1e, 0x71, 0x60, 0xf2, 0xd8, 0xeb,
|
||||
0xb2, 0xc7, 0x71, 0xdf, 0x69, 0xe1, 0xb0, 0x22, 0xc9, 0x25, 0x68, 0xa5, 0xd1, 0x09, 0x0b, 0x9d,
|
||||
0x09, 0xe4, 0x0b, 0x82, 0xac,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5, 0x03, 0x63, 0x45, 0x61, 0xa9, 0xc9, 0xa2, 0x3f, 0xdb, 0x70, 0xb5, 0x66,
|
||||
0xc9, 0x27, 0xdb, 0x5e, 0xea, 0x3d, 0x79, 0x9c, 0xb0, 0x98, 0x47, 0xbe, 0x5e, 0xb8, 0xb1, 0xb7,
|
||||
0xcd, 0x2d, 0xdb, 0x95, 0x9e, 0x15, 0x6b, 0x2a, 0x92, 0xac, 0x01, 0xec, 0xc4, 0xd1, 0x80, 0xcf,
|
||||
0xd2, 0xd1, 0x61, 0x70, 0xf8, 0x49, 0x1f, 0x45, 0x72, 0x54, 0xf8, 0x4c, 0xd3, 0x84, 0x80, 0xbd,
|
||||
0xd3, 0xf7, 0x7a, 0xe8, 0xac, 0x96, 0x8b, 0xdf, 0x7c, 0x3d, 0x97, 0x9d, 0x8e, 0x58, 0x92, 0xf2,
|
||||
0xd8, 0x10, 0xee, 0x32, 0x38, 0x7c, 0xfc, 0x9e, 0x17, 0xfa, 0x7d, 0xe6, 0xf3, 0x71, 0xe1, 0x32,
|
||||
0x83, 0xc3, 0x35, 0xbd, 0xed, 0xfb, 0x47, 0xc1, 0x80, 0x61, 0xe2, 0x36, 0x5d, 0x45, 0x92, 0xff,
|
||||
0xc1, 0x82, 0xd2, 0x6b, 0x3f, 0xe8, 0x9e, 0x84, 0x3c, 0x14, 0xda, 0x38, 0xbf, 0xc4, 0x27, 0xff,
|
||||
0x85, 0x39, 0xa1, 0xa5, 0x96, 0x04, 0x94, 0x2c, 0x70, 0xc9, 0x06, 0xcc, 0xab, 0xb9, 0x3b, 0xf2,
|
||||
0xe4, 0xa7, 0x51, 0xb0, 0xc8, 0x26, 0xd7, 0x60, 0x56, 0xcc, 0x55, 0x72, 0x33, 0x28, 0x97, 0x67,
|
||||
0xf2, 0xf3, 0x93, 0xb6, 0x70, 0xae, 0x33, 0x2b, 0xce, 0xcf, 0x60, 0x71, 0x9f, 0x1d, 0x7d, 0x3e,
|
||||
0x64, 0xce, 0x9c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, 0x24, 0xf1, 0x7a, 0x0a, 0x24, 0x15, 0x99, 0x01, 0x58, 0xb3, 0x00, 0x60, 0x67, 0xd8, 0xf1,
|
||||
0x9d, 0x0d, 0x57, 0x8a, 0x8e, 0xe7, 0x66, 0x44, 0x61, 0xc2, 0xe4, 0xad, 0x64, 0xae, 0x60, 0x95,
|
||||
0x56, 0xe0, 0x3a, 0xa1, 0xf1, 0x19, 0xf4, 0x48, 0xd2, 0x3c, 0x97, 0xe6, 0x38, 0x50, 0xb2, 0x4b,
|
||||
0xa0, 0x54, 0x80, 0x02, 0xbc, 0x15, 0x5a, 0x65, 0x28, 0xd8, 0xaf, 0x49, 0xf1, 0x89, 0xea, 0x14,
|
||||
0x37, 0xa1, 0x6e, 0xb2, 0x00, 0x75, 0x39, 0x40, 0xc1, 0xfd, 0xa6, 0x8a, 0x80, 0x82, 0xbb, 0x95,
|
||||
0x60, 0xa2, 0x5d, 0x05, 0x13, 0x06, 0xc8, 0x41, 0x1e, 0xe4, 0xf2, 0xf0, 0x39, 0x7d, 0x06, 0x7c,
|
||||
0xce, 0x94, 0xe0, 0x53, 0xc1, 0xcb, 0xec, 0x18, 0x78, 0x99, 0x7b, 0x0b, 0x78, 0x99, 0xaf, 0x80,
|
||||
0x97, 0x87, 0xb0, 0x5a, 0x1f, 0x0a, 0xe7, 0x8a, 0xec, 0x6f, 0x2d, 0x70, 0x0e, 0x59, 0x8a, 0x01,
|
||||
0x81, 0x4b, 0x2b, 0x3f, 0x8e, 0x0f, 0xf3, 0x0e, 0x4c, 0x85, 0xea, 0x18, 0x64, 0xda, 0x2a, 0xba,
|
||||
0x18, 0x90, 0xcd, 0x72, 0x40, 0xea, 0x54, 0xb0, 0x8d, 0x54, 0xa0, 0x4f, 0x61, 0xe6, 0xd1, 0x28,
|
||||
0x48, 0xdf, 0x22, 0xc9, 0x0a, 0xb7, 0x7e, 0xa3, 0x5c, 0x77, 0x56, 0x26, 0x1b, 0xfd, 0xba, 0x01,
|
||||
0x4e, 0xd1, 0x7f, 0x18, 0x5d, 0xbc, 0x08, 0xad, 0xdf, 0x4e, 0x96, 0xa7, 0x8d, 0xac, 0x3c, 0x25,
|
||||
0x60, 0xe3, 0x95, 0x26, 0x56, 0xc7, 0x6f, 0xce, 0x0b, 0xba, 0xba, 0xac, 0xc1, 0x6f, 0xee, 0xf5,
|
||||
0x98, 0x9d, 0x72, 0xaf, 0x8b, 0xdc, 0x90, 0x14, 0xcf, 0x08, 0x2f, 0x53, 0x01, 0xa3, 0x70, 0x02,
|
||||
0xa3, 0xb0, 0xc8, 0xe6, 0xab, 0x1e, 0xf3, 0x0b, 0x7e, 0x52, 0x44, 0xd3, 0xb1, 0xbc, 0xe0, 0x85,
|
||||
0xad, 0x11, 0xcf, 0x13, 0x91, 0x05, 0x06, 0x87, 0x8f, 0x3f, 0xcf, 0x22, 0x54, 0x84, 0xbf, 0xc1,
|
||||
0xa1, 0x6f, 0x2c, 0x58, 0x42, 0x37, 0x88, 0x12, 0x7c, 0x67, 0xd4, 0xef, 0xa3, 0x07, 0x56, 0x60,
|
||||
0x62, 0xc4, 0xbd, 0xa1, 0x2a, 0x71, 0x49, 0x71, 0x1d, 0xe2, 0xac, 0x12, 0xc7, 0x6f, 0x1e, 0x00,
|
||||
0x2f, 0xa2, 0x40, 0xa8, 0xce, 0xbd, 0x60, 0xbb, 0x9a, 0xce, 0x05, 0x87, 0x5d, 0x08, 0x8e, 0xda,
|
||||
0x02, 0x8f, 0xfe, 0x6a, 0xc1, 0xb2, 0xba, 0x63, 0x1e, 0xe8, 0xce, 0x67, 0x7c, 0x20, 0x9c, 0xb3,
|
||||
0xde, 0xe6, 0x96, 0x1e, 0x07, 0xfd, 0x94, 0xc5, 0xa8, 0x5f, 0xcb, 0x95, 0x14, 0xdf, 0x29, 0x64,
|
||||
0xaf, 0xd2, 0x43, 0x76, 0x2a, 0x2b, 0x2a, 0x45, 0xd2, 0xdf, 0x2c, 0x58, 0xa9, 0xd2, 0x4e, 0xd4,
|
||||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b, 0xd0, 0x3e, 0x55,
|
||||
0xf5, 0xa4, 0x9e, 0x64, 0x56, 0x98, 0x55, 0x93, 0xee, 0xc0, 0x6c, 0xcf, 0x7c, 0x89, 0x23, 0x97,
|
||||
0x0b, 0xed, 0xaf, 0xba, 0x4b, 0x3b, 0x4e, 0xf5, 0x40, 0x32, 0x24, 0x37, 0x61, 0x26, 0x31, 0xde,
|
||||
0xd5, 0x88, 0xb2, 0xaa, 0xf0, 0xd8, 0x56, 0xb5, 0xfd, 0x53, 0xb8, 0xdc, 0xab, 0xee, 0xb3, 0xc9,
|
||||
0xd5, 0xf1, 0x7d, 0x38, 0x5f, 0x90, 0x9e, 0x25, 0x92, 0x0c, 0xc9, 0x23, 0x20, 0x69, 0xa9, 0x2d,
|
||||
0x26, 0xab, 0x72, 0x66, 0x65, 0xfb, 0xde, 0xf9, 0xf7, 0x98, 0xd1, 0x64, 0x48, 0xba, 0xe0, 0xf4,
|
||||
0x6a, 0xba, 0x12, 0x42, 0x73, 0xef, 0xdb, 0x95, 0x1d, 0x6c, 0xe7, 0x3f, 0x67, 0xca, 0x08, 0xbd,
|
||||
0x7b, 0xa5, 0xfa, 0x4b, 0xeb, 0x5d, 0x59, 0x38, 0x6a, 0xbd, 0x6b, 0x0a, 0xb7, 0x23, 0x58, 0xea,
|
||||
0x95, 0x4b, 0x13, 0x52, 0x3d, 0x4b, 0x9f, 0xfb, 0xda, 0xb8, 0xe1, 0x64, 0x48, 0xee, 0xc1, 0xfc,
|
||||
0x49, 0xfe, 0xa6, 0x25, 0xea, 0x91, 0xbf, 0x5c, 0x76, 0x74, 0x3a, 0x75, 0x43, 0xda, 0xe4, 0x02,
|
||||
0xb8, 0x6b, 0x93, 0x2b, 0x6f, 0x53, 0x6d, 0x72, 0xcd, 0xad, 0xb0, 0x0f, 0x8b, 0x25, 0x34, 0x24,
|
||||
0x57, 0xe4, 0x9c, 0x2a, 0x10, 0xef, 0xac, 0xd6, 0x0f, 0x8a, 0xf5, 0x7a, 0x45, 0xbc, 0xd1, 0xeb,
|
||||
0x55, 0x81, 0x5e, 0x67, 0xb5, 0x7e, 0x30, 0x19, 0xde, 0x99, 0xfd, 0x54, 0xbc, 0xa7, 0x7f, 0x88,
|
||||
0xbf, 0xcf, 0x26, 0xf0, 0xaf, 0x99, 0x1b, 0x7f, 0x05, 0x00, 0x00, 0xff, 0xff, 0x31, 0x19, 0x23,
|
||||
0x3c, 0xaf, 0x19, 0x00, 0x00,
|
||||
var fileDescriptor_group_ed07d0078ff66bfe = []byte{
|
||||
// 1718 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x59, 0xcd, 0x6e, 0xdc, 0xb6,
|
||||
0x13, 0x87, 0x76, 0xb5, 0xb6, 0x77, 0xfc, 0x4d, 0xc7, 0x8e, 0xfe, 0x8a, 0xff, 0x86, 0xc3, 0x06,
|
||||
0x85, 0xd1, 0x83, 0x0b, 0x38, 0x68, 0x81, 0xb4, 0x39, 0x34, 0xb1, 0x63, 0xc7, 0x69, 0x63, 0x27,
|
||||
0xb2, 0x73, 0xe9, 0x25, 0x51, 0x56, 0xf4, 0x46, 0xf1, 0xae, 0xb4, 0x96, 0xb4, 0x4d, 0xda, 0x4b,
|
||||
0x91, 0xa2, 0x40, 0xbf, 0x50, 0xf4, 0x90, 0x53, 0xdb, 0x17, 0xe8, 0xa9, 0x4f, 0xd0, 0xb7, 0xe9,
|
||||
0x8b, 0x14, 0x1c, 0x92, 0x12, 0xf5, 0xb5, 0x1b, 0xd8, 0x45, 0x73, 0x59, 0x68, 0x86, 0x43, 0x72,
|
||||
0x66, 0x38, 0xf3, 0xe3, 0x0c, 0x17, 0x16, 0xbb, 0x51, 0x38, 0x1c, 0xbc, 0x8f, 0xbf, 0x9b, 0x83,
|
||||
0x28, 0x4c, 0x42, 0xd2, 0x42, 0x82, 0xee, 0x02, 0x6c, 0x87, 0xfd, 0x7e, 0x18,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xa4, 0x9f, 0x00, 0x29, 0x5b,
|
||||
0x4a, 0x16, 0xa0, 0x39, 0xf4, 0x3d, 0xf4, 0x6f, 0xdb, 0xe1, 0x9f, 0x5c, 0x93, 0x98, 0x25, 0x4e,
|
||||
0xd8, 0x13, 0xd6, 0xb6, 0x1c, 0x45, 0x52, 0x06, 0xf3, 0x39, 0xb7, 0x5e, 0xe4, 0x90, 0xf8, 0x36,
|
||||
0xe8, 0xc5, 0xfd, 0x1d, 0xe9, 0x33, 0x45, 0xd2, 0x1e, 0x2c, 0xec, 0xb1, 0x04, 0xf7, 0x88, 0xf1,
|
||||
0x34, 0xd8, 0x19, 0x37, 0x57, 0x0e, 0xa7, 0x07, 0xd8, 0x76, 0x74, 0x56, 0xe6, 0xa6, 0xc6, 0x08,
|
||||
0x37, 0x35, 0x4b, 0x6e, 0xa2, 0x31, 0x2c, 0x16, 0x76, 0xbb, 0x90, 0x59, 0xd7, 0xc0, 0xf4, 0xdc,
|
||||
0xc4, 0xb5, 0x9a, 0x18, 0x62, 0x0b, 0x7a, 0x88, 0xe1, 0xea, 0x38, 0x4a, 0xff, 0x36, 0x60, 0xfe,
|
||||
0x48, 0xee, 0xaa, 0x4c, 0xd4, 0x1c, 0x62, 0xe4, 0x1c, 0x32, 0x3e, 0x02, 0x73, 0xd1, 0xd5, 0xac,
|
||||
0x88, 0xae, 0x62, 0x94, 0x9a, 0x15, 0x51, 0xfa, 0xaf, 0x47, 0x20, 0x7d, 0x00, 0xb6, 0x72, 0xed,
|
||||
0xad, 0xc1, 0xa0, 0x27, 0x95, 0xe1, 0xa7, 0xc5, 0xed, 0x5d, 0x80, 0xe6, 0xa3, 0xd4, 0x56, 0xfe,
|
||||
0xc9, 0x57, 0x3c, 0xd4, 0x56, 0x14, 0x96, 0xea, 0x2c, 0xfa, 0xab, 0x09, 0x57, 0x6b, 0x96, 0x7c,
|
||||
0xbc, 0xe3, 0x26, 0xee, 0xe3, 0x47, 0x31, 0x8b, 0x78, 0xe4, 0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 0xd8, 0x4b, 0xac, 0x05, 0x5d, 0x46, 0xf0, 0xe8, 0x19,
|
||||
0x5c, 0xa9, 0x09, 0x0d, 0x1e, 0x19, 0x3c, 0x88, 0xb7, 0xc3, 0x61, 0x90, 0xc8, 0x74, 0x16, 0x04,
|
||||
0xb9, 0x09, 0x26, 0xea, 0xda, 0xc0, 0x74, 0xdd, 0x50, 0xe9, 0x3a, 0x2e, 0xc4, 0x1c, 0x9c, 0x45,
|
||||
0xbf, 0x33, 0x6a, 0xf7, 0x44, 0x18, 0xb1, 0x60, 0xf2, 0x4e, 0xa4, 0x83, 0x88, 0x22, 0xc9, 0x0a,
|
||||
0x4c, 0xdc, 0x89, 0x34, 0x00, 0x91, 0x14, 0xf9, 0x10, 0xcc, 0x1d, 0x01, 0x1f, 0xc6, 0xc6, 0xf4,
|
||||
0x16, 0x1d, 0xad, 0x0f, 0x97, 0x74, 0x50, 0x9e, 0xfe, 0x64, 0xc0, 0xf2, 0x71, 0xe4, 0x06, 0xf1,
|
||||
0x09, 0x8b, 0x50, 0xf4, 0xf0, 0x45, 0xc0, 0x22, 0x09, 0x2b, 0x7b, 0x79, 0x58, 0x51, 0xc1, 0x6f,
|
||||
0xc3, 0xd4, 0x61, 0xcf, 0x43, 0x41, 0x05, 0x63, 0x8a, 0xe6, 0x63, 0x07, 0xec, 0x85, 0x18, 0x13,
|
||||
0x69, 0x91, 0xd2, 0xc5, 0x34, 0x35, 0xcb, 0x69, 0x7a, 0x0f, 0x56, 0xaa, 0x94, 0x39, 0x8f, 0x47,
|
||||
0xe8, 0x57, 0x30, 0x73, 0x2f, 0xf4, 0x83, 0xf4, 0x26, 0xaf, 0x87, 0x49, 0x0b, 0x26, 0xfb, 0x2c,
|
||||
0x8e, 0xdd, 0xae, 0x02, 0x49, 0x45, 0x66, 0x00, 0xd6, 0x2c, 0x00, 0xd8, 0x18, 0x3b, 0x7e, 0x30,
|
||||
0xe1, 0x4a, 0xd1, 0xf1, 0xdc, 0x8c, 0x30, 0x88, 0x99, 0xbc, 0x95, 0xf4, 0x15, 0x8c, 0xd2, 0x0a,
|
||||
0x5c, 0x27, 0x34, 0x3e, 0x83, 0x1e, 0x49, 0xea, 0xe7, 0xd2, 0x1c, 0x05, 0x4a, 0x66, 0x09, 0x94,
|
||||
0x0a, 0x50, 0x80, 0xb7, 0x42, 0xab, 0x0c, 0x05, 0x07, 0x35, 0x29, 0x3e, 0x51, 0x9d, 0xe2, 0x3a,
|
||||
0xd4, 0x4d, 0x16, 0xa0, 0x2e, 0x07, 0x28, 0xb8, 0xdf, 0x54, 0x11, 0x50, 0x70, 0xb7, 0x12, 0x4c,
|
||||
0xb4, 0xab, 0x60, 0x42, 0x03, 0x39, 0xc8, 0x83, 0x5c, 0x1e, 0x3e, 0xa7, 0xc7, 0xc0, 0xe7, 0x4c,
|
||||
0x09, 0x3e, 0x15, 0xbc, 0xcc, 0x8e, 0x80, 0x97, 0xb9, 0x37, 0x80, 0x97, 0xf9, 0x0a, 0x78, 0x79,
|
||||
0x00, 0xab, 0xf5, 0xa1, 0x70, 0xae, 0xc8, 0xfe, 0xde, 0x00, 0xeb, 0x88, 0x25, 0x18, 0x10, 0xb8,
|
||||
0xb4, 0xf2, 0xe3, 0xe8, 0x30, 0xb7, 0x61, 0x2a, 0x50, 0xc7, 0x20, 0xd3, 0x56, 0xd1, 0xc5, 0x80,
|
||||
0x6c, 0x96, 0x03, 0x32, 0x4d, 0x05, 0x53, 0x4b, 0x05, 0xfa, 0x04, 0x66, 0x1e, 0x0e, 0xfd, 0xe4,
|
||||
0x0d, 0x92, 0xac, 0x70, 0xeb, 0x37, 0xca, 0x75, 0x67, 0x65, 0xb2, 0xd1, 0x6f, 0x1b, 0x60, 0x15,
|
||||
0xfd, 0x87, 0xd1, 0xc5, 0x8b, 0xd0, 0xfa, 0xed, 0x64, 0x79, 0xda, 0xc8, 0xca, 0x53, 0x02, 0x26,
|
||||
0x5e, 0x69, 0x62, 0x75, 0xfc, 0xe6, 0x3c, 0xbf, 0x93, 0x96, 0x35, 0xf8, 0xcd, 0xbd, 0x1e, 0xb1,
|
||||
0x33, 0xee, 0x75, 0x91, 0x1b, 0x92, 0xe2, 0x19, 0xe1, 0x66, 0x2a, 0x60, 0x14, 0x4e, 0x60, 0x14,
|
||||
0x16, 0xd9, 0x7c, 0xd5, 0x13, 0x7e, 0xc1, 0x4f, 0x8a, 0x68, 0x3a, 0x91, 0x17, 0xbc, 0xb0, 0x35,
|
||||
0xe4, 0x79, 0x22, 0xb2, 0x40, 0xe3, 0xf0, 0xf1, 0x67, 0x59, 0x84, 0x8a, 0xf0, 0xd7, 0x38, 0xf4,
|
||||
0xb5, 0x01, 0x4b, 0xe8, 0x06, 0x51, 0x82, 0xef, 0x0e, 0x7b, 0x3d, 0xf4, 0xc0, 0x0a, 0x4c, 0x0c,
|
||||
0xb9, 0x37, 0x54, 0x25, 0x2e, 0x29, 0xae, 0x43, 0x94, 0x55, 0xe2, 0xf8, 0xcd, 0x03, 0xe0, 0x79,
|
||||
0xe8, 0x0b, 0xd5, 0xb9, 0x17, 0x4c, 0x27, 0xa5, 0x73, 0xc1, 0x61, 0x16, 0x82, 0xa3, 0xb6, 0xc0,
|
||||
0xa3, 0xbf, 0x1b, 0xb0, 0xac, 0xee, 0x98, 0xfb, 0x69, 0xe7, 0x33, 0x3a, 0x10, 0xce, 0x59, 0x6f,
|
||||
0x73, 0x4b, 0x4f, 0xfc, 0x5e, 0xc2, 0x22, 0xd4, 0xaf, 0xe5, 0x48, 0x8a, 0xef, 0x14, 0xb0, 0x97,
|
||||
0xc9, 0x11, 0x3b, 0x93, 0x15, 0x95, 0x22, 0xe9, 0x1f, 0x06, 0xac, 0x54, 0x69, 0x27, 0xea, 0x74,
|
||||
0x56, 0xac, 0xd3, 0x99, 0x5e, 0xa7, 0xb3, 0x42, 0x9d, 0xae, 0x68, 0xf2, 0x51, 0xae, 0x21, 0x14,
|
||||
0xd5, 0xba, 0xad, 0x57, 0xeb, 0xf9, 0x03, 0xca,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0x95, 0xf9,
|
||||
0x18, 0x7f, 0x9f, 0x4e, 0xe0, 0x9f, 0x33, 0xd7, 0xff, 0x09, 0x00, 0x00, 0xff, 0xff, 0xc0, 0xd8,
|
||||
0xe8, 0x44, 0xb1, 0x19, 0x00, 0x00,
|
||||
}
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
syntax = "proto3";
|
||||
option go_package = "group;group";
|
||||
option go_package = "./group;group";
|
||||
package group;
|
||||
|
||||
message CommonResp{
|
||||
|
||||
@ -7,4 +7,5 @@ all_proto=(
|
||||
chat/chat.proto
|
||||
push/push.proto
|
||||
relay/relay.proto
|
||||
sdk_ws/ws.proto
|
||||
)
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// source: push/push.proto
|
||||
|
||||
package pbPush // import "push"
|
||||
package pbPush // import "./push"
|
||||
|
||||
import proto "github.com/golang/protobuf/proto"
|
||||
import fmt "fmt"
|
||||
@ -49,7 +49,7 @@ func (m *PushMsgReq) Reset() { *m = PushMsgReq{} }
|
||||
func (m *PushMsgReq) String() string { return proto.CompactTextString(m) }
|
||||
func (*PushMsgReq) ProtoMessage() {}
|
||||
func (*PushMsgReq) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_push_a8d13c8ad86fddce, []int{0}
|
||||
return fileDescriptor_push_4f08d2ff54ba8af2, []int{0}
|
||||
}
|
||||
func (m *PushMsgReq) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_PushMsgReq.Unmarshal(m, b)
|
||||
@ -192,7 +192,7 @@ func (m *PushMsgResp) Reset() { *m = PushMsgResp{} }
|
||||
func (m *PushMsgResp) String() string { return proto.CompactTextString(m) }
|
||||
func (*PushMsgResp) ProtoMessage() {}
|
||||
func (*PushMsgResp) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_push_a8d13c8ad86fddce, []int{1}
|
||||
return fileDescriptor_push_4f08d2ff54ba8af2, []int{1}
|
||||
}
|
||||
func (m *PushMsgResp) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_PushMsgResp.Unmarshal(m, b)
|
||||
@ -296,32 +296,32 @@ var _PushMsgService_serviceDesc = grpc.ServiceDesc{
|
||||
Metadata: "push/push.proto",
|
||||
}
|
||||
|
||||
func init() { proto.RegisterFile("push/push.proto", fileDescriptor_push_a8d13c8ad86fddce) }
|
||||
func init() { proto.RegisterFile("push/push.proto", fileDescriptor_push_4f08d2ff54ba8af2) }
|
||||
|
||||
var fileDescriptor_push_a8d13c8ad86fddce = []byte{
|
||||
// 377 bytes of a gzipped FileDescriptorProto
|
||||
var fileDescriptor_push_4f08d2ff54ba8af2 = []byte{
|
||||
// 378 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x5c, 0x92, 0x5d, 0xeb, 0xda, 0x30,
|
||||
0x14, 0xc6, 0xe9, 0xb4, 0xbe, 0x9c, 0xce, 0x97, 0x85, 0x31, 0x82, 0x17, 0xa3, 0xc8, 0x18, 0xde,
|
||||
0xcc, 0xc1, 0x76, 0xb9, 0x9b, 0x31, 0x8b, 0x50, 0x98, 0x2f, 0xa4, 0xee, 0x66, 0x77, 0xb5, 0x9e,
|
||||
0x14, 0xc6, 0xe9, 0xb4, 0xbe, 0x1c, 0xe7, 0xcb, 0xc2, 0x18, 0xc1, 0x8b, 0x51, 0x64, 0x0c, 0x6f,
|
||||
0xd6, 0xc1, 0x76, 0xb9, 0x9b, 0x31, 0x8b, 0x50, 0x98, 0x2f, 0xa4, 0xee, 0x66, 0x77, 0xb5, 0x9e,
|
||||
0x6a, 0x59, 0x9b, 0xc4, 0xa6, 0x0a, 0xfb, 0xd2, 0xfb, 0x0c, 0x23, 0x49, 0xd5, 0xfe, 0xbd, 0x29,
|
||||
0x7d, 0x7e, 0xe7, 0x39, 0x87, 0x27, 0xc9, 0x81, 0x91, 0xbc, 0xa8, 0xd3, 0x67, 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, 0x9c, 0x79, 0x8b, 0xdd,
|
||||
0x24, 0x99, 0x42, 0x4f, 0x4f, 0xdd, 0x65, 0x05, 0x52, 0xd7, 0x94, 0xee, 0x5a, 0x77, 0xad, 0xd4,
|
||||
0x71, 0x59, 0x8a, 0x82, 0x76, 0x3c, 0x67, 0xee, 0xb2, 0x9b, 0x24, 0x1e, 0x0c, 0xea, 0xd1, 0xbb,
|
||||
0xbf, 0x12, 0x69, 0xd7, 0x54, 0x9b, 0x48, 0x3b, 0x22, 0x54, 0x2a, 0x13, 0xdc, 0x38, 0x7a, 0xd6,
|
||||
0xd1, 0x40, 0xda, 0xb1, 0x91, 0x58, 0xc6, 0x55, 0x26, 0x78, 0x18, 0xd0, 0xbe, 0x49, 0xdc, 0x44,
|
||||
0xe4, 0x2d, 0xb8, 0x2b, 0x75, 0x0c, 0x03, 0x0a, 0xa6, 0x66, 0x85, 0xe9, 0x4b, 0xd3, 0x3c, 0xe3,
|
||||
0x18, 0xf2, 0x54, 0x50, 0xaf, 0xee, 0x7b, 0x20, 0x9d, 0x7b, 0x23, 0xf5, 0x0c, 0x45, 0x5f, 0xdb,
|
||||
0x7b, 0xa8, 0x25, 0x79, 0x0f, 0xb0, 0xcd, 0xe3, 0x2a, 0x15, 0x65, 0x11, 0x06, 0x74, 0x60, 0x42,
|
||||
0x35, 0x08, 0xf9, 0x08, 0x43, 0x7d, 0x7a, 0x2c, 0xd7, 0x59, 0xf2, 0x67, 0x1d, 0x17, 0x48, 0x87,
|
||||
0x66, 0xc0, 0x13, 0x25, 0x1f, 0x60, 0x60, 0xc9, 0x32, 0x4e, 0xf0, 0x17, 0xfb, 0x49, 0x47, 0xc6,
|
||||
0xf6, 0x12, 0x9a, 0x5b, 0xca, 0x33, 0xe4, 0x95, 0x3d, 0xc5, 0xd8, 0x26, 0x6d, 0xa0, 0xe9, 0x27,
|
||||
0xf0, 0xee, 0xef, 0xad, 0xa4, 0x8e, 0xc7, 0x50, 0x5d, 0xf2, 0x6a, 0x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
0x26, 0x64, 0xe2, 0x9b, 0x7d, 0x7a, 0xec, 0xcf, 0xf4, 0xcd, 0x13, 0x51, 0xf2, 0xc7, 0xf8, 0xf7,
|
||||
0xd0, 0x37, 0x7b, 0xf7, 0x4d, 0xee, 0x35, 0xdf, 0x77, 0xcc, 0xfe, 0x7d, 0xfd, 0x1f, 0x00, 0x00,
|
||||
0xff, 0xff, 0x6b, 0x53, 0xf4, 0xd4, 0x92, 0x02, 0x00, 0x00,
|
||||
}
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
syntax = "proto3";
|
||||
option go_package = "push;pbPush";
|
||||
option go_package = "./push;pbPush";
|
||||
package push;
|
||||
|
||||
message PushMsgReq {
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// source: relay/relay.proto
|
||||
|
||||
package pbRelay // import "relay"
|
||||
package pbRelay // import "./relay"
|
||||
|
||||
import proto "github.com/golang/protobuf/proto"
|
||||
import fmt "fmt"
|
||||
@ -47,7 +47,7 @@ func (m *MsgToUserReq) Reset() { *m = MsgToUserReq{} }
|
||||
func (m *MsgToUserReq) String() string { return proto.CompactTextString(m) }
|
||||
func (*MsgToUserReq) ProtoMessage() {}
|
||||
func (*MsgToUserReq) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_relay_1ba173c940428df4, []int{0}
|
||||
return fileDescriptor_relay_ff2396ffa84abfa7, []int{0}
|
||||
}
|
||||
func (m *MsgToUserReq) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_MsgToUserReq.Unmarshal(m, b)
|
||||
@ -176,7 +176,7 @@ func (m *MsgToUserResp) Reset() { *m = MsgToUserResp{} }
|
||||
func (m *MsgToUserResp) String() string { return proto.CompactTextString(m) }
|
||||
func (*MsgToUserResp) ProtoMessage() {}
|
||||
func (*MsgToUserResp) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_relay_1ba173c940428df4, []int{1}
|
||||
return fileDescriptor_relay_ff2396ffa84abfa7, []int{1}
|
||||
}
|
||||
func (m *MsgToUserResp) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_MsgToUserResp.Unmarshal(m, b)
|
||||
@ -227,7 +227,7 @@ func (m *SingleMsgToUser) Reset() { *m = SingleMsgToUser{} }
|
||||
func (m *SingleMsgToUser) String() string { return proto.CompactTextString(m) }
|
||||
func (*SingleMsgToUser) ProtoMessage() {}
|
||||
func (*SingleMsgToUser) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_relay_1ba173c940428df4, []int{2}
|
||||
return fileDescriptor_relay_ff2396ffa84abfa7, []int{2}
|
||||
}
|
||||
func (m *SingleMsgToUser) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_SingleMsgToUser.Unmarshal(m, b)
|
||||
@ -346,34 +346,34 @@ var _OnlineMessageRelayService_serviceDesc = grpc.ServiceDesc{
|
||||
Metadata: "relay/relay.proto",
|
||||
}
|
||||
|
||||
func init() { proto.RegisterFile("relay/relay.proto", fileDescriptor_relay_1ba173c940428df4) }
|
||||
func init() { proto.RegisterFile("relay/relay.proto", fileDescriptor_relay_ff2396ffa84abfa7) }
|
||||
|
||||
var fileDescriptor_relay_1ba173c940428df4 = []byte{
|
||||
// 412 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x92, 0xc1, 0x6f, 0xd3, 0x30,
|
||||
0x14, 0xc6, 0x15, 0x42, 0xbb, 0xf5, 0x75, 0x6d, 0xc1, 0xa0, 0xc9, 0xec, 0x80, 0xa2, 0x0a, 0x4d,
|
||||
0x11, 0x87, 0x21, 0x0d, 0x89, 0xcb, 0x6e, 0x2c, 0xaa, 0x14, 0x89, 0x6c, 0xc8, 0xe9, 0x2e, 0xdc,
|
||||
0xb2, 0xec, 0x11, 0x59, 0x24, 0x76, 0x6a, 0x87, 0x49, 0xfb, 0xef, 0xf8, 0xd3, 0x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02, 0x00, 0x00,
|
||||
var fileDescriptor_relay_ff2396ffa84abfa7 = []byte{
|
||||
// 414 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x92, 0xc1, 0x6b, 0xdb, 0x30,
|
||||
0x14, 0xc6, 0xf1, 0xbc, 0xa4, 0xcd, 0x4b, 0x93, 0xac, 0xda, 0x28, 0x5a, 0x0f, 0xc3, 0x84, 0x51,
|
||||
0xc2, 0x0e, 0x19, 0x74, 0xb0, 0x4b, 0x6f, 0xab, 0x09, 0x18, 0xe6, 0x76, 0xc8, 0xe9, 0x65, 0x37,
|
||||
0xd7, 0x7d, 0x33, 0x62, 0xb6, 0xe4, 0x48, 0x5e, 0xa1, 0xff, 0xdd, 0xfe, 0xb4, 0xa1, 0xa7, 0x64,
|
||||
0xd1, 0x32, 0x7a, 0x31, 0xfe, 0x7e, 0xef, 0xf3, 0xf3, 0xa7, 0xa7, 0x07, 0xa7, 0x06, 0x9b, 0xf2,
|
||||
0xe9, 0x23, 0x3d, 0x97, 0x9d, 0xd1, 0xbd, 0x66, 0x03, 0x12, 0xf3, 0xdf, 0x31, 0x9c, 0xe4, 0xb6,
|
||||
0x5e, 0xeb, 0x3b, 0x8b, 0x46, 0xe0, 0x86, 0x9d, 0xc1, 0xb0, 0x40, 0xf5, 0x90, 0xa5, 0x3c, 0x4a,
|
||||
0xa2, 0xc5, 0x48, 0x6c, 0x95, 0xe3, 0x02, 0xab, 0xc7, 0x2c, 0xe5, 0x2f, 0x3c, 0xf7, 0x8a, 0x71,
|
||||
0x38, 0xba, 0xd6, 0xaa, 0x47, 0xd5, 0xf3, 0x01, 0x15, 0x76, 0xd2, 0x55, 0x9c, 0xa7, 0xc0, 0x0d,
|
||||
0x1f, 0x26, 0xd1, 0x22, 0x16, 0x3b, 0xc9, 0xce, 0xe1, 0xd8, 0x75, 0x5d, 0xcb, 0x16, 0xf9, 0x11,
|
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0x13,
|
||||
0x2e, 0x60, 0xea, 0xde, 0xdc, 0x24, 0x56, 0x7e, 0x36, 0x31, 0xcd, 0xe6, 0x80, 0x5e, 0x16, 0xf0,
|
||||
0xf6, 0x56, 0x35, 0x52, 0x61, 0x8e, 0xd6, 0x96, 0x35, 0x0a, 0x17, 0xcf, 0x0d, 0x58, 0x56, 0xc8,
|
||||
0x3e, 0xc3, 0x68, 0x9f, 0xe4, 0xf5, 0x36, 0x7a, 0xb8, 0xa0, 0xe7, 0x6f, 0xfe, 0x87, 0xb6, 0xfb,
|
||||
0x72, 0xfa, 0x7d, 0xb6, 0xf4, 0xfb, 0x7d, 0xd5, 0xdd, 0x53, 0xc7, 0xfb, 0x21, 0x2d, 0xfa, 0xa7,
|
||||
0x3f, 0x01, 0x00, 0x00, 0xff, 0xff, 0xe2, 0x9b, 0x83, 0x12, 0xfd, 0x02, 0x00, 0x00,
|
||||
}
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
syntax = "proto3";
|
||||
option go_package = "relay;pbRelay";
|
||||
option go_package = "./relay;pbRelay";
|
||||
package relay;
|
||||
|
||||
message MsgToUserReq {
|
||||
|
||||
753
pkg/proto/sdk_ws/ws.pb.go
Normal file
753
pkg/proto/sdk_ws/ws.pb.go
Normal file
@ -0,0 +1,753 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// source: sdk_ws/ws.proto
|
||||
|
||||
package open_im_sdk // import "./sdk_ws"
|
||||
|
||||
import proto "github.com/golang/protobuf/proto"
|
||||
import fmt "fmt"
|
||||
import math "math"
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
var _ = proto.Marshal
|
||||
var _ = fmt.Errorf
|
||||
var _ = math.Inf
|
||||
|
||||
// This is a compile-time assertion to ensure that this generated file
|
||||
// is compatible with the proto package it is being compiled against.
|
||||
// A compilation error at this line likely means your copy of the
|
||||
// proto package needs to be updated.
|
||||
const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
|
||||
|
||||
type PullMessageBySeqListResp struct {
|
||||
MaxSeq int64 `protobuf:"varint,1,opt,name=MaxSeq" json:"MaxSeq,omitempty"`
|
||||
MinSeq int64 `protobuf:"varint,2,opt,name=MinSeq" json:"MinSeq,omitempty"`
|
||||
SingleUserMsg []*GatherFormat `protobuf:"bytes,3,rep,name=SingleUserMsg" json:"SingleUserMsg,omitempty"`
|
||||
GroupUserMsg []*GatherFormat `protobuf:"bytes,4,rep,name=GroupUserMsg" json:"GroupUserMsg,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *PullMessageBySeqListResp) Reset() { *m = PullMessageBySeqListResp{} }
|
||||
func (m *PullMessageBySeqListResp) String() string { return proto.CompactTextString(m) }
|
||||
func (*PullMessageBySeqListResp) ProtoMessage() {}
|
||||
func (*PullMessageBySeqListResp) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_ws_f143de4f947df40f, []int{0}
|
||||
}
|
||||
func (m *PullMessageBySeqListResp) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_PullMessageBySeqListResp.Unmarshal(m, b)
|
||||
}
|
||||
func (m *PullMessageBySeqListResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_PullMessageBySeqListResp.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (dst *PullMessageBySeqListResp) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_PullMessageBySeqListResp.Merge(dst, src)
|
||||
}
|
||||
func (m *PullMessageBySeqListResp) XXX_Size() int {
|
||||
return xxx_messageInfo_PullMessageBySeqListResp.Size(m)
|
||||
}
|
||||
func (m *PullMessageBySeqListResp) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_PullMessageBySeqListResp.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_PullMessageBySeqListResp proto.InternalMessageInfo
|
||||
|
||||
func (m *PullMessageBySeqListResp) GetMaxSeq() int64 {
|
||||
if m != nil {
|
||||
return m.MaxSeq
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *PullMessageBySeqListResp) GetMinSeq() int64 {
|
||||
if m != nil {
|
||||
return m.MinSeq
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *PullMessageBySeqListResp) GetSingleUserMsg() []*GatherFormat {
|
||||
if m != nil {
|
||||
return m.SingleUserMsg
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *PullMessageBySeqListResp) GetGroupUserMsg() []*GatherFormat {
|
||||
if m != nil {
|
||||
return m.GroupUserMsg
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type PullMessageBySeqListReq struct {
|
||||
SeqList []int64 `protobuf:"varint,1,rep,packed,name=seqList" json:"seqList,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *PullMessageBySeqListReq) Reset() { *m = PullMessageBySeqListReq{} }
|
||||
func (m *PullMessageBySeqListReq) String() string { return proto.CompactTextString(m) }
|
||||
func (*PullMessageBySeqListReq) ProtoMessage() {}
|
||||
func (*PullMessageBySeqListReq) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_ws_f143de4f947df40f, []int{1}
|
||||
}
|
||||
func (m *PullMessageBySeqListReq) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_PullMessageBySeqListReq.Unmarshal(m, b)
|
||||
}
|
||||
func (m *PullMessageBySeqListReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_PullMessageBySeqListReq.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (dst *PullMessageBySeqListReq) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_PullMessageBySeqListReq.Merge(dst, src)
|
||||
}
|
||||
func (m *PullMessageBySeqListReq) XXX_Size() int {
|
||||
return xxx_messageInfo_PullMessageBySeqListReq.Size(m)
|
||||
}
|
||||
func (m *PullMessageBySeqListReq) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_PullMessageBySeqListReq.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_PullMessageBySeqListReq proto.InternalMessageInfo
|
||||
|
||||
func (m *PullMessageBySeqListReq) GetSeqList() []int64 {
|
||||
if m != nil {
|
||||
return m.SeqList
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type GetMaxAndMinSeqReq struct {
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *GetMaxAndMinSeqReq) Reset() { *m = GetMaxAndMinSeqReq{} }
|
||||
func (m *GetMaxAndMinSeqReq) String() string { return proto.CompactTextString(m) }
|
||||
func (*GetMaxAndMinSeqReq) ProtoMessage() {}
|
||||
func (*GetMaxAndMinSeqReq) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_ws_f143de4f947df40f, []int{2}
|
||||
}
|
||||
func (m *GetMaxAndMinSeqReq) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_GetMaxAndMinSeqReq.Unmarshal(m, b)
|
||||
}
|
||||
func (m *GetMaxAndMinSeqReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_GetMaxAndMinSeqReq.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (dst *GetMaxAndMinSeqReq) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_GetMaxAndMinSeqReq.Merge(dst, src)
|
||||
}
|
||||
func (m *GetMaxAndMinSeqReq) XXX_Size() int {
|
||||
return xxx_messageInfo_GetMaxAndMinSeqReq.Size(m)
|
||||
}
|
||||
func (m *GetMaxAndMinSeqReq) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_GetMaxAndMinSeqReq.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_GetMaxAndMinSeqReq proto.InternalMessageInfo
|
||||
|
||||
type GetMaxAndMinSeqResp struct {
|
||||
MaxSeq int64 `protobuf:"varint,1,opt,name=maxSeq" json:"maxSeq,omitempty"`
|
||||
MinSeq int64 `protobuf:"varint,2,opt,name=minSeq" json:"minSeq,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *GetMaxAndMinSeqResp) Reset() { *m = GetMaxAndMinSeqResp{} }
|
||||
func (m *GetMaxAndMinSeqResp) String() string { return proto.CompactTextString(m) }
|
||||
func (*GetMaxAndMinSeqResp) ProtoMessage() {}
|
||||
func (*GetMaxAndMinSeqResp) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_ws_f143de4f947df40f, []int{3}
|
||||
}
|
||||
func (m *GetMaxAndMinSeqResp) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_GetMaxAndMinSeqResp.Unmarshal(m, b)
|
||||
}
|
||||
func (m *GetMaxAndMinSeqResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_GetMaxAndMinSeqResp.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (dst *GetMaxAndMinSeqResp) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_GetMaxAndMinSeqResp.Merge(dst, src)
|
||||
}
|
||||
func (m *GetMaxAndMinSeqResp) XXX_Size() int {
|
||||
return xxx_messageInfo_GetMaxAndMinSeqResp.Size(m)
|
||||
}
|
||||
func (m *GetMaxAndMinSeqResp) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_GetMaxAndMinSeqResp.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_GetMaxAndMinSeqResp proto.InternalMessageInfo
|
||||
|
||||
func (m *GetMaxAndMinSeqResp) GetMaxSeq() int64 {
|
||||
if m != nil {
|
||||
return m.MaxSeq
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *GetMaxAndMinSeqResp) GetMinSeq() int64 {
|
||||
if m != nil {
|
||||
return m.MinSeq
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
type GatherFormat struct {
|
||||
// @inject_tag: json:"id"
|
||||
ID string `protobuf:"bytes,1,opt,name=ID" json:"id"`
|
||||
// @inject_tag: json:"list"
|
||||
List []*MsgFormat `protobuf:"bytes,2,rep,name=List" json:"list"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *GatherFormat) Reset() { *m = GatherFormat{} }
|
||||
func (m *GatherFormat) String() string { return proto.CompactTextString(m) }
|
||||
func (*GatherFormat) ProtoMessage() {}
|
||||
func (*GatherFormat) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_ws_f143de4f947df40f, []int{4}
|
||||
}
|
||||
func (m *GatherFormat) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_GatherFormat.Unmarshal(m, b)
|
||||
}
|
||||
func (m *GatherFormat) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_GatherFormat.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (dst *GatherFormat) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_GatherFormat.Merge(dst, src)
|
||||
}
|
||||
func (m *GatherFormat) XXX_Size() int {
|
||||
return xxx_messageInfo_GatherFormat.Size(m)
|
||||
}
|
||||
func (m *GatherFormat) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_GatherFormat.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_GatherFormat proto.InternalMessageInfo
|
||||
|
||||
func (m *GatherFormat) GetID() string {
|
||||
if m != nil {
|
||||
return m.ID
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *GatherFormat) GetList() []*MsgFormat {
|
||||
if m != nil {
|
||||
return m.List
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type MsgFormat struct {
|
||||
// @inject_tag: json:"sendID"
|
||||
SendID string `protobuf:"bytes,1,opt,name=SendID" json:"sendID"`
|
||||
// @inject_tag: json:"recvID"
|
||||
RecvID string `protobuf:"bytes,2,opt,name=RecvID" json:"recvID"`
|
||||
// @inject_tag: json:"msgFrom"
|
||||
MsgFrom int32 `protobuf:"varint,3,opt,name=MsgFrom" json:"msgFrom"`
|
||||
// @inject_tag: json:"contentType"
|
||||
ContentType int32 `protobuf:"varint,4,opt,name=ContentType" json:"contentType"`
|
||||
// @inject_tag: json:"serverMsgID"
|
||||
ServerMsgID string `protobuf:"bytes,5,opt,name=ServerMsgID" json:"serverMsgID"`
|
||||
// @inject_tag: json:"content"
|
||||
Content string `protobuf:"bytes,6,opt,name=Content" json:"content"`
|
||||
// @inject_tag: json:"seq"
|
||||
Seq int64 `protobuf:"varint,7,opt,name=Seq" json:"seq"`
|
||||
// @inject_tag: json:"sendTime"
|
||||
SendTime int64 `protobuf:"varint,8,opt,name=SendTime" json:"sendTime"`
|
||||
// @inject_tag: json:"senderPlatformID"
|
||||
SenderPlatformID int32 `protobuf:"varint,9,opt,name=SenderPlatformID" json:"senderPlatformID"`
|
||||
// @inject_tag: json:"senderNickName"
|
||||
SenderNickName string `protobuf:"bytes,10,opt,name=SenderNickName" json:"senderNickName"`
|
||||
// @inject_tag: json:"senderFaceUrl"
|
||||
SenderFaceURL string `protobuf:"bytes,11,opt,name=SenderFaceURL" json:"senderFaceUrl"`
|
||||
// @inject_tag: json:"clientMsgID"
|
||||
ClientMsgID string `protobuf:"bytes,12,opt,name=ClientMsgID" json:"clientMsgID"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *MsgFormat) Reset() { *m = MsgFormat{} }
|
||||
func (m *MsgFormat) String() string { return proto.CompactTextString(m) }
|
||||
func (*MsgFormat) ProtoMessage() {}
|
||||
func (*MsgFormat) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_ws_f143de4f947df40f, []int{5}
|
||||
}
|
||||
func (m *MsgFormat) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_MsgFormat.Unmarshal(m, b)
|
||||
}
|
||||
func (m *MsgFormat) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_MsgFormat.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (dst *MsgFormat) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_MsgFormat.Merge(dst, src)
|
||||
}
|
||||
func (m *MsgFormat) XXX_Size() int {
|
||||
return xxx_messageInfo_MsgFormat.Size(m)
|
||||
}
|
||||
func (m *MsgFormat) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_MsgFormat.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_MsgFormat proto.InternalMessageInfo
|
||||
|
||||
func (m *MsgFormat) GetSendID() string {
|
||||
if m != nil {
|
||||
return m.SendID
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *MsgFormat) GetRecvID() string {
|
||||
if m != nil {
|
||||
return m.RecvID
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *MsgFormat) GetMsgFrom() int32 {
|
||||
if m != nil {
|
||||
return m.MsgFrom
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *MsgFormat) GetContentType() int32 {
|
||||
if m != nil {
|
||||
return m.ContentType
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *MsgFormat) GetServerMsgID() string {
|
||||
if m != nil {
|
||||
return m.ServerMsgID
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *MsgFormat) GetContent() string {
|
||||
if m != nil {
|
||||
return m.Content
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *MsgFormat) GetSeq() int64 {
|
||||
if m != nil {
|
||||
return m.Seq
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *MsgFormat) GetSendTime() int64 {
|
||||
if m != nil {
|
||||
return m.SendTime
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *MsgFormat) GetSenderPlatformID() int32 {
|
||||
if m != nil {
|
||||
return m.SenderPlatformID
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *MsgFormat) GetSenderNickName() string {
|
||||
if m != nil {
|
||||
return m.SenderNickName
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *MsgFormat) GetSenderFaceURL() string {
|
||||
if m != nil {
|
||||
return m.SenderFaceURL
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *MsgFormat) GetClientMsgID() string {
|
||||
if m != nil {
|
||||
return m.ClientMsgID
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type UserSendMsgReq struct {
|
||||
Options map[string]int32 `protobuf:"bytes,1,rep,name=Options" json:"Options,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"`
|
||||
SenderNickName string `protobuf:"bytes,2,opt,name=SenderNickName" json:"SenderNickName,omitempty"`
|
||||
SenderFaceURL string `protobuf:"bytes,3,opt,name=SenderFaceURL" json:"SenderFaceURL,omitempty"`
|
||||
PlatformID int32 `protobuf:"varint,4,opt,name=PlatformID" json:"PlatformID,omitempty"`
|
||||
SessionType int32 `protobuf:"varint,5,opt,name=SessionType" json:"SessionType,omitempty"`
|
||||
MsgFrom int32 `protobuf:"varint,6,opt,name=MsgFrom" json:"MsgFrom,omitempty"`
|
||||
ContentType int32 `protobuf:"varint,7,opt,name=ContentType" json:"ContentType,omitempty"`
|
||||
RecvID string `protobuf:"bytes,8,opt,name=RecvID" json:"RecvID,omitempty"`
|
||||
ForceList []string `protobuf:"bytes,9,rep,name=ForceList" json:"ForceList,omitempty"`
|
||||
Content string `protobuf:"bytes,10,opt,name=Content" json:"Content,omitempty"`
|
||||
ClientMsgID string `protobuf:"bytes,11,opt,name=ClientMsgID" json:"ClientMsgID,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *UserSendMsgReq) Reset() { *m = UserSendMsgReq{} }
|
||||
func (m *UserSendMsgReq) String() string { return proto.CompactTextString(m) }
|
||||
func (*UserSendMsgReq) ProtoMessage() {}
|
||||
func (*UserSendMsgReq) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_ws_f143de4f947df40f, []int{6}
|
||||
}
|
||||
func (m *UserSendMsgReq) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_UserSendMsgReq.Unmarshal(m, b)
|
||||
}
|
||||
func (m *UserSendMsgReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_UserSendMsgReq.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (dst *UserSendMsgReq) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_UserSendMsgReq.Merge(dst, src)
|
||||
}
|
||||
func (m *UserSendMsgReq) XXX_Size() int {
|
||||
return xxx_messageInfo_UserSendMsgReq.Size(m)
|
||||
}
|
||||
func (m *UserSendMsgReq) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_UserSendMsgReq.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_UserSendMsgReq proto.InternalMessageInfo
|
||||
|
||||
func (m *UserSendMsgReq) GetOptions() map[string]int32 {
|
||||
if m != nil {
|
||||
return m.Options
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *UserSendMsgReq) GetSenderNickName() string {
|
||||
if m != nil {
|
||||
return m.SenderNickName
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *UserSendMsgReq) GetSenderFaceURL() string {
|
||||
if m != nil {
|
||||
return m.SenderFaceURL
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *UserSendMsgReq) GetPlatformID() int32 {
|
||||
if m != nil {
|
||||
return m.PlatformID
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *UserSendMsgReq) GetSessionType() int32 {
|
||||
if m != nil {
|
||||
return m.SessionType
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *UserSendMsgReq) GetMsgFrom() int32 {
|
||||
if m != nil {
|
||||
return m.MsgFrom
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *UserSendMsgReq) GetContentType() int32 {
|
||||
if m != nil {
|
||||
return m.ContentType
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *UserSendMsgReq) GetRecvID() string {
|
||||
if m != nil {
|
||||
return m.RecvID
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *UserSendMsgReq) GetForceList() []string {
|
||||
if m != nil {
|
||||
return m.ForceList
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *UserSendMsgReq) GetContent() string {
|
||||
if m != nil {
|
||||
return m.Content
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *UserSendMsgReq) GetClientMsgID() string {
|
||||
if m != nil {
|
||||
return m.ClientMsgID
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type UserSendMsgResp struct {
|
||||
ServerMsgID string `protobuf:"bytes,1,opt,name=ServerMsgID" json:"ServerMsgID,omitempty"`
|
||||
ClientMsgID string `protobuf:"bytes,2,opt,name=ClientMsgID" json:"ClientMsgID,omitempty"`
|
||||
SendTime int64 `protobuf:"varint,3,opt,name=sendTime" json:"sendTime,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *UserSendMsgResp) Reset() { *m = UserSendMsgResp{} }
|
||||
func (m *UserSendMsgResp) String() string { return proto.CompactTextString(m) }
|
||||
func (*UserSendMsgResp) ProtoMessage() {}
|
||||
func (*UserSendMsgResp) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_ws_f143de4f947df40f, []int{7}
|
||||
}
|
||||
func (m *UserSendMsgResp) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_UserSendMsgResp.Unmarshal(m, b)
|
||||
}
|
||||
func (m *UserSendMsgResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_UserSendMsgResp.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (dst *UserSendMsgResp) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_UserSendMsgResp.Merge(dst, src)
|
||||
}
|
||||
func (m *UserSendMsgResp) XXX_Size() int {
|
||||
return xxx_messageInfo_UserSendMsgResp.Size(m)
|
||||
}
|
||||
func (m *UserSendMsgResp) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_UserSendMsgResp.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_UserSendMsgResp proto.InternalMessageInfo
|
||||
|
||||
func (m *UserSendMsgResp) GetServerMsgID() string {
|
||||
if m != nil {
|
||||
return m.ServerMsgID
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *UserSendMsgResp) GetClientMsgID() string {
|
||||
if m != nil {
|
||||
return m.ClientMsgID
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *UserSendMsgResp) GetSendTime() int64 {
|
||||
if m != nil {
|
||||
return m.SendTime
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
type MsgData struct {
|
||||
SendID string `protobuf:"bytes,1,opt,name=sendID" json:"sendID,omitempty"`
|
||||
RecvID string `protobuf:"bytes,2,opt,name=recvID" json:"recvID,omitempty"`
|
||||
SessionType int32 `protobuf:"varint,3,opt,name=sessionType" json:"sessionType,omitempty"`
|
||||
MsgFrom int32 `protobuf:"varint,4,opt,name=msgFrom" json:"msgFrom,omitempty"`
|
||||
ContentType int32 `protobuf:"varint,5,opt,name=contentType" json:"contentType,omitempty"`
|
||||
ServerMsgID string `protobuf:"bytes,6,opt,name=serverMsgID" json:"serverMsgID,omitempty"`
|
||||
Content string `protobuf:"bytes,7,opt,name=content" json:"content,omitempty"`
|
||||
SendTime int64 `protobuf:"varint,8,opt,name=sendTime" json:"sendTime,omitempty"`
|
||||
Seq int64 `protobuf:"varint,9,opt,name=seq" json:"seq,omitempty"`
|
||||
SenderPlatformID int32 `protobuf:"varint,10,opt,name=senderPlatformID" json:"senderPlatformID,omitempty"`
|
||||
SenderNickName string `protobuf:"bytes,11,opt,name=senderNickName" json:"senderNickName,omitempty"`
|
||||
SenderFaceURL string `protobuf:"bytes,12,opt,name=senderFaceURL" json:"senderFaceURL,omitempty"`
|
||||
ClientMsgID string `protobuf:"bytes,13,opt,name=clientMsgID" json:"clientMsgID,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *MsgData) Reset() { *m = MsgData{} }
|
||||
func (m *MsgData) String() string { return proto.CompactTextString(m) }
|
||||
func (*MsgData) ProtoMessage() {}
|
||||
func (*MsgData) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_ws_f143de4f947df40f, []int{8}
|
||||
}
|
||||
func (m *MsgData) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_MsgData.Unmarshal(m, b)
|
||||
}
|
||||
func (m *MsgData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_MsgData.Marshal(b, m, deterministic)
|
||||
}
|
||||
func (dst *MsgData) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_MsgData.Merge(dst, src)
|
||||
}
|
||||
func (m *MsgData) XXX_Size() int {
|
||||
return xxx_messageInfo_MsgData.Size(m)
|
||||
}
|
||||
func (m *MsgData) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_MsgData.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_MsgData proto.InternalMessageInfo
|
||||
|
||||
func (m *MsgData) GetSendID() string {
|
||||
if m != nil {
|
||||
return m.SendID
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *MsgData) GetRecvID() string {
|
||||
if m != nil {
|
||||
return m.RecvID
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *MsgData) GetSessionType() int32 {
|
||||
if m != nil {
|
||||
return m.SessionType
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *MsgData) GetMsgFrom() int32 {
|
||||
if m != nil {
|
||||
return m.MsgFrom
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *MsgData) GetContentType() int32 {
|
||||
if m != nil {
|
||||
return m.ContentType
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *MsgData) GetServerMsgID() string {
|
||||
if m != nil {
|
||||
return m.ServerMsgID
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *MsgData) GetContent() string {
|
||||
if m != nil {
|
||||
return m.Content
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *MsgData) GetSendTime() int64 {
|
||||
if m != nil {
|
||||
return m.SendTime
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *MsgData) GetSeq() int64 {
|
||||
if m != nil {
|
||||
return m.Seq
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *MsgData) GetSenderPlatformID() int32 {
|
||||
if m != nil {
|
||||
return m.SenderPlatformID
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *MsgData) GetSenderNickName() string {
|
||||
if m != nil {
|
||||
return m.SenderNickName
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *MsgData) GetSenderFaceURL() string {
|
||||
if m != nil {
|
||||
return m.SenderFaceURL
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *MsgData) GetClientMsgID() string {
|
||||
if m != nil {
|
||||
return m.ClientMsgID
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func init() {
|
||||
proto.RegisterType((*PullMessageBySeqListResp)(nil), "open_im_sdk.PullMessageBySeqListResp")
|
||||
proto.RegisterType((*PullMessageBySeqListReq)(nil), "open_im_sdk.PullMessageBySeqListReq")
|
||||
proto.RegisterType((*GetMaxAndMinSeqReq)(nil), "open_im_sdk.GetMaxAndMinSeqReq")
|
||||
proto.RegisterType((*GetMaxAndMinSeqResp)(nil), "open_im_sdk.GetMaxAndMinSeqResp")
|
||||
proto.RegisterType((*GatherFormat)(nil), "open_im_sdk.GatherFormat")
|
||||
proto.RegisterType((*MsgFormat)(nil), "open_im_sdk.MsgFormat")
|
||||
proto.RegisterType((*UserSendMsgReq)(nil), "open_im_sdk.UserSendMsgReq")
|
||||
proto.RegisterMapType((map[string]int32)(nil), "open_im_sdk.UserSendMsgReq.OptionsEntry")
|
||||
proto.RegisterType((*UserSendMsgResp)(nil), "open_im_sdk.UserSendMsgResp")
|
||||
proto.RegisterType((*MsgData)(nil), "open_im_sdk.MsgData")
|
||||
}
|
||||
|
||||
func init() { proto.RegisterFile("sdk_ws/ws.proto", fileDescriptor_ws_f143de4f947df40f) }
|
||||
|
||||
var fileDescriptor_ws_f143de4f947df40f = []byte{
|
||||
// 739 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x55, 0x4b, 0x6b, 0xdb, 0x4a,
|
||||
0x14, 0x46, 0x52, 0xfc, 0xd0, 0xb1, 0xf3, 0x60, 0x6e, 0xc8, 0xd5, 0x0d, 0x97, 0x8b, 0x11, 0x97,
|
||||
0x62, 0xb2, 0x70, 0x20, 0xd9, 0x94, 0x94, 0x52, 0x9a, 0x3a, 0x09, 0x2e, 0x71, 0x1a, 0xc6, 0xc9,
|
||||
0xa6, 0x9b, 0xa0, 0xda, 0x53, 0x57, 0xd8, 0x7a, 0x58, 0x47, 0x79, 0xf8, 0xc7, 0xf4, 0x0f, 0x75,
|
||||
0xd1, 0x7f, 0x54, 0x28, 0x67, 0x46, 0x72, 0x66, 0x6c, 0xd3, 0x76, 0x37, 0xe7, 0xd3, 0x9c, 0x99,
|
||||
0x39, 0xdf, 0x03, 0xc1, 0x36, 0x8e, 0x26, 0x77, 0x8f, 0x78, 0xf8, 0x88, 0x9d, 0x34, 0x4b, 0xf2,
|
||||
0x84, 0x35, 0x92, 0x54, 0xc4, 0x77, 0x61, 0x74, 0x87, 0xa3, 0x89, 0xff, 0xcd, 0x02, 0xef, 0xfa,
|
||||
0x7e, 0x3a, 0xed, 0x0b, 0xc4, 0x60, 0x2c, 0x4e, 0xe7, 0x03, 0x31, 0xbb, 0x0c, 0x31, 0xe7, 0x02,
|
||||
0x53, 0xb6, 0x07, 0xd5, 0x7e, 0xf0, 0x34, 0x10, 0x33, 0xcf, 0x6a, 0x59, 0x6d, 0x87, 0x17, 0x95,
|
||||
0xc4, 0xc3, 0x98, 0x70, 0xbb, 0xc0, 0x65, 0xc5, 0xde, 0xc0, 0xe6, 0x20, 0x8c, 0xc7, 0x53, 0x71,
|
||||
0x8b, 0x22, 0xeb, 0xe3, 0xd8, 0x73, 0x5a, 0x4e, 0xbb, 0x71, 0xf4, 0x4f, 0x47, 0xbb, 0xb1, 0x73,
|
||||
0x11, 0xe4, 0x5f, 0x44, 0x76, 0x9e, 0x64, 0x51, 0x90, 0x73, 0x73, 0x3f, 0x7b, 0x0d, 0xcd, 0x8b,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d, 0xce, 0xa1, 0xfa, 0x61, 0xbe, 0xd2, 0x92, 0xfc,
|
||||
0xa9, 0x2a, 0x7f, 0x9d, 0xc7, 0x3f, 0x03, 0x00, 0x00, 0xff, 0xff, 0x38, 0x51, 0xff, 0xb4, 0x4d,
|
||||
0x07, 0x00, 0x00,
|
||||
}
|
||||
89
pkg/proto/sdk_ws/ws.proto
Normal file
89
pkg/proto/sdk_ws/ws.proto
Normal file
@ -0,0 +1,89 @@
|
||||
syntax = "proto3";
|
||||
package open_im_sdk;//The package name to which the proto file belongs
|
||||
option go_package = "./sdk_ws;open_im_sdk";//The generated go pb file is in the current directory, and the package name is open_im_sdk
|
||||
|
||||
|
||||
message PullMessageBySeqListResp {
|
||||
int64 MaxSeq = 1;
|
||||
int64 MinSeq = 2;
|
||||
repeated GatherFormat SingleUserMsg = 3;
|
||||
repeated GatherFormat GroupUserMsg = 4;
|
||||
}
|
||||
message PullMessageBySeqListReq{
|
||||
repeated int64 seqList =1;
|
||||
}
|
||||
message GetMaxAndMinSeqReq {
|
||||
}
|
||||
message GetMaxAndMinSeqResp {
|
||||
int64 maxSeq = 1;
|
||||
int64 minSeq = 2;
|
||||
}
|
||||
message GatherFormat{
|
||||
// @inject_tag: json:"id"
|
||||
string ID = 1;
|
||||
// @inject_tag: json:"list"
|
||||
repeated MsgFormat List = 2;//detail msg
|
||||
}
|
||||
message MsgFormat{
|
||||
// @inject_tag: json:"sendID"
|
||||
string SendID = 1;
|
||||
// @inject_tag: json:"recvID"
|
||||
string RecvID = 2;
|
||||
// @inject_tag: json:"msgFrom"
|
||||
int32 MsgFrom = 3;
|
||||
// @inject_tag: json:"contentType"
|
||||
int32 ContentType = 4;
|
||||
// @inject_tag: json:"serverMsgID"
|
||||
string ServerMsgID = 5;
|
||||
// @inject_tag: json:"content"
|
||||
string Content = 6;
|
||||
// @inject_tag: json:"seq"
|
||||
int64 Seq = 7;
|
||||
// @inject_tag: json:"sendTime"
|
||||
int64 SendTime = 8;
|
||||
// @inject_tag: json:"senderPlatformID"
|
||||
int32 SenderPlatformID = 9;
|
||||
// @inject_tag: json:"senderNickName"
|
||||
string SenderNickName = 10;
|
||||
// @inject_tag: json:"senderFaceUrl"
|
||||
string SenderFaceURL = 11;
|
||||
// @inject_tag: json:"clientMsgID"
|
||||
string ClientMsgID = 12;
|
||||
}
|
||||
|
||||
message UserSendMsgReq {
|
||||
map<string,int32> Options= 1;
|
||||
string SenderNickName = 2;
|
||||
string SenderFaceURL = 3;
|
||||
int32 PlatformID = 4;
|
||||
int32 SessionType = 5;
|
||||
int32 MsgFrom = 6;
|
||||
int32 ContentType = 7;
|
||||
string RecvID = 8;
|
||||
repeated string ForceList = 9;
|
||||
string Content = 10;
|
||||
string ClientMsgID = 11;
|
||||
}
|
||||
|
||||
message UserSendMsgResp {
|
||||
string ServerMsgID = 1;
|
||||
string ClientMsgID = 2;
|
||||
int64 sendTime = 3;
|
||||
|
||||
}
|
||||
message MsgData {
|
||||
string sendID = 1;
|
||||
string recvID = 2;
|
||||
int32 sessionType = 3;
|
||||
int32 msgFrom = 4;
|
||||
int32 contentType = 5;
|
||||
string serverMsgID = 6;
|
||||
string content =7;
|
||||
int64 sendTime =8;
|
||||
int64 seq =9;
|
||||
int32 senderPlatformID =10;
|
||||
string senderNickName =11;
|
||||
string senderFaceURL =12;
|
||||
string clientMsgID =13;
|
||||
}
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// source: user/user.proto
|
||||
|
||||
package user // import "user"
|
||||
package user // import "./user"
|
||||
|
||||
import proto "github.com/golang/protobuf/proto"
|
||||
import fmt "fmt"
|
||||
@ -35,7 +35,7 @@ func (m *CommonResp) Reset() { *m = CommonResp{} }
|
||||
func (m *CommonResp) String() string { return proto.CompactTextString(m) }
|
||||
func (*CommonResp) ProtoMessage() {}
|
||||
func (*CommonResp) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_user_9367ac00c24112e8, []int{0}
|
||||
return fileDescriptor_user_9e1dacb346b997d7, []int{0}
|
||||
}
|
||||
func (m *CommonResp) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_CommonResp.Unmarshal(m, b)
|
||||
@ -81,7 +81,7 @@ func (m *DeleteUsersResp) Reset() { *m = DeleteUsersResp{} }
|
||||
func (m *DeleteUsersResp) String() string { return proto.CompactTextString(m) }
|
||||
func (*DeleteUsersResp) ProtoMessage() {}
|
||||
func (*DeleteUsersResp) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_user_9367ac00c24112e8, []int{1}
|
||||
return fileDescriptor_user_9e1dacb346b997d7, []int{1}
|
||||
}
|
||||
func (m *DeleteUsersResp) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_DeleteUsersResp.Unmarshal(m, b)
|
||||
@ -128,7 +128,7 @@ func (m *DeleteUsersReq) Reset() { *m = DeleteUsersReq{} }
|
||||
func (m *DeleteUsersReq) String() string { return proto.CompactTextString(m) }
|
||||
func (*DeleteUsersReq) ProtoMessage() {}
|
||||
func (*DeleteUsersReq) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_user_9367ac00c24112e8, []int{2}
|
||||
return fileDescriptor_user_9e1dacb346b997d7, []int{2}
|
||||
}
|
||||
func (m *DeleteUsersReq) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_DeleteUsersReq.Unmarshal(m, b)
|
||||
@ -181,7 +181,7 @@ func (m *GetAllUsersUidReq) Reset() { *m = GetAllUsersUidReq{} }
|
||||
func (m *GetAllUsersUidReq) String() string { return proto.CompactTextString(m) }
|
||||
func (*GetAllUsersUidReq) ProtoMessage() {}
|
||||
func (*GetAllUsersUidReq) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_user_9367ac00c24112e8, []int{3}
|
||||
return fileDescriptor_user_9e1dacb346b997d7, []int{3}
|
||||
}
|
||||
func (m *GetAllUsersUidReq) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_GetAllUsersUidReq.Unmarshal(m, b)
|
||||
@ -227,7 +227,7 @@ func (m *GetAllUsersUidResp) Reset() { *m = GetAllUsersUidResp{} }
|
||||
func (m *GetAllUsersUidResp) String() string { return proto.CompactTextString(m) }
|
||||
func (*GetAllUsersUidResp) ProtoMessage() {}
|
||||
func (*GetAllUsersUidResp) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_user_9367ac00c24112e8, []int{4}
|
||||
return fileDescriptor_user_9e1dacb346b997d7, []int{4}
|
||||
}
|
||||
func (m *GetAllUsersUidResp) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_GetAllUsersUidResp.Unmarshal(m, b)
|
||||
@ -274,7 +274,7 @@ func (m *GetUserInfoReq) Reset() { *m = GetUserInfoReq{} }
|
||||
func (m *GetUserInfoReq) String() string { return proto.CompactTextString(m) }
|
||||
func (*GetUserInfoReq) ProtoMessage() {}
|
||||
func (*GetUserInfoReq) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_user_9367ac00c24112e8, []int{5}
|
||||
return fileDescriptor_user_9e1dacb346b997d7, []int{5}
|
||||
}
|
||||
func (m *GetUserInfoReq) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_GetUserInfoReq.Unmarshal(m, b)
|
||||
@ -328,7 +328,7 @@ func (m *GetUserInfoResp) Reset() { *m = GetUserInfoResp{} }
|
||||
func (m *GetUserInfoResp) String() string { return proto.CompactTextString(m) }
|
||||
func (*GetUserInfoResp) ProtoMessage() {}
|
||||
func (*GetUserInfoResp) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_user_9367ac00c24112e8, []int{6}
|
||||
return fileDescriptor_user_9e1dacb346b997d7, []int{6}
|
||||
}
|
||||
func (m *GetUserInfoResp) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_GetUserInfoResp.Unmarshal(m, b)
|
||||
@ -387,7 +387,7 @@ func (m *UserInfo) Reset() { *m = UserInfo{} }
|
||||
func (m *UserInfo) String() string { return proto.CompactTextString(m) }
|
||||
func (*UserInfo) ProtoMessage() {}
|
||||
func (*UserInfo) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_user_9367ac00c24112e8, []int{7}
|
||||
return fileDescriptor_user_9e1dacb346b997d7, []int{7}
|
||||
}
|
||||
func (m *UserInfo) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_UserInfo.Unmarshal(m, b)
|
||||
@ -475,7 +475,7 @@ func (m *LogoutReq) Reset() { *m = LogoutReq{} }
|
||||
func (m *LogoutReq) String() string { return proto.CompactTextString(m) }
|
||||
func (*LogoutReq) ProtoMessage() {}
|
||||
func (*LogoutReq) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_user_9367ac00c24112e8, []int{8}
|
||||
return fileDescriptor_user_9e1dacb346b997d7, []int{8}
|
||||
}
|
||||
func (m *LogoutReq) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_LogoutReq.Unmarshal(m, b)
|
||||
@ -529,7 +529,7 @@ func (m *UpdateUserInfoReq) Reset() { *m = UpdateUserInfoReq{} }
|
||||
func (m *UpdateUserInfoReq) String() string { return proto.CompactTextString(m) }
|
||||
func (*UpdateUserInfoReq) ProtoMessage() {}
|
||||
func (*UpdateUserInfoReq) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_user_9367ac00c24112e8, []int{9}
|
||||
return fileDescriptor_user_9e1dacb346b997d7, []int{9}
|
||||
}
|
||||
func (m *UpdateUserInfoReq) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_UpdateUserInfoReq.Unmarshal(m, b)
|
||||
@ -803,43 +803,44 @@ var _User_serviceDesc = grpc.ServiceDesc{
|
||||
Metadata: "user/user.proto",
|
||||
}
|
||||
|
||||
func init() { proto.RegisterFile("user/user.proto", fileDescriptor_user_9367ac00c24112e8) }
|
||||
func init() { proto.RegisterFile("user/user.proto", fileDescriptor_user_9e1dacb346b997d7) }
|
||||
|
||||
var fileDescriptor_user_9367ac00c24112e8 = []byte{
|
||||
// 560 bytes of a gzipped FileDescriptorProto
|
||||
var fileDescriptor_user_9e1dacb346b997d7 = []byte{
|
||||
// 562 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x54, 0x4d, 0x6f, 0xd3, 0x40,
|
||||
0x10, 0x95, 0xed, 0x7c, 0x79, 0x22, 0x92, 0x74, 0x55, 0x60, 0x15, 0x21, 0x14, 0x59, 0x1c, 0x72,
|
||||
0x2a, 0x28, 0xdc, 0xe8, 0x09, 0x12, 0x51, 0x45, 0x14, 0x55, 0xb2, 0xe4, 0x0b, 0x27, 0x9c, 0xee,
|
||||
0x34, 0x5d, 0xe1, 0x78, 0x8d, 0xbd, 0x91, 0x7a, 0xe4, 0x27, 0xf1, 0xd7, 0xf8, 0x07, 0x68, 0xc7,
|
||||
0x71, 0xe2, 0xaf, 0x72, 0xa0, 0x17, 0x6b, 0xe7, 0xed, 0xfa, 0xbd, 0x7d, 0x33, 0xb3, 0x03, 0xe3,
|
||||
0x7d, 0x86, 0xe9, 0x5b, 0xf3, 0xb9, 0x48, 0x52, 0xa5, 0x15, 0xeb, 0x98, 0xb5, 0xf7, 0x19, 0x60,
|
||||
0xa9, 0x76, 0x3b, 0x15, 0xfb, 0x98, 0x25, 0xec, 0x15, 0xb8, 0x98, 0xa6, 0x2a, 0x5d, 0x2a, 0x81,
|
||||
0xdc, 0x9a, 0x59, 0xf3, 0xae, 0x7f, 0x02, 0xd8, 0x14, 0x06, 0x14, 0x7c, 0xcd, 0xb6, 0xdc, 0x9e,
|
||||
0x59, 0x73, 0xd7, 0x3f, 0xc6, 0x9e, 0x84, 0xf1, 0x0a, 0x23, 0xd4, 0x18, 0x64, 0x98, 0x66, 0x44,
|
||||
0xf6, 0x0e, 0xe0, 0xf6, 0x48, 0x4d, 0x6c, 0xc3, 0xc5, 0xe4, 0x82, 0x6e, 0x70, 0x92, 0xf4, 0x4b,
|
||||
0x67, 0xd8, 0x1b, 0x78, 0x76, 0x17, 0xca, 0x08, 0x45, 0x20, 0xc5, 0xb5, 0xcc, 0x34, 0xb7, 0x67,
|
||||
0xce, 0xdc, 0xf5, 0xab, 0xa0, 0x17, 0xc3, 0xa8, 0x22, 0xf5, 0xd3, 0xfc, 0x27, 0x72, 0xa4, 0xfa,
|
||||
0x5f, 0x05, 0x64, 0xe7, 0xd0, 0xd5, 0xea, 0x07, 0xc6, 0xdc, 0xa1, 0xbb, 0xe7, 0x01, 0x9b, 0xc1,
|
||||
0xf0, 0x26, 0xc1, 0x34, 0xd4, 0x52, 0xc5, 0xeb, 0x15, 0xef, 0xd0, 0x5e, 0x19, 0xf2, 0xbe, 0xc0,
|
||||
0xd9, 0x15, 0xea, 0x8f, 0x51, 0x44, 0x7a, 0x81, 0x14, 0x46, 0xf2, 0x48, 0x66, 0xd7, 0xc8, 0x54,
|
||||
0x89, 0x2c, 0x17, 0x2a, 0x43, 0xde, 0x77, 0x60, 0x75, 0xb2, 0xff, 0x4a, 0x15, 0x87, 0xfe, 0xbe,
|
||||
0x62, 0xb6, 0x08, 0xbd, 0x7b, 0x18, 0x5d, 0xa1, 0x36, 0xf4, 0xeb, 0xf8, 0x4e, 0x99, 0xbb, 0xbe,
|
||||
0x06, 0x30, 0x54, 0xeb, 0x15, 0x1d, 0xb7, 0xe8, 0x78, 0x09, 0x79, 0xdc, 0xcb, 0x4d, 0xd3, 0x4b,
|
||||
0x39, 0x31, 0x0a, 0xc6, 0x15, 0xa5, 0xa7, 0x34, 0x10, 0xf3, 0xa0, 0xb3, 0x0a, 0x75, 0xc8, 0x9d,
|
||||
0x99, 0x33, 0x1f, 0x2e, 0x46, 0xb9, 0xf9, 0x23, 0x37, 0xed, 0x79, 0xbf, 0x2d, 0x18, 0x14, 0x10,
|
||||
0x9b, 0x80, 0xb3, 0x97, 0x82, 0x44, 0x5c, 0xdf, 0x2c, 0x19, 0x83, 0x4e, 0x1c, 0xee, 0xf0, 0x40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0b, 0x9a, 0x25, 0xec, 0x0a, 0x86, 0xd5, 0xbc,
|
||||
0xb1, 0x17, 0x87, 0xc6, 0xaa, 0x67, 0x73, 0xd2, 0x78, 0x6e, 0x46, 0xb8, 0x34, 0x67, 0x0a, 0xe1,
|
||||
0xea, 0xe8, 0x29, 0x84, 0xeb, 0xb3, 0x6f, 0x49, 0x8f, 0xb0, 0xf4, 0xcc, 0x0b, 0xe1, 0xc6, 0x24,
|
||||
0x99, 0xf0, 0xf6, 0x8d, 0x2c, 0xf9, 0x78, 0xfe, 0x75, 0x30, 0xa7, 0x89, 0x7d, 0x65, 0x3e, 0x9b,
|
||||
0x1e, 0xcd, 0xed, 0x77, 0x7f, 0x02, 0x00, 0x00, 0xff, 0xff, 0x30, 0xbd, 0x59, 0x5b, 0xca, 0x05,
|
||||
0x00, 0x00,
|
||||
}
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
syntax = "proto3";
|
||||
option go_package = "user;user";
|
||||
option go_package = "./user;user";
|
||||
package user;
|
||||
|
||||
message CommonResp{
|
||||
|
||||
@ -1,8 +1,9 @@
|
||||
package utils
|
||||
|
||||
import (
|
||||
"github.com/gin-gonic/gin"
|
||||
"net/http"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
|
||||
func CorsHandler() gin.HandlerFunc {
|
||||
|
||||
@ -13,23 +13,14 @@ func init() {
|
||||
ServerIP = config.Config.ServerIP
|
||||
return
|
||||
}
|
||||
//fixme Get the ip of the local network card
|
||||
netInterfaces, err := net.Interfaces()
|
||||
|
||||
// see https://gist.github.com/jniltinho/9787946#gistcomment-3019898
|
||||
conn, err := net.Dial("udp", "8.8.8.8:80")
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
for i := 0; i < len(netInterfaces); i++ {
|
||||
//Exclude useless network cards by judging the net.flag Up flag
|
||||
if (netInterfaces[i].Flags & net.FlagUp) != 0 {
|
||||
address, _ := netInterfaces[i].Addrs()
|
||||
for _, addr := range address {
|
||||
if ipNet, ok := addr.(*net.IPNet); ok && !ipNet.IP.IsLoopback() {
|
||||
if ipNet.IP.To4() != nil {
|
||||
ServerIP = ipNet.IP.String()
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
defer conn.Close()
|
||||
localAddr := conn.LocalAddr().(*net.UDPAddr)
|
||||
ServerIP = localAddr.IP.String()
|
||||
}
|
||||
|
||||
@ -4,7 +4,7 @@ import (
|
||||
"Open_IM/pkg/common/config"
|
||||
"Open_IM/pkg/common/db"
|
||||
"errors"
|
||||
"github.com/dgrijalva/jwt-go"
|
||||
"github.com/golang-jwt/jwt/v4"
|
||||
"time"
|
||||
)
|
||||
|
||||
@ -19,38 +19,27 @@ var (
|
||||
type Claims struct {
|
||||
UID string
|
||||
Platform string //login platform
|
||||
jwt.StandardClaims
|
||||
jwt.RegisteredClaims
|
||||
}
|
||||
|
||||
func BuildClaims(uid, accountAddr, platform string, ttl int64) Claims {
|
||||
now := time.Now().Unix()
|
||||
//if ttl=-1 Permanent token
|
||||
if ttl == -1 {
|
||||
return Claims{
|
||||
UID: uid,
|
||||
Platform: platform,
|
||||
StandardClaims: jwt.StandardClaims{
|
||||
ExpiresAt: -1,
|
||||
IssuedAt: now,
|
||||
NotBefore: now,
|
||||
}}
|
||||
}
|
||||
func BuildClaims(uid, platform string, ttl int64) Claims {
|
||||
now := time.Now()
|
||||
return Claims{
|
||||
UID: uid,
|
||||
Platform: platform,
|
||||
StandardClaims: jwt.StandardClaims{
|
||||
ExpiresAt: now + ttl, //Expiration time
|
||||
IssuedAt: now, //Issuing time
|
||||
NotBefore: now, //Begin Effective time
|
||||
RegisteredClaims: jwt.RegisteredClaims{
|
||||
ExpiresAt: jwt.NewNumericDate(now.Add(time.Duration(ttl*24) * time.Hour)), //Expiration time
|
||||
IssuedAt: jwt.NewNumericDate(now), //Issuing time
|
||||
NotBefore: jwt.NewNumericDate(now), //Begin Effective time
|
||||
}}
|
||||
}
|
||||
|
||||
func CreateToken(userID, accountAddr string, platform int32) (string, int64, error) {
|
||||
claims := BuildClaims(userID, accountAddr, PlatformIDToName(platform), config.Config.TokenPolicy.AccessExpire)
|
||||
func CreateToken(userID string, platform int32) (string, int64, error) {
|
||||
claims := BuildClaims(userID, PlatformIDToName(platform), config.Config.TokenPolicy.AccessExpire)
|
||||
token := jwt.NewWithClaims(jwt.SigningMethodHS256, claims)
|
||||
tokenString, err := token.SignedString([]byte(config.Config.TokenPolicy.AccessSecret))
|
||||
|
||||
return tokenString, claims.ExpiresAt, err
|
||||
return tokenString, claims.ExpiresAt.Time.Unix(), err
|
||||
}
|
||||
|
||||
func secret() jwt.Keyfunc {
|
||||
@ -59,7 +48,7 @@ func secret() jwt.Keyfunc {
|
||||
}
|
||||
}
|
||||
|
||||
func ParseToken(tokensString string) (claims *Claims, err error) {
|
||||
func getClaimFromToken(tokensString string) (*Claims, error) {
|
||||
token, err := jwt.ParseWithClaims(tokensString, &Claims{}, secret())
|
||||
if err != nil {
|
||||
if ve, ok := err.(*jwt.ValidationError); ok {
|
||||
@ -75,76 +64,66 @@ func ParseToken(tokensString string) (claims *Claims, err error) {
|
||||
}
|
||||
}
|
||||
if claims, ok := token.Claims.(*Claims); ok && token.Valid {
|
||||
// 1.check userid and platform class 0 not exists and 1 exists
|
||||
existsInterface, err := db.DB.ExistsUserIDAndPlatform(claims.UID, Platform2class[claims.Platform])
|
||||
return claims, nil
|
||||
}
|
||||
return nil, err
|
||||
}
|
||||
|
||||
func ParseToken(tokensString string) (claims *Claims, err error) {
|
||||
claims, err = getClaimFromToken(tokensString)
|
||||
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
// 1.check userid and platform class 0 not exists and 1 exists
|
||||
existsInterface, err := db.DB.ExistsUserIDAndPlatform(claims.UID, Platform2class[claims.Platform])
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
exists := existsInterface.(int64)
|
||||
//get config multi login policy
|
||||
if config.Config.MultiLoginPolicy.OnlyOneTerminalAccess {
|
||||
//OnlyOneTerminalAccess policy need to check all terminal
|
||||
//When only one end is allowed to log in, there is a situation that needs to be paid attention to. After PC login,
|
||||
//mobile login should check two platform times. One of them is less than the redis storage time, which is the invalid token.
|
||||
platform := "PC"
|
||||
if Platform2class[claims.Platform] == "PC" {
|
||||
platform = "Mobile"
|
||||
}
|
||||
|
||||
existsInterface, err = db.DB.ExistsUserIDAndPlatform(claims.UID, platform)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
exists := existsInterface.(int64)
|
||||
//get config multi login policy
|
||||
if config.Config.MultiLoginPolicy.OnlyOneTerminalAccess {
|
||||
//OnlyOneTerminalAccess policy need to check all terminal
|
||||
//When only one end is allowed to log in, there is a situation that needs to be paid attention to. After PC login,
|
||||
//mobile login should check two platform times. One of them is less than the redis storage time, which is the invalid token.
|
||||
if Platform2class[claims.Platform] == "PC" {
|
||||
existsInterface, err = db.DB.ExistsUserIDAndPlatform(claims.UID, "Mobile")
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
exists = existsInterface.(int64)
|
||||
if exists == 1 {
|
||||
res, err := MakeTheTokenInvalid(*claims, "Mobile")
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if res {
|
||||
return nil, TokenInvalid
|
||||
}
|
||||
}
|
||||
} else {
|
||||
existsInterface, err = db.DB.ExistsUserIDAndPlatform(claims.UID, "PC")
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
exists = existsInterface.(int64)
|
||||
if exists == 1 {
|
||||
res, err := MakeTheTokenInvalid(*claims, "PC")
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if res {
|
||||
return nil, TokenInvalid
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if exists == 1 {
|
||||
res, err := MakeTheTokenInvalid(*claims, Platform2class[claims.Platform])
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if res {
|
||||
return nil, TokenInvalid
|
||||
}
|
||||
exists = existsInterface.(int64)
|
||||
if exists == 1 {
|
||||
res, err := MakeTheTokenInvalid(claims, platform)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
} else if config.Config.MultiLoginPolicy.MobileAndPCTerminalAccessButOtherTerminalKickEachOther {
|
||||
if exists == 1 {
|
||||
res, err := MakeTheTokenInvalid(*claims, Platform2class[claims.Platform])
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if res {
|
||||
return nil, TokenInvalid
|
||||
}
|
||||
if res {
|
||||
return nil, TokenInvalid
|
||||
}
|
||||
}
|
||||
return claims, nil
|
||||
}
|
||||
return nil, TokenUnknown
|
||||
// config.Config.MultiLoginPolicy.MobileAndPCTerminalAccessButOtherTerminalKickEachOther == true
|
||||
// or PC/Mobile validate success
|
||||
// final check
|
||||
if exists == 1 {
|
||||
res, err := MakeTheTokenInvalid(claims, Platform2class[claims.Platform])
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if res {
|
||||
return nil, TokenInvalid
|
||||
}
|
||||
}
|
||||
return claims, nil
|
||||
}
|
||||
|
||||
func MakeTheTokenInvalid(currentClaims Claims, platformClass string) (bool, error) {
|
||||
func MakeTheTokenInvalid(currentClaims *Claims, platformClass string) (bool, error) {
|
||||
storedRedisTokenInterface, err := db.DB.GetPlatformToken(currentClaims.UID, platformClass)
|
||||
if err != nil {
|
||||
return false, err
|
||||
@ -154,40 +133,21 @@ func MakeTheTokenInvalid(currentClaims Claims, platformClass string) (bool, erro
|
||||
return false, err
|
||||
}
|
||||
//if issue time less than redis token then make this token invalid
|
||||
if currentClaims.IssuedAt < storedRedisPlatformClaims.IssuedAt {
|
||||
if currentClaims.IssuedAt.Time.Unix() < storedRedisPlatformClaims.IssuedAt.Time.Unix() {
|
||||
return true, TokenInvalid
|
||||
}
|
||||
return false, nil
|
||||
}
|
||||
|
||||
func ParseRedisInterfaceToken(redisToken interface{}) (*Claims, error) {
|
||||
token, err := jwt.ParseWithClaims(string(redisToken.([]uint8)), &Claims{}, secret())
|
||||
if err != nil {
|
||||
if ve, ok := err.(*jwt.ValidationError); ok {
|
||||
if ve.Errors&jwt.ValidationErrorMalformed != 0 {
|
||||
return nil, TokenMalformed
|
||||
} else if ve.Errors&jwt.ValidationErrorExpired != 0 {
|
||||
return nil, TokenExpired
|
||||
} else if ve.Errors&jwt.ValidationErrorNotValidYet != 0 {
|
||||
return nil, TokenNotValidYet
|
||||
} else {
|
||||
return nil, TokenInvalid
|
||||
}
|
||||
}
|
||||
}
|
||||
if claims, ok := token.Claims.(*Claims); ok && token.Valid {
|
||||
return claims, nil
|
||||
}
|
||||
return nil, err
|
||||
return getClaimFromToken(string(redisToken.([]uint8)))
|
||||
}
|
||||
|
||||
//Validation token, false means failure, true means successful verification
|
||||
func VerifyToken(token, uid string) bool {
|
||||
claims, err := ParseToken(token)
|
||||
if err != nil {
|
||||
if err != nil || claims.UID != uid {
|
||||
return false
|
||||
} else if claims.UID != uid {
|
||||
return false
|
||||
} else {
|
||||
return true
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
@ -106,6 +106,11 @@ func MapToJsonString(param map[string]interface{}) string {
|
||||
dataString := string(dataType)
|
||||
return dataString
|
||||
}
|
||||
func MapIntToJsonString(param map[string]int32) string {
|
||||
dataType, _ := json.Marshal(param)
|
||||
dataString := string(dataType)
|
||||
return dataString
|
||||
}
|
||||
func JsonStringToMap(str string) (tempMap map[string]interface{}) {
|
||||
_ = json.Unmarshal([]byte(str), &tempMap)
|
||||
return tempMap
|
||||
|
||||
@ -37,6 +37,7 @@ func IsContain(target string, List []string) bool {
|
||||
return false
|
||||
|
||||
}
|
||||
|
||||
func InterfaceArrayToStringArray(data []interface{}) (i []string) {
|
||||
for _, param := range data {
|
||||
i = append(i, param.(string))
|
||||
@ -62,3 +63,6 @@ func GetMsgID(sendID string) string {
|
||||
func int64ToString(i int64) string {
|
||||
return strconv.FormatInt(i, 10)
|
||||
}
|
||||
func Int64ToString(i int64) string {
|
||||
return strconv.FormatInt(i, 10)
|
||||
}
|
||||
|
||||
@ -15,17 +15,39 @@ service_port_name=(
|
||||
openImWsPort
|
||||
openImSdkWsPort
|
||||
)
|
||||
for i in ${service_port_name[*]};do
|
||||
list=$(cat $config_path | grep -w ${i} | awk -F '[:]' '{print $NF}')
|
||||
list_to_string $list
|
||||
for j in ${ports_array};do
|
||||
port=`netstat -netulp |grep ./open_im| awk '{print $4}'|grep -w ${j}|awk -F '[:]' '{print $NF}'`
|
||||
if [[ ${port} -ne ${j} ]]; then
|
||||
echo -e ${YELLOW_PREFIX}${i}${COLOR_SUFFIX}${RED_PREFIX}" service does not start normally,not initiated port is "${COLOR_SUFFIX}${YELLOW_PREFIX}${j}${COLOR_SUFFIX}
|
||||
exit 1
|
||||
else
|
||||
echo -e ${j}${GREEN_PREFIX}" port has been listening,belongs service is "${i}${COLOR_SUFFIX}
|
||||
fi
|
||||
done
|
||||
for i in ${service_port_name[*]}; do
|
||||
list=$(cat $config_path | grep -w ${i} | awk -F '[:]' '{print $NF}')
|
||||
list_to_string $list
|
||||
for j in ${ports_array}; do
|
||||
port=$(netstat -netulp | grep ./open_im | awk '{print $4}' | grep -w ${j} | awk -F '[:]' '{print $NF}')
|
||||
if [[ ${port} -ne ${j} ]]; then
|
||||
echo -e ${YELLOW_PREFIX}${i}${COLOR_SUFFIX}${RED_PREFIX}" service does not start normally,not initiated port is "${COLOR_SUFFIX}${YELLOW_PREFIX}${j}${COLOR_SUFFIX}
|
||||
echo -e ${RED_PREFIX}"please check ../logs/openIM.log "${COLOR_SUFFIX}
|
||||
exit -1
|
||||
else
|
||||
echo -e ${j}${GREEN_PREFIX}" port has been listening,belongs service is "${i}${COLOR_SUFFIX}
|
||||
fi
|
||||
done
|
||||
echo -e ${YELLOW_PREFIX}"all services launch success"${COLOR_SUFFIX}
|
||||
done
|
||||
|
||||
#Check launched service process
|
||||
check=$(ps aux | grep -w ./${msg_transfer_name} | grep -v grep | wc -l)
|
||||
if [ $check -eq ${msg_transfer_service_num} ]; then
|
||||
echo -e ${GREEN_PREFIX}"none port has been listening,belongs service is openImMsgTransfer"${COLOR_SUFFIX}
|
||||
else
|
||||
echo -e ${RED_PREFIX}"openImMsgTransfer service does not start normally, num err"${COLOR_SUFFIX}
|
||||
echo -e ${RED_PREFIX}"please check ../logs/openIM.log "${COLOR_SUFFIX}
|
||||
exit -1
|
||||
fi
|
||||
|
||||
|
||||
check=$(ps aux | grep -w ./${timer_task_name} | grep -v grep | wc -l)
|
||||
if [ $check -ge 1 ]; then
|
||||
echo -e ${GREEN_PREFIX}"none port has been listening,belongs service is openImMsgTimer"${COLOR_SUFFIX}
|
||||
else
|
||||
echo -e ${RED_PREFIX}"openImMsgTimer service does not start normally"${COLOR_SUFFIX}
|
||||
echo -e ${RED_PREFIX}"please check ../logs/openIM.log "${COLOR_SUFFIX}
|
||||
exit -1
|
||||
fi
|
||||
|
||||
echo -e ${YELLOW_PREFIX}"all services launch success"${COLOR_SUFFIX}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user