parent
c5037be688
commit
9fcb829b71
@ -0,0 +1,15 @@
|
|||||||
|
package common
|
||||||
|
|
||||||
|
const (
|
||||||
|
UsernameV2 = "root"
|
||||||
|
PasswordV2 = "openIM123"
|
||||||
|
IpV2 = "43.128.72.19:13306"
|
||||||
|
DatabaseV2 = "openIM_v2"
|
||||||
|
)
|
||||||
|
|
||||||
|
const (
|
||||||
|
UsernameV3 = "root"
|
||||||
|
PasswordV3 = "openIM123"
|
||||||
|
IpV3 = "43.134.63.160:13306"
|
||||||
|
DatabaseV3 = "openIM_v3"
|
||||||
|
)
|
@ -0,0 +1,15 @@
|
|||||||
|
package common
|
||||||
|
|
||||||
|
import "fmt"
|
||||||
|
|
||||||
|
func ErrorPrint(s string) {
|
||||||
|
fmt.Printf("\x1b[%dm%v\x1b[0m\n", 31, s)
|
||||||
|
}
|
||||||
|
|
||||||
|
func SuccessPrint(s string) {
|
||||||
|
fmt.Printf("\x1b[%dm%v\x1b[0m\n", 32, s)
|
||||||
|
}
|
||||||
|
|
||||||
|
func WarningPrint(s string) {
|
||||||
|
fmt.Printf("\x1b[%dmWarning: But %v\x1b[0m\n", 33, s)
|
||||||
|
}
|
@ -1,5 +1 @@
|
|||||||
package data_conversion
|
package data_conversion
|
||||||
|
|
||||||
func main() {
|
|
||||||
|
|
||||||
}
|
|
@ -1 +0,0 @@
|
|||||||
protoc --go_out=plugins=grpc:./msg --go_opt=module=github.com/OpenIMSDK/Open-IM-Server/tools/data-conversion/msg msg/msg.proto
|
|
@ -1,15 +0,0 @@
|
|||||||
# Copyright © 2023 OpenIM. All rights reserved.
|
|
||||||
#
|
|
||||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
# you may not use this file except in compliance with the License.
|
|
||||||
# You may obtain a copy of the License at
|
|
||||||
#
|
|
||||||
# http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
#
|
|
||||||
# Unless required by applicable law or agreed to in writing, software
|
|
||||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
# See the License for the specific language governing permissions and
|
|
||||||
# limitations under the License.
|
|
||||||
|
|
||||||
protoc --go_out=plugins=grpc:./msg --go_opt=module=github.com/OpenIMSDK/Open-IM-Server/tools/data-conversion/msg msg/msg.proto
|
|
@ -1,3 +1,68 @@
|
|||||||
module github.com/OpenIMSDK/Open-IM-Server/tools/data-conversion
|
module github.com/OpenIMSDK/Open-IM-Server/tools/conversion
|
||||||
|
|
||||||
go 1.20
|
go 1.20
|
||||||
|
|
||||||
|
|
||||||
|
require (
|
||||||
|
github.com/OpenIMSDK/protocol v0.0.16 // 0.0.16 just for data conversion
|
||||||
|
github.com/OpenIMSDK/tools v0.0.14
|
||||||
|
github.com/golang/protobuf v1.5.3
|
||||||
|
golang.org/x/net v0.14.0
|
||||||
|
google.golang.org/grpc v1.57.0
|
||||||
|
)
|
||||||
|
|
||||||
|
require (
|
||||||
|
github.com/bytedance/sonic v1.9.1 // indirect
|
||||||
|
github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311 // indirect
|
||||||
|
github.com/davecgh/go-spew v1.1.1 // indirect
|
||||||
|
github.com/eapache/go-resiliency v1.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/gabriel-vasile/mimetype v1.4.2 // indirect
|
||||||
|
github.com/gin-contrib/sse v0.1.0 // indirect
|
||||||
|
github.com/gin-gonic/gin v1.9.1 // indirect
|
||||||
|
github.com/go-playground/locales v0.14.1 // indirect
|
||||||
|
github.com/go-playground/universal-translator v0.18.1 // indirect
|
||||||
|
github.com/go-playground/validator/v10 v10.14.0 // indirect
|
||||||
|
github.com/go-zookeeper/zk v1.0.3 // indirect
|
||||||
|
github.com/goccy/go-json v0.10.2 // indirect
|
||||||
|
github.com/golang/snappy v0.0.4 // indirect
|
||||||
|
github.com/hashicorp/go-uuid v1.0.2 // indirect
|
||||||
|
github.com/jcmturner/aescts/v2 v2.0.0 // indirect
|
||||||
|
github.com/jcmturner/dnsutils/v2 v2.0.0 // indirect
|
||||||
|
github.com/jcmturner/gofork v1.0.0 // indirect
|
||||||
|
github.com/jcmturner/gokrb5/v8 v8.4.2 // indirect
|
||||||
|
github.com/jcmturner/rpc/v2 v2.0.3 // indirect
|
||||||
|
github.com/jinzhu/inflection v1.0.0 // indirect
|
||||||
|
github.com/jinzhu/now v1.1.5 // indirect
|
||||||
|
github.com/json-iterator/go v1.1.12 // indirect
|
||||||
|
github.com/klauspost/compress v1.16.7 // indirect
|
||||||
|
github.com/klauspost/cpuid/v2 v2.2.4 // indirect
|
||||||
|
github.com/leodido/go-urn v1.2.4 // indirect
|
||||||
|
github.com/lestrrat-go/file-rotatelogs v2.4.0+incompatible // indirect
|
||||||
|
github.com/lestrrat-go/strftime v1.0.6 // indirect
|
||||||
|
github.com/mattn/go-isatty v0.0.19 // indirect
|
||||||
|
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
|
||||||
|
github.com/modern-go/reflect2 v1.0.2 // indirect
|
||||||
|
github.com/pelletier/go-toml/v2 v2.0.8 // indirect
|
||||||
|
github.com/pierrec/lz4 v2.6.0+incompatible // indirect
|
||||||
|
github.com/pkg/errors v0.9.1 // indirect
|
||||||
|
github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect
|
||||||
|
github.com/twitchyliquid64/golang-asm v0.15.1 // indirect
|
||||||
|
github.com/ugorji/go/codec v1.2.11 // indirect
|
||||||
|
go.uber.org/atomic v1.7.0 // indirect
|
||||||
|
go.uber.org/multierr v1.6.0 // indirect
|
||||||
|
go.uber.org/zap v1.24.0 // indirect
|
||||||
|
golang.org/x/arch v0.3.0 // indirect
|
||||||
|
golang.org/x/crypto v0.12.0 // indirect
|
||||||
|
golang.org/x/sys v0.11.0 // indirect
|
||||||
|
golang.org/x/text v0.12.0 // indirect
|
||||||
|
google.golang.org/genproto/googleapis/rpc v0.0.0-20230807174057-1744710a1577 // indirect
|
||||||
|
gopkg.in/yaml.v3 v3.0.1 // indirect
|
||||||
|
gorm.io/gorm v1.23.8 // indirect
|
||||||
|
)
|
||||||
|
|
||||||
|
require (
|
||||||
|
github.com/Shopify/sarama v1.29.0
|
||||||
|
google.golang.org/protobuf v1.31.0
|
||||||
|
)
|
||||||
|
@ -1,156 +0,0 @@
|
|||||||
// Copyright © 2023 OpenIM. All rights reserved.
|
|
||||||
//
|
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
// you may not use this file except in compliance with the License.
|
|
||||||
// You may obtain a copy of the License at
|
|
||||||
//
|
|
||||||
// http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
//
|
|
||||||
// Unless required by applicable law or agreed to in writing, software
|
|
||||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
// See the License for the specific language governing permissions and
|
|
||||||
// limitations under the License.
|
|
||||||
|
|
||||||
package data_conversion
|
|
||||||
|
|
||||||
import (
|
|
||||||
"fmt"
|
|
||||||
"github.com/OpenIMSDK/Open-IM-Server/pkg/rpcclient"
|
|
||||||
pbMsg "github.com/OpenIMSDK/protocol/msg"
|
|
||||||
openKeeper "github.com/OpenIMSDK/tools/discoveryregistry/zookeeper"
|
|
||||||
"github.com/OpenIMSDK/tools/errs"
|
|
||||||
"github.com/OpenIMSDK/tools/log"
|
|
||||||
"github.com/Shopify/sarama"
|
|
||||||
"github.com/golang/protobuf/proto"
|
|
||||||
"sync"
|
|
||||||
"time"
|
|
||||||
)
|
|
||||||
|
|
||||||
var (
|
|
||||||
topic = "ws2ms_chat"
|
|
||||||
addr = "127.0.0.1:9092"
|
|
||||||
//addr = "43.128.72.19:9092"
|
|
||||||
)
|
|
||||||
|
|
||||||
const (
|
|
||||||
ZkAddr = "127.0.0.1:2181"
|
|
||||||
ZKSchema = "openim"
|
|
||||||
ZKUsername = ""
|
|
||||||
ZKPassword = ""
|
|
||||||
)
|
|
||||||
|
|
||||||
var consumer sarama.Consumer
|
|
||||||
var producerV2 sarama.SyncProducer
|
|
||||||
var wg sync.WaitGroup
|
|
||||||
|
|
||||||
func init() {
|
|
||||||
|
|
||||||
//Producer
|
|
||||||
config := sarama.NewConfig() // Instantiate a sarama Config
|
|
||||||
config.Producer.Return.Successes = true // Whether to enable the successes channel to be notified after the message is sent successfully
|
|
||||||
config.Producer.Return.Errors = true
|
|
||||||
config.Producer.RequiredAcks = sarama.WaitForAll // Set producer Message Reply level 0 1 all
|
|
||||||
config.Producer.Partitioner = sarama.NewHashPartitioner // Set the hash-key automatic hash partition. When sending a message, you must specify the key value of the message. If there is no key, the partition will be selected randomly
|
|
||||||
|
|
||||||
client, err := sarama.NewSyncProducer([]string{addr}, config)
|
|
||||||
if err != nil {
|
|
||||||
fmt.Println("producer closed, err:", err)
|
|
||||||
}
|
|
||||||
producerV2 = client
|
|
||||||
|
|
||||||
//Consumer
|
|
||||||
consumerT, err := sarama.NewConsumer([]string{addr}, sarama.NewConfig())
|
|
||||||
if err != nil {
|
|
||||||
fmt.Printf("fail to start consumer, err:%v\n", err)
|
|
||||||
}
|
|
||||||
consumer = consumerT
|
|
||||||
}
|
|
||||||
|
|
||||||
func SendMessage() {
|
|
||||||
// construct a message
|
|
||||||
msg := &sarama.ProducerMessage{}
|
|
||||||
msg.Topic = topic
|
|
||||||
msg.Value = sarama.StringEncoder("this is a test log")
|
|
||||||
|
|
||||||
// Send a message
|
|
||||||
pid, offset, err := producerV2.SendMessage(msg)
|
|
||||||
if err != nil {
|
|
||||||
fmt.Println("send msg failed, err:", err)
|
|
||||||
}
|
|
||||||
fmt.Printf("pid:%v offset:%v\n", pid, offset)
|
|
||||||
}
|
|
||||||
|
|
||||||
func GetMessage() {
|
|
||||||
partitionList, err := consumer.Partitions(topic) // Get all partitions according to topic
|
|
||||||
if err != nil {
|
|
||||||
fmt.Printf("fail to get list of partition:err%v\n", err)
|
|
||||||
}
|
|
||||||
fmt.Println(partitionList)
|
|
||||||
//var ch chan int
|
|
||||||
//msgRpcClient, err := GetMsgRpcService()
|
|
||||||
if err != nil {
|
|
||||||
fmt.Printf("rpc err:%s", err)
|
|
||||||
}
|
|
||||||
|
|
||||||
for partition := range partitionList {
|
|
||||||
pc, err := consumer.ConsumePartition(topic, int32(partition), sarama.OffsetOldest)
|
|
||||||
if err != nil {
|
|
||||||
panic(err)
|
|
||||||
}
|
|
||||||
wg.Add(1)
|
|
||||||
defer pc.AsyncClose()
|
|
||||||
|
|
||||||
go func(sarama.PartitionConsumer) {
|
|
||||||
defer wg.Done()
|
|
||||||
for msg := range pc.Messages() {
|
|
||||||
//Transfer([]*sarama.ConsumerMessage{msg}, msgRpcClient)
|
|
||||||
|
|
||||||
//V2
|
|
||||||
msgFromMQV2 := pbMsg.MsgDataToMQ{}
|
|
||||||
err := proto.Unmarshal(msg.Value, &msgFromMQV2)
|
|
||||||
if err != nil {
|
|
||||||
fmt.Printf("err:%s \n", err)
|
|
||||||
}
|
|
||||||
fmt.Printf("msg:%s \n", &msgFromMQV2)
|
|
||||||
|
|
||||||
//V3
|
|
||||||
//msgFromMQ := &sdkws.MsgData{}
|
|
||||||
//err = proto.Unmarshal(msg.Value, msgFromMQ)
|
|
||||||
//if err != nil {
|
|
||||||
// fmt.Printf("err:%s \n", err)
|
|
||||||
//}
|
|
||||||
//fmt.Printf("msg:%s \n", &msgFromMQ)
|
|
||||||
fmt.Printf("Partition:%d, Offset:%d, Key:%s, Value:%s\n", msg.Partition, msg.Offset, string(msg.Key), string(msg.Value))
|
|
||||||
}
|
|
||||||
|
|
||||||
}(pc)
|
|
||||||
|
|
||||||
}
|
|
||||||
wg.Wait()
|
|
||||||
consumer.Close()
|
|
||||||
//_ = <-ch
|
|
||||||
}
|
|
||||||
|
|
||||||
func Transfer(consumerMessages []*sarama.ConsumerMessage, msgRpcClient rpcclient.MessageRpcClient) {
|
|
||||||
for i := 0; i < len(consumerMessages); i++ {
|
|
||||||
msgFromMQV2 := pbMsg.MsgDataToMQ{}
|
|
||||||
err := proto.Unmarshal(consumerMessages[i].Value, &msgFromMQV2)
|
|
||||||
if err != nil {
|
|
||||||
fmt.Printf("err:%s \n", err)
|
|
||||||
}
|
|
||||||
fmt.Printf("msg:%s \n", &msgFromMQV2)
|
|
||||||
//msgRpcClient.SendMsg(context.Background(),msgFromMQV2)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
func GetMsgRpcService() (rpcclient.MessageRpcClient, error) {
|
|
||||||
client, err := openKeeper.NewClient([]string{ZkAddr}, ZKSchema,
|
|
||||||
openKeeper.WithFreq(time.Hour), openKeeper.WithRoundRobin(), openKeeper.WithUserNameAndPassword(ZKUsername,
|
|
||||||
ZKPassword), openKeeper.WithTimeout(10), openKeeper.WithLogger(log.NewZkLogger()))
|
|
||||||
msgClient := rpcclient.NewMessageRpcClient(client)
|
|
||||||
if err != nil {
|
|
||||||
return msgClient, errs.Wrap(err)
|
|
||||||
}
|
|
||||||
return msgClient, nil
|
|
||||||
}
|
|
@ -1,15 +0,0 @@
|
|||||||
// Copyright © 2023 OpenIM. All rights reserved.
|
|
||||||
//
|
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
// you may not use this file except in compliance with the License.
|
|
||||||
// You may obtain a copy of the License at
|
|
||||||
//
|
|
||||||
// http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
//
|
|
||||||
// Unless required by applicable law or agreed to in writing, software
|
|
||||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
// See the License for the specific language governing permissions and
|
|
||||||
// limitations under the License.
|
|
||||||
|
|
||||||
package data_conversion
|
|
@ -0,0 +1,339 @@
|
|||||||
|
// Copyright © 2023 OpenIM. All rights reserved.
|
||||||
|
//
|
||||||
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
// you may not use this file except in compliance with the License.
|
||||||
|
// You may obtain a copy of the License at
|
||||||
|
//
|
||||||
|
// http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
//
|
||||||
|
// Unless required by applicable law or agreed to in writing, software
|
||||||
|
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
// See the License for the specific language governing permissions and
|
||||||
|
// limitations under the License.
|
||||||
|
|
||||||
|
package data_conversion
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"encoding/json"
|
||||||
|
"fmt"
|
||||||
|
pbmsg "github.com/OpenIMSDK/Open-IM-Server/tools/conversion/proto/msg"
|
||||||
|
"github.com/OpenIMSDK/protocol/constant"
|
||||||
|
msgv3 "github.com/OpenIMSDK/protocol/msg"
|
||||||
|
"github.com/OpenIMSDK/protocol/sdkws"
|
||||||
|
openKeeper "github.com/OpenIMSDK/tools/discoveryregistry/zookeeper"
|
||||||
|
"github.com/OpenIMSDK/tools/log"
|
||||||
|
"github.com/OpenIMSDK/tools/mw"
|
||||||
|
"github.com/Shopify/sarama"
|
||||||
|
"github.com/golang/protobuf/proto"
|
||||||
|
"google.golang.org/grpc"
|
||||||
|
"google.golang.org/grpc/credentials/insecure"
|
||||||
|
"sync"
|
||||||
|
"time"
|
||||||
|
)
|
||||||
|
|
||||||
|
var (
|
||||||
|
topic = "ws2ms_chat"
|
||||||
|
addr = "127.0.0.1:9092"
|
||||||
|
//addr = "43.128.72.19:9092"
|
||||||
|
)
|
||||||
|
|
||||||
|
const (
|
||||||
|
ZkAddr = "43.134.63.160:2181"
|
||||||
|
ZKSchema = "openim"
|
||||||
|
ZKUsername = ""
|
||||||
|
ZKPassword = ""
|
||||||
|
MsgName = "Msg"
|
||||||
|
)
|
||||||
|
|
||||||
|
var consumer sarama.Consumer
|
||||||
|
var producerV2 sarama.SyncProducer
|
||||||
|
var wg sync.WaitGroup
|
||||||
|
|
||||||
|
var msgRpcClient msgv3.MsgClient
|
||||||
|
|
||||||
|
func init() {
|
||||||
|
|
||||||
|
//Producer
|
||||||
|
config := sarama.NewConfig() // Instantiate a sarama Config
|
||||||
|
config.Producer.Return.Successes = true // Whether to enable the successes channel to be notified after the message is sent successfully
|
||||||
|
config.Producer.Return.Errors = true
|
||||||
|
config.Producer.RequiredAcks = sarama.WaitForAll // Set producer Message Reply level 0 1 all
|
||||||
|
config.Producer.Partitioner = sarama.NewHashPartitioner // Set the hash-key automatic hash partition. When sending a message, you must specify the key value of the message. If there is no key, the partition will be selected randomly
|
||||||
|
|
||||||
|
client, err := sarama.NewSyncProducer([]string{addr}, config)
|
||||||
|
if err != nil {
|
||||||
|
fmt.Println("producer closed, err:", err)
|
||||||
|
}
|
||||||
|
producerV2 = client
|
||||||
|
|
||||||
|
//Consumer
|
||||||
|
consumerT, err := sarama.NewConsumer([]string{addr}, sarama.NewConfig())
|
||||||
|
if err != nil {
|
||||||
|
fmt.Printf("fail to start consumer, err:%v\n", err)
|
||||||
|
}
|
||||||
|
consumer = consumerT
|
||||||
|
|
||||||
|
msgRpcClient = NewMessage()
|
||||||
|
}
|
||||||
|
|
||||||
|
func SendMessage() {
|
||||||
|
// construct a message
|
||||||
|
msg := &sarama.ProducerMessage{}
|
||||||
|
msg.Topic = topic
|
||||||
|
msg.Value = sarama.StringEncoder("this is a test log")
|
||||||
|
|
||||||
|
// Send a message
|
||||||
|
pid, offset, err := producerV2.SendMessage(msg)
|
||||||
|
if err != nil {
|
||||||
|
fmt.Println("send msg failed, err:", err)
|
||||||
|
}
|
||||||
|
fmt.Printf("pid:%v offset:%v\n", pid, offset)
|
||||||
|
}
|
||||||
|
|
||||||
|
func GetMessage() {
|
||||||
|
partitionList, err := consumer.Partitions(topic) // Get all partitions according to topic
|
||||||
|
if err != nil {
|
||||||
|
fmt.Printf("fail to get list of partition:err%v\n", err)
|
||||||
|
}
|
||||||
|
fmt.Println(partitionList)
|
||||||
|
//var ch chan int
|
||||||
|
|
||||||
|
if err != nil {
|
||||||
|
fmt.Printf("rpc err:%s", err)
|
||||||
|
}
|
||||||
|
|
||||||
|
for partition := range partitionList {
|
||||||
|
pc, err := consumer.ConsumePartition(topic, int32(partition), sarama.OffsetOldest)
|
||||||
|
if err != nil {
|
||||||
|
panic(err)
|
||||||
|
}
|
||||||
|
wg.Add(1)
|
||||||
|
defer pc.AsyncClose()
|
||||||
|
|
||||||
|
go func(sarama.PartitionConsumer) {
|
||||||
|
defer wg.Done()
|
||||||
|
for msg := range pc.Messages() {
|
||||||
|
Transfer([]*sarama.ConsumerMessage{msg})
|
||||||
|
|
||||||
|
//V2
|
||||||
|
//msgFromMQV2 := pbmsg.MsgDataToMQ{}
|
||||||
|
//err := proto.Unmarshal(msg.Value, &msgFromMQV2)
|
||||||
|
//if err != nil {
|
||||||
|
// fmt.Printf("err:%s \n", err)
|
||||||
|
//}
|
||||||
|
//fmt.Printf("msg:%s \n", &msgFromMQV2)
|
||||||
|
|
||||||
|
//V3
|
||||||
|
//msgFromMQ := &sdkws.MsgData{}
|
||||||
|
//err = proto.Unmarshal(msg.Value, msgFromMQ)
|
||||||
|
//if err != nil {
|
||||||
|
// fmt.Printf("err:%s \n", err)
|
||||||
|
//}
|
||||||
|
//fmt.Printf("msg:%s \n", &msgFromMQ)
|
||||||
|
//fmt.Printf("Partition:%d, Offset:%d, Key:%s, Value:%s\n", msg.Partition, msg.Offset, string(msg.Key), string(msg.Value))
|
||||||
|
}
|
||||||
|
|
||||||
|
}(pc)
|
||||||
|
|
||||||
|
}
|
||||||
|
wg.Wait()
|
||||||
|
consumer.Close()
|
||||||
|
//_ = <-ch
|
||||||
|
}
|
||||||
|
|
||||||
|
type TextElem struct {
|
||||||
|
Content string `json:"content"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func Transfer(consumerMessages []*sarama.ConsumerMessage) {
|
||||||
|
for i := 0; i < len(consumerMessages); i++ {
|
||||||
|
fmt.Printf("Partition:%d, Offset:%d, Key:%s \n", consumerMessages[i].Partition, consumerMessages[i].Offset, string(consumerMessages[i].Key))
|
||||||
|
msgFromMQV2 := pbmsg.MsgDataToMQ{}
|
||||||
|
err := proto.Unmarshal(consumerMessages[i].Value, &msgFromMQV2)
|
||||||
|
if err != nil {
|
||||||
|
fmt.Printf("err:%s \n", err)
|
||||||
|
}
|
||||||
|
fmt.Printf("msg:%s \n", &msgFromMQV2)
|
||||||
|
//fmt.Printf("rpcClient:%s \n", msgRpcClient)
|
||||||
|
if msgFromMQV2.MsgData.ContentType == constant.Text {
|
||||||
|
text := string(msgFromMQV2.MsgData.Content)
|
||||||
|
textElem := TextElem{
|
||||||
|
Content: text,
|
||||||
|
}
|
||||||
|
msgFromMQV2.MsgData.Content, err = json.Marshal(textElem)
|
||||||
|
if err != nil {
|
||||||
|
fmt.Printf("test err: %s \n", err)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if msgFromMQV2.MsgData.SessionType == constant.SingleChatType || msgFromMQV2.MsgData.SessionType == constant.NotificationChatType {
|
||||||
|
if string(consumerMessages[i].Key) != msgFromMQV2.MsgData.SendID {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
offlinePushInfo := &sdkws.OfflinePushInfo{
|
||||||
|
Title: msgFromMQV2.MsgData.OfflinePushInfo.Title,
|
||||||
|
Desc: msgFromMQV2.MsgData.OfflinePushInfo.Desc,
|
||||||
|
Ex: msgFromMQV2.MsgData.OfflinePushInfo.Ex,
|
||||||
|
IOSPushSound: msgFromMQV2.MsgData.OfflinePushInfo.IOSPushSound,
|
||||||
|
IOSBadgeCount: msgFromMQV2.MsgData.OfflinePushInfo.IOSBadgeCount,
|
||||||
|
SignalInfo: "",
|
||||||
|
}
|
||||||
|
msgData := &sdkws.MsgData{
|
||||||
|
SendID: msgFromMQV2.MsgData.SendID,
|
||||||
|
RecvID: msgFromMQV2.MsgData.RecvID,
|
||||||
|
GroupID: msgFromMQV2.MsgData.GroupID,
|
||||||
|
ClientMsgID: msgFromMQV2.MsgData.ClientMsgID,
|
||||||
|
ServerMsgID: msgFromMQV2.MsgData.ServerMsgID,
|
||||||
|
SenderPlatformID: msgFromMQV2.MsgData.SenderPlatformID,
|
||||||
|
SenderNickname: msgFromMQV2.MsgData.SenderNickname,
|
||||||
|
SenderFaceURL: msgFromMQV2.MsgData.SenderFaceURL,
|
||||||
|
SessionType: msgFromMQV2.MsgData.SessionType,
|
||||||
|
MsgFrom: msgFromMQV2.MsgData.MsgFrom,
|
||||||
|
ContentType: msgFromMQV2.MsgData.ContentType,
|
||||||
|
Content: msgFromMQV2.MsgData.Content,
|
||||||
|
Seq: int64(msgFromMQV2.MsgData.Seq),
|
||||||
|
SendTime: msgFromMQV2.MsgData.SendTime,
|
||||||
|
CreateTime: msgFromMQV2.MsgData.CreateTime,
|
||||||
|
Status: msgFromMQV2.MsgData.Status,
|
||||||
|
IsRead: false,
|
||||||
|
Options: msgFromMQV2.MsgData.Options,
|
||||||
|
OfflinePushInfo: offlinePushInfo,
|
||||||
|
AtUserIDList: msgFromMQV2.MsgData.AtUserIDList,
|
||||||
|
AttachedInfo: msgFromMQV2.MsgData.AttachedInfo,
|
||||||
|
Ex: msgFromMQV2.MsgData.Ex,
|
||||||
|
}
|
||||||
|
ctx := context.WithValue(context.Background(), "operationID", msgFromMQV2.OperationID)
|
||||||
|
resp, err := msgRpcClient.SendMsg(ctx, &msgv3.SendMsgReq{MsgData: msgData})
|
||||||
|
if err != nil {
|
||||||
|
fmt.Printf("resp err: %s \n", err)
|
||||||
|
}
|
||||||
|
fmt.Printf("resp: %s \n", resp)
|
||||||
|
} else if msgFromMQV2.MsgData.SessionType == constant.GroupChatType {
|
||||||
|
if string(consumerMessages[i].Key) != msgFromMQV2.MsgData.SendID {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
if msgFromMQV2.MsgData.ContentType < constant.ContentTypeBegin || msgFromMQV2.MsgData.ContentType > constant.AdvancedText {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
offlinePushInfo := &sdkws.OfflinePushInfo{
|
||||||
|
Title: msgFromMQV2.MsgData.OfflinePushInfo.Title,
|
||||||
|
Desc: msgFromMQV2.MsgData.OfflinePushInfo.Desc,
|
||||||
|
Ex: msgFromMQV2.MsgData.OfflinePushInfo.Ex,
|
||||||
|
IOSPushSound: msgFromMQV2.MsgData.OfflinePushInfo.IOSPushSound,
|
||||||
|
IOSBadgeCount: msgFromMQV2.MsgData.OfflinePushInfo.IOSBadgeCount,
|
||||||
|
SignalInfo: "",
|
||||||
|
}
|
||||||
|
msgData := &sdkws.MsgData{
|
||||||
|
SendID: msgFromMQV2.MsgData.SendID,
|
||||||
|
RecvID: msgFromMQV2.MsgData.RecvID,
|
||||||
|
GroupID: msgFromMQV2.MsgData.GroupID,
|
||||||
|
ClientMsgID: msgFromMQV2.MsgData.ClientMsgID,
|
||||||
|
ServerMsgID: msgFromMQV2.MsgData.ServerMsgID,
|
||||||
|
SenderPlatformID: msgFromMQV2.MsgData.SenderPlatformID,
|
||||||
|
SenderNickname: msgFromMQV2.MsgData.SenderNickname,
|
||||||
|
SenderFaceURL: msgFromMQV2.MsgData.SenderFaceURL,
|
||||||
|
SessionType: constant.SuperGroupChatType,
|
||||||
|
MsgFrom: msgFromMQV2.MsgData.MsgFrom,
|
||||||
|
ContentType: msgFromMQV2.MsgData.ContentType,
|
||||||
|
Content: msgFromMQV2.MsgData.Content,
|
||||||
|
Seq: int64(msgFromMQV2.MsgData.Seq),
|
||||||
|
SendTime: msgFromMQV2.MsgData.SendTime,
|
||||||
|
CreateTime: msgFromMQV2.MsgData.CreateTime,
|
||||||
|
Status: msgFromMQV2.MsgData.Status,
|
||||||
|
IsRead: false,
|
||||||
|
Options: msgFromMQV2.MsgData.Options,
|
||||||
|
OfflinePushInfo: offlinePushInfo,
|
||||||
|
AtUserIDList: msgFromMQV2.MsgData.AtUserIDList,
|
||||||
|
AttachedInfo: msgFromMQV2.MsgData.AttachedInfo,
|
||||||
|
Ex: msgFromMQV2.MsgData.Ex,
|
||||||
|
}
|
||||||
|
ctx := context.WithValue(context.Background(), "operationID", msgFromMQV2.OperationID)
|
||||||
|
resp, err := msgRpcClient.SendMsg(ctx, &msgv3.SendMsgReq{MsgData: msgData})
|
||||||
|
if err != nil {
|
||||||
|
fmt.Printf("resp err: %s \n", err)
|
||||||
|
}
|
||||||
|
fmt.Printf("resp: %s \n", resp)
|
||||||
|
} else if msgFromMQV2.MsgData.SessionType == constant.SuperGroupChatType {
|
||||||
|
if msgFromMQV2.MsgData.ContentType < constant.ContentTypeBegin || msgFromMQV2.MsgData.ContentType > constant.AdvancedText {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
offlinePushInfo := &sdkws.OfflinePushInfo{
|
||||||
|
Title: msgFromMQV2.MsgData.OfflinePushInfo.Title,
|
||||||
|
Desc: msgFromMQV2.MsgData.OfflinePushInfo.Desc,
|
||||||
|
Ex: msgFromMQV2.MsgData.OfflinePushInfo.Ex,
|
||||||
|
IOSPushSound: msgFromMQV2.MsgData.OfflinePushInfo.IOSPushSound,
|
||||||
|
IOSBadgeCount: msgFromMQV2.MsgData.OfflinePushInfo.IOSBadgeCount,
|
||||||
|
SignalInfo: "",
|
||||||
|
}
|
||||||
|
msgData := &sdkws.MsgData{
|
||||||
|
SendID: msgFromMQV2.MsgData.SendID,
|
||||||
|
RecvID: msgFromMQV2.MsgData.RecvID,
|
||||||
|
GroupID: msgFromMQV2.MsgData.GroupID,
|
||||||
|
ClientMsgID: msgFromMQV2.MsgData.ClientMsgID,
|
||||||
|
ServerMsgID: msgFromMQV2.MsgData.ServerMsgID,
|
||||||
|
SenderPlatformID: msgFromMQV2.MsgData.SenderPlatformID,
|
||||||
|
SenderNickname: msgFromMQV2.MsgData.SenderNickname,
|
||||||
|
SenderFaceURL: msgFromMQV2.MsgData.SenderFaceURL,
|
||||||
|
SessionType: msgFromMQV2.MsgData.SessionType,
|
||||||
|
MsgFrom: msgFromMQV2.MsgData.MsgFrom,
|
||||||
|
ContentType: msgFromMQV2.MsgData.ContentType,
|
||||||
|
Content: msgFromMQV2.MsgData.Content,
|
||||||
|
Seq: int64(msgFromMQV2.MsgData.Seq),
|
||||||
|
SendTime: msgFromMQV2.MsgData.SendTime,
|
||||||
|
CreateTime: msgFromMQV2.MsgData.CreateTime,
|
||||||
|
Status: msgFromMQV2.MsgData.Status,
|
||||||
|
IsRead: false,
|
||||||
|
Options: msgFromMQV2.MsgData.Options,
|
||||||
|
OfflinePushInfo: offlinePushInfo,
|
||||||
|
AtUserIDList: msgFromMQV2.MsgData.AtUserIDList,
|
||||||
|
AttachedInfo: msgFromMQV2.MsgData.AttachedInfo,
|
||||||
|
Ex: msgFromMQV2.MsgData.Ex,
|
||||||
|
}
|
||||||
|
ctx := context.WithValue(context.Background(), "operationID", msgFromMQV2.OperationID)
|
||||||
|
resp, err := msgRpcClient.SendMsg(ctx, &msgv3.SendMsgReq{MsgData: msgData})
|
||||||
|
if err != nil {
|
||||||
|
fmt.Printf("resp err: %s \n", err)
|
||||||
|
}
|
||||||
|
fmt.Printf("resp: %s \n", resp)
|
||||||
|
}
|
||||||
|
fmt.Printf("\n\n\n")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//GetMsgRpcService Convenient for detachment
|
||||||
|
//func GetMsgRpcService() (rpcclient.MessageRpcClient, error) {
|
||||||
|
// client, err := openKeeper.NewClient([]string{ZkAddr}, ZKSchema,
|
||||||
|
// openKeeper.WithFreq(time.Hour), openKeeper.WithRoundRobin(), openKeeper.WithUserNameAndPassword(ZKUsername,
|
||||||
|
// ZKPassword), openKeeper.WithTimeout(10))
|
||||||
|
// msgClient := rpcclient.NewMessageRpcClient(client)
|
||||||
|
// if err != nil {
|
||||||
|
// return msgClient, err
|
||||||
|
// }
|
||||||
|
// return msgClient, nil
|
||||||
|
//}
|
||||||
|
|
||||||
|
func NewMessage() msgv3.MsgClient {
|
||||||
|
discov, err := openKeeper.NewClient(
|
||||||
|
[]string{ZkAddr},
|
||||||
|
ZKSchema,
|
||||||
|
openKeeper.WithFreq(time.Hour),
|
||||||
|
openKeeper.WithRoundRobin(),
|
||||||
|
openKeeper.WithUserNameAndPassword(
|
||||||
|
ZKUsername,
|
||||||
|
ZKPassword),
|
||||||
|
openKeeper.WithTimeout(10),
|
||||||
|
openKeeper.WithLogger(log.NewZkLogger()),
|
||||||
|
)
|
||||||
|
if err != nil {
|
||||||
|
fmt.Printf("discov, err:%s", err)
|
||||||
|
}
|
||||||
|
discov.AddOption(mw.GrpcClient(), grpc.WithTransportCredentials(insecure.NewCredentials()))
|
||||||
|
conn, err := discov.GetConn(context.Background(), MsgName)
|
||||||
|
if err != nil {
|
||||||
|
fmt.Printf("conn, err:%s", err)
|
||||||
|
panic(err)
|
||||||
|
}
|
||||||
|
client := msgv3.NewMsgClient(conn)
|
||||||
|
return client
|
||||||
|
}
|
@ -1,580 +0,0 @@
|
|||||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
|
||||||
// versions:
|
|
||||||
// protoc-gen-go v1.29.1
|
|
||||||
// protoc v4.22.0
|
|
||||||
// source: msg/msg.proto
|
|
||||||
|
|
||||||
package msg
|
|
||||||
|
|
||||||
import (
|
|
||||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
|
||||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
|
||||||
reflect "reflect"
|
|
||||||
sync "sync"
|
|
||||||
)
|
|
||||||
|
|
||||||
const (
|
|
||||||
// Verify that this generated code is sufficiently up-to-date.
|
|
||||||
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
|
|
||||||
// Verify that runtime/protoimpl is sufficiently up-to-date.
|
|
||||||
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
|
||||||
)
|
|
||||||
|
|
||||||
type MsgDataToMQ struct {
|
|
||||||
state protoimpl.MessageState
|
|
||||||
sizeCache protoimpl.SizeCache
|
|
||||||
unknownFields protoimpl.UnknownFields
|
|
||||||
|
|
||||||
Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token"`
|
|
||||||
OperationID string `protobuf:"bytes,2,opt,name=operationID,proto3" json:"operationID"`
|
|
||||||
MsgData *MsgData `protobuf:"bytes,3,opt,name=msgData,proto3" json:"msgData"`
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x *MsgDataToMQ) Reset() {
|
|
||||||
*x = MsgDataToMQ{}
|
|
||||||
if protoimpl.UnsafeEnabled {
|
|
||||||
mi := &file_msg_msg_proto_msgTypes[0]
|
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x *MsgDataToMQ) String() string {
|
|
||||||
return protoimpl.X.MessageStringOf(x)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (*MsgDataToMQ) ProtoMessage() {}
|
|
||||||
|
|
||||||
func (x *MsgDataToMQ) ProtoReflect() protoreflect.Message {
|
|
||||||
mi := &file_msg_msg_proto_msgTypes[0]
|
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
||||||
if ms.LoadMessageInfo() == nil {
|
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
return ms
|
|
||||||
}
|
|
||||||
return mi.MessageOf(x)
|
|
||||||
}
|
|
||||||
|
|
||||||
// Deprecated: Use MsgDataToMQ.ProtoReflect.Descriptor instead.
|
|
||||||
func (*MsgDataToMQ) Descriptor() ([]byte, []int) {
|
|
||||||
return file_msg_msg_proto_rawDescGZIP(), []int{0}
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x *MsgDataToMQ) GetToken() string {
|
|
||||||
if x != nil {
|
|
||||||
return x.Token
|
|
||||||
}
|
|
||||||
return ""
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x *MsgDataToMQ) GetOperationID() string {
|
|
||||||
if x != nil {
|
|
||||||
return x.OperationID
|
|
||||||
}
|
|
||||||
return ""
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x *MsgDataToMQ) GetMsgData() *MsgData {
|
|
||||||
if x != nil {
|
|
||||||
return x.MsgData
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
type MsgData struct {
|
|
||||||
state protoimpl.MessageState
|
|
||||||
sizeCache protoimpl.SizeCache
|
|
||||||
unknownFields protoimpl.UnknownFields
|
|
||||||
|
|
||||||
SendID string `protobuf:"bytes,1,opt,name=sendID,proto3" json:"sendID"`
|
|
||||||
RecvID string `protobuf:"bytes,2,opt,name=recvID,proto3" json:"recvID"`
|
|
||||||
GroupID string `protobuf:"bytes,3,opt,name=groupID,proto3" json:"groupID"`
|
|
||||||
ClientMsgID string `protobuf:"bytes,4,opt,name=clientMsgID,proto3" json:"clientMsgID"`
|
|
||||||
ServerMsgID string `protobuf:"bytes,5,opt,name=serverMsgID,proto3" json:"serverMsgID"`
|
|
||||||
SenderPlatformID int32 `protobuf:"varint,6,opt,name=senderPlatformID,proto3" json:"senderPlatformID"`
|
|
||||||
SenderNickname string `protobuf:"bytes,7,opt,name=senderNickname,proto3" json:"senderNickname"`
|
|
||||||
SenderFaceURL string `protobuf:"bytes,8,opt,name=senderFaceURL,proto3" json:"senderFaceURL"`
|
|
||||||
SessionType int32 `protobuf:"varint,9,opt,name=sessionType,proto3" json:"sessionType"`
|
|
||||||
MsgFrom int32 `protobuf:"varint,10,opt,name=msgFrom,proto3" json:"msgFrom"`
|
|
||||||
ContentType int32 `protobuf:"varint,11,opt,name=contentType,proto3" json:"contentType"`
|
|
||||||
Content []byte `protobuf:"bytes,12,opt,name=content,proto3" json:"content"`
|
|
||||||
Seq uint32 `protobuf:"varint,14,opt,name=seq,proto3" json:"seq"`
|
|
||||||
SendTime int64 `protobuf:"varint,15,opt,name=sendTime,proto3" json:"sendTime"`
|
|
||||||
CreateTime int64 `protobuf:"varint,16,opt,name=createTime,proto3" json:"createTime"`
|
|
||||||
Status int32 `protobuf:"varint,17,opt,name=status,proto3" json:"status"`
|
|
||||||
Options map[string]bool `protobuf:"bytes,18,rep,name=options,proto3" json:"options" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"`
|
|
||||||
OfflinePushInfo *OfflinePushInfo `protobuf:"bytes,19,opt,name=offlinePushInfo,proto3" json:"offlinePushInfo"`
|
|
||||||
AtUserIDList []string `protobuf:"bytes,20,rep,name=atUserIDList,proto3" json:"atUserIDList"`
|
|
||||||
MsgDataList []byte `protobuf:"bytes,21,opt,name=msgDataList,proto3" json:"msgDataList"`
|
|
||||||
AttachedInfo string `protobuf:"bytes,22,opt,name=attachedInfo,proto3" json:"attachedInfo"`
|
|
||||||
Ex string `protobuf:"bytes,23,opt,name=ex,proto3" json:"ex"`
|
|
||||||
IsReact bool `protobuf:"varint,40,opt,name=isReact,proto3" json:"isReact"`
|
|
||||||
IsExternalExtensions bool `protobuf:"varint,41,opt,name=isExternalExtensions,proto3" json:"isExternalExtensions"`
|
|
||||||
MsgFirstModifyTime int64 `protobuf:"varint,42,opt,name=msgFirstModifyTime,proto3" json:"msgFirstModifyTime"`
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x *MsgData) Reset() {
|
|
||||||
*x = MsgData{}
|
|
||||||
if protoimpl.UnsafeEnabled {
|
|
||||||
mi := &file_msg_msg_proto_msgTypes[1]
|
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x *MsgData) String() string {
|
|
||||||
return protoimpl.X.MessageStringOf(x)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (*MsgData) ProtoMessage() {}
|
|
||||||
|
|
||||||
func (x *MsgData) ProtoReflect() protoreflect.Message {
|
|
||||||
mi := &file_msg_msg_proto_msgTypes[1]
|
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
||||||
if ms.LoadMessageInfo() == nil {
|
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
return ms
|
|
||||||
}
|
|
||||||
return mi.MessageOf(x)
|
|
||||||
}
|
|
||||||
|
|
||||||
// Deprecated: Use MsgData.ProtoReflect.Descriptor instead.
|
|
||||||
func (*MsgData) Descriptor() ([]byte, []int) {
|
|
||||||
return file_msg_msg_proto_rawDescGZIP(), []int{1}
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x *MsgData) GetSendID() string {
|
|
||||||
if x != nil {
|
|
||||||
return x.SendID
|
|
||||||
}
|
|
||||||
return ""
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x *MsgData) GetRecvID() string {
|
|
||||||
if x != nil {
|
|
||||||
return x.RecvID
|
|
||||||
}
|
|
||||||
return ""
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x *MsgData) GetGroupID() string {
|
|
||||||
if x != nil {
|
|
||||||
return x.GroupID
|
|
||||||
}
|
|
||||||
return ""
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x *MsgData) GetClientMsgID() string {
|
|
||||||
if x != nil {
|
|
||||||
return x.ClientMsgID
|
|
||||||
}
|
|
||||||
return ""
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x *MsgData) GetServerMsgID() string {
|
|
||||||
if x != nil {
|
|
||||||
return x.ServerMsgID
|
|
||||||
}
|
|
||||||
return ""
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x *MsgData) GetSenderPlatformID() int32 {
|
|
||||||
if x != nil {
|
|
||||||
return x.SenderPlatformID
|
|
||||||
}
|
|
||||||
return 0
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x *MsgData) GetSenderNickname() string {
|
|
||||||
if x != nil {
|
|
||||||
return x.SenderNickname
|
|
||||||
}
|
|
||||||
return ""
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x *MsgData) GetSenderFaceURL() string {
|
|
||||||
if x != nil {
|
|
||||||
return x.SenderFaceURL
|
|
||||||
}
|
|
||||||
return ""
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x *MsgData) GetSessionType() int32 {
|
|
||||||
if x != nil {
|
|
||||||
return x.SessionType
|
|
||||||
}
|
|
||||||
return 0
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x *MsgData) GetMsgFrom() int32 {
|
|
||||||
if x != nil {
|
|
||||||
return x.MsgFrom
|
|
||||||
}
|
|
||||||
return 0
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x *MsgData) GetContentType() int32 {
|
|
||||||
if x != nil {
|
|
||||||
return x.ContentType
|
|
||||||
}
|
|
||||||
return 0
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x *MsgData) GetContent() []byte {
|
|
||||||
if x != nil {
|
|
||||||
return x.Content
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x *MsgData) GetSeq() uint32 {
|
|
||||||
if x != nil {
|
|
||||||
return x.Seq
|
|
||||||
}
|
|
||||||
return 0
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x *MsgData) GetSendTime() int64 {
|
|
||||||
if x != nil {
|
|
||||||
return x.SendTime
|
|
||||||
}
|
|
||||||
return 0
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x *MsgData) GetCreateTime() int64 {
|
|
||||||
if x != nil {
|
|
||||||
return x.CreateTime
|
|
||||||
}
|
|
||||||
return 0
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x *MsgData) GetStatus() int32 {
|
|
||||||
if x != nil {
|
|
||||||
return x.Status
|
|
||||||
}
|
|
||||||
return 0
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x *MsgData) GetOptions() map[string]bool {
|
|
||||||
if x != nil {
|
|
||||||
return x.Options
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x *MsgData) GetOfflinePushInfo() *OfflinePushInfo {
|
|
||||||
if x != nil {
|
|
||||||
return x.OfflinePushInfo
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x *MsgData) GetAtUserIDList() []string {
|
|
||||||
if x != nil {
|
|
||||||
return x.AtUserIDList
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x *MsgData) GetMsgDataList() []byte {
|
|
||||||
if x != nil {
|
|
||||||
return x.MsgDataList
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x *MsgData) GetAttachedInfo() string {
|
|
||||||
if x != nil {
|
|
||||||
return x.AttachedInfo
|
|
||||||
}
|
|
||||||
return ""
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x *MsgData) GetEx() string {
|
|
||||||
if x != nil {
|
|
||||||
return x.Ex
|
|
||||||
}
|
|
||||||
return ""
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x *MsgData) GetIsReact() bool {
|
|
||||||
if x != nil {
|
|
||||||
return x.IsReact
|
|
||||||
}
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x *MsgData) GetIsExternalExtensions() bool {
|
|
||||||
if x != nil {
|
|
||||||
return x.IsExternalExtensions
|
|
||||||
}
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x *MsgData) GetMsgFirstModifyTime() int64 {
|
|
||||||
if x != nil {
|
|
||||||
return x.MsgFirstModifyTime
|
|
||||||
}
|
|
||||||
return 0
|
|
||||||
}
|
|
||||||
|
|
||||||
type OfflinePushInfo struct {
|
|
||||||
state protoimpl.MessageState
|
|
||||||
sizeCache protoimpl.SizeCache
|
|
||||||
unknownFields protoimpl.UnknownFields
|
|
||||||
|
|
||||||
Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title"`
|
|
||||||
Desc string `protobuf:"bytes,2,opt,name=desc,proto3" json:"desc"`
|
|
||||||
Ex string `protobuf:"bytes,3,opt,name=ex,proto3" json:"ex"`
|
|
||||||
IOSPushSound string `protobuf:"bytes,4,opt,name=iOSPushSound,proto3" json:"iOSPushSound"`
|
|
||||||
IOSBadgeCount bool `protobuf:"varint,5,opt,name=iOSBadgeCount,proto3" json:"iOSBadgeCount"`
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x *OfflinePushInfo) Reset() {
|
|
||||||
*x = OfflinePushInfo{}
|
|
||||||
if protoimpl.UnsafeEnabled {
|
|
||||||
mi := &file_msg_msg_proto_msgTypes[2]
|
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x *OfflinePushInfo) String() string {
|
|
||||||
return protoimpl.X.MessageStringOf(x)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (*OfflinePushInfo) ProtoMessage() {}
|
|
||||||
|
|
||||||
func (x *OfflinePushInfo) ProtoReflect() protoreflect.Message {
|
|
||||||
mi := &file_msg_msg_proto_msgTypes[2]
|
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
||||||
if ms.LoadMessageInfo() == nil {
|
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
return ms
|
|
||||||
}
|
|
||||||
return mi.MessageOf(x)
|
|
||||||
}
|
|
||||||
|
|
||||||
// Deprecated: Use OfflinePushInfo.ProtoReflect.Descriptor instead.
|
|
||||||
func (*OfflinePushInfo) Descriptor() ([]byte, []int) {
|
|
||||||
return file_msg_msg_proto_rawDescGZIP(), []int{2}
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x *OfflinePushInfo) GetTitle() string {
|
|
||||||
if x != nil {
|
|
||||||
return x.Title
|
|
||||||
}
|
|
||||||
return ""
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x *OfflinePushInfo) GetDesc() string {
|
|
||||||
if x != nil {
|
|
||||||
return x.Desc
|
|
||||||
}
|
|
||||||
return ""
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x *OfflinePushInfo) GetEx() string {
|
|
||||||
if x != nil {
|
|
||||||
return x.Ex
|
|
||||||
}
|
|
||||||
return ""
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x *OfflinePushInfo) GetIOSPushSound() string {
|
|
||||||
if x != nil {
|
|
||||||
return x.IOSPushSound
|
|
||||||
}
|
|
||||||
return ""
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x *OfflinePushInfo) GetIOSBadgeCount() bool {
|
|
||||||
if x != nil {
|
|
||||||
return x.IOSBadgeCount
|
|
||||||
}
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
var File_msg_msg_proto protoreflect.FileDescriptor
|
|
||||||
|
|
||||||
var file_msg_msg_proto_rawDesc = []byte{
|
|
||||||
0x0a, 0x0d, 0x6d, 0x73, 0x67, 0x2f, 0x6d, 0x73, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12,
|
|
||||||
0x03, 0x6d, 0x73, 0x67, 0x22, 0x6d, 0x0a, 0x0b, 0x4d, 0x73, 0x67, 0x44, 0x61, 0x74, 0x61, 0x54,
|
|
||||||
0x6f, 0x4d, 0x51, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x01, 0x20, 0x01,
|
|
||||||
0x28, 0x09, 0x52, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x20, 0x0a, 0x0b, 0x6f, 0x70, 0x65,
|
|
||||||
0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b,
|
|
||||||
0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x12, 0x26, 0x0a, 0x07, 0x6d,
|
|
||||||
0x73, 0x67, 0x44, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x6d,
|
|
||||||
0x73, 0x67, 0x2e, 0x4d, 0x73, 0x67, 0x44, 0x61, 0x74, 0x61, 0x52, 0x07, 0x6d, 0x73, 0x67, 0x44,
|
|
||||||
0x61, 0x74, 0x61, 0x22, 0x98, 0x07, 0x0a, 0x07, 0x4d, 0x73, 0x67, 0x44, 0x61, 0x74, 0x61, 0x12,
|
|
||||||
0x16, 0x0a, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
|
|
||||||
0x06, 0x73, 0x65, 0x6e, 0x64, 0x49, 0x44, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x63, 0x76, 0x49,
|
|
||||||
0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x65, 0x63, 0x76, 0x49, 0x44, 0x12,
|
|
||||||
0x18, 0x0a, 0x07, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x44, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09,
|
|
||||||
0x52, 0x07, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x44, 0x12, 0x20, 0x0a, 0x0b, 0x63, 0x6c, 0x69,
|
|
||||||
0x65, 0x6e, 0x74, 0x4d, 0x73, 0x67, 0x49, 0x44, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b,
|
|
||||||
0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x4d, 0x73, 0x67, 0x49, 0x44, 0x12, 0x20, 0x0a, 0x0b, 0x73,
|
|
||||||
0x65, 0x72, 0x76, 0x65, 0x72, 0x4d, 0x73, 0x67, 0x49, 0x44, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09,
|
|
||||||
0x52, 0x0b, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x4d, 0x73, 0x67, 0x49, 0x44, 0x12, 0x2a, 0x0a,
|
|
||||||
0x10, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x49,
|
|
||||||
0x44, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x10, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x50,
|
|
||||||
0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x49, 0x44, 0x12, 0x26, 0x0a, 0x0e, 0x73, 0x65, 0x6e,
|
|
||||||
0x64, 0x65, 0x72, 0x4e, 0x69, 0x63, 0x6b, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28,
|
|
||||||
0x09, 0x52, 0x0e, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x4e, 0x69, 0x63, 0x6b, 0x6e, 0x61, 0x6d,
|
|
||||||
0x65, 0x12, 0x24, 0x0a, 0x0d, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x46, 0x61, 0x63, 0x65, 0x55,
|
|
||||||
0x52, 0x4c, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72,
|
|
||||||
0x46, 0x61, 0x63, 0x65, 0x55, 0x52, 0x4c, 0x12, 0x20, 0x0a, 0x0b, 0x73, 0x65, 0x73, 0x73, 0x69,
|
|
||||||
0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x73, 0x65,
|
|
||||||
0x73, 0x73, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x73, 0x67,
|
|
||||||
0x46, 0x72, 0x6f, 0x6d, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x6d, 0x73, 0x67, 0x46,
|
|
||||||
0x72, 0x6f, 0x6d, 0x12, 0x20, 0x0a, 0x0b, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x54, 0x79,
|
|
||||||
0x70, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e,
|
|
||||||
0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74,
|
|
||||||
0x18, 0x0c, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12,
|
|
||||||
0x10, 0x0a, 0x03, 0x73, 0x65, 0x71, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x03, 0x73, 0x65,
|
|
||||||
0x71, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x65, 0x6e, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x0f, 0x20,
|
|
||||||
0x01, 0x28, 0x03, 0x52, 0x08, 0x73, 0x65, 0x6e, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x1e, 0x0a,
|
|
||||||
0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x10, 0x20, 0x01, 0x28,
|
|
||||||
0x03, 0x52, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x16, 0x0a,
|
|
||||||
0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x11, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x73,
|
|
||||||
0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x33, 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73,
|
|
||||||
0x18, 0x12, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x6d, 0x73, 0x67, 0x2e, 0x4d, 0x73, 0x67,
|
|
||||||
0x44, 0x61, 0x74, 0x61, 0x2e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72,
|
|
||||||
0x79, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x3e, 0x0a, 0x0f, 0x6f, 0x66,
|
|
||||||
0x66, 0x6c, 0x69, 0x6e, 0x65, 0x50, 0x75, 0x73, 0x68, 0x49, 0x6e, 0x66, 0x6f, 0x18, 0x13, 0x20,
|
|
||||||
0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6d, 0x73, 0x67, 0x2e, 0x4f, 0x66, 0x66, 0x6c, 0x69, 0x6e,
|
|
||||||
0x65, 0x50, 0x75, 0x73, 0x68, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0f, 0x6f, 0x66, 0x66, 0x6c, 0x69,
|
|
||||||
0x6e, 0x65, 0x50, 0x75, 0x73, 0x68, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x22, 0x0a, 0x0c, 0x61, 0x74,
|
|
||||||
0x55, 0x73, 0x65, 0x72, 0x49, 0x44, 0x4c, 0x69, 0x73, 0x74, 0x18, 0x14, 0x20, 0x03, 0x28, 0x09,
|
|
||||||
0x52, 0x0c, 0x61, 0x74, 0x55, 0x73, 0x65, 0x72, 0x49, 0x44, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x20,
|
|
||||||
0x0a, 0x0b, 0x6d, 0x73, 0x67, 0x44, 0x61, 0x74, 0x61, 0x4c, 0x69, 0x73, 0x74, 0x18, 0x15, 0x20,
|
|
||||||
0x01, 0x28, 0x0c, 0x52, 0x0b, 0x6d, 0x73, 0x67, 0x44, 0x61, 0x74, 0x61, 0x4c, 0x69, 0x73, 0x74,
|
|
||||||
0x12, 0x22, 0x0a, 0x0c, 0x61, 0x74, 0x74, 0x61, 0x63, 0x68, 0x65, 0x64, 0x49, 0x6e, 0x66, 0x6f,
|
|
||||||
0x18, 0x16, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x61, 0x74, 0x74, 0x61, 0x63, 0x68, 0x65, 0x64,
|
|
||||||
0x49, 0x6e, 0x66, 0x6f, 0x12, 0x0e, 0x0a, 0x02, 0x65, 0x78, 0x18, 0x17, 0x20, 0x01, 0x28, 0x09,
|
|
||||||
0x52, 0x02, 0x65, 0x78, 0x12, 0x18, 0x0a, 0x07, 0x69, 0x73, 0x52, 0x65, 0x61, 0x63, 0x74, 0x18,
|
|
||||||
0x28, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x69, 0x73, 0x52, 0x65, 0x61, 0x63, 0x74, 0x12, 0x32,
|
|
||||||
0x0a, 0x14, 0x69, 0x73, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x45, 0x78, 0x74, 0x65,
|
|
||||||
0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x29, 0x20, 0x01, 0x28, 0x08, 0x52, 0x14, 0x69, 0x73,
|
|
||||||
0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f,
|
|
||||||
0x6e, 0x73, 0x12, 0x2e, 0x0a, 0x12, 0x6d, 0x73, 0x67, 0x46, 0x69, 0x72, 0x73, 0x74, 0x4d, 0x6f,
|
|
||||||
0x64, 0x69, 0x66, 0x79, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x2a, 0x20, 0x01, 0x28, 0x03, 0x52, 0x12,
|
|
||||||
0x6d, 0x73, 0x67, 0x46, 0x69, 0x72, 0x73, 0x74, 0x4d, 0x6f, 0x64, 0x69, 0x66, 0x79, 0x54, 0x69,
|
|
||||||
0x6d, 0x65, 0x1a, 0x3a, 0x0a, 0x0c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x6e, 0x74,
|
|
||||||
0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
|
|
||||||
0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20,
|
|
||||||
0x01, 0x28, 0x08, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x95,
|
|
||||||
0x01, 0x0a, 0x0f, 0x4f, 0x66, 0x66, 0x6c, 0x69, 0x6e, 0x65, 0x50, 0x75, 0x73, 0x68, 0x49, 0x6e,
|
|
||||||
0x66, 0x6f, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28,
|
|
||||||
0x09, 0x52, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x65, 0x73, 0x63,
|
|
||||||
0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x64, 0x65, 0x73, 0x63, 0x12, 0x0e, 0x0a, 0x02,
|
|
||||||
0x65, 0x78, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x65, 0x78, 0x12, 0x22, 0x0a, 0x0c,
|
|
||||||
0x69, 0x4f, 0x53, 0x50, 0x75, 0x73, 0x68, 0x53, 0x6f, 0x75, 0x6e, 0x64, 0x18, 0x04, 0x20, 0x01,
|
|
||||||
0x28, 0x09, 0x52, 0x0c, 0x69, 0x4f, 0x53, 0x50, 0x75, 0x73, 0x68, 0x53, 0x6f, 0x75, 0x6e, 0x64,
|
|
||||||
0x12, 0x24, 0x0a, 0x0d, 0x69, 0x4f, 0x53, 0x42, 0x61, 0x64, 0x67, 0x65, 0x43, 0x6f, 0x75, 0x6e,
|
|
||||||
0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x69, 0x4f, 0x53, 0x42, 0x61, 0x64, 0x67,
|
|
||||||
0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x42, 0x3f, 0x5a, 0x3d, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62,
|
|
||||||
0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x44, 0x4b, 0x2f, 0x4f,
|
|
||||||
0x70, 0x65, 0x6e, 0x2d, 0x49, 0x4d, 0x2d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2f, 0x74, 0x6f,
|
|
||||||
0x6f, 0x6c, 0x73, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x2d, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73,
|
|
||||||
0x69, 0x6f, 0x6e, 0x2f, 0x6d, 0x73, 0x67, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
|
||||||
}
|
|
||||||
|
|
||||||
var (
|
|
||||||
file_msg_msg_proto_rawDescOnce sync.Once
|
|
||||||
file_msg_msg_proto_rawDescData = file_msg_msg_proto_rawDesc
|
|
||||||
)
|
|
||||||
|
|
||||||
func file_msg_msg_proto_rawDescGZIP() []byte {
|
|
||||||
file_msg_msg_proto_rawDescOnce.Do(func() {
|
|
||||||
file_msg_msg_proto_rawDescData = protoimpl.X.CompressGZIP(file_msg_msg_proto_rawDescData)
|
|
||||||
})
|
|
||||||
return file_msg_msg_proto_rawDescData
|
|
||||||
}
|
|
||||||
|
|
||||||
var file_msg_msg_proto_msgTypes = make([]protoimpl.MessageInfo, 4)
|
|
||||||
var file_msg_msg_proto_goTypes = []interface{}{
|
|
||||||
(*MsgDataToMQ)(nil), // 0: msg.MsgDataToMQ
|
|
||||||
(*MsgData)(nil), // 1: msg.MsgData
|
|
||||||
(*OfflinePushInfo)(nil), // 2: msg.OfflinePushInfo
|
|
||||||
nil, // 3: msg.MsgData.OptionsEntry
|
|
||||||
}
|
|
||||||
var file_msg_msg_proto_depIdxs = []int32{
|
|
||||||
1, // 0: msg.MsgDataToMQ.msgData:type_name -> msg.MsgData
|
|
||||||
3, // 1: msg.MsgData.options:type_name -> msg.MsgData.OptionsEntry
|
|
||||||
2, // 2: msg.MsgData.offlinePushInfo:type_name -> msg.OfflinePushInfo
|
|
||||||
3, // [3:3] is the sub-list for method output_type
|
|
||||||
3, // [3:3] is the sub-list for method input_type
|
|
||||||
3, // [3:3] is the sub-list for extension type_name
|
|
||||||
3, // [3:3] is the sub-list for extension extendee
|
|
||||||
0, // [0:3] is the sub-list for field type_name
|
|
||||||
}
|
|
||||||
|
|
||||||
func init() { file_msg_msg_proto_init() }
|
|
||||||
func file_msg_msg_proto_init() {
|
|
||||||
if File_msg_msg_proto != nil {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
if !protoimpl.UnsafeEnabled {
|
|
||||||
file_msg_msg_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
|
||||||
switch v := v.(*MsgDataToMQ); i {
|
|
||||||
case 0:
|
|
||||||
return &v.state
|
|
||||||
case 1:
|
|
||||||
return &v.sizeCache
|
|
||||||
case 2:
|
|
||||||
return &v.unknownFields
|
|
||||||
default:
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
}
|
|
||||||
file_msg_msg_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
|
|
||||||
switch v := v.(*MsgData); i {
|
|
||||||
case 0:
|
|
||||||
return &v.state
|
|
||||||
case 1:
|
|
||||||
return &v.sizeCache
|
|
||||||
case 2:
|
|
||||||
return &v.unknownFields
|
|
||||||
default:
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
}
|
|
||||||
file_msg_msg_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
|
|
||||||
switch v := v.(*OfflinePushInfo); i {
|
|
||||||
case 0:
|
|
||||||
return &v.state
|
|
||||||
case 1:
|
|
||||||
return &v.sizeCache
|
|
||||||
case 2:
|
|
||||||
return &v.unknownFields
|
|
||||||
default:
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
type x struct{}
|
|
||||||
out := protoimpl.TypeBuilder{
|
|
||||||
File: protoimpl.DescBuilder{
|
|
||||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
|
||||||
RawDescriptor: file_msg_msg_proto_rawDesc,
|
|
||||||
NumEnums: 0,
|
|
||||||
NumMessages: 4,
|
|
||||||
NumExtensions: 0,
|
|
||||||
NumServices: 0,
|
|
||||||
},
|
|
||||||
GoTypes: file_msg_msg_proto_goTypes,
|
|
||||||
DependencyIndexes: file_msg_msg_proto_depIdxs,
|
|
||||||
MessageInfos: file_msg_msg_proto_msgTypes,
|
|
||||||
}.Build()
|
|
||||||
File_msg_msg_proto = out.File
|
|
||||||
file_msg_msg_proto_rawDesc = nil
|
|
||||||
file_msg_msg_proto_goTypes = nil
|
|
||||||
file_msg_msg_proto_depIdxs = nil
|
|
||||||
}
|
|
@ -1,46 +0,0 @@
|
|||||||
syntax = "proto3";
|
|
||||||
option go_package = "github.com/OpenIMSDK/Open-IM-Server/tools/data-conversion/msg";
|
|
||||||
package msg;
|
|
||||||
|
|
||||||
message MsgDataToMQ{
|
|
||||||
string token =1;
|
|
||||||
string operationID = 2;
|
|
||||||
MsgData msgData = 3;
|
|
||||||
}
|
|
||||||
|
|
||||||
message MsgData {
|
|
||||||
string sendID = 1;
|
|
||||||
string recvID = 2;
|
|
||||||
string groupID = 3;
|
|
||||||
string clientMsgID = 4;
|
|
||||||
string serverMsgID = 5;
|
|
||||||
int32 senderPlatformID = 6;
|
|
||||||
string senderNickname = 7;
|
|
||||||
string senderFaceURL = 8;
|
|
||||||
int32 sessionType = 9;
|
|
||||||
int32 msgFrom = 10;
|
|
||||||
int32 contentType = 11;
|
|
||||||
bytes content = 12;
|
|
||||||
uint32 seq = 14;
|
|
||||||
int64 sendTime = 15;
|
|
||||||
int64 createTime = 16;
|
|
||||||
int32 status = 17;
|
|
||||||
map<string, bool> options = 18;
|
|
||||||
OfflinePushInfo offlinePushInfo = 19;
|
|
||||||
repeated string atUserIDList = 20;
|
|
||||||
bytes msgDataList = 21;
|
|
||||||
string attachedInfo = 22;
|
|
||||||
string ex = 23;
|
|
||||||
|
|
||||||
bool isReact = 40;
|
|
||||||
bool isExternalExtensions = 41;
|
|
||||||
int64 msgFirstModifyTime = 42;
|
|
||||||
|
|
||||||
}
|
|
||||||
message OfflinePushInfo{
|
|
||||||
string title = 1;
|
|
||||||
string desc = 2;
|
|
||||||
string ex = 3;
|
|
||||||
string iOSPushSound = 4;
|
|
||||||
bool iOSBadgeCount = 5;
|
|
||||||
}
|
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,375 @@
|
|||||||
|
syntax = "proto3";
|
||||||
|
option go_package = "Open_IM/pkg/proto/admin_cms;admin_cms";
|
||||||
|
import "conversion/proto/sdk_ws/ws.proto";
|
||||||
|
package admin_cms;
|
||||||
|
|
||||||
|
|
||||||
|
message CommonResp {
|
||||||
|
int32 errCode = 1;
|
||||||
|
string errMsg = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
message AdminLoginReq {
|
||||||
|
string operationID = 1;
|
||||||
|
string adminID = 2;
|
||||||
|
string secret = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
message AdminLoginResp {
|
||||||
|
string token = 1;
|
||||||
|
string userName = 2;
|
||||||
|
string faceURL = 3;
|
||||||
|
CommonResp commonResp = 4;
|
||||||
|
}
|
||||||
|
|
||||||
|
message GetUserTokenReq {
|
||||||
|
string operationID = 1;
|
||||||
|
string userID = 2;
|
||||||
|
int32 platformID = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
message GetUserTokenResp {
|
||||||
|
CommonResp commonResp = 1;
|
||||||
|
string token = 2;
|
||||||
|
int64 expTime = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
message AddUserRegisterAddFriendIDListReq {
|
||||||
|
string operationID = 1;
|
||||||
|
repeated string userIDList = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
message AddUserRegisterAddFriendIDListResp {
|
||||||
|
CommonResp commonResp = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
message ReduceUserRegisterAddFriendIDListReq {
|
||||||
|
string operationID = 1;
|
||||||
|
int32 operation = 2;
|
||||||
|
repeated string userIDList = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
message ReduceUserRegisterAddFriendIDListResp {
|
||||||
|
CommonResp commonResp = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
message GetUserRegisterAddFriendIDListReq {
|
||||||
|
string operationID = 1;
|
||||||
|
server_api_params.RequestPagination pagination = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
message GetUserRegisterAddFriendIDListResp {
|
||||||
|
repeated server_api_params.UserInfo userInfoList = 1;
|
||||||
|
server_api_params.ResponsePagination pagination = 2;
|
||||||
|
CommonResp commonResp = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
message GetChatLogsReq {
|
||||||
|
string content = 1;
|
||||||
|
string sendID = 2;
|
||||||
|
string recvID = 3;
|
||||||
|
string sendTime = 4;
|
||||||
|
int32 sessionType = 5;
|
||||||
|
int32 contentType = 6;
|
||||||
|
server_api_params.RequestPagination pagination = 7;
|
||||||
|
string operationID = 8;
|
||||||
|
string opUserID = 9;
|
||||||
|
}
|
||||||
|
|
||||||
|
message ChatLog {
|
||||||
|
string serverMsgID = 1;
|
||||||
|
string clientMsgID = 2;
|
||||||
|
string sendID = 3;
|
||||||
|
string recvID = 4;
|
||||||
|
string groupID = 5;
|
||||||
|
string recvNickname = 6;
|
||||||
|
int32 senderPlatformID = 7;
|
||||||
|
string senderNickname = 8;
|
||||||
|
string senderFaceURL = 9;
|
||||||
|
string groupName = 10;
|
||||||
|
int32 sessionType = 11;
|
||||||
|
int32 msgFrom = 12;
|
||||||
|
int32 contentType = 13;
|
||||||
|
string content = 14;
|
||||||
|
int32 status = 15;
|
||||||
|
int64 sendTime = 16;
|
||||||
|
int64 createTime = 17;
|
||||||
|
string ex = 18;
|
||||||
|
}
|
||||||
|
|
||||||
|
message GetChatLogsResp {
|
||||||
|
repeated ChatLog chatLogs = 1;
|
||||||
|
server_api_params.ResponsePagination pagination = 2;
|
||||||
|
int32 chatLogsNum = 3;
|
||||||
|
CommonResp commonResp = 4;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
message StatisticsReq {
|
||||||
|
string from = 1;
|
||||||
|
string to = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
message GetActiveUserReq{
|
||||||
|
StatisticsReq statisticsReq = 1;
|
||||||
|
string operationID = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
message UserResp{
|
||||||
|
string nickName = 1;
|
||||||
|
string userID = 2;
|
||||||
|
int32 messageNum = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
message GetActiveUserResp {
|
||||||
|
repeated UserResp Users = 1;
|
||||||
|
CommonResp commonResp = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
message GetActiveGroupReq{
|
||||||
|
StatisticsReq statisticsReq = 1;
|
||||||
|
string operationID = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
message GroupResp {
|
||||||
|
string GroupName = 1;
|
||||||
|
string GroupId = 2;
|
||||||
|
int32 MessageNum = 3;
|
||||||
|
CommonResp commonResp = 4;
|
||||||
|
}
|
||||||
|
|
||||||
|
message GetActiveGroupResp {
|
||||||
|
repeated GroupResp Groups = 1;
|
||||||
|
CommonResp commonResp = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
message DateNumList {
|
||||||
|
string Date = 1;
|
||||||
|
int32 Num = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
message GetMessageStatisticsReq {
|
||||||
|
StatisticsReq StatisticsReq = 1;
|
||||||
|
string OperationID = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
message GetMessageStatisticsResp {
|
||||||
|
int32 PrivateMessageNum = 1;
|
||||||
|
int32 GroupMessageNum = 2;
|
||||||
|
repeated DateNumList PrivateMessageNumList = 3;
|
||||||
|
repeated DateNumList GroupMessageNumList = 4;
|
||||||
|
CommonResp commonResp = 5;
|
||||||
|
}
|
||||||
|
|
||||||
|
message GetGroupStatisticsReq {
|
||||||
|
StatisticsReq StatisticsReq = 1;
|
||||||
|
string OperationID = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
message GetGroupStatisticsResp {
|
||||||
|
int32 IncreaseGroupNum = 1;
|
||||||
|
int32 TotalGroupNum = 2;
|
||||||
|
repeated DateNumList IncreaseGroupNumList = 3;
|
||||||
|
repeated DateNumList TotalGroupNumList = 4;
|
||||||
|
CommonResp commonResp = 5;
|
||||||
|
}
|
||||||
|
|
||||||
|
message GetUserStatisticsReq {
|
||||||
|
StatisticsReq StatisticsReq = 1;
|
||||||
|
string OperationID = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
message GetUserStatisticsResp {
|
||||||
|
int32 IncreaseUserNum = 1;
|
||||||
|
int32 ActiveUserNum = 2;
|
||||||
|
int32 TotalUserNum = 3;
|
||||||
|
repeated DateNumList IncreaseUserNumList = 4;
|
||||||
|
repeated DateNumList ActiveUserNumList = 5;
|
||||||
|
repeated DateNumList TotalUserNumList = 6;
|
||||||
|
CommonResp commonResp = 7;
|
||||||
|
}
|
||||||
|
|
||||||
|
message GenerateInvitationCodeReq {
|
||||||
|
string operationID = 1;
|
||||||
|
int32 codeLen = 2;
|
||||||
|
int32 codeNum = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
message GenerateInvitationCodeResp {
|
||||||
|
CommonResp commonResp = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
message GetInvitationCodesReq {
|
||||||
|
string operationID = 1;
|
||||||
|
string code = 2;
|
||||||
|
int32 status = 3;
|
||||||
|
server_api_params.RequestPagination pagination = 4;
|
||||||
|
}
|
||||||
|
|
||||||
|
message invitationCode {
|
||||||
|
string invitationCode = 1;
|
||||||
|
int32 createTime = 2;
|
||||||
|
int32 lastTime = 3;
|
||||||
|
string userID = 4;
|
||||||
|
int32 status = 5;
|
||||||
|
}
|
||||||
|
|
||||||
|
message GetInvitationCodesResp {
|
||||||
|
repeated invitationCode invitationCodes = 1;
|
||||||
|
server_api_params.ResponsePagination Pagination = 2;
|
||||||
|
CommonResp commonResp = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
message QueryIPRegisterReq {
|
||||||
|
string operationID = 1;
|
||||||
|
string IP = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
message QueryIPRegisterResp {
|
||||||
|
string IP = 1;
|
||||||
|
int32 RegisterNum = 2;
|
||||||
|
int32 Status = 3;
|
||||||
|
repeated string userIDList = 4;
|
||||||
|
CommonResp commonResp = 5;
|
||||||
|
}
|
||||||
|
|
||||||
|
message AddIPLimitReq {
|
||||||
|
string operationID = 1;
|
||||||
|
string IP = 2;
|
||||||
|
int32 limitTime = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
message AddIPLimitResp {
|
||||||
|
CommonResp commonResp = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
message RemoveIPLimitReq {
|
||||||
|
string operationID = 1;
|
||||||
|
string IP = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
message RemoveIPLimitResp {
|
||||||
|
CommonResp commonResp = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
message QueryUserIDIPLimitLoginReq {
|
||||||
|
string operationID = 1;
|
||||||
|
string userID = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
message UserIPLimit {
|
||||||
|
string userID = 1;
|
||||||
|
string IP = 2;
|
||||||
|
int32 createTime = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
message QueryUserIDIPLimitLoginResp {
|
||||||
|
repeated UserIPLimit UserIPLimits = 1;
|
||||||
|
CommonResp commonResp = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
message AddUserIPLimitLoginReq {
|
||||||
|
string userID = 1;
|
||||||
|
string operationID = 2;
|
||||||
|
string IP = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
message AddUserIPLimitLoginResp {
|
||||||
|
CommonResp commonResp = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
message RemoveUserIPLimitReq {
|
||||||
|
string userID = 1;
|
||||||
|
string operationID = 2;
|
||||||
|
string IP = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
message RemoveUserIPLimitResp {
|
||||||
|
CommonResp commonResp = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
message GetClientInitConfigReq {
|
||||||
|
string operationID = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
message GetClientInitConfigResp {
|
||||||
|
CommonResp commonResp = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
message SetClientInitConfigReq {
|
||||||
|
string operationID = 1;
|
||||||
|
string discoverPageURL = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
message SetClientInitConfigResp {
|
||||||
|
CommonResp commonResp = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
message GetUserFriendsReq {
|
||||||
|
string operationID = 1;
|
||||||
|
string userID = 2;
|
||||||
|
string friendUserID = 3;
|
||||||
|
string friendUserName = 4;
|
||||||
|
server_api_params.RequestPagination pagination = 5;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
message GetUserFriendsResp {
|
||||||
|
server_api_params.ResponsePagination pagination = 1;
|
||||||
|
repeated server_api_params.FriendInfo friendInfoList = 2;
|
||||||
|
int32 friendNums = 3;
|
||||||
|
CommonResp commonResp = 4;
|
||||||
|
}
|
||||||
|
|
||||||
|
message GetUserIDByEmailAndPhoneNumberReq{
|
||||||
|
string operationID = 1;
|
||||||
|
string email = 2;
|
||||||
|
string phoneNumber = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
message GetUserIDByEmailAndPhoneNumberResp{
|
||||||
|
repeated string userIDList = 1;
|
||||||
|
CommonResp commonResp = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
service adminCMS {
|
||||||
|
rpc AdminLogin(AdminLoginReq) returns(AdminLoginResp);
|
||||||
|
|
||||||
|
rpc AddUserRegisterAddFriendIDList(AddUserRegisterAddFriendIDListReq) returns(AddUserRegisterAddFriendIDListResp);
|
||||||
|
rpc ReduceUserRegisterAddFriendIDList(ReduceUserRegisterAddFriendIDListReq) returns(ReduceUserRegisterAddFriendIDListResp);
|
||||||
|
rpc GetUserRegisterAddFriendIDList(GetUserRegisterAddFriendIDListReq) returns(GetUserRegisterAddFriendIDListResp);
|
||||||
|
|
||||||
|
|
||||||
|
rpc GetChatLogs(GetChatLogsReq) returns(GetChatLogsResp);
|
||||||
|
|
||||||
|
rpc GetActiveUser(GetActiveUserReq) returns(GetActiveUserResp);
|
||||||
|
rpc GetActiveGroup(GetActiveGroupReq) returns(GetActiveGroupResp);
|
||||||
|
rpc GetMessageStatistics(GetMessageStatisticsReq) returns(GetMessageStatisticsResp);
|
||||||
|
rpc GetGroupStatistics(GetGroupStatisticsReq) returns(GetGroupStatisticsResp);
|
||||||
|
rpc GetUserStatistics(GetUserStatisticsReq) returns(GetUserStatisticsResp);
|
||||||
|
|
||||||
|
rpc GenerateInvitationCode(GenerateInvitationCodeReq) returns(GenerateInvitationCodeResp);
|
||||||
|
rpc GetInvitationCodes(GetInvitationCodesReq) returns(GetInvitationCodesResp);
|
||||||
|
|
||||||
|
rpc QueryIPRegister(QueryIPRegisterReq) returns(QueryIPRegisterResp);
|
||||||
|
rpc AddIPLimit(AddIPLimitReq) returns(AddIPLimitResp);
|
||||||
|
rpc RemoveIPLimit(RemoveIPLimitReq) returns(RemoveIPLimitResp);
|
||||||
|
rpc QueryUserIDIPLimitLogin(QueryUserIDIPLimitLoginReq) returns(QueryUserIDIPLimitLoginResp);
|
||||||
|
rpc AddUserIPLimitLogin(AddUserIPLimitLoginReq) returns(AddUserIPLimitLoginResp);
|
||||||
|
rpc RemoveUserIPLimit(RemoveUserIPLimitReq) returns(RemoveUserIPLimitResp);
|
||||||
|
|
||||||
|
rpc GetClientInitConfig(GetClientInitConfigReq) returns(GetClientInitConfigResp);
|
||||||
|
rpc SetClientInitConfig(SetClientInitConfigReq) returns(SetClientInitConfigResp);
|
||||||
|
|
||||||
|
rpc GetUserFriends(GetUserFriendsReq) returns(GetUserFriendsResp);
|
||||||
|
|
||||||
|
rpc GetUserIDByEmailAndPhoneNumber(GetUserIDByEmailAndPhoneNumberReq) returns(GetUserIDByEmailAndPhoneNumberResp);
|
||||||
|
|
||||||
|
rpc GetUserToken(GetUserTokenReq) returns(GetUserTokenResp);
|
||||||
|
}
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,65 @@
|
|||||||
|
syntax = "proto3";
|
||||||
|
import "Open-IM-Server/pkg/proto/sdk_ws/ws.proto";
|
||||||
|
package pbAuth;
|
||||||
|
option go_package = "Open_IM/pkg/proto/auth;pbAuth";
|
||||||
|
|
||||||
|
message CommonResp{
|
||||||
|
int32 errCode = 1;
|
||||||
|
string errMsg = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
message UserRegisterReq {
|
||||||
|
server_api_params.UserInfo UserInfo = 1;
|
||||||
|
string OperationID = 2;
|
||||||
|
}
|
||||||
|
message UserRegisterResp {
|
||||||
|
CommonResp CommonResp = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
message UserTokenReq {
|
||||||
|
int32 Platform = 1;
|
||||||
|
string FromUserID = 2;
|
||||||
|
string OpUserID = 3;
|
||||||
|
string OperationID = 4;
|
||||||
|
string LoginIp = 5;
|
||||||
|
}
|
||||||
|
message UserTokenResp {
|
||||||
|
CommonResp CommonResp = 1;
|
||||||
|
string Token = 2;
|
||||||
|
int64 ExpiredTime = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
message ForceLogoutReq {
|
||||||
|
int32 Platform = 1;
|
||||||
|
string FromUserID = 2;
|
||||||
|
string OpUserID = 3;
|
||||||
|
string OperationID = 4;
|
||||||
|
}
|
||||||
|
message ForceLogoutResp {
|
||||||
|
CommonResp CommonResp = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
message ParseTokenReq{
|
||||||
|
string token = 1;
|
||||||
|
string operationID = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
message ParseTokenResp{
|
||||||
|
string userID = 1;
|
||||||
|
string platform = 2;
|
||||||
|
CommonResp commonResp = 3;
|
||||||
|
uint32 expireTimeSeconds = 4;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
service Auth {
|
||||||
|
rpc UserRegister(UserRegisterReq) returns(UserRegisterResp);
|
||||||
|
rpc UserToken(UserTokenReq) returns(UserTokenResp);
|
||||||
|
rpc ForceLogout(ForceLogoutReq) returns(ForceLogoutResp);
|
||||||
|
rpc ParseToken(ParseTokenReq)returns(ParseTokenResp);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
@ -0,0 +1,29 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
source ./proto_dir.cfg
|
||||||
|
|
||||||
|
for ((i = 0; i < ${#all_proto[*]}; i++)); do
|
||||||
|
proto=${all_proto[$i]}
|
||||||
|
protoc -I ../../../ -I ./ --go_out=plugins=grpc:. $proto
|
||||||
|
echo "protoc --go_out=plugins=grpc:." $proto
|
||||||
|
done
|
||||||
|
echo "proto file generate success"
|
||||||
|
|
||||||
|
|
||||||
|
j=0
|
||||||
|
for file in $(find ./Open_IM -name "*.go"); do # Not recommended, will break on whitespace
|
||||||
|
filelist[j]=$file
|
||||||
|
j=`expr $j + 1`
|
||||||
|
done
|
||||||
|
|
||||||
|
|
||||||
|
for ((i = 0; i < ${#filelist[*]}; i++)); do
|
||||||
|
proto=${filelist[$i]}
|
||||||
|
cp $proto ${proto#*./Open_IM/pkg/proto/}
|
||||||
|
done
|
||||||
|
rm Open_IM -rf
|
||||||
|
#find ./ -type f -path "*.pb.go"|xargs sed -i 's/\".\/sdk_ws\"/\"Open_IM\/pkg\/proto\/sdk_ws\"/g'
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,88 @@
|
|||||||
|
syntax = "proto3";
|
||||||
|
option go_package = "Open_IM/pkg/proto/cache;cache";
|
||||||
|
package cache;
|
||||||
|
|
||||||
|
message CommonResp{
|
||||||
|
int32 errCode = 1;
|
||||||
|
string errMsg = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
message GetFriendIDListFromCacheReq {
|
||||||
|
string userID = 1;
|
||||||
|
string operationID = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
message GetFriendIDListFromCacheResp {
|
||||||
|
repeated string userIDList = 1;
|
||||||
|
CommonResp commonResp = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
message DelFriendIDListFromCacheReq {
|
||||||
|
string userID = 1;
|
||||||
|
string operationID = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
message DelFriendIDListFromCacheResp {
|
||||||
|
CommonResp commonResp = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
message GetBlackIDListFromCacheReq {
|
||||||
|
string userID = 1;
|
||||||
|
string operationID = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
message GetBlackIDListFromCacheResp {
|
||||||
|
repeated string userIDList = 1;
|
||||||
|
CommonResp commonResp = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
message DelBlackIDListFromCacheReq {
|
||||||
|
string userID = 1;
|
||||||
|
string operationID = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
message DelBlackIDListFromCacheResp {
|
||||||
|
CommonResp commonResp = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
message GetGroupMemberIDListFromCacheReq {
|
||||||
|
string operationID = 1;
|
||||||
|
string groupID = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
message GetGroupMemberIDListFromCacheResp {
|
||||||
|
CommonResp commonResp = 1;
|
||||||
|
repeated string userIDList = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
message DelGroupMemberIDListFromCacheReq {
|
||||||
|
string groupID = 1;
|
||||||
|
string operationID = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
message DelGroupMemberIDListFromCacheResp {
|
||||||
|
CommonResp commonResp = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
service cache{
|
||||||
|
|
||||||
|
// friendInfo
|
||||||
|
rpc GetFriendIDListFromCache(GetFriendIDListFromCacheReq) returns(GetFriendIDListFromCacheResp);
|
||||||
|
|
||||||
|
// for dtm
|
||||||
|
rpc DelFriendIDListFromCache(DelFriendIDListFromCacheReq) returns(DelFriendIDListFromCacheResp);
|
||||||
|
|
||||||
|
// blackList
|
||||||
|
rpc GetBlackIDListFromCache(GetBlackIDListFromCacheReq) returns(GetBlackIDListFromCacheResp);
|
||||||
|
|
||||||
|
// for dtm
|
||||||
|
rpc DelBlackIDListFromCache(DelBlackIDListFromCacheReq) returns (DelBlackIDListFromCacheResp);
|
||||||
|
|
||||||
|
// group
|
||||||
|
rpc GetGroupMemberIDListFromCache(GetGroupMemberIDListFromCacheReq) returns(GetGroupMemberIDListFromCacheResp);
|
||||||
|
|
||||||
|
// for dtm
|
||||||
|
rpc DelGroupMemberIDListFromCache(DelGroupMemberIDListFromCacheReq) returns(DelGroupMemberIDListFromCacheResp);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
@ -0,0 +1,448 @@
|
|||||||
|
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||||
|
// source: conversation/conversation.proto
|
||||||
|
|
||||||
|
package conversation // import "Open_IM/pkg/proto/conversation"
|
||||||
|
|
||||||
|
import proto "github.com/golang/protobuf/proto"
|
||||||
|
import fmt "fmt"
|
||||||
|
import math "math"
|
||||||
|
|
||||||
|
import (
|
||||||
|
context "golang.org/x/net/context"
|
||||||
|
grpc "google.golang.org/grpc"
|
||||||
|
)
|
||||||
|
|
||||||
|
// Reference imports to suppress errors if they are not otherwise used.
|
||||||
|
var _ = proto.Marshal
|
||||||
|
var _ = fmt.Errorf
|
||||||
|
var _ = math.Inf
|
||||||
|
|
||||||
|
// This is a compile-time assertion to ensure that this generated file
|
||||||
|
// is compatible with the proto package it is being compiled against.
|
||||||
|
// A compilation error at this line likely means your copy of the
|
||||||
|
// proto package needs to be updated.
|
||||||
|
const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
|
||||||
|
|
||||||
|
type CommonResp struct {
|
||||||
|
ErrCode int32 `protobuf:"varint,1,opt,name=errCode" json:"errCode,omitempty"`
|
||||||
|
ErrMsg string `protobuf:"bytes,2,opt,name=errMsg" json:"errMsg,omitempty"`
|
||||||
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||||
|
XXX_unrecognized []byte `json:"-"`
|
||||||
|
XXX_sizecache int32 `json:"-"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *CommonResp) Reset() { *m = CommonResp{} }
|
||||||
|
func (m *CommonResp) String() string { return proto.CompactTextString(m) }
|
||||||
|
func (*CommonResp) ProtoMessage() {}
|
||||||
|
func (*CommonResp) Descriptor() ([]byte, []int) {
|
||||||
|
return fileDescriptor_conversation_7438d6c35155b4e4, []int{0}
|
||||||
|
}
|
||||||
|
func (m *CommonResp) XXX_Unmarshal(b []byte) error {
|
||||||
|
return xxx_messageInfo_CommonResp.Unmarshal(m, b)
|
||||||
|
}
|
||||||
|
func (m *CommonResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||||
|
return xxx_messageInfo_CommonResp.Marshal(b, m, deterministic)
|
||||||
|
}
|
||||||
|
func (dst *CommonResp) XXX_Merge(src proto.Message) {
|
||||||
|
xxx_messageInfo_CommonResp.Merge(dst, src)
|
||||||
|
}
|
||||||
|
func (m *CommonResp) XXX_Size() int {
|
||||||
|
return xxx_messageInfo_CommonResp.Size(m)
|
||||||
|
}
|
||||||
|
func (m *CommonResp) XXX_DiscardUnknown() {
|
||||||
|
xxx_messageInfo_CommonResp.DiscardUnknown(m)
|
||||||
|
}
|
||||||
|
|
||||||
|
var xxx_messageInfo_CommonResp proto.InternalMessageInfo
|
||||||
|
|
||||||
|
func (m *CommonResp) GetErrCode() int32 {
|
||||||
|
if m != nil {
|
||||||
|
return m.ErrCode
|
||||||
|
}
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *CommonResp) GetErrMsg() string {
|
||||||
|
if m != nil {
|
||||||
|
return m.ErrMsg
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
type Conversation struct {
|
||||||
|
OwnerUserID string `protobuf:"bytes,1,opt,name=ownerUserID" json:"ownerUserID,omitempty"`
|
||||||
|
ConversationID string `protobuf:"bytes,2,opt,name=conversationID" json:"conversationID,omitempty"`
|
||||||
|
RecvMsgOpt int32 `protobuf:"varint,3,opt,name=recvMsgOpt" json:"recvMsgOpt,omitempty"`
|
||||||
|
ConversationType int32 `protobuf:"varint,4,opt,name=conversationType" json:"conversationType,omitempty"`
|
||||||
|
UserID string `protobuf:"bytes,5,opt,name=userID" json:"userID,omitempty"`
|
||||||
|
GroupID string `protobuf:"bytes,6,opt,name=groupID" json:"groupID,omitempty"`
|
||||||
|
UnreadCount int32 `protobuf:"varint,7,opt,name=unreadCount" json:"unreadCount,omitempty"`
|
||||||
|
DraftTextTime int64 `protobuf:"varint,8,opt,name=draftTextTime" json:"draftTextTime,omitempty"`
|
||||||
|
IsPinned bool `protobuf:"varint,9,opt,name=isPinned" json:"isPinned,omitempty"`
|
||||||
|
AttachedInfo string `protobuf:"bytes,10,opt,name=attachedInfo" json:"attachedInfo,omitempty"`
|
||||||
|
IsPrivateChat bool `protobuf:"varint,11,opt,name=isPrivateChat" json:"isPrivateChat,omitempty"`
|
||||||
|
GroupAtType int32 `protobuf:"varint,12,opt,name=groupAtType" json:"groupAtType,omitempty"`
|
||||||
|
IsNotInGroup bool `protobuf:"varint,13,opt,name=isNotInGroup" json:"isNotInGroup,omitempty"`
|
||||||
|
Ex string `protobuf:"bytes,14,opt,name=ex" json:"ex,omitempty"`
|
||||||
|
UpdateUnreadCountTime int64 `protobuf:"varint,15,opt,name=updateUnreadCountTime" json:"updateUnreadCountTime,omitempty"`
|
||||||
|
BurnDuration int32 `protobuf:"varint,16,opt,name=burnDuration" json:"burnDuration,omitempty"`
|
||||||
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||||
|
XXX_unrecognized []byte `json:"-"`
|
||||||
|
XXX_sizecache int32 `json:"-"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *Conversation) Reset() { *m = Conversation{} }
|
||||||
|
func (m *Conversation) String() string { return proto.CompactTextString(m) }
|
||||||
|
func (*Conversation) ProtoMessage() {}
|
||||||
|
func (*Conversation) Descriptor() ([]byte, []int) {
|
||||||
|
return fileDescriptor_conversation_7438d6c35155b4e4, []int{1}
|
||||||
|
}
|
||||||
|
func (m *Conversation) XXX_Unmarshal(b []byte) error {
|
||||||
|
return xxx_messageInfo_Conversation.Unmarshal(m, b)
|
||||||
|
}
|
||||||
|
func (m *Conversation) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||||
|
return xxx_messageInfo_Conversation.Marshal(b, m, deterministic)
|
||||||
|
}
|
||||||
|
func (dst *Conversation) XXX_Merge(src proto.Message) {
|
||||||
|
xxx_messageInfo_Conversation.Merge(dst, src)
|
||||||
|
}
|
||||||
|
func (m *Conversation) XXX_Size() int {
|
||||||
|
return xxx_messageInfo_Conversation.Size(m)
|
||||||
|
}
|
||||||
|
func (m *Conversation) XXX_DiscardUnknown() {
|
||||||
|
xxx_messageInfo_Conversation.DiscardUnknown(m)
|
||||||
|
}
|
||||||
|
|
||||||
|
var xxx_messageInfo_Conversation proto.InternalMessageInfo
|
||||||
|
|
||||||
|
func (m *Conversation) GetOwnerUserID() string {
|
||||||
|
if m != nil {
|
||||||
|
return m.OwnerUserID
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *Conversation) GetConversationID() string {
|
||||||
|
if m != nil {
|
||||||
|
return m.ConversationID
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *Conversation) GetRecvMsgOpt() int32 {
|
||||||
|
if m != nil {
|
||||||
|
return m.RecvMsgOpt
|
||||||
|
}
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *Conversation) GetConversationType() int32 {
|
||||||
|
if m != nil {
|
||||||
|
return m.ConversationType
|
||||||
|
}
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *Conversation) GetUserID() string {
|
||||||
|
if m != nil {
|
||||||
|
return m.UserID
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *Conversation) GetGroupID() string {
|
||||||
|
if m != nil {
|
||||||
|
return m.GroupID
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *Conversation) GetUnreadCount() int32 {
|
||||||
|
if m != nil {
|
||||||
|
return m.UnreadCount
|
||||||
|
}
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *Conversation) GetDraftTextTime() int64 {
|
||||||
|
if m != nil {
|
||||||
|
return m.DraftTextTime
|
||||||
|
}
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *Conversation) GetIsPinned() bool {
|
||||||
|
if m != nil {
|
||||||
|
return m.IsPinned
|
||||||
|
}
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *Conversation) GetAttachedInfo() string {
|
||||||
|
if m != nil {
|
||||||
|
return m.AttachedInfo
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *Conversation) GetIsPrivateChat() bool {
|
||||||
|
if m != nil {
|
||||||
|
return m.IsPrivateChat
|
||||||
|
}
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *Conversation) GetGroupAtType() int32 {
|
||||||
|
if m != nil {
|
||||||
|
return m.GroupAtType
|
||||||
|
}
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *Conversation) GetIsNotInGroup() bool {
|
||||||
|
if m != nil {
|
||||||
|
return m.IsNotInGroup
|
||||||
|
}
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *Conversation) GetEx() string {
|
||||||
|
if m != nil {
|
||||||
|
return m.Ex
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *Conversation) GetUpdateUnreadCountTime() int64 {
|
||||||
|
if m != nil {
|
||||||
|
return m.UpdateUnreadCountTime
|
||||||
|
}
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *Conversation) GetBurnDuration() int32 {
|
||||||
|
if m != nil {
|
||||||
|
return m.BurnDuration
|
||||||
|
}
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
type ModifyConversationFieldReq struct {
|
||||||
|
Conversation *Conversation `protobuf:"bytes,1,opt,name=conversation" json:"conversation,omitempty"`
|
||||||
|
FieldType int32 `protobuf:"varint,2,opt,name=fieldType" json:"fieldType,omitempty"`
|
||||||
|
UserIDList []string `protobuf:"bytes,3,rep,name=userIDList" json:"userIDList,omitempty"`
|
||||||
|
OperationID string `protobuf:"bytes,4,opt,name=operationID" json:"operationID,omitempty"`
|
||||||
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||||
|
XXX_unrecognized []byte `json:"-"`
|
||||||
|
XXX_sizecache int32 `json:"-"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *ModifyConversationFieldReq) Reset() { *m = ModifyConversationFieldReq{} }
|
||||||
|
func (m *ModifyConversationFieldReq) String() string { return proto.CompactTextString(m) }
|
||||||
|
func (*ModifyConversationFieldReq) ProtoMessage() {}
|
||||||
|
func (*ModifyConversationFieldReq) Descriptor() ([]byte, []int) {
|
||||||
|
return fileDescriptor_conversation_7438d6c35155b4e4, []int{2}
|
||||||
|
}
|
||||||
|
func (m *ModifyConversationFieldReq) XXX_Unmarshal(b []byte) error {
|
||||||
|
return xxx_messageInfo_ModifyConversationFieldReq.Unmarshal(m, b)
|
||||||
|
}
|
||||||
|
func (m *ModifyConversationFieldReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||||
|
return xxx_messageInfo_ModifyConversationFieldReq.Marshal(b, m, deterministic)
|
||||||
|
}
|
||||||
|
func (dst *ModifyConversationFieldReq) XXX_Merge(src proto.Message) {
|
||||||
|
xxx_messageInfo_ModifyConversationFieldReq.Merge(dst, src)
|
||||||
|
}
|
||||||
|
func (m *ModifyConversationFieldReq) XXX_Size() int {
|
||||||
|
return xxx_messageInfo_ModifyConversationFieldReq.Size(m)
|
||||||
|
}
|
||||||
|
func (m *ModifyConversationFieldReq) XXX_DiscardUnknown() {
|
||||||
|
xxx_messageInfo_ModifyConversationFieldReq.DiscardUnknown(m)
|
||||||
|
}
|
||||||
|
|
||||||
|
var xxx_messageInfo_ModifyConversationFieldReq proto.InternalMessageInfo
|
||||||
|
|
||||||
|
func (m *ModifyConversationFieldReq) GetConversation() *Conversation {
|
||||||
|
if m != nil {
|
||||||
|
return m.Conversation
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *ModifyConversationFieldReq) GetFieldType() int32 {
|
||||||
|
if m != nil {
|
||||||
|
return m.FieldType
|
||||||
|
}
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *ModifyConversationFieldReq) GetUserIDList() []string {
|
||||||
|
if m != nil {
|
||||||
|
return m.UserIDList
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *ModifyConversationFieldReq) GetOperationID() string {
|
||||||
|
if m != nil {
|
||||||
|
return m.OperationID
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
type ModifyConversationFieldResp struct {
|
||||||
|
CommonResp *CommonResp `protobuf:"bytes,1,opt,name=commonResp" json:"commonResp,omitempty"`
|
||||||
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||||
|
XXX_unrecognized []byte `json:"-"`
|
||||||
|
XXX_sizecache int32 `json:"-"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *ModifyConversationFieldResp) Reset() { *m = ModifyConversationFieldResp{} }
|
||||||
|
func (m *ModifyConversationFieldResp) String() string { return proto.CompactTextString(m) }
|
||||||
|
func (*ModifyConversationFieldResp) ProtoMessage() {}
|
||||||
|
func (*ModifyConversationFieldResp) Descriptor() ([]byte, []int) {
|
||||||
|
return fileDescriptor_conversation_7438d6c35155b4e4, []int{3}
|
||||||
|
}
|
||||||
|
func (m *ModifyConversationFieldResp) XXX_Unmarshal(b []byte) error {
|
||||||
|
return xxx_messageInfo_ModifyConversationFieldResp.Unmarshal(m, b)
|
||||||
|
}
|
||||||
|
func (m *ModifyConversationFieldResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||||
|
return xxx_messageInfo_ModifyConversationFieldResp.Marshal(b, m, deterministic)
|
||||||
|
}
|
||||||
|
func (dst *ModifyConversationFieldResp) XXX_Merge(src proto.Message) {
|
||||||
|
xxx_messageInfo_ModifyConversationFieldResp.Merge(dst, src)
|
||||||
|
}
|
||||||
|
func (m *ModifyConversationFieldResp) XXX_Size() int {
|
||||||
|
return xxx_messageInfo_ModifyConversationFieldResp.Size(m)
|
||||||
|
}
|
||||||
|
func (m *ModifyConversationFieldResp) XXX_DiscardUnknown() {
|
||||||
|
xxx_messageInfo_ModifyConversationFieldResp.DiscardUnknown(m)
|
||||||
|
}
|
||||||
|
|
||||||
|
var xxx_messageInfo_ModifyConversationFieldResp proto.InternalMessageInfo
|
||||||
|
|
||||||
|
func (m *ModifyConversationFieldResp) GetCommonResp() *CommonResp {
|
||||||
|
if m != nil {
|
||||||
|
return m.CommonResp
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func init() {
|
||||||
|
proto.RegisterType((*CommonResp)(nil), "conversation.CommonResp")
|
||||||
|
proto.RegisterType((*Conversation)(nil), "conversation.Conversation")
|
||||||
|
proto.RegisterType((*ModifyConversationFieldReq)(nil), "conversation.ModifyConversationFieldReq")
|
||||||
|
proto.RegisterType((*ModifyConversationFieldResp)(nil), "conversation.ModifyConversationFieldResp")
|
||||||
|
}
|
||||||
|
|
||||||
|
// Reference imports to suppress errors if they are not otherwise used.
|
||||||
|
var _ context.Context
|
||||||
|
var _ grpc.ClientConn
|
||||||
|
|
||||||
|
// This is a compile-time assertion to ensure that this generated file
|
||||||
|
// is compatible with the grpc package it is being compiled against.
|
||||||
|
const _ = grpc.SupportPackageIsVersion4
|
||||||
|
|
||||||
|
// Client API for Conversation service
|
||||||
|
|
||||||
|
type ConversationClient interface {
|
||||||
|
ModifyConversationField(ctx context.Context, in *ModifyConversationFieldReq, opts ...grpc.CallOption) (*ModifyConversationFieldResp, error)
|
||||||
|
}
|
||||||
|
|
||||||
|
type conversationClient struct {
|
||||||
|
cc *grpc.ClientConn
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewConversationClient(cc *grpc.ClientConn) ConversationClient {
|
||||||
|
return &conversationClient{cc}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *conversationClient) ModifyConversationField(ctx context.Context, in *ModifyConversationFieldReq, opts ...grpc.CallOption) (*ModifyConversationFieldResp, error) {
|
||||||
|
out := new(ModifyConversationFieldResp)
|
||||||
|
err := grpc.Invoke(ctx, "/conversation.conversation/ModifyConversationField", in, out, c.cc, opts...)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return out, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// Server API for Conversation service
|
||||||
|
|
||||||
|
type ConversationServer interface {
|
||||||
|
ModifyConversationField(context.Context, *ModifyConversationFieldReq) (*ModifyConversationFieldResp, error)
|
||||||
|
}
|
||||||
|
|
||||||
|
func RegisterConversationServer(s *grpc.Server, srv ConversationServer) {
|
||||||
|
s.RegisterService(&_Conversation_serviceDesc, srv)
|
||||||
|
}
|
||||||
|
|
||||||
|
func _Conversation_ModifyConversationField_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(ModifyConversationFieldReq)
|
||||||
|
if err := dec(in); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if interceptor == nil {
|
||||||
|
return srv.(ConversationServer).ModifyConversationField(ctx, in)
|
||||||
|
}
|
||||||
|
info := &grpc.UnaryServerInfo{
|
||||||
|
Server: srv,
|
||||||
|
FullMethod: "/conversation.conversation/ModifyConversationField",
|
||||||
|
}
|
||||||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||||
|
return srv.(ConversationServer).ModifyConversationField(ctx, req.(*ModifyConversationFieldReq))
|
||||||
|
}
|
||||||
|
return interceptor(ctx, in, info, handler)
|
||||||
|
}
|
||||||
|
|
||||||
|
var _Conversation_serviceDesc = grpc.ServiceDesc{
|
||||||
|
ServiceName: "conversation.conversation",
|
||||||
|
HandlerType: (*ConversationServer)(nil),
|
||||||
|
Methods: []grpc.MethodDesc{
|
||||||
|
{
|
||||||
|
MethodName: "ModifyConversationField",
|
||||||
|
Handler: _Conversation_ModifyConversationField_Handler,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
Streams: []grpc.StreamDesc{},
|
||||||
|
Metadata: "conversation/conversation.proto",
|
||||||
|
}
|
||||||
|
|
||||||
|
func init() {
|
||||||
|
proto.RegisterFile("conversation/conversation.proto", fileDescriptor_conversation_7438d6c35155b4e4)
|
||||||
|
}
|
||||||
|
|
||||||
|
var fileDescriptor_conversation_7438d6c35155b4e4 = []byte{
|
||||||
|
// 520 bytes of a gzipped FileDescriptorProto
|
||||||
|
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x94, 0xd1, 0x6b, 0x13, 0x41,
|
||||||
|
0x10, 0xc6, 0xb9, 0xb4, 0x4d, 0x93, 0x49, 0x1a, 0xcb, 0x82, 0xba, 0x44, 0xd1, 0x10, 0x44, 0x4e,
|
||||||
|
0xc5, 0x06, 0xaa, 0x0f, 0x82, 0x50, 0xd0, 0x04, 0xe5, 0xc0, 0xd8, 0x72, 0xa4, 0x08, 0xbe, 0xc8,
|
||||||
|
0x35, 0x37, 0x49, 0x0f, 0xcd, 0xee, 0xba, 0xbb, 0x17, 0xd3, 0x17, 0xff, 0x2a, 0x1f, 0xfd, 0xe3,
|
||||||
|
0x64, 0x27, 0x49, 0xb3, 0x5b, 0x0d, 0xf8, 0x38, 0xbf, 0x9d, 0xfb, 0xe6, 0x9b, 0xcd, 0x97, 0x85,
|
||||||
|
0x87, 0x63, 0x29, 0xe6, 0xa8, 0x4d, 0x66, 0x0b, 0x29, 0x7a, 0x7e, 0x71, 0xa4, 0xb4, 0xb4, 0x92,
|
||||||
|
0x35, 0x7d, 0xd6, 0x3d, 0x01, 0xe8, 0xcb, 0xd9, 0x4c, 0x8a, 0x14, 0x8d, 0x62, 0x1c, 0xf6, 0x51,
|
||||||
|
0xeb, 0xbe, 0xcc, 0x91, 0x47, 0x9d, 0x28, 0xde, 0x4b, 0xd7, 0x25, 0xbb, 0x03, 0x55, 0xd4, 0x7a,
|
||||||
|
0x68, 0xa6, 0xbc, 0xd2, 0x89, 0xe2, 0x7a, 0xba, 0xaa, 0xba, 0xbf, 0x76, 0xa1, 0xd9, 0xf7, 0x04,
|
||||||
|
0x59, 0x07, 0x1a, 0xf2, 0x87, 0x40, 0x7d, 0x6e, 0x50, 0x27, 0x03, 0x92, 0xa9, 0xa7, 0x3e, 0x62,
|
||||||
|
0x8f, 0xa1, 0xe5, 0x5b, 0x48, 0x06, 0x2b, 0xc9, 0x1b, 0x94, 0x3d, 0x00, 0xd0, 0x38, 0x9e, 0x0f,
|
||||||
|
0xcd, 0xf4, 0x54, 0x59, 0xbe, 0x43, 0x7e, 0x3c, 0xc2, 0x9e, 0xc2, 0xa1, 0xff, 0xc5, 0xe8, 0x4a,
|
||||||
|
0x21, 0xdf, 0xa5, 0xae, 0xbf, 0xb8, 0xb3, 0x5f, 0x2e, 0x0d, 0xed, 0x2d, 0xed, 0x2f, 0x2b, 0xb7,
|
||||||
|
0xf0, 0x54, 0xcb, 0x52, 0x25, 0x03, 0x5e, 0xa5, 0x83, 0x75, 0xe9, 0xf6, 0x28, 0x85, 0xc6, 0x2c,
|
||||||
|
0xef, 0xcb, 0x52, 0x58, 0xbe, 0x4f, 0xc2, 0x3e, 0x62, 0x8f, 0xe0, 0x20, 0xd7, 0xd9, 0xc4, 0x8e,
|
||||||
|
0x70, 0x61, 0x47, 0xc5, 0x0c, 0x79, 0xad, 0x13, 0xc5, 0x3b, 0x69, 0x08, 0x59, 0x1b, 0x6a, 0x85,
|
||||||
|
0x39, 0x2b, 0x84, 0xc0, 0x9c, 0xd7, 0x3b, 0x51, 0x5c, 0x4b, 0xaf, 0x6b, 0xd6, 0x85, 0x66, 0x66,
|
||||||
|
0x6d, 0x36, 0xbe, 0xc4, 0x3c, 0x11, 0x13, 0xc9, 0x81, 0x2c, 0x04, 0xcc, 0x4d, 0x29, 0xcc, 0x99,
|
||||||
|
0x2e, 0xe6, 0x99, 0xc5, 0xfe, 0x65, 0x66, 0x79, 0x83, 0x44, 0x42, 0xe8, 0xdc, 0x92, 0xf1, 0x37,
|
||||||
|
0x96, 0xae, 0xa1, 0xb9, 0x74, 0xeb, 0x21, 0x37, 0xab, 0x30, 0x1f, 0xa5, 0x4d, 0xc4, 0x7b, 0x47,
|
||||||
|
0xf9, 0x01, 0xc9, 0x04, 0x8c, 0xb5, 0xa0, 0x82, 0x0b, 0xde, 0x22, 0x17, 0x15, 0x5c, 0xb0, 0x97,
|
||||||
|
0x70, 0xbb, 0x54, 0x79, 0x66, 0xf1, 0x7c, 0xb3, 0x36, 0x6d, 0x7a, 0x8b, 0x36, 0xfd, 0xf7, 0xa1,
|
||||||
|
0x9b, 0x74, 0x51, 0x6a, 0x31, 0x28, 0x35, 0xdd, 0x3f, 0x3f, 0x24, 0x33, 0x01, 0xeb, 0xfe, 0x8e,
|
||||||
|
0xa0, 0x3d, 0x94, 0x79, 0x31, 0xb9, 0xf2, 0xc3, 0xf3, 0xae, 0xc0, 0x6f, 0x79, 0x8a, 0xdf, 0xd9,
|
||||||
|
0x09, 0x04, 0x29, 0xa5, 0x14, 0x35, 0x8e, 0xdb, 0x47, 0x41, 0x9c, 0xfd, 0x2f, 0xd3, 0xa0, 0x9f,
|
||||||
|
0xdd, 0x87, 0xfa, 0xc4, 0x69, 0xd1, 0x65, 0x54, 0x68, 0xfe, 0x06, 0xb8, 0x60, 0x2d, 0x7f, 0xfe,
|
||||||
|
0x0f, 0x85, 0x71, 0xc1, 0xda, 0x89, 0xeb, 0xa9, 0x47, 0x28, 0xc2, 0x0a, 0xf5, 0x3a, 0x9d, 0xbb,
|
||||||
|
0xab, 0x08, 0x6f, 0x50, 0xf7, 0x13, 0xdc, 0xdb, 0xea, 0xde, 0x28, 0xf6, 0x0a, 0x60, 0x7c, 0xfd,
|
||||||
|
0xa7, 0x5a, 0x99, 0xe7, 0x37, 0xcd, 0xaf, 0xcf, 0x53, 0xaf, 0xf7, 0xf8, 0x67, 0xb8, 0x38, 0x13,
|
||||||
|
0x70, 0x77, 0xcb, 0x20, 0x16, 0x87, 0x82, 0xdb, 0x6f, 0xb3, 0xfd, 0xe4, 0x3f, 0x3b, 0x8d, 0x7a,
|
||||||
|
0xfb, 0xfc, 0xf3, 0xb3, 0x53, 0x85, 0xe2, 0x4b, 0x32, 0xec, 0xa9, 0xaf, 0xd3, 0x1e, 0xbd, 0x18,
|
||||||
|
0xc1, 0x23, 0xf2, 0xda, 0x2f, 0x2e, 0xaa, 0xd4, 0xf0, 0xe2, 0x4f, 0x00, 0x00, 0x00, 0xff, 0xff,
|
||||||
|
0xb3, 0xd2, 0x40, 0x56, 0x75, 0x04, 0x00, 0x00,
|
||||||
|
}
|
@ -0,0 +1,41 @@
|
|||||||
|
syntax = "proto3";
|
||||||
|
option go_package = "Open_IM/pkg/proto/conversation;conversation";
|
||||||
|
package conversation;
|
||||||
|
|
||||||
|
message CommonResp{
|
||||||
|
int32 errCode = 1;
|
||||||
|
string errMsg = 2;
|
||||||
|
}
|
||||||
|
message Conversation{
|
||||||
|
string ownerUserID = 1;
|
||||||
|
string conversationID = 2;
|
||||||
|
int32 recvMsgOpt = 3;
|
||||||
|
int32 conversationType = 4;
|
||||||
|
string userID = 5;
|
||||||
|
string groupID = 6;
|
||||||
|
int32 unreadCount = 7;
|
||||||
|
int64 draftTextTime = 8;
|
||||||
|
bool isPinned = 9;
|
||||||
|
string attachedInfo = 10;
|
||||||
|
bool isPrivateChat = 11;
|
||||||
|
int32 groupAtType = 12;
|
||||||
|
bool isNotInGroup = 13;
|
||||||
|
string ex = 14;
|
||||||
|
int64 updateUnreadCountTime = 15;
|
||||||
|
int32 burnDuration = 16;
|
||||||
|
|
||||||
|
}
|
||||||
|
message ModifyConversationFieldReq{
|
||||||
|
Conversation conversation = 1;
|
||||||
|
int32 fieldType = 2;
|
||||||
|
repeated string userIDList = 3;
|
||||||
|
string operationID = 4;
|
||||||
|
}
|
||||||
|
|
||||||
|
message ModifyConversationFieldResp{
|
||||||
|
CommonResp commonResp = 1;
|
||||||
|
}
|
||||||
|
service conversation {
|
||||||
|
rpc ModifyConversationField(ModifyConversationFieldReq)returns(ModifyConversationFieldResp);
|
||||||
|
|
||||||
|
}
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,172 @@
|
|||||||
|
syntax = "proto3";
|
||||||
|
import "Open-IM-Server/pkg/proto/sdk_ws/ws.proto";
|
||||||
|
option go_package = "Open_IM/pkg/proto/friend;friend";
|
||||||
|
package friend;
|
||||||
|
|
||||||
|
message CommonResp{
|
||||||
|
int32 errCode = 1;
|
||||||
|
string errMsg = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
message CommID{
|
||||||
|
string OpUserID = 1;
|
||||||
|
string OperationID = 2;
|
||||||
|
string ToUserID = 4;
|
||||||
|
string FromUserID = 5;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
message GetFriendsInfoReq{
|
||||||
|
CommID CommID = 1;
|
||||||
|
}
|
||||||
|
message GetFriendInfoResp{
|
||||||
|
int32 ErrCode = 1;
|
||||||
|
string ErrMsg = 2;
|
||||||
|
repeated server_api_params.FriendInfo FriendInfoList = 3;
|
||||||
|
// int32 IsBlack = 4;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
message AddFriendReq{
|
||||||
|
CommID CommID = 1;
|
||||||
|
string ReqMsg = 2;
|
||||||
|
}
|
||||||
|
message AddFriendResp{
|
||||||
|
CommonResp CommonResp = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
message ImportFriendReq{
|
||||||
|
repeated string FriendUserIDList = 1;
|
||||||
|
string OperationID = 2;
|
||||||
|
string FromUserID = 3;
|
||||||
|
string OpUserID = 4;
|
||||||
|
}
|
||||||
|
message UserIDResult{
|
||||||
|
string UserID = 1;
|
||||||
|
int32 Result = 2;
|
||||||
|
}
|
||||||
|
message ImportFriendResp{
|
||||||
|
CommonResp CommonResp = 1;
|
||||||
|
repeated UserIDResult UserIDResultList = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
message GetFriendApplyListReq{
|
||||||
|
CommID CommID = 1;
|
||||||
|
}
|
||||||
|
message GetFriendApplyListResp{
|
||||||
|
int32 ErrCode = 1;
|
||||||
|
string ErrMsg = 2;
|
||||||
|
repeated server_api_params.FriendRequest FriendRequestList = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
message GetFriendListReq{
|
||||||
|
CommID CommID = 1;
|
||||||
|
}
|
||||||
|
message GetFriendListResp{
|
||||||
|
int32 ErrCode = 1;
|
||||||
|
string ErrMsg = 2;
|
||||||
|
repeated server_api_params.FriendInfo FriendInfoList = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
message AddBlacklistReq{
|
||||||
|
CommID CommID = 1;
|
||||||
|
}
|
||||||
|
message AddBlacklistResp{
|
||||||
|
CommonResp CommonResp = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
message RemoveBlacklistReq{
|
||||||
|
CommID CommID = 1;
|
||||||
|
}
|
||||||
|
message RemoveBlacklistResp{
|
||||||
|
CommonResp CommonResp = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
message GetBlacklistReq{
|
||||||
|
CommID CommID = 1;
|
||||||
|
}
|
||||||
|
message GetBlacklistResp{
|
||||||
|
int32 ErrCode = 1;
|
||||||
|
string ErrMsg = 2;
|
||||||
|
repeated server_api_params.PublicUserInfo BlackUserInfoList = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
message IsFriendReq{
|
||||||
|
CommID CommID = 1;
|
||||||
|
}
|
||||||
|
message IsFriendResp{
|
||||||
|
int32 ErrCode = 1;
|
||||||
|
string ErrMsg = 2;
|
||||||
|
bool Response = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
message IsInBlackListReq{
|
||||||
|
CommID CommID = 1;
|
||||||
|
}
|
||||||
|
message IsInBlackListResp{
|
||||||
|
int32 ErrCode = 1;
|
||||||
|
string ErrMsg = 2;
|
||||||
|
bool Response = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
message DeleteFriendReq{
|
||||||
|
CommID CommID = 1;
|
||||||
|
}
|
||||||
|
message DeleteFriendResp{
|
||||||
|
CommonResp CommonResp = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
//process
|
||||||
|
message AddFriendResponseReq{
|
||||||
|
CommID CommID = 1;
|
||||||
|
int32 handleResult = 2;
|
||||||
|
string handleMsg = 3;
|
||||||
|
}
|
||||||
|
message AddFriendResponseResp{
|
||||||
|
CommonResp CommonResp = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
message SetFriendRemarkReq{
|
||||||
|
CommID CommID = 1;
|
||||||
|
string Remark = 2;
|
||||||
|
}
|
||||||
|
message SetFriendRemarkResp{
|
||||||
|
CommonResp CommonResp = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
message GetSelfApplyListReq{
|
||||||
|
CommID CommID = 1;
|
||||||
|
}
|
||||||
|
message GetSelfApplyListResp{
|
||||||
|
int32 ErrCode = 1;
|
||||||
|
string ErrMsg = 2;
|
||||||
|
repeated server_api_params.FriendRequest FriendRequestList = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
service friend{
|
||||||
|
// rpc getFriendsInfo(GetFriendsInfoReq) returns(GetFriendInfoResp);
|
||||||
|
rpc addFriend(AddFriendReq) returns(AddFriendResp);
|
||||||
|
rpc getFriendApplyList(GetFriendApplyListReq) returns(GetFriendApplyListResp);
|
||||||
|
rpc getSelfApplyList(GetSelfApplyListReq) returns(GetSelfApplyListResp);
|
||||||
|
rpc getFriendList(GetFriendListReq) returns(GetFriendListResp);
|
||||||
|
rpc addBlacklist(AddBlacklistReq) returns(AddBlacklistResp);
|
||||||
|
rpc removeBlacklist(RemoveBlacklistReq) returns(RemoveBlacklistResp);
|
||||||
|
rpc isFriend(IsFriendReq) returns(IsFriendResp);
|
||||||
|
rpc isInBlackList(IsInBlackListReq) returns(IsInBlackListResp);
|
||||||
|
rpc getBlacklist(GetBlacklistReq) returns(GetBlacklistResp);
|
||||||
|
rpc deleteFriend(DeleteFriendReq) returns(DeleteFriendResp);
|
||||||
|
rpc addFriendResponse(AddFriendResponseReq) returns(AddFriendResponseResp);
|
||||||
|
rpc setFriendRemark(SetFriendRemarkReq) returns(SetFriendRemarkResp);
|
||||||
|
rpc importFriend(ImportFriendReq) returns(ImportFriendResp);
|
||||||
|
|
||||||
|
// rpc CheckFriendFromCache(IsFriendReq) returns(IsFriendResp);
|
||||||
|
// rpc CheckBlockFromCache(IsInBlackListReq) returns(IsFriendResp);
|
||||||
|
}
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,454 @@
|
|||||||
|
syntax = "proto3";
|
||||||
|
import "Open-IM-Server/pkg/proto/sdk_ws/ws.proto";
|
||||||
|
import "Open-IM-Server/pkg/proto/sdk_ws/wrappers.proto";
|
||||||
|
option go_package = "Open_IM/pkg/proto/group;group";
|
||||||
|
package group;
|
||||||
|
|
||||||
|
message CommonResp{
|
||||||
|
int32 ErrCode = 1;
|
||||||
|
string ErrMsg = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
message GroupAddMemberInfo{
|
||||||
|
string UserID = 1;
|
||||||
|
int32 RoleLevel = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
message CreateGroupReq{
|
||||||
|
repeated GroupAddMemberInfo InitMemberList = 1;
|
||||||
|
server_api_params.GroupInfo GroupInfo = 2;
|
||||||
|
string OperationID = 3;
|
||||||
|
string OpUserID = 4; //app manager or group owner
|
||||||
|
string OwnerUserID = 5; //owner
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
message CreateGroupResp{
|
||||||
|
int32 ErrCode = 1;
|
||||||
|
string ErrMsg = 2;
|
||||||
|
server_api_params.GroupInfo GroupInfo = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
message GetGroupsInfoReq{
|
||||||
|
repeated string GroupIDList = 1;
|
||||||
|
string OperationID = 2;
|
||||||
|
string OpUserID = 3; //No verification permission
|
||||||
|
}
|
||||||
|
message GetGroupsInfoResp{
|
||||||
|
int32 ErrCode = 1;
|
||||||
|
string ErrMsg = 2;
|
||||||
|
repeated server_api_params.GroupInfo GroupInfoList = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
message SetGroupInfoReq{
|
||||||
|
server_api_params.GroupInfoForSet groupInfoForSet = 1;
|
||||||
|
string OpUserID = 2; //app manager or group owner
|
||||||
|
string OperationID = 3;
|
||||||
|
}
|
||||||
|
message SetGroupInfoResp{
|
||||||
|
CommonResp CommonResp = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
message GetGroupApplicationListReq {
|
||||||
|
string OpUserID = 1; //app manager or group owner(manager)
|
||||||
|
string OperationID = 2;
|
||||||
|
string FromUserID = 3; //owner or manager
|
||||||
|
}
|
||||||
|
message GetGroupApplicationListResp {
|
||||||
|
int32 ErrCode = 1;
|
||||||
|
string ErrMsg = 2;
|
||||||
|
repeated server_api_params.GroupRequest GroupRequestList = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
message GetUserReqApplicationListReq{
|
||||||
|
string UserID = 1;
|
||||||
|
string OpUserID = 2;
|
||||||
|
string OperationID = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
message GetUserReqApplicationListResp{
|
||||||
|
CommonResp CommonResp = 1;
|
||||||
|
repeated server_api_params.GroupRequest GroupRequestList = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
message TransferGroupOwnerReq {
|
||||||
|
string GroupID = 1;
|
||||||
|
string OldOwnerUserID = 2;
|
||||||
|
string NewOwnerUserID = 3;
|
||||||
|
string OperationID = 4;
|
||||||
|
string OpUserID = 5; //app manager or group owner
|
||||||
|
}
|
||||||
|
message TransferGroupOwnerResp{
|
||||||
|
CommonResp CommonResp = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
message JoinGroupReq{
|
||||||
|
string GroupID = 1;
|
||||||
|
string ReqMessage = 2;
|
||||||
|
string OpUserID = 3;
|
||||||
|
string OperationID = 4;
|
||||||
|
int32 JoinSource = 5;
|
||||||
|
string InviterUserID = 6;
|
||||||
|
|
||||||
|
}
|
||||||
|
message JoinGroupResp{
|
||||||
|
CommonResp CommonResp = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
message GroupApplicationResponseReq{
|
||||||
|
string OperationID = 1;
|
||||||
|
string OpUserID = 2;
|
||||||
|
string GroupID = 3;
|
||||||
|
string FromUserID = 4; //
|
||||||
|
string HandledMsg = 5;
|
||||||
|
int32 HandleResult = 6;
|
||||||
|
}
|
||||||
|
message GroupApplicationResponseResp{
|
||||||
|
CommonResp CommonResp = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
message QuitGroupReq{
|
||||||
|
string GroupID = 1;
|
||||||
|
string OperationID = 2;
|
||||||
|
string OpUserID = 3;
|
||||||
|
}
|
||||||
|
message QuitGroupResp{
|
||||||
|
CommonResp CommonResp = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
message GetGroupMemberListReq {
|
||||||
|
string GroupID = 1;
|
||||||
|
string OpUserID = 2; //No verification permission
|
||||||
|
string OperationID = 3;
|
||||||
|
int32 Filter = 4;
|
||||||
|
int32 NextSeq = 5;
|
||||||
|
}
|
||||||
|
|
||||||
|
message GetGroupMemberListResp {
|
||||||
|
int32 ErrCode = 1;
|
||||||
|
string ErrMsg = 2;
|
||||||
|
repeated server_api_params.GroupMemberFullInfo memberList = 3;
|
||||||
|
int32 nextSeq = 4;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
message GetGroupMembersInfoReq {
|
||||||
|
string GroupID = 1;
|
||||||
|
repeated string memberList = 2;
|
||||||
|
string OpUserID = 3; //No verification permission
|
||||||
|
string OperationID = 4;
|
||||||
|
bool noCache = 5;
|
||||||
|
}
|
||||||
|
|
||||||
|
message GetGroupMembersInfoResp {
|
||||||
|
int32 ErrCode = 1;
|
||||||
|
string ErrMsg = 2;
|
||||||
|
repeated server_api_params.GroupMemberFullInfo memberList = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
message KickGroupMemberReq {
|
||||||
|
string GroupID = 1;
|
||||||
|
repeated string KickedUserIDList = 2;
|
||||||
|
string Reason = 3;
|
||||||
|
string OperationID = 5;
|
||||||
|
string OpUserID = 6; //app manger or group manager
|
||||||
|
}
|
||||||
|
|
||||||
|
message Id2Result {
|
||||||
|
string UserID = 1;
|
||||||
|
int32 Result = 2; //0 ok; -1 error
|
||||||
|
}
|
||||||
|
|
||||||
|
message KickGroupMemberResp {
|
||||||
|
int32 ErrCode = 1;
|
||||||
|
string ErrMsg = 2;
|
||||||
|
repeated Id2Result Id2ResultList = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
message GetJoinedGroupListReq {
|
||||||
|
string FromUserID = 1;
|
||||||
|
string operationID = 2;
|
||||||
|
string OpUserID = 3; //app manager or FromUserID
|
||||||
|
}
|
||||||
|
message GetJoinedGroupListResp{
|
||||||
|
int32 ErrCode = 1;
|
||||||
|
string ErrMsg = 2;
|
||||||
|
repeated server_api_params.GroupInfo GroupList = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
message InviteUserToGroupReq {
|
||||||
|
string OperationID = 2;
|
||||||
|
string GroupID = 3;
|
||||||
|
string Reason = 4;
|
||||||
|
repeated string InvitedUserIDList = 5;
|
||||||
|
string OpUserID = 6; //group member or app manager
|
||||||
|
}
|
||||||
|
message InviteUserToGroupResp {
|
||||||
|
int32 ErrCode = 1;
|
||||||
|
string ErrMsg = 2;
|
||||||
|
repeated Id2Result Id2ResultList = 3; // 0 ok, -1 error
|
||||||
|
}
|
||||||
|
|
||||||
|
message InviteUserToGroupsReq {
|
||||||
|
string OperationID = 1;
|
||||||
|
repeated string groupIDList = 2;
|
||||||
|
string Reason = 3;
|
||||||
|
string invitedUserID = 4;
|
||||||
|
string OpUserID = 5; //group member or app manager
|
||||||
|
}
|
||||||
|
message InviteUserToGroupsResp {
|
||||||
|
int32 ErrCode = 1;
|
||||||
|
string ErrMsg = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
message GetGroupAllMemberReq {
|
||||||
|
string GroupID = 1;
|
||||||
|
string OpUserID = 2; //No verification permission
|
||||||
|
string OperationID = 3;
|
||||||
|
int32 Offset = 4;
|
||||||
|
int32 Count = 5;
|
||||||
|
}
|
||||||
|
message GetGroupAllMemberResp {
|
||||||
|
int32 ErrCode = 1;
|
||||||
|
string ErrMsg = 2;
|
||||||
|
repeated server_api_params.GroupMemberFullInfo memberList = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
message CMSGroup {
|
||||||
|
server_api_params.GroupInfo GroupInfo = 1;
|
||||||
|
string GroupOwnerUserName = 2;
|
||||||
|
string GroupOwnerUserID = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
message GetGroupsReq {
|
||||||
|
server_api_params.RequestPagination Pagination = 1;
|
||||||
|
string GroupName = 2;
|
||||||
|
string GroupID = 3;
|
||||||
|
string OperationID = 4;
|
||||||
|
}
|
||||||
|
|
||||||
|
message GetGroupsResp {
|
||||||
|
repeated CMSGroup CMSGroups = 1;
|
||||||
|
server_api_params.ResponsePagination Pagination = 2;
|
||||||
|
int32 GroupNum = 3;
|
||||||
|
CommonResp commonResp = 4;
|
||||||
|
}
|
||||||
|
|
||||||
|
message GetGroupMemberReq {
|
||||||
|
string GroupID = 1;
|
||||||
|
string OperationID = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
message GetGroupMembersCMSReq {
|
||||||
|
string GroupID = 1;
|
||||||
|
string UserName = 2;
|
||||||
|
server_api_params.RequestPagination Pagination = 3;
|
||||||
|
string OperationID = 4;
|
||||||
|
}
|
||||||
|
|
||||||
|
message GetGroupMembersCMSResp {
|
||||||
|
repeated server_api_params.GroupMemberFullInfo members = 1;
|
||||||
|
server_api_params.ResponsePagination Pagination = 2;
|
||||||
|
int32 MemberNums = 3;
|
||||||
|
CommonResp commonResp = 4;
|
||||||
|
}
|
||||||
|
|
||||||
|
message DismissGroupReq{
|
||||||
|
string opUserID = 1; //group or app manager
|
||||||
|
string operationID = 2;
|
||||||
|
string groupID = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
message DismissGroupResp{
|
||||||
|
CommonResp commonResp = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
message MuteGroupMemberReq{
|
||||||
|
string opUserID = 1; //group or app manager
|
||||||
|
string operationID = 2;
|
||||||
|
string groupID = 3;
|
||||||
|
string userID = 4;
|
||||||
|
uint32 mutedSeconds = 5;
|
||||||
|
}
|
||||||
|
|
||||||
|
message MuteGroupMemberResp{
|
||||||
|
CommonResp commonResp = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
message CancelMuteGroupMemberReq{
|
||||||
|
string opUserID = 1; //group or app manager
|
||||||
|
string operationID = 2;
|
||||||
|
string groupID = 3;
|
||||||
|
string userID = 4;
|
||||||
|
}
|
||||||
|
|
||||||
|
message CancelMuteGroupMemberResp{
|
||||||
|
CommonResp commonResp = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
message MuteGroupReq{
|
||||||
|
string opUserID = 1; //group or app manager
|
||||||
|
string operationID = 2;
|
||||||
|
string groupID = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
message MuteGroupResp{
|
||||||
|
CommonResp commonResp = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
message CancelMuteGroupReq{
|
||||||
|
string opUserID = 1; //group or app manager
|
||||||
|
string operationID = 2;
|
||||||
|
string groupID = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
message CancelMuteGroupResp{
|
||||||
|
CommonResp commonResp = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
message SetGroupMemberNicknameReq{
|
||||||
|
string groupID = 1;
|
||||||
|
string nickname = 2;
|
||||||
|
string opUserID = 3;
|
||||||
|
string operationID = 4;
|
||||||
|
string userID = 5;
|
||||||
|
}
|
||||||
|
message SetGroupMemberNicknameResp{
|
||||||
|
CommonResp CommonResp = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
message GetJoinedSuperGroupListReq {
|
||||||
|
string operationID = 1;
|
||||||
|
string userID = 2;
|
||||||
|
string opUserID = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
message GetJoinedSuperGroupListResp {
|
||||||
|
CommonResp commonResp = 1;
|
||||||
|
repeated server_api_params.GroupInfo GroupList = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
message GetSuperGroupsInfoReq {
|
||||||
|
repeated string GroupIDList = 1;
|
||||||
|
string OperationID = 2;
|
||||||
|
string OpUserID = 3; //No verification permission
|
||||||
|
}
|
||||||
|
|
||||||
|
message GetSuperGroupsInfoResp {
|
||||||
|
CommonResp commonResp = 1;
|
||||||
|
repeated server_api_params.GroupInfo GroupInfoList = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
message SetGroupMemberInfoReq{
|
||||||
|
string groupID = 1;
|
||||||
|
string userID = 2;
|
||||||
|
string opUserID = 3;
|
||||||
|
string operationID = 4;
|
||||||
|
google.protobuf.StringValue nickname = 5;
|
||||||
|
google.protobuf.StringValue faceURL = 6;
|
||||||
|
google.protobuf.Int32Value roleLevel = 7;
|
||||||
|
google.protobuf.StringValue ex = 8;
|
||||||
|
}
|
||||||
|
|
||||||
|
message SetGroupMemberInfoResp{
|
||||||
|
CommonResp CommonResp = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
message GetGroupAbstractInfoReq{
|
||||||
|
string groupID = 1;
|
||||||
|
string opUserID = 2;
|
||||||
|
string operationID = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
message GetGroupAbstractInfoResp{
|
||||||
|
CommonResp CommonResp = 1;
|
||||||
|
int32 groupMemberNumber = 2;
|
||||||
|
uint64 groupMemberListHash = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
message GroupIsExistReq {
|
||||||
|
repeated string groupIDList = 1;
|
||||||
|
string opUserID = 2;
|
||||||
|
string operationID = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
message GroupIsExistResp {
|
||||||
|
CommonResp CommonResp = 1;
|
||||||
|
map<string, bool> IsExistMap = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
message UserIsInGroupReq {
|
||||||
|
string groupID = 1;
|
||||||
|
repeated string userIDList = 2;
|
||||||
|
string operationID = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
message UserIsInGroupResp {
|
||||||
|
CommonResp CommonResp = 1;
|
||||||
|
map<string, bool> IsExistMap = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
service group{
|
||||||
|
rpc createGroup(CreateGroupReq) returns(CreateGroupResp);
|
||||||
|
rpc joinGroup(JoinGroupReq) returns(JoinGroupResp);
|
||||||
|
rpc quitGroup(QuitGroupReq) returns(QuitGroupResp);
|
||||||
|
rpc getGroupsInfo(GetGroupsInfoReq) returns(GetGroupsInfoResp);
|
||||||
|
rpc setGroupInfo(SetGroupInfoReq) returns(SetGroupInfoResp);
|
||||||
|
rpc getGroupApplicationList(GetGroupApplicationListReq) returns(GetGroupApplicationListResp);
|
||||||
|
rpc getUserReqApplicationList(GetUserReqApplicationListReq) returns(GetUserReqApplicationListResp);
|
||||||
|
rpc transferGroupOwner(TransferGroupOwnerReq) returns(TransferGroupOwnerResp);
|
||||||
|
rpc groupApplicationResponse(GroupApplicationResponseReq) returns(GroupApplicationResponseResp);
|
||||||
|
rpc getGroupMemberList(GetGroupMemberListReq) returns(GetGroupMemberListResp);
|
||||||
|
rpc getGroupMembersInfo(GetGroupMembersInfoReq) returns(GetGroupMembersInfoResp);
|
||||||
|
rpc kickGroupMember(KickGroupMemberReq) returns (KickGroupMemberResp);
|
||||||
|
rpc getJoinedGroupList(GetJoinedGroupListReq) returns (GetJoinedGroupListResp);
|
||||||
|
rpc inviteUserToGroup(InviteUserToGroupReq) returns (InviteUserToGroupResp);
|
||||||
|
rpc inviteUserToGroups(InviteUserToGroupsReq) returns (InviteUserToGroupsResp);
|
||||||
|
rpc getGroupAllMember(GetGroupAllMemberReq) returns(GetGroupAllMemberResp);
|
||||||
|
|
||||||
|
rpc GetGroups(GetGroupsReq) returns(GetGroupsResp);
|
||||||
|
rpc GetGroupMembersCMS(GetGroupMembersCMSReq) returns(GetGroupMembersCMSResp);
|
||||||
|
|
||||||
|
|
||||||
|
rpc DismissGroup(DismissGroupReq) returns(DismissGroupResp);
|
||||||
|
rpc MuteGroupMember(MuteGroupMemberReq) returns(MuteGroupMemberResp);
|
||||||
|
rpc CancelMuteGroupMember(CancelMuteGroupMemberReq) returns(CancelMuteGroupMemberResp);
|
||||||
|
rpc MuteGroup(MuteGroupReq) returns(MuteGroupResp);
|
||||||
|
rpc CancelMuteGroup(CancelMuteGroupReq) returns(CancelMuteGroupResp);
|
||||||
|
|
||||||
|
rpc SetGroupMemberNickname(SetGroupMemberNicknameReq) returns (SetGroupMemberNicknameResp);
|
||||||
|
rpc GetJoinedSuperGroupList(GetJoinedSuperGroupListReq) returns (GetJoinedSuperGroupListResp);
|
||||||
|
rpc GetSuperGroupsInfo(GetSuperGroupsInfoReq) returns (GetSuperGroupsInfoResp);
|
||||||
|
rpc SetGroupMemberInfo(SetGroupMemberInfoReq) returns (SetGroupMemberInfoResp);
|
||||||
|
rpc GetGroupAbstractInfo(GetGroupAbstractInfoReq) returns (GetGroupAbstractInfoResp);
|
||||||
|
rpc GroupIsExist(GroupIsExistReq) returns(GroupIsExistResp);
|
||||||
|
rpc UserIsInGroup(UserIsInGroupReq) returns(UserIsInGroupResp);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,315 @@
|
|||||||
|
syntax = "proto3";
|
||||||
|
import "Open-IM-Server/pkg/proto/sdk_ws/ws.proto";
|
||||||
|
import "Open-IM-Server/pkg/proto/sdk_ws/wrappers.proto";
|
||||||
|
option go_package = "Open_IM/pkg/proto/msg;msg";
|
||||||
|
package msg;
|
||||||
|
|
||||||
|
message MsgDataToMQ{
|
||||||
|
string token =1;
|
||||||
|
string operationID = 2;
|
||||||
|
server_api_params.MsgData msgData = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
message MsgDataToDB {
|
||||||
|
server_api_params.MsgData msgData = 1;
|
||||||
|
string operationID = 2;
|
||||||
|
|
||||||
|
}
|
||||||
|
message PushMsgDataToMQ{
|
||||||
|
string OperationID = 1;
|
||||||
|
server_api_params.MsgData msgData = 2;
|
||||||
|
string pushToUserID = 3;
|
||||||
|
}
|
||||||
|
message MsgDataToMongoByMQ{
|
||||||
|
uint64 lastSeq =1;
|
||||||
|
string aggregationID = 2;
|
||||||
|
repeated MsgDataToMQ messageList = 3;
|
||||||
|
string triggerID = 4;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
//message PullMessageReq {
|
||||||
|
// string UserID = 1;
|
||||||
|
// int64 SeqBegin = 2;
|
||||||
|
// int64 SeqEnd = 3;
|
||||||
|
// string OperationID = 4;
|
||||||
|
//}
|
||||||
|
//
|
||||||
|
//message PullMessageResp {
|
||||||
|
// int32 ErrCode = 1;
|
||||||
|
// string ErrMsg = 2;
|
||||||
|
// int64 MaxSeq = 3;
|
||||||
|
// int64 MinSeq = 4;
|
||||||
|
// repeated GatherFormat SingleUserMsg = 5;
|
||||||
|
// repeated GatherFormat GroupUserMsg = 6;
|
||||||
|
//}
|
||||||
|
//message PullMessageBySeqListReq{
|
||||||
|
// string UserID = 1;
|
||||||
|
// string OperationID = 2;
|
||||||
|
// repeated int64 seqList =3;
|
||||||
|
//}
|
||||||
|
message GetMaxAndMinSeqReq {
|
||||||
|
string UserID = 1;
|
||||||
|
string OperationID = 2;
|
||||||
|
}
|
||||||
|
message GetMaxAndMinSeqResp {
|
||||||
|
int32 ErrCode = 1;
|
||||||
|
string ErrMsg = 2;
|
||||||
|
uint32 MaxSeq = 3;
|
||||||
|
uint32 MinSeq = 4;
|
||||||
|
}
|
||||||
|
|
||||||
|
message SendMsgReq {
|
||||||
|
|
||||||
|
string token =1;
|
||||||
|
string operationID = 2;
|
||||||
|
server_api_params.MsgData msgData = 3;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
message SendMsgResp {
|
||||||
|
int32 errCode = 1;
|
||||||
|
string errMsg = 2;
|
||||||
|
string serverMsgID = 4;
|
||||||
|
string clientMsgID = 5;
|
||||||
|
int64 sendTime = 6;
|
||||||
|
string ex = 7;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
message ClearMsgReq{
|
||||||
|
string userID = 1;
|
||||||
|
string opUserID = 2;
|
||||||
|
string operationID = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
message ClearMsgResp{
|
||||||
|
int32 errCode = 1;
|
||||||
|
string errMsg = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
message SetMsgMinSeqReq{
|
||||||
|
string userID = 1;
|
||||||
|
string groupID = 2;
|
||||||
|
uint32 minSeq = 3;
|
||||||
|
string operationID = 4;
|
||||||
|
string opUserID = 5;
|
||||||
|
}
|
||||||
|
message SetMsgMinSeqResp{
|
||||||
|
int32 errCode = 1;
|
||||||
|
string errMsg = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
message SetSendMsgStatusReq{
|
||||||
|
string operationID = 1;
|
||||||
|
int32 status = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
message SetSendMsgStatusResp{
|
||||||
|
int32 errCode = 1;
|
||||||
|
string errMsg = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
message GetSendMsgStatusReq{
|
||||||
|
string operationID = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
message GetSendMsgStatusResp{
|
||||||
|
int32 errCode = 1;
|
||||||
|
string errMsg = 2;
|
||||||
|
int32 status = 3;
|
||||||
|
}
|
||||||
|
message DelSuperGroupMsgReq{
|
||||||
|
string opUserID = 1;
|
||||||
|
string userID = 2;
|
||||||
|
string groupID = 3;
|
||||||
|
string operationID = 4;
|
||||||
|
}
|
||||||
|
message DelSuperGroupMsgResp{
|
||||||
|
int32 errCode = 1;
|
||||||
|
string errMsg = 2;
|
||||||
|
}
|
||||||
|
message GetSuperGroupMsgReq{
|
||||||
|
string operationID = 1;
|
||||||
|
uint32 Seq = 2;
|
||||||
|
string groupID = 3;
|
||||||
|
|
||||||
|
}
|
||||||
|
message GetSuperGroupMsgResp{
|
||||||
|
int32 errCode = 1;
|
||||||
|
string errMsg = 2;
|
||||||
|
server_api_params.MsgData msgData = 3;
|
||||||
|
}
|
||||||
|
message GetWriteDiffMsgReq{
|
||||||
|
string operationID = 1;
|
||||||
|
uint32 Seq = 2;
|
||||||
|
|
||||||
|
}
|
||||||
|
message GetWriteDiffMsgResp{
|
||||||
|
int32 errCode = 1;
|
||||||
|
string errMsg = 2;
|
||||||
|
server_api_params.MsgData msgData = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
message ModifyMessageReactionExtensionsReq {
|
||||||
|
string operationID = 1;
|
||||||
|
string sourceID = 2;
|
||||||
|
string opUserID = 3;
|
||||||
|
int32 sessionType = 4;
|
||||||
|
map <string, server_api_params.KeyValue>reactionExtensionList = 5;
|
||||||
|
string clientMsgID = 6;
|
||||||
|
google.protobuf.StringValue ex = 7;
|
||||||
|
google.protobuf.StringValue attachedInfo = 8;
|
||||||
|
bool isReact = 9;
|
||||||
|
bool isExternalExtensions = 10;
|
||||||
|
int64 msgFirstModifyTime = 11;
|
||||||
|
}
|
||||||
|
message SetMessageReactionExtensionsReq {
|
||||||
|
string operationID = 1;
|
||||||
|
string sourceID = 2;
|
||||||
|
string opUserID = 3;
|
||||||
|
int32 opUserIDPlatformID = 4;
|
||||||
|
int32 sessionType = 5;
|
||||||
|
map <string, server_api_params.KeyValue>reactionExtensionList = 6;
|
||||||
|
string clientMsgID = 7;
|
||||||
|
google.protobuf.StringValue ex = 8;
|
||||||
|
google.protobuf.StringValue attachedInfo = 9;
|
||||||
|
bool isReact = 10;
|
||||||
|
bool isExternalExtensions = 11;
|
||||||
|
int64 msgFirstModifyTime = 12;
|
||||||
|
}
|
||||||
|
message SetMessageReactionExtensionsResp {
|
||||||
|
int32 errCode = 1;
|
||||||
|
string errMsg = 2;
|
||||||
|
string clientMsgID = 3;
|
||||||
|
int64 msgFirstModifyTime = 4;
|
||||||
|
bool isReact = 5;
|
||||||
|
repeated KeyValueResp result = 6;
|
||||||
|
}
|
||||||
|
message AddMessageReactionExtensionsReq {
|
||||||
|
string operationID = 1;
|
||||||
|
string sourceID = 2;
|
||||||
|
string opUserID = 3;
|
||||||
|
int32 opUserIDPlatformID = 4;
|
||||||
|
int32 sessionType = 5;
|
||||||
|
map <string, server_api_params.KeyValue>reactionExtensionList = 6;
|
||||||
|
string clientMsgID = 7;
|
||||||
|
google.protobuf.StringValue ex = 8;
|
||||||
|
google.protobuf.StringValue attachedInfo = 9;
|
||||||
|
bool isReact = 10;
|
||||||
|
bool isExternalExtensions = 11;
|
||||||
|
int64 msgFirstModifyTime = 12;
|
||||||
|
uint32 seq = 13;
|
||||||
|
}
|
||||||
|
message AddMessageReactionExtensionsResp {
|
||||||
|
int32 errCode = 1;
|
||||||
|
string errMsg = 2;
|
||||||
|
string clientMsgID = 3;
|
||||||
|
int64 msgFirstModifyTime = 4;
|
||||||
|
bool isReact = 5;
|
||||||
|
repeated KeyValueResp result = 6;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
message GetMessageListReactionExtensionsReq {
|
||||||
|
string operationID = 1;
|
||||||
|
string opUserID = 2;
|
||||||
|
string sourceID = 3;
|
||||||
|
int32 sessionType = 4;
|
||||||
|
bool isExternalExtensions = 5;
|
||||||
|
message MessageReactionKey {
|
||||||
|
string clientMsgID = 1;
|
||||||
|
int64 msgFirstModifyTime = 2;
|
||||||
|
}
|
||||||
|
repeated string typeKeyList = 6;
|
||||||
|
repeated MessageReactionKey messageReactionKeyList = 7;
|
||||||
|
}
|
||||||
|
message GetMessageListReactionExtensionsResp{
|
||||||
|
int32 errCode = 1;
|
||||||
|
string errMsg = 2;
|
||||||
|
repeated SingleMessageExtensionResult singleMessageResult =3;
|
||||||
|
|
||||||
|
}
|
||||||
|
message SingleMessageExtensionResult {
|
||||||
|
int32 errCode = 1;
|
||||||
|
string errMsg = 2;
|
||||||
|
map <string, server_api_params.KeyValue>reactionExtensionList = 3;
|
||||||
|
string clientMsgID = 4;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
message ModifyMessageReactionExtensionsResp {
|
||||||
|
int32 errCode = 1;
|
||||||
|
string errMsg = 2;
|
||||||
|
repeated ExtendMsgResp successList = 3;
|
||||||
|
repeated ExtendMsgResp failedList = 4;
|
||||||
|
}
|
||||||
|
|
||||||
|
message DeleteMessageListReactionExtensionsReq {
|
||||||
|
string operationID = 1;
|
||||||
|
string opUserID = 2;
|
||||||
|
string sourceID = 3;
|
||||||
|
int32 opUserIDPlatformID = 4;
|
||||||
|
int32 sessionType = 5;
|
||||||
|
string clientMsgID = 6;
|
||||||
|
bool isExternalExtensions = 7;
|
||||||
|
int64 msgFirstModifyTime = 8;
|
||||||
|
repeated server_api_params.KeyValue reactionExtensionList = 9;
|
||||||
|
}
|
||||||
|
|
||||||
|
message DeleteMessageListReactionExtensionsResp {
|
||||||
|
int32 errCode = 1;
|
||||||
|
string errMsg = 2;
|
||||||
|
repeated KeyValueResp result = 6;
|
||||||
|
}
|
||||||
|
|
||||||
|
message ExtendMsgResp {
|
||||||
|
ExtendMsg extendMsg = 1;
|
||||||
|
int32 errCode = 2;
|
||||||
|
string errMsg = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
message ExtendMsg {
|
||||||
|
map <string, KeyValueResp>reactionExtensionList = 1;
|
||||||
|
string clientMsgID = 2;
|
||||||
|
int64 msgFirstModifyTime = 3;
|
||||||
|
string attachedInfo = 4;
|
||||||
|
string ex = 5;
|
||||||
|
}
|
||||||
|
|
||||||
|
message KeyValueResp {
|
||||||
|
server_api_params.KeyValue keyValue = 1;
|
||||||
|
int32 errCode = 2;
|
||||||
|
string errMsg = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
message MsgDataToModifyByMQ{
|
||||||
|
string aggregationID = 1;
|
||||||
|
repeated MsgDataToMQ messageList = 2;
|
||||||
|
string triggerID = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
service msg {
|
||||||
|
rpc GetMaxAndMinSeq(server_api_params.GetMaxAndMinSeqReq) returns(server_api_params.GetMaxAndMinSeqResp);
|
||||||
|
rpc PullMessageBySeqList(server_api_params.PullMessageBySeqListReq) returns(server_api_params.PullMessageBySeqListResp);
|
||||||
|
rpc SendMsg(SendMsgReq) returns(SendMsgResp);
|
||||||
|
rpc DelMsgList(server_api_params.DelMsgListReq) returns(server_api_params.DelMsgListResp);
|
||||||
|
rpc DelSuperGroupMsg(DelSuperGroupMsgReq) returns(DelSuperGroupMsgResp);
|
||||||
|
rpc ClearMsg(ClearMsgReq) returns(ClearMsgResp);
|
||||||
|
rpc SetMsgMinSeq(SetMsgMinSeqReq) returns(SetMsgMinSeqResp);
|
||||||
|
rpc SetSendMsgStatus(SetSendMsgStatusReq) returns(SetSendMsgStatusResp);
|
||||||
|
rpc GetSendMsgStatus(GetSendMsgStatusReq) returns(GetSendMsgStatusResp);
|
||||||
|
rpc GetSuperGroupMsg(GetSuperGroupMsgReq) returns(GetSuperGroupMsgResp);
|
||||||
|
rpc GetWriteDiffMsg(GetWriteDiffMsgReq) returns(GetWriteDiffMsgResp);
|
||||||
|
|
||||||
|
// modify msg
|
||||||
|
rpc SetMessageReactionExtensions(SetMessageReactionExtensionsReq) returns(SetMessageReactionExtensionsResp);
|
||||||
|
rpc GetMessageListReactionExtensions(GetMessageListReactionExtensionsReq) returns(GetMessageListReactionExtensionsResp);
|
||||||
|
rpc AddMessageReactionExtensions(AddMessageReactionExtensionsReq) returns(AddMessageReactionExtensionsResp);
|
||||||
|
rpc DeleteMessageReactionExtensions(DeleteMessageListReactionExtensionsReq) returns(DeleteMessageListReactionExtensionsResp);
|
||||||
|
}
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,303 @@
|
|||||||
|
syntax = "proto3";
|
||||||
|
import "Open-IM-Server/pkg/proto/sdk_ws/ws.proto";
|
||||||
|
option go_package = "Open_IM/pkg/proto/office;office";
|
||||||
|
package office;
|
||||||
|
|
||||||
|
message CommonResp{
|
||||||
|
int32 errCode = 1;
|
||||||
|
string errMsg = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
message TagUser {
|
||||||
|
string userID = 1;
|
||||||
|
string userName = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
message Tag {
|
||||||
|
string tagID = 1;
|
||||||
|
string tagName = 2;
|
||||||
|
repeated TagUser userList = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
message GetUserTagsReq{
|
||||||
|
string userID = 1;
|
||||||
|
string operationID = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
message GetUserTagsResp{
|
||||||
|
CommonResp commonResp = 1;
|
||||||
|
repeated Tag tags = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
message CreateTagReq {
|
||||||
|
string tagName = 1;
|
||||||
|
string userID = 2;
|
||||||
|
repeated string userIDList = 3;
|
||||||
|
string operationID = 4;
|
||||||
|
}
|
||||||
|
|
||||||
|
message CreateTagResp {
|
||||||
|
CommonResp commonResp = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
message DeleteTagReq {
|
||||||
|
string userID = 1;
|
||||||
|
string tagID = 2;
|
||||||
|
string operationID = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
message DeleteTagResp {
|
||||||
|
CommonResp commonResp = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
message SetTagReq {
|
||||||
|
string userID = 1;
|
||||||
|
string tagID = 2;
|
||||||
|
string newName = 3;
|
||||||
|
repeated string increaseUserIDList = 4;
|
||||||
|
repeated string reduceUserIDList = 5;
|
||||||
|
string operationID = 6;
|
||||||
|
}
|
||||||
|
|
||||||
|
message SetTagResp {
|
||||||
|
CommonResp commonResp = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
message SendMsg2TagReq {
|
||||||
|
repeated string tagList = 1;
|
||||||
|
repeated string UserList = 2;
|
||||||
|
repeated string GroupList = 3;
|
||||||
|
string sendID = 4;
|
||||||
|
int32 senderPlatformID = 5;
|
||||||
|
string content = 6;
|
||||||
|
string operationID = 7;
|
||||||
|
}
|
||||||
|
|
||||||
|
message SendMsg2TagResp {
|
||||||
|
CommonResp commonResp = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
message GetTagSendLogsReq {
|
||||||
|
server_api_params.RequestPagination Pagination = 1;
|
||||||
|
string userID = 2;
|
||||||
|
string operationID = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
message TagSendLog {
|
||||||
|
repeated TagUser userList = 1;
|
||||||
|
string content = 2;
|
||||||
|
int64 sendTime = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
message GetTagSendLogsResp {
|
||||||
|
CommonResp commonResp = 1;
|
||||||
|
server_api_params.ResponsePagination Pagination = 2;
|
||||||
|
repeated TagSendLog tagSendLogs = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
message GetUserTagByIDReq {
|
||||||
|
string userID = 1;
|
||||||
|
string tagID = 2;
|
||||||
|
string operationID = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
message GetUserTagByIDResp {
|
||||||
|
CommonResp commonResp = 1;
|
||||||
|
Tag tag = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// WorkMoment
|
||||||
|
|
||||||
|
message LikeUser {
|
||||||
|
string userID = 1;
|
||||||
|
string userName = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
message NotificationUser {
|
||||||
|
string userID = 1;
|
||||||
|
string userName = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
message Comment {
|
||||||
|
string userID = 1;
|
||||||
|
string userName = 2;
|
||||||
|
string faceURL = 3;
|
||||||
|
string replyUserID = 4;
|
||||||
|
string replyUserName = 5;
|
||||||
|
string contentID = 6;
|
||||||
|
string content = 7;
|
||||||
|
int32 createTime = 8;
|
||||||
|
}
|
||||||
|
|
||||||
|
message PermissionGroup {
|
||||||
|
string groupName = 1;
|
||||||
|
string groupID = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
message WorkMomentUser {
|
||||||
|
string userID = 1;
|
||||||
|
string userName = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
message WorkMoment {
|
||||||
|
string workMomentID = 1;
|
||||||
|
string userID = 2;
|
||||||
|
string userName = 3;
|
||||||
|
string faceURL = 4;
|
||||||
|
string content = 5;
|
||||||
|
repeated WorkMomentUser likeUserList = 6;
|
||||||
|
repeated Comment comments = 7;
|
||||||
|
int32 permission = 8;
|
||||||
|
repeated WorkMomentUser permissionUserList = 9;
|
||||||
|
repeated PermissionGroup permissionGroupList = 10;
|
||||||
|
repeated WorkMomentUser atUserList = 11;
|
||||||
|
int32 createTime = 12;
|
||||||
|
}
|
||||||
|
|
||||||
|
message CreateOneWorkMomentReq {
|
||||||
|
WorkMoment workMoment = 1;
|
||||||
|
string operationID = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
message CreateOneWorkMomentResp {
|
||||||
|
CommonResp commonResp = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
message DeleteOneWorkMomentReq {
|
||||||
|
string workMomentID = 1;
|
||||||
|
string userID = 2;
|
||||||
|
string operationID = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
message DeleteOneWorkMomentResp {
|
||||||
|
CommonResp commonResp = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
message LikeOneWorkMomentReq {
|
||||||
|
string userID = 1;
|
||||||
|
string WorkMomentID = 2;
|
||||||
|
string operationID = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
message LikeOneWorkMomentResp {
|
||||||
|
CommonResp commonResp = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
message CommentOneWorkMomentReq {
|
||||||
|
string userID = 1;
|
||||||
|
string workMomentID = 2;
|
||||||
|
string replyUserID = 3;
|
||||||
|
string content = 4;
|
||||||
|
string operationID = 5;
|
||||||
|
}
|
||||||
|
|
||||||
|
message CommentOneWorkMomentResp {
|
||||||
|
CommonResp commonResp = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
message DeleteCommentReq {
|
||||||
|
string workMomentID = 1;
|
||||||
|
string contentID = 2;
|
||||||
|
string opUserID = 3;
|
||||||
|
string operationID = 4;
|
||||||
|
}
|
||||||
|
|
||||||
|
message DeleteCommentResp {
|
||||||
|
CommonResp commonResp = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
message GetWorkMomentByIDReq {
|
||||||
|
string workMomentID = 1;
|
||||||
|
string opUserID = 2;
|
||||||
|
string operationID = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
message GetWorkMomentByIDResp {
|
||||||
|
CommonResp commonResp = 1;
|
||||||
|
WorkMoment workMoment = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
message ChangeWorkMomentPermissionReq {
|
||||||
|
string workMomentID = 1;
|
||||||
|
string opUserID = 2;
|
||||||
|
int32 permission = 3;
|
||||||
|
repeated string permissionUserIDList = 4;
|
||||||
|
string operationID = 5;
|
||||||
|
}
|
||||||
|
|
||||||
|
message ChangeWorkMomentPermissionResp {
|
||||||
|
CommonResp commonResp = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
message GetUserWorkMomentsReq {
|
||||||
|
string userID = 1;
|
||||||
|
string opUserID = 2;
|
||||||
|
server_api_params.RequestPagination Pagination = 3;
|
||||||
|
string operationID = 4;
|
||||||
|
}
|
||||||
|
|
||||||
|
message GetUserWorkMomentsResp {
|
||||||
|
CommonResp commonResp = 1;
|
||||||
|
repeated WorkMoment workMoments = 2;
|
||||||
|
server_api_params.ResponsePagination Pagination = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
message GetUserFriendWorkMomentsReq {
|
||||||
|
string userID = 1;
|
||||||
|
server_api_params.RequestPagination Pagination = 2;
|
||||||
|
string operationID = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
message GetUserFriendWorkMomentsResp {
|
||||||
|
CommonResp commonResp = 1;
|
||||||
|
repeated WorkMoment workMoments = 2;
|
||||||
|
server_api_params.ResponsePagination Pagination = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
message WorkMomentNotificationMsg {
|
||||||
|
int32 notificationMsgType = 1;
|
||||||
|
string replyUserName = 2;
|
||||||
|
string replyUserID = 3;
|
||||||
|
string content = 4;
|
||||||
|
string contentID = 5;
|
||||||
|
string workMomentID = 6;
|
||||||
|
string userID = 7;
|
||||||
|
string userName = 8;
|
||||||
|
string faceURL = 9;
|
||||||
|
string workMomentContent = 10;
|
||||||
|
int32 createTime = 11;
|
||||||
|
}
|
||||||
|
|
||||||
|
message SetUserWorkMomentsLevelReq {
|
||||||
|
string userID = 1;
|
||||||
|
int32 level = 2;
|
||||||
|
string operationID = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
message SetUserWorkMomentsLevelResp {
|
||||||
|
CommonResp commonResp = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
service OfficeService {
|
||||||
|
rpc GetUserTags(GetUserTagsReq) returns(GetUserTagsResp);
|
||||||
|
rpc CreateTag(CreateTagReq) returns(CreateTagResp);
|
||||||
|
rpc DeleteTag(DeleteTagReq) returns(DeleteTagResp);
|
||||||
|
rpc SetTag(SetTagReq) returns(SetTagResp);
|
||||||
|
rpc SendMsg2Tag(SendMsg2TagReq) returns(SendMsg2TagResp);
|
||||||
|
rpc GetTagSendLogs(GetTagSendLogsReq) returns(GetTagSendLogsResp);
|
||||||
|
rpc GetUserTagByID(GetUserTagByIDReq) returns(GetUserTagByIDResp);
|
||||||
|
|
||||||
|
rpc CreateOneWorkMoment(CreateOneWorkMomentReq) returns(CreateOneWorkMomentResp);
|
||||||
|
rpc DeleteOneWorkMoment(DeleteOneWorkMomentReq) returns(DeleteOneWorkMomentResp);
|
||||||
|
rpc LikeOneWorkMoment(LikeOneWorkMomentReq) returns(LikeOneWorkMomentResp);
|
||||||
|
rpc CommentOneWorkMoment(CommentOneWorkMomentReq) returns(CommentOneWorkMomentResp);
|
||||||
|
rpc DeleteComment(DeleteCommentReq) returns(DeleteCommentResp);
|
||||||
|
rpc GetWorkMomentByID(GetWorkMomentByIDReq) returns(GetWorkMomentByIDResp);
|
||||||
|
rpc ChangeWorkMomentPermission(ChangeWorkMomentPermissionReq) returns(ChangeWorkMomentPermissionResp);
|
||||||
|
/// user self
|
||||||
|
rpc GetUserWorkMoments(GetUserWorkMomentsReq) returns(GetUserWorkMomentsResp);
|
||||||
|
/// users friend
|
||||||
|
rpc GetUserFriendWorkMoments(GetUserFriendWorkMomentsReq) returns(GetUserFriendWorkMomentsResp);
|
||||||
|
rpc SetUserWorkMomentsLevel(SetUserWorkMomentsLevelReq) returns(SetUserWorkMomentsLevelResp);
|
||||||
|
}
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,209 @@
|
|||||||
|
syntax = "proto3";
|
||||||
|
import "Open-IM-Server/pkg/proto/sdk_ws/ws.proto";
|
||||||
|
option go_package = "Open_IM/pkg/proto/organization;organization";
|
||||||
|
package organization;
|
||||||
|
|
||||||
|
|
||||||
|
message CreateDepartmentReq{
|
||||||
|
server_api_params.Department departmentInfo = 1;
|
||||||
|
string operationID = 2;
|
||||||
|
string opUserID = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
message CreateDepartmentResp{
|
||||||
|
int32 errCode = 1;
|
||||||
|
string errMsg = 2;
|
||||||
|
server_api_params.Department departmentInfo = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
message UpdateDepartmentReq{
|
||||||
|
server_api_params.Department departmentInfo = 1;
|
||||||
|
string operationID = 2;
|
||||||
|
string opUserID = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
message UpdateDepartmentResp{
|
||||||
|
int32 errCode = 1;
|
||||||
|
string errMsg = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
message GetSubDepartmentReq{
|
||||||
|
string departmentID = 1;
|
||||||
|
string operationID = 2;
|
||||||
|
string opUserID = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
message GetSubDepartmentResp{
|
||||||
|
int32 errCode = 1;
|
||||||
|
string errMsg = 2;
|
||||||
|
repeated server_api_params.Department departmentList = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
message DeleteDepartmentReq{
|
||||||
|
string departmentID = 1;
|
||||||
|
string operationID = 2;
|
||||||
|
string opUserID = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
message DeleteDepartmentResp{
|
||||||
|
int32 errCode = 1;
|
||||||
|
string errMsg = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
message GetDepartmentParentIDListReq {
|
||||||
|
string departmentID = 1;
|
||||||
|
string operationID = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
message GetDepartmentParentIDListResp {
|
||||||
|
int32 errCode = 1;
|
||||||
|
string errMsg = 2;
|
||||||
|
repeated string parentIDList = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
message CreateOrganizationUserReq{
|
||||||
|
server_api_params.OrganizationUser organizationUser = 1;
|
||||||
|
string operationID = 2;
|
||||||
|
string opUserID = 3;
|
||||||
|
bool IsRegister = 4;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
message CreateOrganizationUserResp{
|
||||||
|
int32 errCode = 1;
|
||||||
|
string errMsg = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
message UpdateOrganizationUserReq{
|
||||||
|
server_api_params.OrganizationUser organizationUser = 1;
|
||||||
|
string operationID = 2;
|
||||||
|
string opUserID = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
message UpdateOrganizationUserResp{
|
||||||
|
int32 errCode = 1;
|
||||||
|
string errMsg = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
message CreateDepartmentMemberReq{
|
||||||
|
server_api_params.DepartmentMember departmentMember = 1;
|
||||||
|
string operationID = 2;
|
||||||
|
string opUserID = 3;
|
||||||
|
}
|
||||||
|
message CreateDepartmentMemberResp{
|
||||||
|
int32 errCode = 1;
|
||||||
|
string errMsg = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
message GetUserInDepartmentReq{
|
||||||
|
string userID = 1;
|
||||||
|
string operationID = 2;
|
||||||
|
string opUserID = 3;
|
||||||
|
}
|
||||||
|
message GetUserInDepartmentResp{
|
||||||
|
int32 errCode = 1;
|
||||||
|
string errMsg = 2;
|
||||||
|
server_api_params.UserInDepartment userInDepartment = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
message UpdateUserInDepartmentReq{
|
||||||
|
server_api_params.DepartmentMember departmentMember = 1;
|
||||||
|
string operationID = 2;
|
||||||
|
string opUserID = 3;
|
||||||
|
}
|
||||||
|
message UpdateUserInDepartmentResp{
|
||||||
|
int32 errCode = 1;
|
||||||
|
string errMsg = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
message DeleteUserInDepartmentReq{
|
||||||
|
string userID = 1;
|
||||||
|
string operationID = 2;
|
||||||
|
string opUserID = 3;
|
||||||
|
string departmentID = 4;
|
||||||
|
}
|
||||||
|
message DeleteUserInDepartmentResp{
|
||||||
|
int32 errCode = 1;
|
||||||
|
string errMsg = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
message DeleteOrganizationUserReq{
|
||||||
|
string userID = 1;
|
||||||
|
string operationID = 2;
|
||||||
|
string opUserID = 3;
|
||||||
|
}
|
||||||
|
message DeleteOrganizationUserResp{
|
||||||
|
int32 errCode = 1;
|
||||||
|
string errMsg = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
message GetDepartmentMemberReq{
|
||||||
|
string departmentID = 1;
|
||||||
|
string operationID = 2;
|
||||||
|
string opUserID = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
message GetDepartmentMemberResp{
|
||||||
|
int32 errCode = 1;
|
||||||
|
string errMsg = 2;
|
||||||
|
repeated server_api_params.UserDepartmentMember userDepartmentMemberList = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
message GetDepartmentRelatedGroupIDListReq {
|
||||||
|
string operationID = 1;
|
||||||
|
repeated string departmentIDList = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
message GetDepartmentRelatedGroupIDListResp {
|
||||||
|
int32 errCode = 1;
|
||||||
|
string errMsg = 2;
|
||||||
|
repeated string groupIDList = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
message GetUserInOrganizationReq{
|
||||||
|
repeated string userIDList = 1;
|
||||||
|
string operationID = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
message GetUserInOrganizationResp{
|
||||||
|
int32 errCode = 1;
|
||||||
|
string errMsg = 2;
|
||||||
|
repeated server_api_params.OrganizationUser organizationUsers = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
service organization{
|
||||||
|
rpc CreateDepartment(CreateDepartmentReq) returns(CreateDepartmentResp);
|
||||||
|
rpc UpdateDepartment(UpdateDepartmentReq) returns(UpdateDepartmentResp);
|
||||||
|
rpc GetSubDepartment(GetSubDepartmentReq) returns(GetSubDepartmentResp);
|
||||||
|
rpc DeleteDepartment(DeleteDepartmentReq) returns(DeleteDepartmentResp);
|
||||||
|
rpc GetDepartmentParentIDList(GetDepartmentParentIDListReq) returns(GetDepartmentParentIDListResp);
|
||||||
|
|
||||||
|
rpc CreateOrganizationUser(CreateOrganizationUserReq) returns(CreateOrganizationUserResp);
|
||||||
|
rpc UpdateOrganizationUser(UpdateOrganizationUserReq) returns(UpdateOrganizationUserResp);
|
||||||
|
rpc DeleteOrganizationUser(DeleteOrganizationUserReq) returns(DeleteOrganizationUserResp);
|
||||||
|
|
||||||
|
|
||||||
|
rpc CreateDepartmentMember(CreateDepartmentMemberReq) returns(CreateDepartmentMemberResp);
|
||||||
|
rpc GetUserInDepartment(GetUserInDepartmentReq) returns(GetUserInDepartmentResp);
|
||||||
|
rpc DeleteUserInDepartment(DeleteUserInDepartmentReq) returns(DeleteUserInDepartmentResp);
|
||||||
|
rpc UpdateUserInDepartment(UpdateUserInDepartmentReq) returns(UpdateUserInDepartmentResp);
|
||||||
|
rpc GetDepartmentMember(GetDepartmentMemberReq) returns(GetDepartmentMemberResp);
|
||||||
|
rpc GetDepartmentRelatedGroupIDList(GetDepartmentRelatedGroupIDListReq) returns(GetDepartmentRelatedGroupIDListResp);
|
||||||
|
|
||||||
|
rpc GetUserInOrganization(GetUserInOrganizationReq) returns(GetUserInOrganizationResp);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -0,0 +1,17 @@
|
|||||||
|
|
||||||
|
all_proto=(
|
||||||
|
admin_cms/admin_cms.proto
|
||||||
|
auth/auth.proto
|
||||||
|
friend/friend.proto
|
||||||
|
group/group.proto
|
||||||
|
user/user.proto
|
||||||
|
rtc/rtc.proto
|
||||||
|
msg/msg.proto
|
||||||
|
push/push.proto
|
||||||
|
relay/relay.proto
|
||||||
|
sdk_ws/ws.proto
|
||||||
|
conversation/conversation.proto
|
||||||
|
office/office.proto
|
||||||
|
cache/cache.proto
|
||||||
|
organization/organization.proto
|
||||||
|
)
|
@ -0,0 +1,357 @@
|
|||||||
|
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||||
|
// source: push/push.proto
|
||||||
|
|
||||||
|
package pbPush // import "Open_IM/pkg/proto/push"
|
||||||
|
|
||||||
|
import proto "github.com/golang/protobuf/proto"
|
||||||
|
import fmt "fmt"
|
||||||
|
import math "math"
|
||||||
|
import sdk_ws "Open_IM/pkg/proto/sdk_ws"
|
||||||
|
|
||||||
|
import (
|
||||||
|
context "golang.org/x/net/context"
|
||||||
|
grpc "google.golang.org/grpc"
|
||||||
|
)
|
||||||
|
|
||||||
|
// Reference imports to suppress errors if they are not otherwise used.
|
||||||
|
var _ = proto.Marshal
|
||||||
|
var _ = fmt.Errorf
|
||||||
|
var _ = math.Inf
|
||||||
|
|
||||||
|
// This is a compile-time assertion to ensure that this generated file
|
||||||
|
// is compatible with the proto package it is being compiled against.
|
||||||
|
// A compilation error at this line likely means your copy of the
|
||||||
|
// proto package needs to be updated.
|
||||||
|
const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
|
||||||
|
|
||||||
|
type PushMsgReq struct {
|
||||||
|
OperationID string `protobuf:"bytes,1,opt,name=operationID" json:"operationID,omitempty"`
|
||||||
|
MsgData *sdk_ws.MsgData `protobuf:"bytes,2,opt,name=msgData" json:"msgData,omitempty"`
|
||||||
|
PushToUserID string `protobuf:"bytes,3,opt,name=pushToUserID" json:"pushToUserID,omitempty"`
|
||||||
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||||
|
XXX_unrecognized []byte `json:"-"`
|
||||||
|
XXX_sizecache int32 `json:"-"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *PushMsgReq) Reset() { *m = PushMsgReq{} }
|
||||||
|
func (m *PushMsgReq) String() string { return proto.CompactTextString(m) }
|
||||||
|
func (*PushMsgReq) ProtoMessage() {}
|
||||||
|
func (*PushMsgReq) Descriptor() ([]byte, []int) {
|
||||||
|
return fileDescriptor_push_17f752d1b1c8edd5, []int{0}
|
||||||
|
}
|
||||||
|
func (m *PushMsgReq) XXX_Unmarshal(b []byte) error {
|
||||||
|
return xxx_messageInfo_PushMsgReq.Unmarshal(m, b)
|
||||||
|
}
|
||||||
|
func (m *PushMsgReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||||
|
return xxx_messageInfo_PushMsgReq.Marshal(b, m, deterministic)
|
||||||
|
}
|
||||||
|
func (dst *PushMsgReq) XXX_Merge(src proto.Message) {
|
||||||
|
xxx_messageInfo_PushMsgReq.Merge(dst, src)
|
||||||
|
}
|
||||||
|
func (m *PushMsgReq) XXX_Size() int {
|
||||||
|
return xxx_messageInfo_PushMsgReq.Size(m)
|
||||||
|
}
|
||||||
|
func (m *PushMsgReq) XXX_DiscardUnknown() {
|
||||||
|
xxx_messageInfo_PushMsgReq.DiscardUnknown(m)
|
||||||
|
}
|
||||||
|
|
||||||
|
var xxx_messageInfo_PushMsgReq proto.InternalMessageInfo
|
||||||
|
|
||||||
|
func (m *PushMsgReq) GetOperationID() string {
|
||||||
|
if m != nil {
|
||||||
|
return m.OperationID
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *PushMsgReq) GetMsgData() *sdk_ws.MsgData {
|
||||||
|
if m != nil {
|
||||||
|
return m.MsgData
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *PushMsgReq) GetPushToUserID() string {
|
||||||
|
if m != nil {
|
||||||
|
return m.PushToUserID
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
type PushMsgResp struct {
|
||||||
|
ResultCode int32 `protobuf:"varint,1,opt,name=ResultCode" json:"ResultCode,omitempty"`
|
||||||
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||||
|
XXX_unrecognized []byte `json:"-"`
|
||||||
|
XXX_sizecache int32 `json:"-"`
|
||||||
|
}
|
||||||
|
|
||||||
|
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_17f752d1b1c8edd5, []int{1}
|
||||||
|
}
|
||||||
|
func (m *PushMsgResp) XXX_Unmarshal(b []byte) error {
|
||||||
|
return xxx_messageInfo_PushMsgResp.Unmarshal(m, b)
|
||||||
|
}
|
||||||
|
func (m *PushMsgResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||||
|
return xxx_messageInfo_PushMsgResp.Marshal(b, m, deterministic)
|
||||||
|
}
|
||||||
|
func (dst *PushMsgResp) XXX_Merge(src proto.Message) {
|
||||||
|
xxx_messageInfo_PushMsgResp.Merge(dst, src)
|
||||||
|
}
|
||||||
|
func (m *PushMsgResp) XXX_Size() int {
|
||||||
|
return xxx_messageInfo_PushMsgResp.Size(m)
|
||||||
|
}
|
||||||
|
func (m *PushMsgResp) XXX_DiscardUnknown() {
|
||||||
|
xxx_messageInfo_PushMsgResp.DiscardUnknown(m)
|
||||||
|
}
|
||||||
|
|
||||||
|
var xxx_messageInfo_PushMsgResp proto.InternalMessageInfo
|
||||||
|
|
||||||
|
func (m *PushMsgResp) GetResultCode() int32 {
|
||||||
|
if m != nil {
|
||||||
|
return m.ResultCode
|
||||||
|
}
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
type DelUserPushTokenReq struct {
|
||||||
|
OperationID string `protobuf:"bytes,1,opt,name=operationID" json:"operationID,omitempty"`
|
||||||
|
UserID string `protobuf:"bytes,2,opt,name=userID" json:"userID,omitempty"`
|
||||||
|
PlatformID int32 `protobuf:"varint,3,opt,name=platformID" json:"platformID,omitempty"`
|
||||||
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||||
|
XXX_unrecognized []byte `json:"-"`
|
||||||
|
XXX_sizecache int32 `json:"-"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *DelUserPushTokenReq) Reset() { *m = DelUserPushTokenReq{} }
|
||||||
|
func (m *DelUserPushTokenReq) String() string { return proto.CompactTextString(m) }
|
||||||
|
func (*DelUserPushTokenReq) ProtoMessage() {}
|
||||||
|
func (*DelUserPushTokenReq) Descriptor() ([]byte, []int) {
|
||||||
|
return fileDescriptor_push_17f752d1b1c8edd5, []int{2}
|
||||||
|
}
|
||||||
|
func (m *DelUserPushTokenReq) XXX_Unmarshal(b []byte) error {
|
||||||
|
return xxx_messageInfo_DelUserPushTokenReq.Unmarshal(m, b)
|
||||||
|
}
|
||||||
|
func (m *DelUserPushTokenReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||||
|
return xxx_messageInfo_DelUserPushTokenReq.Marshal(b, m, deterministic)
|
||||||
|
}
|
||||||
|
func (dst *DelUserPushTokenReq) XXX_Merge(src proto.Message) {
|
||||||
|
xxx_messageInfo_DelUserPushTokenReq.Merge(dst, src)
|
||||||
|
}
|
||||||
|
func (m *DelUserPushTokenReq) XXX_Size() int {
|
||||||
|
return xxx_messageInfo_DelUserPushTokenReq.Size(m)
|
||||||
|
}
|
||||||
|
func (m *DelUserPushTokenReq) XXX_DiscardUnknown() {
|
||||||
|
xxx_messageInfo_DelUserPushTokenReq.DiscardUnknown(m)
|
||||||
|
}
|
||||||
|
|
||||||
|
var xxx_messageInfo_DelUserPushTokenReq proto.InternalMessageInfo
|
||||||
|
|
||||||
|
func (m *DelUserPushTokenReq) GetOperationID() string {
|
||||||
|
if m != nil {
|
||||||
|
return m.OperationID
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *DelUserPushTokenReq) GetUserID() string {
|
||||||
|
if m != nil {
|
||||||
|
return m.UserID
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *DelUserPushTokenReq) GetPlatformID() int32 {
|
||||||
|
if m != nil {
|
||||||
|
return m.PlatformID
|
||||||
|
}
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
type DelUserPushTokenResp struct {
|
||||||
|
ErrCode int32 `protobuf:"varint,1,opt,name=errCode" json:"errCode,omitempty"`
|
||||||
|
ErrMsg string `protobuf:"bytes,2,opt,name=errMsg" json:"errMsg,omitempty"`
|
||||||
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||||
|
XXX_unrecognized []byte `json:"-"`
|
||||||
|
XXX_sizecache int32 `json:"-"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *DelUserPushTokenResp) Reset() { *m = DelUserPushTokenResp{} }
|
||||||
|
func (m *DelUserPushTokenResp) String() string { return proto.CompactTextString(m) }
|
||||||
|
func (*DelUserPushTokenResp) ProtoMessage() {}
|
||||||
|
func (*DelUserPushTokenResp) Descriptor() ([]byte, []int) {
|
||||||
|
return fileDescriptor_push_17f752d1b1c8edd5, []int{3}
|
||||||
|
}
|
||||||
|
func (m *DelUserPushTokenResp) XXX_Unmarshal(b []byte) error {
|
||||||
|
return xxx_messageInfo_DelUserPushTokenResp.Unmarshal(m, b)
|
||||||
|
}
|
||||||
|
func (m *DelUserPushTokenResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||||
|
return xxx_messageInfo_DelUserPushTokenResp.Marshal(b, m, deterministic)
|
||||||
|
}
|
||||||
|
func (dst *DelUserPushTokenResp) XXX_Merge(src proto.Message) {
|
||||||
|
xxx_messageInfo_DelUserPushTokenResp.Merge(dst, src)
|
||||||
|
}
|
||||||
|
func (m *DelUserPushTokenResp) XXX_Size() int {
|
||||||
|
return xxx_messageInfo_DelUserPushTokenResp.Size(m)
|
||||||
|
}
|
||||||
|
func (m *DelUserPushTokenResp) XXX_DiscardUnknown() {
|
||||||
|
xxx_messageInfo_DelUserPushTokenResp.DiscardUnknown(m)
|
||||||
|
}
|
||||||
|
|
||||||
|
var xxx_messageInfo_DelUserPushTokenResp proto.InternalMessageInfo
|
||||||
|
|
||||||
|
func (m *DelUserPushTokenResp) GetErrCode() int32 {
|
||||||
|
if m != nil {
|
||||||
|
return m.ErrCode
|
||||||
|
}
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *DelUserPushTokenResp) GetErrMsg() string {
|
||||||
|
if m != nil {
|
||||||
|
return m.ErrMsg
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
func init() {
|
||||||
|
proto.RegisterType((*PushMsgReq)(nil), "push.PushMsgReq")
|
||||||
|
proto.RegisterType((*PushMsgResp)(nil), "push.PushMsgResp")
|
||||||
|
proto.RegisterType((*DelUserPushTokenReq)(nil), "push.DelUserPushTokenReq")
|
||||||
|
proto.RegisterType((*DelUserPushTokenResp)(nil), "push.DelUserPushTokenResp")
|
||||||
|
}
|
||||||
|
|
||||||
|
// Reference imports to suppress errors if they are not otherwise used.
|
||||||
|
var _ context.Context
|
||||||
|
var _ grpc.ClientConn
|
||||||
|
|
||||||
|
// This is a compile-time assertion to ensure that this generated file
|
||||||
|
// is compatible with the grpc package it is being compiled against.
|
||||||
|
const _ = grpc.SupportPackageIsVersion4
|
||||||
|
|
||||||
|
// Client API for PushMsgService service
|
||||||
|
|
||||||
|
type PushMsgServiceClient interface {
|
||||||
|
PushMsg(ctx context.Context, in *PushMsgReq, opts ...grpc.CallOption) (*PushMsgResp, error)
|
||||||
|
DelUserPushToken(ctx context.Context, in *DelUserPushTokenReq, opts ...grpc.CallOption) (*DelUserPushTokenResp, error)
|
||||||
|
}
|
||||||
|
|
||||||
|
type pushMsgServiceClient struct {
|
||||||
|
cc *grpc.ClientConn
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewPushMsgServiceClient(cc *grpc.ClientConn) PushMsgServiceClient {
|
||||||
|
return &pushMsgServiceClient{cc}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *pushMsgServiceClient) PushMsg(ctx context.Context, in *PushMsgReq, opts ...grpc.CallOption) (*PushMsgResp, error) {
|
||||||
|
out := new(PushMsgResp)
|
||||||
|
err := grpc.Invoke(ctx, "/push.PushMsgService/PushMsg", in, out, c.cc, opts...)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return out, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *pushMsgServiceClient) DelUserPushToken(ctx context.Context, in *DelUserPushTokenReq, opts ...grpc.CallOption) (*DelUserPushTokenResp, error) {
|
||||||
|
out := new(DelUserPushTokenResp)
|
||||||
|
err := grpc.Invoke(ctx, "/push.PushMsgService/DelUserPushToken", in, out, c.cc, opts...)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return out, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// Server API for PushMsgService service
|
||||||
|
|
||||||
|
type PushMsgServiceServer interface {
|
||||||
|
PushMsg(context.Context, *PushMsgReq) (*PushMsgResp, error)
|
||||||
|
DelUserPushToken(context.Context, *DelUserPushTokenReq) (*DelUserPushTokenResp, error)
|
||||||
|
}
|
||||||
|
|
||||||
|
func RegisterPushMsgServiceServer(s *grpc.Server, srv PushMsgServiceServer) {
|
||||||
|
s.RegisterService(&_PushMsgService_serviceDesc, srv)
|
||||||
|
}
|
||||||
|
|
||||||
|
func _PushMsgService_PushMsg_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(PushMsgReq)
|
||||||
|
if err := dec(in); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if interceptor == nil {
|
||||||
|
return srv.(PushMsgServiceServer).PushMsg(ctx, in)
|
||||||
|
}
|
||||||
|
info := &grpc.UnaryServerInfo{
|
||||||
|
Server: srv,
|
||||||
|
FullMethod: "/push.PushMsgService/PushMsg",
|
||||||
|
}
|
||||||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||||
|
return srv.(PushMsgServiceServer).PushMsg(ctx, req.(*PushMsgReq))
|
||||||
|
}
|
||||||
|
return interceptor(ctx, in, info, handler)
|
||||||
|
}
|
||||||
|
|
||||||
|
func _PushMsgService_DelUserPushToken_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(DelUserPushTokenReq)
|
||||||
|
if err := dec(in); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if interceptor == nil {
|
||||||
|
return srv.(PushMsgServiceServer).DelUserPushToken(ctx, in)
|
||||||
|
}
|
||||||
|
info := &grpc.UnaryServerInfo{
|
||||||
|
Server: srv,
|
||||||
|
FullMethod: "/push.PushMsgService/DelUserPushToken",
|
||||||
|
}
|
||||||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||||
|
return srv.(PushMsgServiceServer).DelUserPushToken(ctx, req.(*DelUserPushTokenReq))
|
||||||
|
}
|
||||||
|
return interceptor(ctx, in, info, handler)
|
||||||
|
}
|
||||||
|
|
||||||
|
var _PushMsgService_serviceDesc = grpc.ServiceDesc{
|
||||||
|
ServiceName: "push.PushMsgService",
|
||||||
|
HandlerType: (*PushMsgServiceServer)(nil),
|
||||||
|
Methods: []grpc.MethodDesc{
|
||||||
|
{
|
||||||
|
MethodName: "PushMsg",
|
||||||
|
Handler: _PushMsgService_PushMsg_Handler,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
MethodName: "DelUserPushToken",
|
||||||
|
Handler: _PushMsgService_DelUserPushToken_Handler,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
Streams: []grpc.StreamDesc{},
|
||||||
|
Metadata: "push/push.proto",
|
||||||
|
}
|
||||||
|
|
||||||
|
func init() { proto.RegisterFile("push/push.proto", fileDescriptor_push_17f752d1b1c8edd5) }
|
||||||
|
|
||||||
|
var fileDescriptor_push_17f752d1b1c8edd5 = []byte{
|
||||||
|
// 342 bytes of a gzipped FileDescriptorProto
|
||||||
|
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x52, 0x4f, 0x4b, 0xfb, 0x40,
|
||||||
|
0x10, 0x25, 0xfd, 0xfd, 0xda, 0xe2, 0x54, 0xb4, 0xae, 0x22, 0x31, 0xa0, 0x96, 0x9c, 0x7a, 0x69,
|
||||||
|
0x02, 0xd5, 0x9b, 0x37, 0xcd, 0xc1, 0x1c, 0x82, 0x25, 0xea, 0xc5, 0x4b, 0xd8, 0xda, 0x35, 0x2d,
|
||||||
|
0xfd, 0xb3, 0xe3, 0x4e, 0x62, 0xbf, 0x82, 0xe0, 0x97, 0x96, 0xdd, 0x24, 0x1a, 0xab, 0x82, 0x97,
|
||||||
|
0x65, 0xe7, 0xcd, 0xdb, 0x79, 0x6f, 0x76, 0x06, 0x76, 0x31, 0xa7, 0xa9, 0xaf, 0x0f, 0x0f, 0x95,
|
||||||
|
0xcc, 0x24, 0xfb, 0xaf, 0xef, 0x4e, 0xff, 0x06, 0xc5, 0x6a, 0x10, 0x46, 0x83, 0x5b, 0xa1, 0x5e,
|
||||||
|
0x84, 0xf2, 0x71, 0x9e, 0xfa, 0x26, 0xef, 0xd3, 0x64, 0x9e, 0xac, 0xc9, 0x5f, 0x53, 0xc1, 0x77,
|
||||||
|
0x5f, 0x2d, 0x80, 0x51, 0x4e, 0xd3, 0x88, 0xd2, 0x58, 0x3c, 0xb3, 0x1e, 0x74, 0x24, 0x0a, 0xc5,
|
||||||
|
0xb3, 0x99, 0x5c, 0x85, 0x81, 0x6d, 0xf5, 0xac, 0xfe, 0x56, 0x5c, 0x87, 0xd8, 0x39, 0xb4, 0x97,
|
||||||
|
0x94, 0x06, 0x3c, 0xe3, 0x76, 0xa3, 0x67, 0xf5, 0x3b, 0x43, 0xc7, 0x23, 0x23, 0x92, 0x70, 0x9c,
|
||||||
|
0x25, 0xc8, 0x15, 0x5f, 0x92, 0x17, 0x15, 0x8c, 0xb8, 0xa2, 0x32, 0x17, 0xb6, 0xb5, 0xb1, 0x3b,
|
||||||
|
0x79, 0x4f, 0x42, 0x85, 0x81, 0xfd, 0xcf, 0x14, 0xfe, 0x82, 0xb9, 0x03, 0xe8, 0x7c, 0x38, 0x21,
|
||||||
|
0x64, 0x27, 0x00, 0xb1, 0xa0, 0x7c, 0x91, 0x5d, 0xc9, 0x89, 0x30, 0x4e, 0x9a, 0x71, 0x0d, 0x71,
|
||||||
|
0x25, 0xec, 0x07, 0x62, 0xa1, 0xdf, 0x8e, 0x4c, 0x95, 0xb9, 0x58, 0xfd, 0xad, 0x83, 0x43, 0x68,
|
||||||
|
0xe5, 0x85, 0x8b, 0x86, 0x49, 0x96, 0x91, 0x16, 0xc4, 0x05, 0xcf, 0x9e, 0xa4, 0x5a, 0x96, 0x0e,
|
||||||
|
0x9b, 0x71, 0x0d, 0x71, 0xaf, 0xe1, 0xe0, 0xbb, 0x20, 0x21, 0xb3, 0xa1, 0x2d, 0x94, 0xaa, 0xb9,
|
||||||
|
0xac, 0x42, 0xad, 0x24, 0x94, 0x8a, 0x28, 0xad, 0x94, 0x8a, 0x68, 0xf8, 0x66, 0xc1, 0x4e, 0xd9,
|
||||||
|
0xaa, 0x1e, 0xd0, 0xec, 0x51, 0x30, 0x0f, 0xda, 0x25, 0xc2, 0xba, 0x9e, 0x99, 0xe7, 0xe7, 0x54,
|
||||||
|
0x9c, 0xbd, 0x0d, 0x84, 0x90, 0x85, 0xd0, 0xdd, 0x34, 0xc3, 0x8e, 0x0a, 0xda, 0x0f, 0xbf, 0xe2,
|
||||||
|
0x38, 0xbf, 0xa5, 0x08, 0x2f, 0x4f, 0x1f, 0x8e, 0xf5, 0xba, 0x24, 0x61, 0x54, 0xdb, 0x13, 0x4d,
|
||||||
|
0xbf, 0xc0, 0xb1, 0x66, 0x8e, 0x5b, 0x06, 0x3a, 0x7b, 0x0f, 0x00, 0x00, 0xff, 0xff, 0xd6, 0x44,
|
||||||
|
0x0e, 0xd2, 0x6d, 0x02, 0x00, 0x00,
|
||||||
|
}
|
@ -0,0 +1,49 @@
|
|||||||
|
syntax = "proto3";
|
||||||
|
import "Open-IM-Server/pkg/proto/sdk_ws/ws.proto";
|
||||||
|
option go_package = "Open_IM/pkg/proto/push;pbPush";
|
||||||
|
package push;
|
||||||
|
|
||||||
|
message PushMsgReq {
|
||||||
|
string operationID = 1;
|
||||||
|
server_api_params.MsgData msgData = 2;
|
||||||
|
string pushToUserID = 3;
|
||||||
|
}
|
||||||
|
message PushMsgResp{
|
||||||
|
int32 ResultCode = 1;
|
||||||
|
}
|
||||||
|
message DelUserPushTokenReq{
|
||||||
|
string operationID = 1;
|
||||||
|
string userID =2;
|
||||||
|
int32 platformID = 3;
|
||||||
|
}
|
||||||
|
message DelUserPushTokenResp{
|
||||||
|
int32 errCode = 1;
|
||||||
|
string errMsg = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
//message InternalPushMsgReq{
|
||||||
|
// int32 ReqIdentifier = 1;
|
||||||
|
// string Token = 2;
|
||||||
|
// string SendID = 3;
|
||||||
|
// string OperationID = 4;
|
||||||
|
// int32 MsgIncr = 5;
|
||||||
|
// int32 PlatformID = 6;
|
||||||
|
// int32 SessionType = 7;
|
||||||
|
// int32 MsgFrom = 8;
|
||||||
|
// int32 ContentType = 9;
|
||||||
|
// string RecvID = 10;
|
||||||
|
// repeated string ForceList = 11;
|
||||||
|
// string Content = 12;
|
||||||
|
// string Options = 13;
|
||||||
|
// string ClientMsgID = 14;
|
||||||
|
// string OffLineInfo = 15;
|
||||||
|
// string Ex = 16;
|
||||||
|
//
|
||||||
|
//}
|
||||||
|
|
||||||
|
service PushMsgService {
|
||||||
|
rpc PushMsg(PushMsgReq) returns(PushMsgResp);
|
||||||
|
rpc DelUserPushToken(DelUserPushTokenReq) returns(DelUserPushTokenResp);
|
||||||
|
// rpc InternalPushMsg(InternalPushMsgReq)returns(PushMsgResp);
|
||||||
|
}
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,103 @@
|
|||||||
|
syntax = "proto3";
|
||||||
|
import "Open-IM-Server/pkg/proto/sdk_ws/ws.proto";
|
||||||
|
option go_package = "Open_IM/pkg/proto/relay;pbRelay";
|
||||||
|
package relay;
|
||||||
|
|
||||||
|
message OnlinePushMsgReq {
|
||||||
|
string OperationID = 1;
|
||||||
|
server_api_params.MsgData msgData = 2;
|
||||||
|
string pushToUserID = 3;
|
||||||
|
}
|
||||||
|
message OnlinePushMsgResp{
|
||||||
|
repeated SingleMsgToUserPlatform resp = 1;
|
||||||
|
}
|
||||||
|
message SingelMsgToUserResultList{
|
||||||
|
string userID =1;
|
||||||
|
repeated SingleMsgToUserPlatform resp = 2;
|
||||||
|
bool onlinePush = 3;
|
||||||
|
|
||||||
|
}
|
||||||
|
message OnlineBatchPushOneMsgReq{
|
||||||
|
string OperationID = 1;
|
||||||
|
server_api_params.MsgData msgData = 2;
|
||||||
|
repeated string pushToUserIDList = 3;
|
||||||
|
}
|
||||||
|
message OnlineBatchPushOneMsgResp{
|
||||||
|
repeated SingelMsgToUserResultList singlePushResult= 1;
|
||||||
|
}
|
||||||
|
//message SendMsgByWSReq{
|
||||||
|
// string SendID = 1;
|
||||||
|
// string RecvID = 2;
|
||||||
|
// string Content = 3;
|
||||||
|
// int64 SendTime = 4;
|
||||||
|
// int64 MsgFrom = 5;
|
||||||
|
// int64 ContentType = 6;
|
||||||
|
// int64 SessionType = 7;
|
||||||
|
// string OperationID = 8;
|
||||||
|
// int64 PlatformID = 9;
|
||||||
|
//}
|
||||||
|
|
||||||
|
message SingleMsgToUserPlatform{
|
||||||
|
int64 ResultCode = 1;
|
||||||
|
string RecvID = 2;
|
||||||
|
int32 RecvPlatFormID = 3;
|
||||||
|
}
|
||||||
|
message GetUsersOnlineStatusReq{
|
||||||
|
repeated string userIDList = 1;
|
||||||
|
string operationID = 2;
|
||||||
|
string opUserID = 3;
|
||||||
|
}
|
||||||
|
message GetUsersOnlineStatusResp{
|
||||||
|
int32 errCode = 1;
|
||||||
|
string errMsg = 2;
|
||||||
|
repeated SuccessResult successResult = 3;
|
||||||
|
repeated FailedDetail failedResult = 4;
|
||||||
|
message SuccessDetail{
|
||||||
|
string platform = 1;
|
||||||
|
string status = 2;
|
||||||
|
string connID = 3;
|
||||||
|
bool isBackground = 4;
|
||||||
|
}
|
||||||
|
message FailedDetail{
|
||||||
|
string userID = 3;
|
||||||
|
int32 errCode = 1;
|
||||||
|
string errMsg = 2;
|
||||||
|
}
|
||||||
|
message SuccessResult{
|
||||||
|
string userID = 1;
|
||||||
|
string status = 2;
|
||||||
|
repeated SuccessDetail detailPlatformStatus = 3;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
message KickUserOfflineReq{
|
||||||
|
string operationID = 1;
|
||||||
|
int32 platformID = 2;
|
||||||
|
repeated string kickUserIDList = 3;
|
||||||
|
}
|
||||||
|
message KickUserOfflineResp{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
message MultiTerminalLoginCheckReq{
|
||||||
|
string userID = 1;
|
||||||
|
int32 platformID = 2;
|
||||||
|
string token = 3;
|
||||||
|
string operationID = 4;
|
||||||
|
}
|
||||||
|
message MultiTerminalLoginCheckResp{
|
||||||
|
int32 errCode = 1;
|
||||||
|
string errMsg = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
service relay {
|
||||||
|
rpc OnlinePushMsg(OnlinePushMsgReq) returns(OnlinePushMsgResp);
|
||||||
|
rpc GetUsersOnlineStatus(GetUsersOnlineStatusReq) returns(GetUsersOnlineStatusResp);
|
||||||
|
rpc OnlineBatchPushOneMsg(OnlineBatchPushOneMsgReq) returns(OnlineBatchPushOneMsgResp);
|
||||||
|
rpc SuperGroupOnlineBatchPushOneMsg(OnlineBatchPushOneMsgReq) returns(OnlineBatchPushOneMsgResp);
|
||||||
|
rpc KickUserOffline(KickUserOfflineReq) returns(KickUserOfflineResp);
|
||||||
|
rpc MultiTerminalLoginCheck(MultiTerminalLoginCheckReq) returns(MultiTerminalLoginCheckResp);
|
||||||
|
rpc SuperGroupBackgroundOnlinePush(OnlineBatchPushOneMsgReq) returns(OnlineBatchPushOneMsgResp);
|
||||||
|
}
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,278 @@
|
|||||||
|
syntax = "proto3";
|
||||||
|
option go_package = "Open_IM/pkg/proto/rtc;rtc";
|
||||||
|
package proto;
|
||||||
|
|
||||||
|
message CommonResp{
|
||||||
|
int32 errCode = 1;
|
||||||
|
string errMsg = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
message MsgData {
|
||||||
|
string sendID = 1;
|
||||||
|
string recvID = 2;
|
||||||
|
string groupID = 3;
|
||||||
|
string clientMsgID = 4;
|
||||||
|
string serverMsgID = 5;
|
||||||
|
int32 senderPlatformID = 6;
|
||||||
|
string senderNickname = 7;
|
||||||
|
string senderFaceURL = 8;
|
||||||
|
int32 sessionType = 9;
|
||||||
|
int32 msgFrom = 10;
|
||||||
|
int32 contentType = 11;
|
||||||
|
bytes content = 12;
|
||||||
|
uint32 seq = 14;
|
||||||
|
int64 sendTime = 15;
|
||||||
|
int64 createTime = 16;
|
||||||
|
int32 status = 17;
|
||||||
|
map<string, bool> options = 18;
|
||||||
|
OfflinePushInfo offlinePushInfo = 19;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
message GroupInfo{
|
||||||
|
string groupID = 1;
|
||||||
|
string groupName = 2;
|
||||||
|
string notification = 3;
|
||||||
|
string introduction = 4;
|
||||||
|
string faceURL = 5;
|
||||||
|
string ownerUserID = 6;
|
||||||
|
uint32 createTime = 7;
|
||||||
|
uint32 memberCount = 8;
|
||||||
|
string ex = 9;
|
||||||
|
int32 status = 10;
|
||||||
|
string creatorUserID = 11;
|
||||||
|
int32 groupType = 12;
|
||||||
|
}
|
||||||
|
|
||||||
|
message GroupMemberFullInfo {
|
||||||
|
string groupID = 1 ;
|
||||||
|
string userID = 2 ;
|
||||||
|
int32 roleLevel = 3;
|
||||||
|
int32 joinTime = 4;
|
||||||
|
string nickname = 5;
|
||||||
|
string faceURL = 6;
|
||||||
|
int32 appMangerLevel = 7; //if >0
|
||||||
|
int32 joinSource = 8;
|
||||||
|
string operatorUserID = 9;
|
||||||
|
string ex = 10;
|
||||||
|
}
|
||||||
|
|
||||||
|
message ParticipantMetaData{
|
||||||
|
GroupInfo groupInfo = 1;
|
||||||
|
GroupMemberFullInfo groupMemberInfo = 2;
|
||||||
|
PublicUserInfo userInfo = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
message PublicUserInfo{
|
||||||
|
string userID = 1;
|
||||||
|
string nickname = 2;
|
||||||
|
string faceURL = 3;
|
||||||
|
int32 gender = 4;
|
||||||
|
string ex = 5;
|
||||||
|
}
|
||||||
|
|
||||||
|
message GetJoinTokenReq{
|
||||||
|
string room = 1;
|
||||||
|
string identity = 2;
|
||||||
|
ParticipantMetaData metaData = 3;
|
||||||
|
string operationID = 4;
|
||||||
|
}
|
||||||
|
|
||||||
|
message GetJoinTokenResp{
|
||||||
|
CommonResp CommonResp = 1;
|
||||||
|
string jwt = 2;
|
||||||
|
string liveURL = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
message OfflinePushInfo{
|
||||||
|
string title = 1;
|
||||||
|
string desc = 2;
|
||||||
|
string ex = 3;
|
||||||
|
string iOSPushSound = 4;
|
||||||
|
bool iOSBadgeCount = 5;
|
||||||
|
}
|
||||||
|
|
||||||
|
message SignalReq {
|
||||||
|
oneof payload {
|
||||||
|
SignalInviteReq invite = 1;
|
||||||
|
SignalInviteInGroupReq inviteInGroup= 2;
|
||||||
|
SignalCancelReq cancel = 3;
|
||||||
|
SignalAcceptReq accept = 4;
|
||||||
|
SignalHungUpReq hungUp = 5;
|
||||||
|
SignalRejectReq reject = 6;
|
||||||
|
SignalGetRoomByGroupIDReq getRoomByGroupID = 7;
|
||||||
|
|
||||||
|
SignalOnRoomParticipantConnectedReq onRoomParticipantConnectedReq = 8;
|
||||||
|
SignalOnRoomParticipantDisconnectedReq onRoomParticipantDisconnectedReq = 9;
|
||||||
|
SignalGetTokenByRoomIDReq getTokenByRoomID = 10;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
message SignalResp {
|
||||||
|
oneof payload {
|
||||||
|
SignalInviteReply invite = 1;
|
||||||
|
SignalInviteInGroupReply inviteInGroup= 2;
|
||||||
|
SignalCancelReply cancel = 3;
|
||||||
|
SignalAcceptReply accept = 4;
|
||||||
|
SignalHungUpReply hungUp = 5;
|
||||||
|
SignalRejectReply reject = 6;
|
||||||
|
SignalGetRoomByGroupIDReply getRoomByGroupID = 7;
|
||||||
|
SignalGetTokenByRoomIDReply getTokenByRoomID = 8;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
message InvitationInfo {
|
||||||
|
string inviterUserID = 1;
|
||||||
|
repeated string inviteeUserIDList = 2;
|
||||||
|
string customData = 3;
|
||||||
|
string groupID = 4;
|
||||||
|
string roomID = 5;
|
||||||
|
int32 timeout = 6;
|
||||||
|
string mediaType = 7;
|
||||||
|
int32 platformID = 8;
|
||||||
|
int32 sessionType = 9;
|
||||||
|
int32 initiateTime = 10;
|
||||||
|
repeated string busyLineUserIDList = 11;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
message SignalInviteReq {
|
||||||
|
string opUserID = 1;
|
||||||
|
InvitationInfo invitation = 2;
|
||||||
|
OfflinePushInfo offlinePushInfo = 3;
|
||||||
|
ParticipantMetaData participant = 4;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
message SignalInviteReply {
|
||||||
|
string token = 1;
|
||||||
|
string roomID = 2;
|
||||||
|
string liveURL = 3;
|
||||||
|
repeated string busyLineUserIDList = 4;
|
||||||
|
}
|
||||||
|
|
||||||
|
message SignalInviteInGroupReq {
|
||||||
|
string opUserID = 1;
|
||||||
|
InvitationInfo invitation = 2;
|
||||||
|
OfflinePushInfo offlinePushInfo = 3;
|
||||||
|
ParticipantMetaData participant = 4;
|
||||||
|
}
|
||||||
|
|
||||||
|
message SignalInviteInGroupReply {
|
||||||
|
string token = 1;
|
||||||
|
string roomID = 2;
|
||||||
|
string liveURL = 3;
|
||||||
|
repeated string busyLineUserIDList = 4;
|
||||||
|
}
|
||||||
|
|
||||||
|
message SignalCancelReq {
|
||||||
|
string opUserID = 1;
|
||||||
|
InvitationInfo invitation = 2;
|
||||||
|
OfflinePushInfo offlinePushInfo = 3;
|
||||||
|
ParticipantMetaData participant = 4;
|
||||||
|
}
|
||||||
|
|
||||||
|
message SignalCancelReply {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
message SignalAcceptReq {
|
||||||
|
string opUserID = 1;
|
||||||
|
InvitationInfo invitation = 2;
|
||||||
|
OfflinePushInfo offlinePushInfo = 3;
|
||||||
|
ParticipantMetaData participant = 4;
|
||||||
|
int32 opUserPlatformID = 5;
|
||||||
|
}
|
||||||
|
|
||||||
|
message SignalAcceptReply {
|
||||||
|
string token = 1;
|
||||||
|
string roomID = 2;
|
||||||
|
string liveURL = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
message SignalHungUpReq {
|
||||||
|
string opUserID = 1;
|
||||||
|
InvitationInfo invitation = 2;
|
||||||
|
OfflinePushInfo offlinePushInfo = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
message SignalHungUpReply {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
message SignalRejectReq {
|
||||||
|
string opUserID = 1;
|
||||||
|
InvitationInfo invitation = 2;
|
||||||
|
OfflinePushInfo offlinePushInfo = 3;
|
||||||
|
ParticipantMetaData participant = 4;
|
||||||
|
int32 opUserPlatformID = 5;
|
||||||
|
}
|
||||||
|
|
||||||
|
message SignalRejectReply {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
message SignalGetRoomByGroupIDReq {
|
||||||
|
string opUserID = 1;
|
||||||
|
string groupID = 2;
|
||||||
|
ParticipantMetaData participant = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
message SignalGetRoomByGroupIDReply {
|
||||||
|
InvitationInfo invitation = 1;
|
||||||
|
repeated ParticipantMetaData participant = 2;
|
||||||
|
string roomID = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
message SignalOnRoomParticipantConnectedReq {
|
||||||
|
InvitationInfo invitation = 1;
|
||||||
|
repeated ParticipantMetaData participant = 2;
|
||||||
|
string groupID = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
message SignalOnRoomParticipantDisconnectedReq {
|
||||||
|
InvitationInfo invitation = 1;
|
||||||
|
repeated ParticipantMetaData participant = 2;
|
||||||
|
string groupID = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
message SignalGetTokenByRoomIDReq {
|
||||||
|
string roomID = 1;
|
||||||
|
string opUserID = 2;
|
||||||
|
ParticipantMetaData participant = 3;
|
||||||
|
string operationID = 4;
|
||||||
|
}
|
||||||
|
|
||||||
|
message SignalGetTokenByRoomIDReply {
|
||||||
|
string token = 1;
|
||||||
|
string liveURL = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
message SignalMessageAssembleReq {
|
||||||
|
SignalReq signalReq = 1;
|
||||||
|
string operationID = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
message SignalMessageAssembleResp {
|
||||||
|
CommonResp commonResp = 1;
|
||||||
|
bool isPass = 2;
|
||||||
|
SignalResp signalResp = 3;
|
||||||
|
MsgData msgData = 4;
|
||||||
|
}
|
||||||
|
|
||||||
|
message SignalGetRoomsReq {
|
||||||
|
string operationID = 1;
|
||||||
|
string roomID = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
message SignalGetRoomsResp {
|
||||||
|
CommonResp commonResp = 1;
|
||||||
|
repeated SignalGetRoomByGroupIDReply roomList = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
service RtcService {
|
||||||
|
rpc SignalMessageAssemble(SignalMessageAssembleReq) returns(SignalMessageAssembleResp);
|
||||||
|
rpc SignalGetRooms(SignalGetRoomsReq) returns(SignalGetRoomsResp);
|
||||||
|
}
|
@ -0,0 +1,123 @@
|
|||||||
|
// Protocol Buffers - Google's data interchange format
|
||||||
|
// Copyright 2008 Google Inc. All rights reserved.
|
||||||
|
// https://developers.google.com/protocol-buffers/
|
||||||
|
//
|
||||||
|
// Redistribution and use in source and binary forms, with or without
|
||||||
|
// modification, are permitted provided that the following conditions are
|
||||||
|
// met:
|
||||||
|
//
|
||||||
|
// * Redistributions of source code must retain the above copyright
|
||||||
|
// notice, this list of conditions and the following disclaimer.
|
||||||
|
// * Redistributions in binary form must reproduce the above
|
||||||
|
// copyright notice, this list of conditions and the following disclaimer
|
||||||
|
// in the documentation and/or other materials provided with the
|
||||||
|
// distribution.
|
||||||
|
// * Neither the name of Google Inc. nor the names of its
|
||||||
|
// contributors may be used to endorse or promote products derived from
|
||||||
|
// this software without specific prior written permission.
|
||||||
|
//
|
||||||
|
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||||
|
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||||
|
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||||
|
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||||
|
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||||
|
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||||
|
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||||
|
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||||
|
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||||
|
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||||
|
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
|
// Wrappers for primitive (non-message) types. These types are useful
|
||||||
|
// for embedding primitives in the `google.protobuf.Any` type and for places
|
||||||
|
// where we need to distinguish between the absence of a primitive
|
||||||
|
// typed field and its default value.
|
||||||
|
//
|
||||||
|
// These wrappers have no meaningful use within repeated fields as they lack
|
||||||
|
// the ability to detect presence on individual elements.
|
||||||
|
// These wrappers have no meaningful use within a map or a oneof since
|
||||||
|
// individual entries of a map or fields of a oneof can already detect presence.
|
||||||
|
|
||||||
|
syntax = "proto3";
|
||||||
|
|
||||||
|
package google.protobuf;
|
||||||
|
|
||||||
|
option csharp_namespace = "Google.Protobuf.WellKnownTypes";
|
||||||
|
option cc_enable_arenas = true;
|
||||||
|
option go_package = "google.golang.org/protobuf/types/known/wrapperspb";
|
||||||
|
option java_package = "com.google.protobuf";
|
||||||
|
option java_outer_classname = "WrappersProto";
|
||||||
|
option java_multiple_files = true;
|
||||||
|
option objc_class_prefix = "GPB";
|
||||||
|
|
||||||
|
// Wrapper message for `double`.
|
||||||
|
//
|
||||||
|
// The JSON representation for `DoubleValue` is JSON number.
|
||||||
|
message DoubleValue {
|
||||||
|
// The double value.
|
||||||
|
double value = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Wrapper message for `float`.
|
||||||
|
//
|
||||||
|
// The JSON representation for `FloatValue` is JSON number.
|
||||||
|
message FloatValue {
|
||||||
|
// The float value.
|
||||||
|
float value = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Wrapper message for `int64`.
|
||||||
|
//
|
||||||
|
// The JSON representation for `Int64Value` is JSON string.
|
||||||
|
message Int64Value {
|
||||||
|
// The int64 value.
|
||||||
|
int64 value = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Wrapper message for `uint64`.
|
||||||
|
//
|
||||||
|
// The JSON representation for `UInt64Value` is JSON string.
|
||||||
|
message UInt64Value {
|
||||||
|
// The uint64 value.
|
||||||
|
uint64 value = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Wrapper message for `int32`.
|
||||||
|
//
|
||||||
|
// The JSON representation for `Int32Value` is JSON number.
|
||||||
|
message Int32Value {
|
||||||
|
// The int32 value.
|
||||||
|
int32 value = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Wrapper message for `uint32`.
|
||||||
|
//
|
||||||
|
// The JSON representation for `UInt32Value` is JSON number.
|
||||||
|
message UInt32Value {
|
||||||
|
// The uint32 value.
|
||||||
|
uint32 value = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Wrapper message for `bool`.
|
||||||
|
//
|
||||||
|
// The JSON representation for `BoolValue` is JSON `true` and `false`.
|
||||||
|
message BoolValue {
|
||||||
|
// The bool value.
|
||||||
|
bool value = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Wrapper message for `string`.
|
||||||
|
//
|
||||||
|
// The JSON representation for `StringValue` is JSON string.
|
||||||
|
message StringValue {
|
||||||
|
// The string value.
|
||||||
|
string value = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Wrapper message for `bytes`.
|
||||||
|
//
|
||||||
|
// The JSON representation for `BytesValue` is JSON string.
|
||||||
|
message BytesValue {
|
||||||
|
// The bytes value.
|
||||||
|
bytes value = 1;
|
||||||
|
}
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,740 @@
|
|||||||
|
syntax = "proto3";
|
||||||
|
import "Open-IM-Server/pkg/proto/sdk_ws/wrappers.proto";
|
||||||
|
option go_package = "Open_IM/pkg/proto/sdk_ws;server_api_params";
|
||||||
|
package server_api_params;
|
||||||
|
|
||||||
|
|
||||||
|
////////////////////////////////base///////////////////////////////
|
||||||
|
|
||||||
|
|
||||||
|
message GroupInfo{
|
||||||
|
string groupID = 1;
|
||||||
|
string groupName = 2;
|
||||||
|
string notification = 3;
|
||||||
|
string introduction = 4;
|
||||||
|
string faceURL = 5;
|
||||||
|
string ownerUserID = 6;
|
||||||
|
uint32 createTime = 7;
|
||||||
|
uint32 memberCount = 8;
|
||||||
|
string ex = 9;
|
||||||
|
int32 status = 10;
|
||||||
|
string creatorUserID = 11;
|
||||||
|
int32 groupType = 12;
|
||||||
|
int32 needVerification = 13;
|
||||||
|
int32 lookMemberInfo = 14;
|
||||||
|
int32 applyMemberFriend = 15;
|
||||||
|
uint32 notificationUpdateTime = 16;
|
||||||
|
string notificationUserID = 17;
|
||||||
|
}
|
||||||
|
|
||||||
|
message GroupInfoForSet{
|
||||||
|
string groupID = 1;
|
||||||
|
string groupName = 2;
|
||||||
|
string notification = 3;
|
||||||
|
string introduction = 4;
|
||||||
|
string faceURL = 5;
|
||||||
|
string ex = 6;
|
||||||
|
google.protobuf.Int32Value needVerification = 7;
|
||||||
|
google.protobuf.Int32Value lookMemberInfo = 8;
|
||||||
|
google.protobuf.Int32Value applyMemberFriend = 9;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
message GroupMemberFullInfo {
|
||||||
|
string groupID = 1 ;
|
||||||
|
string userID = 2 ;
|
||||||
|
int32 roleLevel = 3;
|
||||||
|
int32 joinTime = 4;
|
||||||
|
string nickname = 5;
|
||||||
|
string faceURL = 6;
|
||||||
|
int32 appMangerLevel = 7; //if >0
|
||||||
|
int32 joinSource = 8;
|
||||||
|
string operatorUserID = 9;
|
||||||
|
string ex = 10;
|
||||||
|
uint32 muteEndTime = 11;
|
||||||
|
string inviterUserID = 12;
|
||||||
|
}
|
||||||
|
|
||||||
|
message PublicUserInfo{
|
||||||
|
string userID = 1;
|
||||||
|
string nickname = 2;
|
||||||
|
string faceURL = 3;
|
||||||
|
int32 gender = 4;
|
||||||
|
string ex = 5;
|
||||||
|
}
|
||||||
|
|
||||||
|
message UserInfo{
|
||||||
|
string userID = 1;
|
||||||
|
string nickname = 2;
|
||||||
|
string faceURL = 3;
|
||||||
|
int32 gender = 4;
|
||||||
|
string phoneNumber = 5;
|
||||||
|
uint32 birth = 6;
|
||||||
|
string email = 7;
|
||||||
|
string ex = 8;
|
||||||
|
uint32 createTime = 9;
|
||||||
|
int32 appMangerLevel = 10;
|
||||||
|
int32 globalRecvMsgOpt = 11;
|
||||||
|
string birthStr = 12;
|
||||||
|
}
|
||||||
|
|
||||||
|
message FriendInfo{
|
||||||
|
string ownerUserID = 1;
|
||||||
|
string remark = 2;
|
||||||
|
uint32 createTime = 3;
|
||||||
|
UserInfo friendUser = 4;
|
||||||
|
int32 addSource = 5;
|
||||||
|
string operatorUserID = 6;
|
||||||
|
string ex = 7;
|
||||||
|
}
|
||||||
|
|
||||||
|
message BlackInfo{
|
||||||
|
string ownerUserID = 1;
|
||||||
|
uint32 createTime = 2;
|
||||||
|
PublicUserInfo blackUserInfo = 3;
|
||||||
|
int32 addSource = 4;
|
||||||
|
string operatorUserID = 5;
|
||||||
|
string ex = 6;
|
||||||
|
}
|
||||||
|
|
||||||
|
message GroupRequest{
|
||||||
|
PublicUserInfo userInfo = 1;
|
||||||
|
GroupInfo groupInfo = 2;
|
||||||
|
int32 handleResult = 3;
|
||||||
|
string reqMsg = 4;
|
||||||
|
string handleMsg = 5;
|
||||||
|
uint32 reqTime = 6;
|
||||||
|
string handleUserID = 7;
|
||||||
|
uint32 handleTime = 8;
|
||||||
|
string ex = 9;
|
||||||
|
int32 joinSource = 10;
|
||||||
|
string inviterUserID = 11;
|
||||||
|
}
|
||||||
|
|
||||||
|
message FriendRequest{
|
||||||
|
string fromUserID = 1;
|
||||||
|
string fromNickname = 2;
|
||||||
|
string fromFaceURL = 3;
|
||||||
|
int32 fromGender = 4;
|
||||||
|
string toUserID = 5;
|
||||||
|
string toNickname = 6;
|
||||||
|
string toFaceURL = 7;
|
||||||
|
int32 toGender = 8;
|
||||||
|
int32 handleResult = 9;
|
||||||
|
string reqMsg = 10;
|
||||||
|
uint32 createTime = 11;
|
||||||
|
string handlerUserID = 12;
|
||||||
|
string handleMsg = 13;
|
||||||
|
uint32 handleTime = 14;
|
||||||
|
string ex = 15;
|
||||||
|
}
|
||||||
|
|
||||||
|
///////////////////////////////////organization/////////////////////////////////////
|
||||||
|
|
||||||
|
message Department {
|
||||||
|
string departmentID = 1;
|
||||||
|
string faceURL = 2;
|
||||||
|
string name = 3;
|
||||||
|
string parentID = 4;
|
||||||
|
int32 order = 5;
|
||||||
|
int32 departmentType = 6;
|
||||||
|
uint32 createTime = 7;
|
||||||
|
uint32 subDepartmentNum = 8;
|
||||||
|
uint32 memberNum = 9;
|
||||||
|
string ex = 10;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
message OrganizationUser {
|
||||||
|
string userID = 1;
|
||||||
|
string nickname = 2;
|
||||||
|
string englishName = 3;
|
||||||
|
string faceURL = 4;
|
||||||
|
int32 gender = 5;
|
||||||
|
string mobile = 6;
|
||||||
|
string telephone = 7;
|
||||||
|
uint32 birth = 8;
|
||||||
|
string email = 9;
|
||||||
|
uint32 createTime = 10;
|
||||||
|
string ex = 11;
|
||||||
|
string birthStr = 12;
|
||||||
|
}
|
||||||
|
|
||||||
|
message DepartmentMember {
|
||||||
|
string userID = 1;
|
||||||
|
string departmentID = 2;
|
||||||
|
int32 order = 3;
|
||||||
|
string position = 4;
|
||||||
|
int32 leader = 5;
|
||||||
|
int32 status = 6;
|
||||||
|
string ex = 7;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
message UserDepartmentMember {
|
||||||
|
OrganizationUser organizationUser = 1;
|
||||||
|
DepartmentMember departmentMember = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
message UserInDepartment {
|
||||||
|
OrganizationUser organizationUser = 1;
|
||||||
|
repeated DepartmentMember departmentMemberList = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
///////////////////////////////////organization end//////////////////////////////////
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
///////////////////////////////////base end/////////////////////////////////////
|
||||||
|
message PullMessageBySeqListReq{
|
||||||
|
string userID = 1;
|
||||||
|
string operationID = 2;
|
||||||
|
repeated uint32 seqList = 3;
|
||||||
|
map <string, seqList>groupSeqList = 4;
|
||||||
|
}
|
||||||
|
|
||||||
|
message seqList {
|
||||||
|
repeated uint32 seqList = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
message MsgDataList {
|
||||||
|
repeated MsgData msgDataList = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
message PullMessageBySeqListResp {
|
||||||
|
int32 errCode = 1;
|
||||||
|
string errMsg = 2;
|
||||||
|
repeated MsgData list = 3;
|
||||||
|
map<string, MsgDataList> groupMsgDataList = 4;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
message GetMaxAndMinSeqReq {
|
||||||
|
repeated string groupIDList = 1;
|
||||||
|
string userID = 2;
|
||||||
|
string operationID = 3;
|
||||||
|
}
|
||||||
|
message MaxAndMinSeq{
|
||||||
|
uint32 maxSeq = 1;
|
||||||
|
uint32 minSeq = 2;
|
||||||
|
}
|
||||||
|
message GetMaxAndMinSeqResp {
|
||||||
|
uint32 maxSeq = 1;
|
||||||
|
uint32 minSeq = 2;
|
||||||
|
int32 errCode = 3;
|
||||||
|
string errMsg = 4;
|
||||||
|
map<string, MaxAndMinSeq> groupMaxAndMinSeq = 5;
|
||||||
|
}
|
||||||
|
|
||||||
|
message UserSendMsgResp {
|
||||||
|
string serverMsgID = 1;
|
||||||
|
string clientMsgID = 2;
|
||||||
|
int64 sendTime = 3;
|
||||||
|
string ex = 4;
|
||||||
|
}
|
||||||
|
|
||||||
|
message MsgData {
|
||||||
|
string sendID = 1;
|
||||||
|
string recvID = 2;
|
||||||
|
string groupID = 3;
|
||||||
|
string clientMsgID = 4;
|
||||||
|
string serverMsgID = 5;
|
||||||
|
int32 senderPlatformID = 6;
|
||||||
|
string senderNickname = 7;
|
||||||
|
string senderFaceURL = 8;
|
||||||
|
int32 sessionType = 9;
|
||||||
|
int32 msgFrom = 10;
|
||||||
|
int32 contentType = 11;
|
||||||
|
bytes content = 12;
|
||||||
|
uint32 seq = 14;
|
||||||
|
int64 sendTime = 15;
|
||||||
|
int64 createTime = 16;
|
||||||
|
int32 status = 17;
|
||||||
|
map<string, bool> options = 18;
|
||||||
|
OfflinePushInfo offlinePushInfo = 19;
|
||||||
|
repeated string atUserIDList = 20;
|
||||||
|
bytes msgDataList = 21;
|
||||||
|
string attachedInfo = 22;
|
||||||
|
string ex = 23;
|
||||||
|
|
||||||
|
bool isReact = 40;
|
||||||
|
bool isExternalExtensions = 41;
|
||||||
|
int64 msgFirstModifyTime = 42;
|
||||||
|
|
||||||
|
}
|
||||||
|
message OfflinePushInfo{
|
||||||
|
string title = 1;
|
||||||
|
string desc = 2;
|
||||||
|
string ex = 3;
|
||||||
|
string iOSPushSound = 4;
|
||||||
|
bool iOSBadgeCount = 5;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
message TipsComm{
|
||||||
|
bytes detail = 1;
|
||||||
|
string defaultTips = 2;
|
||||||
|
string jsonDetail = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
//////////////////////group/////////////////////
|
||||||
|
|
||||||
|
|
||||||
|
// OnGroupCreated()
|
||||||
|
message GroupCreatedTips{
|
||||||
|
GroupInfo group = 1;
|
||||||
|
GroupMemberFullInfo opUser = 2;
|
||||||
|
repeated GroupMemberFullInfo memberList = 3;
|
||||||
|
int64 operationTime = 4;
|
||||||
|
GroupMemberFullInfo groupOwnerUser = 5;
|
||||||
|
}
|
||||||
|
|
||||||
|
// OnGroupInfoSet()
|
||||||
|
message GroupInfoSetTips{
|
||||||
|
GroupMemberFullInfo opUser = 1; //who do this
|
||||||
|
int64 muteTime = 2;
|
||||||
|
GroupInfo group = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
// OnJoinGroupApplication()
|
||||||
|
message JoinGroupApplicationTips{
|
||||||
|
GroupInfo group = 1;
|
||||||
|
PublicUserInfo applicant = 2;
|
||||||
|
string reqMsg = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
// OnQuitGroup()
|
||||||
|
//Actively leave the group
|
||||||
|
message MemberQuitTips{
|
||||||
|
GroupInfo group = 1;
|
||||||
|
GroupMemberFullInfo quitUser = 2;
|
||||||
|
int64 operationTime = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// OnApplicationGroupAccepted()
|
||||||
|
message GroupApplicationAcceptedTips{
|
||||||
|
GroupInfo group = 1;
|
||||||
|
GroupMemberFullInfo opUser = 2;
|
||||||
|
string handleMsg = 4;
|
||||||
|
int32 receiverAs = 5; // admin(==1) or applicant(==0)
|
||||||
|
}
|
||||||
|
|
||||||
|
// OnApplicationGroupRejected()
|
||||||
|
message GroupApplicationRejectedTips{
|
||||||
|
GroupInfo group = 1;
|
||||||
|
GroupMemberFullInfo opUser = 2;
|
||||||
|
string handleMsg = 4;
|
||||||
|
int32 receiverAs = 5; // admin(==1) or applicant(==0)
|
||||||
|
}
|
||||||
|
|
||||||
|
// OnTransferGroupOwner()
|
||||||
|
message GroupOwnerTransferredTips{
|
||||||
|
GroupInfo group = 1;
|
||||||
|
GroupMemberFullInfo opUser = 2;
|
||||||
|
GroupMemberFullInfo newGroupOwner = 3;
|
||||||
|
int64 operationTime = 4;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// OnMemberKicked()
|
||||||
|
message MemberKickedTips{
|
||||||
|
GroupInfo group = 1;
|
||||||
|
GroupMemberFullInfo opUser = 2;
|
||||||
|
repeated GroupMemberFullInfo kickedUserList = 3;
|
||||||
|
int64 operationTime = 4;
|
||||||
|
}
|
||||||
|
|
||||||
|
// OnMemberInvited()
|
||||||
|
message MemberInvitedTips{
|
||||||
|
GroupInfo group = 1;
|
||||||
|
GroupMemberFullInfo opUser = 2;
|
||||||
|
repeated GroupMemberFullInfo invitedUserList = 3;
|
||||||
|
int64 operationTime = 4;
|
||||||
|
}
|
||||||
|
|
||||||
|
//Actively join the group
|
||||||
|
message MemberEnterTips{
|
||||||
|
GroupInfo group = 1;
|
||||||
|
GroupMemberFullInfo entrantUser = 2;
|
||||||
|
int64 operationTime = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
message GroupDismissedTips{
|
||||||
|
GroupInfo group = 1;
|
||||||
|
GroupMemberFullInfo opUser = 2;
|
||||||
|
int64 operationTime = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
message GroupMemberMutedTips{
|
||||||
|
GroupInfo group = 1;
|
||||||
|
GroupMemberFullInfo opUser = 2;
|
||||||
|
int64 operationTime = 3;
|
||||||
|
GroupMemberFullInfo mutedUser = 4;
|
||||||
|
uint32 mutedSeconds = 5;
|
||||||
|
}
|
||||||
|
|
||||||
|
message GroupMemberCancelMutedTips{
|
||||||
|
GroupInfo group = 1;
|
||||||
|
GroupMemberFullInfo opUser = 2;
|
||||||
|
int64 operationTime = 3;
|
||||||
|
GroupMemberFullInfo mutedUser = 4;
|
||||||
|
}
|
||||||
|
|
||||||
|
message GroupMutedTips{
|
||||||
|
GroupInfo group = 1;
|
||||||
|
GroupMemberFullInfo opUser = 2;
|
||||||
|
int64 operationTime = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
message GroupCancelMutedTips{
|
||||||
|
GroupInfo group = 1;
|
||||||
|
GroupMemberFullInfo opUser = 2;
|
||||||
|
int64 operationTime = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
message GroupMemberInfoSetTips{
|
||||||
|
GroupInfo group = 1;
|
||||||
|
GroupMemberFullInfo opUser = 2;
|
||||||
|
int64 operationTime = 3;
|
||||||
|
GroupMemberFullInfo changedUser = 4;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
message OrganizationChangedTips{
|
||||||
|
UserInfo opUser = 2;
|
||||||
|
int64 operationTime = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//////////////////////friend/////////////////////
|
||||||
|
//message FriendInfo{
|
||||||
|
// UserInfo OwnerUser = 1;
|
||||||
|
// string Remark = 2;
|
||||||
|
// uint64 CreateTime = 3;
|
||||||
|
// UserInfo FriendUser = 4;
|
||||||
|
//}
|
||||||
|
|
||||||
|
message FriendApplication{
|
||||||
|
int64 addTime = 1;
|
||||||
|
string addSource = 2;
|
||||||
|
string addWording = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
message FromToUserID{
|
||||||
|
string fromUserID = 1;
|
||||||
|
string toUserID = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
//FromUserID apply to add ToUserID
|
||||||
|
message FriendApplicationTips{
|
||||||
|
FromToUserID fromToUserID = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
//FromUserID accept or reject ToUserID
|
||||||
|
message FriendApplicationApprovedTips{
|
||||||
|
FromToUserID fromToUserID = 1;
|
||||||
|
string handleMsg = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
//FromUserID accept or reject ToUserID
|
||||||
|
message FriendApplicationRejectedTips{
|
||||||
|
FromToUserID fromToUserID = 1;
|
||||||
|
string handleMsg = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// FromUserID Added a friend ToUserID
|
||||||
|
message FriendAddedTips{
|
||||||
|
FriendInfo friend = 1;
|
||||||
|
int64 operationTime = 2;
|
||||||
|
PublicUserInfo opUser = 3; //who do this
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// FromUserID deleted a friend ToUserID
|
||||||
|
message FriendDeletedTips{
|
||||||
|
FromToUserID fromToUserID = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
message BlackAddedTips{
|
||||||
|
FromToUserID fromToUserID = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
message BlackDeletedTips{
|
||||||
|
FromToUserID fromToUserID = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
message FriendInfoChangedTips{
|
||||||
|
FromToUserID fromToUserID = 1;
|
||||||
|
}
|
||||||
|
//////////////////////user/////////////////////
|
||||||
|
message UserInfoUpdatedTips{
|
||||||
|
string userID = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
//////////////////////conversation/////////////////////
|
||||||
|
message ConversationUpdateTips{
|
||||||
|
string UserID = 1;
|
||||||
|
repeated string conversationIDList = 2;
|
||||||
|
int64 updateUnreadCountTime = 3;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
message ConversationSetPrivateTips{
|
||||||
|
string recvID = 1;
|
||||||
|
string sendID = 2;
|
||||||
|
bool isPrivate = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
////////////////////message///////////////////////
|
||||||
|
message DeleteMessageTips{
|
||||||
|
string opUserID = 1;
|
||||||
|
string userID = 2;
|
||||||
|
repeated uint32 seqList = 3;
|
||||||
|
}
|
||||||
|
///cms
|
||||||
|
message RequestPagination {
|
||||||
|
int32 pageNumber = 1;
|
||||||
|
int32 showNumber = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
message ResponsePagination {
|
||||||
|
int32 CurrentPage = 5;
|
||||||
|
int32 ShowNumber = 6;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
///////////////////signal//////////////
|
||||||
|
message SignalReq {
|
||||||
|
oneof payload {
|
||||||
|
SignalInviteReq invite = 1;
|
||||||
|
SignalInviteInGroupReq inviteInGroup = 2;
|
||||||
|
SignalCancelReq cancel = 3;
|
||||||
|
SignalAcceptReq accept = 4;
|
||||||
|
SignalHungUpReq hungUp = 5;
|
||||||
|
SignalRejectReq reject = 6;
|
||||||
|
SignalGetRoomByGroupIDReq getRoomByGroupID = 7;
|
||||||
|
|
||||||
|
SignalOnRoomParticipantConnectedReq onRoomParticipantConnectedReq = 8;
|
||||||
|
SignalOnRoomParticipantDisconnectedReq onRoomParticipantDisconnectedReq = 9;
|
||||||
|
SignalGetTokenByRoomIDReq getTokenByRoomID = 10;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
message SignalResp {
|
||||||
|
oneof payload {
|
||||||
|
SignalInviteReply invite = 1;
|
||||||
|
SignalInviteInGroupReply inviteInGroup = 2;
|
||||||
|
SignalCancelReply cancel = 3;
|
||||||
|
SignalAcceptReply accept = 4;
|
||||||
|
SignalHungUpReply hungUp = 5;
|
||||||
|
SignalRejectReply reject = 6;
|
||||||
|
SignalGetRoomByGroupIDReply getRoomByGroupID = 7;
|
||||||
|
SignalGetTokenByRoomIDReply getTokenByRoomID = 8;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
message InvitationInfo {
|
||||||
|
string inviterUserID = 1;
|
||||||
|
repeated string inviteeUserIDList = 2;
|
||||||
|
string customData = 3;
|
||||||
|
string groupID = 4;
|
||||||
|
string roomID = 5;
|
||||||
|
int32 timeout = 6;
|
||||||
|
string mediaType = 7;
|
||||||
|
int32 platformID = 8;
|
||||||
|
int32 sessionType = 9;
|
||||||
|
int32 initiateTime = 10;
|
||||||
|
repeated string busyLineUserIDList = 11;
|
||||||
|
}
|
||||||
|
|
||||||
|
message ParticipantMetaData{
|
||||||
|
GroupInfo groupInfo = 1;
|
||||||
|
GroupMemberFullInfo groupMemberInfo = 2;
|
||||||
|
PublicUserInfo userInfo = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
message SignalInviteReq {
|
||||||
|
string opUserID = 1;
|
||||||
|
InvitationInfo invitation = 2;
|
||||||
|
OfflinePushInfo offlinePushInfo = 3;
|
||||||
|
ParticipantMetaData participant = 4;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
message SignalInviteReply {
|
||||||
|
string token = 1;
|
||||||
|
string roomID = 2;
|
||||||
|
string liveURL = 3;
|
||||||
|
repeated string busyLineUserIDList = 4;
|
||||||
|
}
|
||||||
|
|
||||||
|
message SignalInviteInGroupReq {
|
||||||
|
string opUserID = 1;
|
||||||
|
InvitationInfo invitation = 2;
|
||||||
|
OfflinePushInfo offlinePushInfo = 3;
|
||||||
|
ParticipantMetaData participant = 4;
|
||||||
|
}
|
||||||
|
|
||||||
|
message SignalInviteInGroupReply {
|
||||||
|
string token = 1;
|
||||||
|
string roomID = 2;
|
||||||
|
string liveURL = 3;
|
||||||
|
repeated string busyLineUserIDList = 4;
|
||||||
|
}
|
||||||
|
|
||||||
|
message SignalCancelReq {
|
||||||
|
string opUserID = 1;
|
||||||
|
InvitationInfo invitation = 2;
|
||||||
|
OfflinePushInfo offlinePushInfo = 3;
|
||||||
|
ParticipantMetaData participant = 4;
|
||||||
|
}
|
||||||
|
|
||||||
|
message SignalCancelReply {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
message SignalAcceptReq {
|
||||||
|
string opUserID = 1;
|
||||||
|
InvitationInfo invitation = 2;
|
||||||
|
OfflinePushInfo offlinePushInfo = 3;
|
||||||
|
ParticipantMetaData participant = 4;
|
||||||
|
int32 opUserPlatformID = 5;
|
||||||
|
}
|
||||||
|
|
||||||
|
message SignalAcceptReply {
|
||||||
|
string token = 1;
|
||||||
|
string roomID = 2;
|
||||||
|
string liveURL = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
message SignalHungUpReq {
|
||||||
|
string opUserID = 1;
|
||||||
|
InvitationInfo invitation = 2;
|
||||||
|
OfflinePushInfo offlinePushInfo = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
message SignalHungUpReply {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
message SignalRejectReq {
|
||||||
|
string opUserID = 1;
|
||||||
|
InvitationInfo invitation = 2;
|
||||||
|
OfflinePushInfo offlinePushInfo = 3;
|
||||||
|
ParticipantMetaData participant = 4;
|
||||||
|
int32 opUserPlatformID = 5;
|
||||||
|
}
|
||||||
|
|
||||||
|
message SignalRejectReply {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
message SignalGetRoomByGroupIDReq {
|
||||||
|
string opUserID = 1;
|
||||||
|
string groupID = 2;
|
||||||
|
ParticipantMetaData participant = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
message SignalGetRoomByGroupIDReply {
|
||||||
|
InvitationInfo invitation = 1;
|
||||||
|
repeated ParticipantMetaData participant = 2;
|
||||||
|
string roomID = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
message SignalOnRoomParticipantConnectedReq {
|
||||||
|
InvitationInfo invitation = 1;
|
||||||
|
repeated ParticipantMetaData participant = 2;
|
||||||
|
string groupID = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
message SignalOnRoomParticipantDisconnectedReq {
|
||||||
|
InvitationInfo invitation = 1;
|
||||||
|
repeated ParticipantMetaData participant = 2;
|
||||||
|
string groupID = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
message SignalGetTokenByRoomIDReq {
|
||||||
|
string roomID = 1;
|
||||||
|
string opUserID = 2;
|
||||||
|
ParticipantMetaData participant = 3;
|
||||||
|
string operationID = 4;
|
||||||
|
}
|
||||||
|
|
||||||
|
message SignalGetTokenByRoomIDReply {
|
||||||
|
string token = 1;
|
||||||
|
string liveURL = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
message DelMsgListReq{
|
||||||
|
string opUserID = 1;
|
||||||
|
string userID = 2;
|
||||||
|
repeated uint32 seqList = 3;
|
||||||
|
string operationID = 4;
|
||||||
|
}
|
||||||
|
|
||||||
|
message DelMsgListResp{
|
||||||
|
int32 errCode = 1;
|
||||||
|
string errMsg = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
message SetAppBackgroundStatusReq {
|
||||||
|
string userID = 1;
|
||||||
|
bool isBackground = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
message SetAppBackgroundStatusResp {
|
||||||
|
int32 errCode = 1;
|
||||||
|
string errMsg = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
message ExtendMsgSet {
|
||||||
|
string sourceID = 1;
|
||||||
|
int32 sessionType = 2;
|
||||||
|
map <string, ExtendMsg>extendMsgs = 3;
|
||||||
|
int64 MaxMsgUpdateTime = 4;
|
||||||
|
int32 extendMsgNum = 5;
|
||||||
|
int64 createTime = 6;
|
||||||
|
}
|
||||||
|
|
||||||
|
message ExtendMsg {
|
||||||
|
map <string, KeyValue>reactionExtensionList = 1;
|
||||||
|
string clientMsgID = 2;
|
||||||
|
int64 msgFirstModifyTime = 3;
|
||||||
|
string attachedInfo = 4;
|
||||||
|
string ex = 5;
|
||||||
|
}
|
||||||
|
|
||||||
|
message KeyValue {
|
||||||
|
string typeKey = 1;
|
||||||
|
string value = 2;
|
||||||
|
int64 latestUpdateTime = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,232 @@
|
|||||||
|
syntax = "proto3";
|
||||||
|
import "Open-IM-Server/pkg/proto/sdk_ws/ws.proto";
|
||||||
|
import "Open-IM-Server/pkg/proto/conversation/conversation.proto";
|
||||||
|
option go_package = "Open_IM/pkg/proto/user;user";
|
||||||
|
package user;
|
||||||
|
|
||||||
|
message CommonResp{
|
||||||
|
int32 errCode = 1;
|
||||||
|
string errMsg = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
message GetAllUserIDReq{
|
||||||
|
string opUserID = 1;
|
||||||
|
string operationID = 2;
|
||||||
|
}
|
||||||
|
message GetAllUserIDResp{
|
||||||
|
CommonResp CommonResp = 1;
|
||||||
|
repeated string UserIDList = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
message AccountCheckReq{
|
||||||
|
repeated string CheckUserIDList = 1;
|
||||||
|
string OpUserID = 2;
|
||||||
|
string OperationID = 3;
|
||||||
|
|
||||||
|
}
|
||||||
|
message AccountCheckResp{
|
||||||
|
CommonResp commonResp = 1;
|
||||||
|
message SingleUserStatus {
|
||||||
|
string userID = 1;
|
||||||
|
string accountStatus = 2;
|
||||||
|
}
|
||||||
|
repeated SingleUserStatus ResultList = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
message GetUserInfoReq{
|
||||||
|
repeated string userIDList = 1;
|
||||||
|
string OpUserID = 2;
|
||||||
|
string OperationID = 3;
|
||||||
|
}
|
||||||
|
message GetUserInfoResp{
|
||||||
|
CommonResp commonResp = 1;
|
||||||
|
repeated server_api_params.UserInfo UserInfoList = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
message UpdateUserInfoReq{
|
||||||
|
server_api_params.UserInfo UserInfo = 1;
|
||||||
|
string OpUserID = 2;
|
||||||
|
string operationID = 3;
|
||||||
|
}
|
||||||
|
message UpdateUserInfoResp{
|
||||||
|
CommonResp commonResp = 1;
|
||||||
|
}
|
||||||
|
message SetGlobalRecvMessageOptReq{
|
||||||
|
string userID = 1;
|
||||||
|
string operationID = 2;
|
||||||
|
int32 globalRecvMsgOpt = 3;
|
||||||
|
}
|
||||||
|
message SetGlobalRecvMessageOptResp{
|
||||||
|
CommonResp commonResp = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
message SetConversationReq{
|
||||||
|
conversation.Conversation Conversation = 1;
|
||||||
|
int32 notificationType = 2;
|
||||||
|
string OperationID = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
message SetConversationResp{
|
||||||
|
CommonResp commonResp = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
message SetRecvMsgOptReq {
|
||||||
|
string OwnerUserID = 1;
|
||||||
|
string ConversationID = 2;
|
||||||
|
int32 RecvMsgOpt = 3;
|
||||||
|
int32 notificationType = 4;
|
||||||
|
string OperationID = 5;
|
||||||
|
}
|
||||||
|
|
||||||
|
message SetRecvMsgOptResp {
|
||||||
|
CommonResp commonResp = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
message GetConversationReq{
|
||||||
|
string ConversationID = 1;
|
||||||
|
string OwnerUserID = 2;
|
||||||
|
string OperationID = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
message GetConversationResp{
|
||||||
|
CommonResp commonResp = 1;
|
||||||
|
conversation.Conversation Conversation = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
message GetConversationsReq{
|
||||||
|
string OwnerUserID = 1;
|
||||||
|
repeated string ConversationIDs = 2;
|
||||||
|
string OperationID = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
message GetConversationsResp{
|
||||||
|
CommonResp commonResp = 1;
|
||||||
|
repeated conversation.Conversation Conversations = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
message GetAllConversationsReq{
|
||||||
|
string OwnerUserID = 1;
|
||||||
|
string OperationID = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
message GetAllConversationsResp{
|
||||||
|
CommonResp commonResp = 1;
|
||||||
|
repeated conversation.Conversation Conversations = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
message BatchSetConversationsReq{
|
||||||
|
repeated conversation.Conversation Conversations = 1;
|
||||||
|
string OwnerUserID = 2;
|
||||||
|
int32 notificationType = 3;
|
||||||
|
string OperationID = 4;
|
||||||
|
}
|
||||||
|
|
||||||
|
message BatchSetConversationsResp{
|
||||||
|
CommonResp commonResp = 1;
|
||||||
|
repeated string Success = 2;
|
||||||
|
repeated string Failed = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
message GetUsersReq {
|
||||||
|
string operationID = 1;
|
||||||
|
server_api_params.RequestPagination pagination = 2;
|
||||||
|
string userName = 3;
|
||||||
|
string userID = 4;
|
||||||
|
string content = 5;
|
||||||
|
}
|
||||||
|
|
||||||
|
message CmsUser {
|
||||||
|
server_api_params.UserInfo user = 1;
|
||||||
|
bool isBlock = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
message GetUsersResp{
|
||||||
|
CommonResp commonResp = 1;
|
||||||
|
repeated CmsUser userList = 2;
|
||||||
|
server_api_params.ResponsePagination Pagination = 3;
|
||||||
|
int32 totalNums = 4;
|
||||||
|
}
|
||||||
|
|
||||||
|
message AddUserReq{
|
||||||
|
server_api_params.UserInfo userInfo = 1;
|
||||||
|
string operationID = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
message AddUserResp{
|
||||||
|
CommonResp CommonResp = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
message BlockUserReq{
|
||||||
|
string userID = 1;
|
||||||
|
string endDisableTime = 2;
|
||||||
|
string operationID = 3;
|
||||||
|
string opUserID = 4;
|
||||||
|
}
|
||||||
|
|
||||||
|
message BlockUserResp{
|
||||||
|
CommonResp CommonResp = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
message UnBlockUserReq{
|
||||||
|
string userID = 1;
|
||||||
|
string operationID = 2;
|
||||||
|
string opUserID = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
message UnBlockUserResp{
|
||||||
|
CommonResp CommonResp = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
message GetBlockUsersReq{
|
||||||
|
server_api_params.RequestPagination pagination = 1;
|
||||||
|
string operationID = 2;
|
||||||
|
string userID = 3;
|
||||||
|
int32 totalBlockUserNum = 4;
|
||||||
|
}
|
||||||
|
|
||||||
|
message BlockUser {
|
||||||
|
server_api_params.UserInfo UserInfo = 1;
|
||||||
|
string BeginDisableTime = 2;
|
||||||
|
string EndDisableTime = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
message GetBlockUsersResp{
|
||||||
|
CommonResp CommonResp = 1;
|
||||||
|
repeated BlockUser BlockUsers = 2;
|
||||||
|
server_api_params.ResponsePagination Pagination = 3;
|
||||||
|
int32 UserNums = 4;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
service user {
|
||||||
|
rpc GetUserInfo(GetUserInfoReq) returns(GetUserInfoResp);
|
||||||
|
rpc UpdateUserInfo(UpdateUserInfoReq) returns(UpdateUserInfoResp);
|
||||||
|
rpc SetGlobalRecvMessageOpt(SetGlobalRecvMessageOptReq) returns(SetGlobalRecvMessageOptResp);
|
||||||
|
rpc GetAllUserID(GetAllUserIDReq)returns(GetAllUserIDResp);
|
||||||
|
|
||||||
|
rpc AccountCheck(AccountCheckReq)returns(AccountCheckResp);
|
||||||
|
rpc GetConversation(GetConversationReq)returns(GetConversationResp);
|
||||||
|
rpc GetAllConversations(GetAllConversationsReq)returns(GetAllConversationsResp);
|
||||||
|
rpc GetConversations(GetConversationsReq)returns(GetConversationsResp);
|
||||||
|
rpc BatchSetConversations(BatchSetConversationsReq)returns(BatchSetConversationsResp);
|
||||||
|
rpc SetConversation(SetConversationReq)returns(SetConversationResp);
|
||||||
|
rpc SetRecvMsgOpt(SetRecvMsgOptReq)returns(SetRecvMsgOptResp);
|
||||||
|
|
||||||
|
|
||||||
|
rpc GetUsers(GetUsersReq) returns (GetUsersResp);
|
||||||
|
|
||||||
|
rpc AddUser(AddUserReq) returns (AddUserResp);
|
||||||
|
|
||||||
|
rpc BlockUser(BlockUserReq) returns (BlockUserResp);
|
||||||
|
rpc UnBlockUser(UnBlockUserReq) returns (UnBlockUserResp);
|
||||||
|
rpc GetBlockUsers(GetBlockUsersReq) returns (GetBlockUsersResp);
|
||||||
|
}
|
||||||
|
|
@ -1,15 +0,0 @@
|
|||||||
// Copyright © 2023 OpenIM. All rights reserved.
|
|
||||||
//
|
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
// you may not use this file except in compliance with the License.
|
|
||||||
// You may obtain a copy of the License at
|
|
||||||
//
|
|
||||||
// http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
//
|
|
||||||
// Unless required by applicable law or agreed to in writing, software
|
|
||||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
// See the License for the specific language governing permissions and
|
|
||||||
// limitations under the License.
|
|
||||||
|
|
||||||
package data_conversion
|
|
Loading…
Reference in new issue