mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-04-24 18:36:19 +08:00
Merge branch 'errcode' of https://github.com/OpenIMSDK/Open-IM-Server into errcode
# Conflicts: # pkg/apiresp/gin.go # pkg/apiresp/resp.go
This commit is contained in:
commit
05ae254d3d
@ -40,10 +40,12 @@ func (o *Conversation) GetConversations(c *gin.Context) {
|
|||||||
a2r.Call(conversation.ConversationClient.GetConversations, o.client, c)
|
a2r.Call(conversation.ConversationClient.GetConversations, o.client, c)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// deprecated
|
||||||
func (o *Conversation) SetConversation(c *gin.Context) {
|
func (o *Conversation) SetConversation(c *gin.Context) {
|
||||||
a2r.Call(conversation.ConversationClient.SetConversation, o.client, c)
|
a2r.Call(conversation.ConversationClient.SetConversation, o.client, c)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// deprecated
|
||||||
func (o *Conversation) BatchSetConversations(c *gin.Context) {
|
func (o *Conversation) BatchSetConversations(c *gin.Context) {
|
||||||
a2r.Call(conversation.ConversationClient.BatchSetConversations, o.client, c)
|
a2r.Call(conversation.ConversationClient.BatchSetConversations, o.client, c)
|
||||||
}
|
}
|
||||||
|
@ -4,6 +4,7 @@ import (
|
|||||||
"context"
|
"context"
|
||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"github.com/OpenIMSDK/Open-IM-Server/pkg/apiresp"
|
||||||
"github.com/OpenIMSDK/Open-IM-Server/pkg/common/constant"
|
"github.com/OpenIMSDK/Open-IM-Server/pkg/common/constant"
|
||||||
"github.com/OpenIMSDK/Open-IM-Server/pkg/common/log"
|
"github.com/OpenIMSDK/Open-IM-Server/pkg/common/log"
|
||||||
"github.com/OpenIMSDK/Open-IM-Server/pkg/common/mcontext"
|
"github.com/OpenIMSDK/Open-IM-Server/pkg/common/mcontext"
|
||||||
@ -14,6 +15,10 @@ import (
|
|||||||
"sync"
|
"sync"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
var ErrConnClosed = errors.New("conn has closed")
|
||||||
|
var ErrNotSupportMessageProtocol = errors.New("not support message protocol")
|
||||||
|
var ErrClientClosed = errors.New("client actively close the connection")
|
||||||
|
|
||||||
const (
|
const (
|
||||||
// MessageText is for UTF-8 encoded text messages like JSON.
|
// MessageText is for UTF-8 encoded text messages like JSON.
|
||||||
MessageText = iota + 1
|
MessageText = iota + 1
|
||||||
@ -33,6 +38,8 @@ const (
|
|||||||
PongMessage = 10
|
PongMessage = 10
|
||||||
)
|
)
|
||||||
|
|
||||||
|
type PongHandler func(string) error
|
||||||
|
|
||||||
type Client struct {
|
type Client struct {
|
||||||
w *sync.Mutex
|
w *sync.Mutex
|
||||||
conn LongConn
|
conn LongConn
|
||||||
@ -41,9 +48,9 @@ type Client struct {
|
|||||||
userID string
|
userID string
|
||||||
isBackground bool
|
isBackground bool
|
||||||
ctx *UserConnContext
|
ctx *UserConnContext
|
||||||
onlineAt int64 // 上线时间戳(毫秒)
|
|
||||||
longConnServer LongConnServer
|
longConnServer LongConnServer
|
||||||
closed bool
|
closed bool
|
||||||
|
closedErr error
|
||||||
}
|
}
|
||||||
|
|
||||||
func newClient(ctx *UserConnContext, conn LongConn, isCompress bool) *Client {
|
func newClient(ctx *UserConnContext, conn LongConn, isCompress bool) *Client {
|
||||||
@ -54,7 +61,6 @@ func newClient(ctx *UserConnContext, conn LongConn, isCompress bool) *Client {
|
|||||||
isCompress: isCompress,
|
isCompress: isCompress,
|
||||||
userID: ctx.GetUserID(),
|
userID: ctx.GetUserID(),
|
||||||
ctx: ctx,
|
ctx: ctx,
|
||||||
onlineAt: utils.GetCurrentTimestampByMill(),
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
func (c *Client) ResetClient(ctx *UserConnContext, conn LongConn, isCompress bool, longConnServer LongConnServer) {
|
func (c *Client) ResetClient(ctx *UserConnContext, conn LongConn, isCompress bool, longConnServer LongConnServer) {
|
||||||
@ -64,8 +70,14 @@ func (c *Client) ResetClient(ctx *UserConnContext, conn LongConn, isCompress boo
|
|||||||
c.isCompress = isCompress
|
c.isCompress = isCompress
|
||||||
c.userID = ctx.GetUserID()
|
c.userID = ctx.GetUserID()
|
||||||
c.ctx = ctx
|
c.ctx = ctx
|
||||||
c.onlineAt = utils.GetCurrentTimestampByMill()
|
|
||||||
c.longConnServer = longConnServer
|
c.longConnServer = longConnServer
|
||||||
|
c.isBackground = false
|
||||||
|
c.closed = false
|
||||||
|
c.closedErr = nil
|
||||||
|
}
|
||||||
|
func (c *Client) pongHandler(_ string) error {
|
||||||
|
c.conn.SetReadDeadline(pongWait)
|
||||||
|
return nil
|
||||||
}
|
}
|
||||||
func (c *Client) readMessage() {
|
func (c *Client) readMessage() {
|
||||||
defer func() {
|
defer func() {
|
||||||
@ -74,31 +86,37 @@ func (c *Client) readMessage() {
|
|||||||
}
|
}
|
||||||
c.close()
|
c.close()
|
||||||
}()
|
}()
|
||||||
//var returnErr error
|
c.conn.SetReadLimit(maxMessageSize)
|
||||||
|
_ = c.conn.SetReadDeadline(pongWait)
|
||||||
|
c.conn.SetPongHandler(c.pongHandler)
|
||||||
for {
|
for {
|
||||||
messageType, message, returnErr := c.conn.ReadMessage()
|
messageType, message, returnErr := c.conn.ReadMessage()
|
||||||
if returnErr != nil {
|
if returnErr != nil {
|
||||||
break
|
c.closedErr = returnErr
|
||||||
|
return
|
||||||
}
|
}
|
||||||
|
log.ZDebug(c.ctx, "readMessage", "messageType", messageType, "message", string(message))
|
||||||
if c.closed == true { //连接刚置位已经关闭,但是协程还没退出的场景
|
if c.closed == true { //连接刚置位已经关闭,但是协程还没退出的场景
|
||||||
break
|
c.closedErr = ErrConnClosed
|
||||||
|
return
|
||||||
}
|
}
|
||||||
switch messageType {
|
switch messageType {
|
||||||
case PingMessage:
|
|
||||||
case PongMessage:
|
|
||||||
case CloseMessage:
|
|
||||||
return
|
|
||||||
case MessageText:
|
|
||||||
case MessageBinary:
|
case MessageBinary:
|
||||||
if len(message) == 0 {
|
parseDataErr := c.handleMessage(message)
|
||||||
continue
|
if parseDataErr != nil {
|
||||||
|
c.closedErr = parseDataErr
|
||||||
|
return
|
||||||
}
|
}
|
||||||
returnErr = c.handleMessage(message)
|
case MessageText:
|
||||||
if returnErr != nil {
|
c.closedErr = ErrNotSupportMessageProtocol
|
||||||
log.ZError(context.Background(), "WSGetNewestSeq", returnErr)
|
return
|
||||||
break
|
case PingMessage:
|
||||||
}
|
err := c.writePongMsg()
|
||||||
|
log.ZError(c.ctx, "writePongMsg", err)
|
||||||
|
case CloseMessage:
|
||||||
|
c.closedErr = ErrClientClosed
|
||||||
|
return
|
||||||
|
default:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -120,7 +138,7 @@ func (c *Client) handleMessage(message []byte) error {
|
|||||||
return utils.Wrap(err, "")
|
return utils.Wrap(err, "")
|
||||||
}
|
}
|
||||||
if binaryReq.SendID != c.userID {
|
if binaryReq.SendID != c.userID {
|
||||||
return errors.New("exception conn userID not same to req userID")
|
return utils.Wrap(errors.New("exception conn userID not same to req userID"), binaryReq.String())
|
||||||
}
|
}
|
||||||
ctx := mcontext.WithMustInfoCtx([]string{binaryReq.OperationID, binaryReq.SendID, constant.PlatformIDToName(c.platformID), c.ctx.GetConnID()})
|
ctx := mcontext.WithMustInfoCtx([]string{binaryReq.OperationID, binaryReq.SendID, constant.PlatformIDToName(c.platformID), c.ctx.GetConnID()})
|
||||||
var messageErr error
|
var messageErr error
|
||||||
@ -128,8 +146,6 @@ func (c *Client) handleMessage(message []byte) error {
|
|||||||
switch binaryReq.ReqIdentifier {
|
switch binaryReq.ReqIdentifier {
|
||||||
case WSGetNewestSeq:
|
case WSGetNewestSeq:
|
||||||
resp, messageErr = c.longConnServer.GetSeq(ctx, binaryReq)
|
resp, messageErr = c.longConnServer.GetSeq(ctx, binaryReq)
|
||||||
log.ZError(ctx, "WSGetNewestSeq", messageErr, "resp", resp)
|
|
||||||
|
|
||||||
case WSSendMsg:
|
case WSSendMsg:
|
||||||
resp, messageErr = c.longConnServer.SendMessage(ctx, binaryReq)
|
resp, messageErr = c.longConnServer.SendMessage(ctx, binaryReq)
|
||||||
case WSSendSignalMsg:
|
case WSSendSignalMsg:
|
||||||
@ -166,13 +182,16 @@ func (c *Client) close() {
|
|||||||
|
|
||||||
}
|
}
|
||||||
func (c *Client) replyMessage(binaryReq *Req, err error, resp []byte) {
|
func (c *Client) replyMessage(binaryReq *Req, err error, resp []byte) {
|
||||||
|
errResp := apiresp.ParseError(err)
|
||||||
mReply := Resp{
|
mReply := Resp{
|
||||||
ReqIdentifier: binaryReq.ReqIdentifier,
|
ReqIdentifier: binaryReq.ReqIdentifier,
|
||||||
MsgIncr: binaryReq.MsgIncr,
|
MsgIncr: binaryReq.MsgIncr,
|
||||||
OperationID: binaryReq.OperationID,
|
OperationID: binaryReq.OperationID,
|
||||||
|
ErrCode: errResp.ErrCode,
|
||||||
|
ErrMsg: errResp.ErrMsg,
|
||||||
Data: resp,
|
Data: resp,
|
||||||
}
|
}
|
||||||
_ = c.writeMsg(mReply)
|
_ = c.writeBinaryMsg(mReply)
|
||||||
}
|
}
|
||||||
func (c *Client) PushMessage(ctx context.Context, msgData *sdkws.MsgData) error {
|
func (c *Client) PushMessage(ctx context.Context, msgData *sdkws.MsgData) error {
|
||||||
data, err := proto.Marshal(msgData)
|
data, err := proto.Marshal(msgData)
|
||||||
@ -184,15 +203,14 @@ func (c *Client) PushMessage(ctx context.Context, msgData *sdkws.MsgData) error
|
|||||||
OperationID: mcontext.GetOperationID(ctx),
|
OperationID: mcontext.GetOperationID(ctx),
|
||||||
Data: data,
|
Data: data,
|
||||||
}
|
}
|
||||||
return c.writeMsg(resp)
|
return c.writeBinaryMsg(resp)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *Client) KickOnlineMessage(ctx context.Context) error {
|
func (c *Client) KickOnlineMessage(ctx context.Context) error {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *Client) writeMsg(resp Resp) error {
|
func (c *Client) writeBinaryMsg(resp Resp) error {
|
||||||
c.w.Lock()
|
c.w.Lock()
|
||||||
defer c.w.Unlock()
|
defer c.w.Unlock()
|
||||||
if c.closed == true {
|
if c.closed == true {
|
||||||
@ -204,7 +222,7 @@ func (c *Client) writeMsg(resp Resp) error {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return utils.Wrap(err, "")
|
return utils.Wrap(err, "")
|
||||||
}
|
}
|
||||||
_ = c.conn.SetWriteTimeout(60)
|
_ = c.conn.SetWriteDeadline(writeWait)
|
||||||
if c.isCompress {
|
if c.isCompress {
|
||||||
var compressErr error
|
var compressErr error
|
||||||
resultBuf, compressErr = c.longConnServer.Compress(encodeBuf)
|
resultBuf, compressErr = c.longConnServer.Compress(encodeBuf)
|
||||||
@ -216,3 +234,14 @@ func (c *Client) writeMsg(resp Resp) error {
|
|||||||
return c.conn.WriteMessage(MessageBinary, encodedBuf)
|
return c.conn.WriteMessage(MessageBinary, encodedBuf)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (c *Client) writePongMsg() error {
|
||||||
|
c.w.Lock()
|
||||||
|
defer c.w.Unlock()
|
||||||
|
if c.closed == true {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
_ = c.conn.SetWriteDeadline(writeWait)
|
||||||
|
return c.conn.WriteMessage(PongMessage, nil)
|
||||||
|
|
||||||
|
}
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
package msggateway
|
package msggateway
|
||||||
|
|
||||||
|
import "time"
|
||||||
|
|
||||||
const (
|
const (
|
||||||
WsUserID = "sendID"
|
WsUserID = "sendID"
|
||||||
CommonUserID = "userID"
|
CommonUserID = "userID"
|
||||||
@ -25,3 +27,14 @@ const (
|
|||||||
WsSetBackgroundStatus = 2004
|
WsSetBackgroundStatus = 2004
|
||||||
WSDataError = 3001
|
WSDataError = 3001
|
||||||
)
|
)
|
||||||
|
|
||||||
|
const (
|
||||||
|
// Time allowed to write a message to the peer.
|
||||||
|
writeWait = 10 * time.Second
|
||||||
|
|
||||||
|
// Time allowed to read the next pong message from the peer.
|
||||||
|
pongWait = 30 * time.Second
|
||||||
|
|
||||||
|
// Maximum message size allowed from peer.
|
||||||
|
maxMessageSize = 51200
|
||||||
|
)
|
||||||
|
@ -13,31 +13,33 @@ type LongConn interface {
|
|||||||
WriteMessage(messageType int, message []byte) error
|
WriteMessage(messageType int, message []byte) error
|
||||||
//Read message from connection.
|
//Read message from connection.
|
||||||
ReadMessage() (int, []byte, error)
|
ReadMessage() (int, []byte, error)
|
||||||
//SetReadTimeout sets the read deadline on the underlying network connection,
|
// SetReadDeadline sets the read deadline on the underlying network connection,
|
||||||
//after a read has timed out, will return an error.
|
//after a read has timed out, will return an error.
|
||||||
SetReadTimeout(timeout int) error
|
SetReadDeadline(timeout time.Duration) error
|
||||||
//SetWriteTimeout sets the write deadline when send message,when read has timed out,will return error.
|
// SetWriteDeadline sets the write deadline when send message,when read has timed out,will return error.
|
||||||
SetWriteTimeout(timeout int) error
|
SetWriteDeadline(timeout time.Duration) error
|
||||||
//Try to dial a connection,url must set auth args,header can control compress data
|
//Try to dial a connection,url must set auth args,header can control compress data
|
||||||
Dial(urlStr string, requestHeader http.Header) (*http.Response, error)
|
Dial(urlStr string, requestHeader http.Header) (*http.Response, error)
|
||||||
//Whether the connection of the current long connection is nil
|
//Whether the connection of the current long connection is nil
|
||||||
IsNil() bool
|
IsNil() bool
|
||||||
//Set the connection of the current long connection to nil
|
//Set the connection of the current long connection to nil
|
||||||
SetConnNil()
|
SetConnNil()
|
||||||
|
// SetReadLimit sets the maximum size for a message read from the peer.bytes
|
||||||
|
SetReadLimit(limit int64)
|
||||||
|
SetPongHandler(handler PongHandler)
|
||||||
//Check the connection of the current and when it was sent are the same
|
//Check the connection of the current and when it was sent are the same
|
||||||
//CheckSendConnDiffNow() bool
|
//CheckSendConnDiffNow() bool
|
||||||
//
|
//
|
||||||
GenerateLongConn(w http.ResponseWriter, r *http.Request) error
|
GenerateLongConn(w http.ResponseWriter, r *http.Request) error
|
||||||
}
|
}
|
||||||
type GWebSocket struct {
|
type GWebSocket struct {
|
||||||
protocolType int
|
protocolType int
|
||||||
conn *websocket.Conn
|
conn *websocket.Conn
|
||||||
handshakeTimeout time.Duration
|
handshakeTimeout time.Duration
|
||||||
readBufferSize, WriteBufferSize int
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func newGWebSocket(protocolType int, handshakeTimeout time.Duration, readBufferSize int) *GWebSocket {
|
func newGWebSocket(protocolType int, handshakeTimeout time.Duration) *GWebSocket {
|
||||||
return &GWebSocket{protocolType: protocolType, handshakeTimeout: handshakeTimeout, readBufferSize: readBufferSize}
|
return &GWebSocket{protocolType: protocolType, handshakeTimeout: handshakeTimeout}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (d *GWebSocket) Close() error {
|
func (d *GWebSocket) Close() error {
|
||||||
@ -46,7 +48,6 @@ func (d *GWebSocket) Close() error {
|
|||||||
func (d *GWebSocket) GenerateLongConn(w http.ResponseWriter, r *http.Request) error {
|
func (d *GWebSocket) GenerateLongConn(w http.ResponseWriter, r *http.Request) error {
|
||||||
upgrader := &websocket.Upgrader{
|
upgrader := &websocket.Upgrader{
|
||||||
HandshakeTimeout: d.handshakeTimeout,
|
HandshakeTimeout: d.handshakeTimeout,
|
||||||
ReadBufferSize: d.readBufferSize,
|
|
||||||
CheckOrigin: func(r *http.Request) bool { return true },
|
CheckOrigin: func(r *http.Request) bool { return true },
|
||||||
}
|
}
|
||||||
conn, err := upgrader.Upgrade(w, r, nil)
|
conn, err := upgrader.Upgrade(w, r, nil)
|
||||||
@ -69,12 +70,12 @@ func (d *GWebSocket) WriteMessage(messageType int, message []byte) error {
|
|||||||
func (d *GWebSocket) ReadMessage() (int, []byte, error) {
|
func (d *GWebSocket) ReadMessage() (int, []byte, error) {
|
||||||
return d.conn.ReadMessage()
|
return d.conn.ReadMessage()
|
||||||
}
|
}
|
||||||
func (d *GWebSocket) SetReadTimeout(timeout int) error {
|
func (d *GWebSocket) SetReadDeadline(timeout time.Duration) error {
|
||||||
return d.conn.SetReadDeadline(time.Now().Add(time.Duration(timeout) * time.Second))
|
return d.conn.SetReadDeadline(time.Now().Add(timeout))
|
||||||
}
|
}
|
||||||
|
|
||||||
func (d *GWebSocket) SetWriteTimeout(timeout int) error {
|
func (d *GWebSocket) SetWriteDeadline(timeout time.Duration) error {
|
||||||
return d.conn.SetWriteDeadline(time.Now().Add(time.Duration(timeout) * time.Second))
|
return d.conn.SetWriteDeadline(time.Now().Add(timeout))
|
||||||
}
|
}
|
||||||
|
|
||||||
func (d *GWebSocket) Dial(urlStr string, requestHeader http.Header) (*http.Response, error) {
|
func (d *GWebSocket) Dial(urlStr string, requestHeader http.Header) (*http.Response, error) {
|
||||||
@ -96,6 +97,12 @@ func (d *GWebSocket) IsNil() bool {
|
|||||||
func (d *GWebSocket) SetConnNil() {
|
func (d *GWebSocket) SetConnNil() {
|
||||||
d.conn = nil
|
d.conn = nil
|
||||||
}
|
}
|
||||||
|
func (d *GWebSocket) SetReadLimit(limit int64) {
|
||||||
|
d.conn.SetReadLimit(limit)
|
||||||
|
}
|
||||||
|
func (d *GWebSocket) SetPongHandler(handler PongHandler) {
|
||||||
|
d.conn.SetPongHandler(handler)
|
||||||
|
}
|
||||||
|
|
||||||
//func (d *GWebSocket) CheckSendConnDiffNow() bool {
|
//func (d *GWebSocket) CheckSendConnDiffNow() bool {
|
||||||
// return d.conn == d.sendConn
|
// return d.conn == d.sendConn
|
||||||
|
@ -2,10 +2,10 @@ package msggateway
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"github.com/OpenIMSDK/Open-IM-Server/pkg/common/log"
|
|
||||||
"github.com/OpenIMSDK/Open-IM-Server/pkg/proto/msg"
|
"github.com/OpenIMSDK/Open-IM-Server/pkg/proto/msg"
|
||||||
"github.com/OpenIMSDK/Open-IM-Server/pkg/proto/sdkws"
|
"github.com/OpenIMSDK/Open-IM-Server/pkg/proto/sdkws"
|
||||||
"github.com/OpenIMSDK/Open-IM-Server/pkg/rpcclient/notification"
|
"github.com/OpenIMSDK/Open-IM-Server/pkg/rpcclient/notification"
|
||||||
|
"github.com/OpenIMSDK/Open-IM-Server/pkg/utils"
|
||||||
"github.com/go-playground/validator/v10"
|
"github.com/go-playground/validator/v10"
|
||||||
"github.com/golang/protobuf/proto"
|
"github.com/golang/protobuf/proto"
|
||||||
)
|
)
|
||||||
@ -18,11 +18,16 @@ type Req struct {
|
|||||||
MsgIncr string `json:"msgIncr" validate:"required"`
|
MsgIncr string `json:"msgIncr" validate:"required"`
|
||||||
Data []byte `json:"data"`
|
Data []byte `json:"data"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (r *Req) String() string {
|
||||||
|
return utils.StructToJsonString(r)
|
||||||
|
}
|
||||||
|
|
||||||
type Resp struct {
|
type Resp struct {
|
||||||
ReqIdentifier int32 `json:"reqIdentifier"`
|
ReqIdentifier int32 `json:"reqIdentifier"`
|
||||||
MsgIncr string `json:"msgIncr"`
|
MsgIncr string `json:"msgIncr"`
|
||||||
OperationID string `json:"operationID"`
|
OperationID string `json:"operationID"`
|
||||||
ErrCode int32 `json:"errCode"`
|
ErrCode int `json:"errCode"`
|
||||||
ErrMsg string `json:"errMsg"`
|
ErrMsg string `json:"errMsg"`
|
||||||
Data []byte `json:"data"`
|
Data []byte `json:"data"`
|
||||||
}
|
}
|
||||||
@ -54,7 +59,6 @@ func (g GrpcHandler) GetSeq(context context.Context, data Req) ([]byte, error) {
|
|||||||
if err := g.validate.Struct(req); err != nil {
|
if err := g.validate.Struct(req); err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
log.ZDebug(context, "msggateway GetSeq", "notification", g.notification, "msg", g.notification.Msg)
|
|
||||||
resp, err := g.notification.Msg.GetMaxAndMinSeq(context, &req)
|
resp, err := g.notification.Msg.GetMaxAndMinSeq(context, &req)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
@ -148,3 +152,23 @@ func (g GrpcHandler) SetUserDeviceBackground(_ context.Context, data Req) ([]byt
|
|||||||
}
|
}
|
||||||
return nil, req.IsBackground, nil
|
return nil, req.IsBackground, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//func (g GrpcHandler) call[T any](ctx context.Context, data Req, m proto.Message, rpc func(ctx context.Context, req proto.Message)) ([]byte, error) {
|
||||||
|
// if err := proto.Unmarshal(data.Data, m); err != nil {
|
||||||
|
// return nil, err
|
||||||
|
// }
|
||||||
|
// if err := g.validate.Struct(m); err != nil {
|
||||||
|
// return nil, err
|
||||||
|
// }
|
||||||
|
// rpc(ctx, m)
|
||||||
|
// req := msg.SendMsgReq{MsgData: &msgData}
|
||||||
|
// resp, err := g.notification.Msg.SendMsg(context, &req)
|
||||||
|
// if err != nil {
|
||||||
|
// return nil, err
|
||||||
|
// }
|
||||||
|
// c, err := proto.Marshal(resp)
|
||||||
|
// if err != nil {
|
||||||
|
// return nil, err
|
||||||
|
// }
|
||||||
|
// return c, nil
|
||||||
|
//}
|
||||||
|
@ -34,18 +34,17 @@ var bufferPool = sync.Pool{
|
|||||||
}
|
}
|
||||||
|
|
||||||
type WsServer struct {
|
type WsServer struct {
|
||||||
port int
|
port int
|
||||||
wsMaxConnNum int64
|
wsMaxConnNum int64
|
||||||
registerChan chan *Client
|
registerChan chan *Client
|
||||||
unregisterChan chan *Client
|
unregisterChan chan *Client
|
||||||
clients *UserMap
|
clients *UserMap
|
||||||
clientPool sync.Pool
|
clientPool sync.Pool
|
||||||
onlineUserNum int64
|
onlineUserNum int64
|
||||||
onlineUserConnNum int64
|
onlineUserConnNum int64
|
||||||
handshakeTimeout time.Duration
|
handshakeTimeout time.Duration
|
||||||
readBufferSize, WriteBufferSize int
|
hubServer *Server
|
||||||
hubServer *Server
|
validate *validator.Validate
|
||||||
validate *validator.Validate
|
|
||||||
Compressor
|
Compressor
|
||||||
Encoder
|
Encoder
|
||||||
MessageHandler
|
MessageHandler
|
||||||
@ -85,7 +84,6 @@ func NewWsServer(opts ...Option) (*WsServer, error) {
|
|||||||
port: config.port,
|
port: config.port,
|
||||||
wsMaxConnNum: config.maxConnNum,
|
wsMaxConnNum: config.maxConnNum,
|
||||||
handshakeTimeout: config.handshakeTimeout,
|
handshakeTimeout: config.handshakeTimeout,
|
||||||
readBufferSize: config.messageMaxMsgLength,
|
|
||||||
clientPool: sync.Pool{
|
clientPool: sync.Pool{
|
||||||
New: func() interface{} {
|
New: func() interface{} {
|
||||||
return new(Client)
|
return new(Client)
|
||||||
@ -149,7 +147,7 @@ func (ws *WsServer) unregisterClient(client *Client) {
|
|||||||
atomic.AddInt64(&ws.onlineUserNum, -1)
|
atomic.AddInt64(&ws.onlineUserNum, -1)
|
||||||
}
|
}
|
||||||
atomic.AddInt64(&ws.onlineUserConnNum, -1)
|
atomic.AddInt64(&ws.onlineUserConnNum, -1)
|
||||||
log.ZInfo(client.ctx, "user offline", "online user Num", ws.onlineUserNum, "online user conn Num", ws.onlineUserConnNum)
|
log.ZInfo(client.ctx, "user offline", "close reason", client.closedErr, "online user Num", ws.onlineUserNum, "online user conn Num", ws.onlineUserConnNum)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (ws *WsServer) wsHandler(w http.ResponseWriter, r *http.Request) {
|
func (ws *WsServer) wsHandler(w http.ResponseWriter, r *http.Request) {
|
||||||
@ -186,7 +184,7 @@ func (ws *WsServer) wsHandler(w http.ResponseWriter, r *http.Request) {
|
|||||||
httpError(context, err)
|
httpError(context, err)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
wsLongConn := newGWebSocket(WebSocket, ws.handshakeTimeout, ws.readBufferSize)
|
wsLongConn := newGWebSocket(WebSocket, ws.handshakeTimeout)
|
||||||
err = wsLongConn.GenerateLongConn(w, r)
|
err = wsLongConn.GenerateLongConn(w, r)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
httpError(context, err)
|
httpError(context, err)
|
||||||
|
@ -154,7 +154,7 @@ func (s *userServer) GetPaginationUsers(ctx context.Context, req *pbuser.GetPagi
|
|||||||
}
|
}
|
||||||
resp.Total = int32(total)
|
resp.Total = int32(total)
|
||||||
resp.Users, err = (*convert.DBUser)(nil).DB2PB(usersDB)
|
resp.Users, err = (*convert.DBUser)(nil).DB2PB(usersDB)
|
||||||
return resp, nil
|
return resp, err
|
||||||
}
|
}
|
||||||
|
|
||||||
// ok
|
// ok
|
||||||
@ -187,11 +187,6 @@ func (s *userServer) UserRegister(ctx context.Context, req *pbuser.UserRegisterR
|
|||||||
UserID: user.UserID,
|
UserID: user.UserID,
|
||||||
Nickname: user.Nickname,
|
Nickname: user.Nickname,
|
||||||
FaceURL: user.FaceURL,
|
FaceURL: user.FaceURL,
|
||||||
Gender: user.Gender,
|
|
||||||
AreaCode: user.AreaCode,
|
|
||||||
PhoneNumber: user.PhoneNumber,
|
|
||||||
Birth: time.UnixMilli(user.Birth),
|
|
||||||
Email: user.Email,
|
|
||||||
Ex: user.Ex,
|
Ex: user.Ex,
|
||||||
CreateTime: now,
|
CreateTime: now,
|
||||||
AppMangerLevel: user.AppMangerLevel,
|
AppMangerLevel: user.AppMangerLevel,
|
||||||
|
@ -5,7 +5,7 @@ import (
|
|||||||
"reflect"
|
"reflect"
|
||||||
)
|
)
|
||||||
|
|
||||||
type ApiCodeResponse struct {
|
type ApiResponse struct {
|
||||||
ErrCode int `json:"errCode"`
|
ErrCode int `json:"errCode"`
|
||||||
ErrMsg string `json:"errMsg"`
|
ErrMsg string `json:"errMsg"`
|
||||||
ErrDlt string `json:"errDlt"`
|
ErrDlt string `json:"errDlt"`
|
||||||
@ -30,26 +30,23 @@ func isAllFieldsPrivate(v any) bool {
|
|||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
func ApiSuccess(data any) *ApiCodeResponse {
|
func apiSuccess(data any) *ApiResponse {
|
||||||
if isAllFieldsPrivate(data) {
|
if isAllFieldsPrivate(data) {
|
||||||
return &ApiCodeResponse{}
|
return &ApiResponse{}
|
||||||
}
|
}
|
||||||
return &ApiCodeResponse{
|
return &ApiResponse{
|
||||||
Data: data,
|
Data: data,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func ApiError(err error) *ApiCodeResponse {
|
func ParseError(err error) *ApiResponse {
|
||||||
if err == nil {
|
|
||||||
return ApiSuccess(nil)
|
|
||||||
}
|
|
||||||
unwrap := errs.Unwrap(err)
|
unwrap := errs.Unwrap(err)
|
||||||
if codeErr, ok := unwrap.(errs.CodeError); ok {
|
if codeErr, ok := unwrap.(errs.CodeError); ok {
|
||||||
resp := ApiCodeResponse{ErrCode: codeErr.Code(), ErrMsg: codeErr.Msg(), ErrDlt: codeErr.Detail()}
|
resp := ApiResponse{ErrCode: codeErr.Code(), ErrMsg: codeErr.Msg(), ErrDlt: codeErr.Detail()}
|
||||||
if resp.ErrDlt == "" {
|
if resp.ErrDlt == "" {
|
||||||
resp.ErrDlt = err.Error()
|
resp.ErrDlt = err.Error()
|
||||||
}
|
}
|
||||||
return &resp
|
return &resp
|
||||||
}
|
}
|
||||||
return &ApiCodeResponse{ErrCode: errs.ServerInternalError, ErrMsg: err.Error()}
|
return &ApiResponse{ErrCode: errs.ServerInternalError, ErrMsg: err.Error()}
|
||||||
}
|
}
|
||||||
|
@ -168,11 +168,6 @@ const (
|
|||||||
MinioDurationTimes = 3600
|
MinioDurationTimes = 3600
|
||||||
//Aws
|
//Aws
|
||||||
AwsDurationTimes = 3600
|
AwsDurationTimes = 3600
|
||||||
// verificationCode used for
|
|
||||||
VerificationCodeForRegister = 1
|
|
||||||
VerificationCodeForReset = 2
|
|
||||||
VerificationCodeForRegisterSuffix = "_forRegister"
|
|
||||||
VerificationCodeForResetSuffix = "_forReset"
|
|
||||||
|
|
||||||
//callbackCommand
|
//callbackCommand
|
||||||
CallbackBeforeSendSingleMsgCommand = "callbackBeforeSendSingleMsgCommand"
|
CallbackBeforeSendSingleMsgCommand = "callbackBeforeSendSingleMsgCommand"
|
||||||
|
10
pkg/common/db/cache/conversation.go
vendored
10
pkg/common/db/cache/conversation.go
vendored
@ -44,8 +44,10 @@ type ConversationCache interface {
|
|||||||
DelUserRecvMsgOpt(ownerUserID, conversationID string) ConversationCache
|
DelUserRecvMsgOpt(ownerUserID, conversationID string) ConversationCache
|
||||||
// get one super group recv msg but do not notification userID list
|
// get one super group recv msg but do not notification userID list
|
||||||
GetSuperGroupRecvMsgNotNotifyUserIDs(ctx context.Context, groupID string) (userIDs []string, err error)
|
GetSuperGroupRecvMsgNotNotifyUserIDs(ctx context.Context, groupID string) (userIDs []string, err error)
|
||||||
|
DelSuperGroupRecvMsgNotNotifyUserIDs(groupID string) ConversationCache
|
||||||
// get one super group recv msg but do not notification userID list hash
|
// get one super group recv msg but do not notification userID list hash
|
||||||
GetSuperGroupRecvMsgNotNotifyUserIDsHash(ctx context.Context, groupID string) (hash uint64, err error)
|
GetSuperGroupRecvMsgNotNotifyUserIDsHash(ctx context.Context, groupID string) (hash uint64, err error)
|
||||||
|
DelSuperGroupRecvMsgNotNotifyUserIDsHash(groupID string) ConversationCache
|
||||||
}
|
}
|
||||||
|
|
||||||
func NewConversationRedis(rdb redis.UniversalClient, opts rockscache.Options, db relationTb.ConversationModelInterface) ConversationCache {
|
func NewConversationRedis(rdb redis.UniversalClient, opts rockscache.Options, db relationTb.ConversationModelInterface) ConversationCache {
|
||||||
@ -193,7 +195,7 @@ func (c *ConversationRedisCache) DelUserRecvMsgOpt(ownerUserID, conversationID s
|
|||||||
return cache
|
return cache
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *ConversationRedisCache) DelSuperGroupRecvMsgNotNotifyUserIDs(ctx context.Context, groupID string) ConversationCache {
|
func (c *ConversationRedisCache) DelSuperGroupRecvMsgNotNotifyUserIDs(groupID string) ConversationCache {
|
||||||
cache := c.NewCache()
|
cache := c.NewCache()
|
||||||
cache.AddKeys(c.getSuperGroupRecvNotNotifyUserIDsKey(groupID))
|
cache.AddKeys(c.getSuperGroupRecvNotNotifyUserIDsKey(groupID))
|
||||||
return cache
|
return cache
|
||||||
@ -212,6 +214,8 @@ func (c *ConversationRedisCache) GetSuperGroupRecvMsgNotNotifyUserIDsHash(ctx co
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *ConversationRedisCache) DelSuperGroupRecvMsgNotNotifyUserIDsHash(ctx context.Context, groupID string) {
|
func (c *ConversationRedisCache) DelSuperGroupRecvMsgNotNotifyUserIDsHash(groupID string) ConversationCache {
|
||||||
panic("implement me")
|
cache := c.NewCache()
|
||||||
|
cache.AddKeys(c.getSuperGroupRecvNotNotifyUserIDsHashKey(groupID))
|
||||||
|
return cache
|
||||||
}
|
}
|
||||||
|
16
pkg/common/db/cache/rockscache.go
vendored
16
pkg/common/db/cache/rockscache.go
vendored
@ -17,7 +17,7 @@ var errIndex = errors.New("err index")
|
|||||||
type metaCache interface {
|
type metaCache interface {
|
||||||
ExecDel(ctx context.Context) error
|
ExecDel(ctx context.Context) error
|
||||||
// delete key rapid
|
// delete key rapid
|
||||||
DeleteKey(ctx context.Context, key string) error
|
DelKey(ctx context.Context, key string) error
|
||||||
AddKeys(keys ...string)
|
AddKeys(keys ...string)
|
||||||
GetPreDeleteKeys() []string
|
GetPreDeleteKeys() []string
|
||||||
}
|
}
|
||||||
@ -38,7 +38,7 @@ func (m *metaCacheRedis) ExecDel(ctx context.Context) error {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *metaCacheRedis) DeleteKey(ctx context.Context, key string) error {
|
func (m *metaCacheRedis) DelKey(ctx context.Context, key string) error {
|
||||||
return m.rcClient.TagAsDeleted2(ctx, key)
|
return m.rcClient.TagAsDeleted2(ctx, key)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -110,12 +110,14 @@ func batchGetCache[T any](ctx context.Context, rcClient *rockscache.Client, keys
|
|||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
for _, v := range batchMap {
|
for _, v := range batchMap {
|
||||||
var t T
|
if v != "" {
|
||||||
err = json.Unmarshal([]byte(v), &t)
|
var t T
|
||||||
if err != nil {
|
err = json.Unmarshal([]byte(v), &t)
|
||||||
return nil, utils.Wrap(err, "unmarshal failed")
|
if err != nil {
|
||||||
|
return nil, utils.Wrap(err, "unmarshal failed")
|
||||||
|
}
|
||||||
|
tArrays = append(tArrays, t)
|
||||||
}
|
}
|
||||||
tArrays = append(tArrays, t)
|
|
||||||
}
|
}
|
||||||
return tArrays, nil
|
return tArrays, nil
|
||||||
}
|
}
|
||||||
|
@ -7,6 +7,7 @@ import (
|
|||||||
"github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/cache"
|
"github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/cache"
|
||||||
relationTb "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/table/relation"
|
relationTb "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/table/relation"
|
||||||
"github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/tx"
|
"github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/tx"
|
||||||
|
"github.com/OpenIMSDK/Open-IM-Server/pkg/common/log"
|
||||||
"github.com/OpenIMSDK/Open-IM-Server/pkg/utils"
|
"github.com/OpenIMSDK/Open-IM-Server/pkg/utils"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -57,6 +58,7 @@ func (c *ConversationDataBase) SetUsersConversationFiledTx(ctx context.Context,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
NotUserIDs := utils.DifferenceString(haveUserIDs, userIDs)
|
NotUserIDs := utils.DifferenceString(haveUserIDs, userIDs)
|
||||||
|
log.ZDebug(ctx, "SetUsersConversationFiledTx", "NotUserIDs", NotUserIDs, "haveUserIDs", haveUserIDs, "userIDs", userIDs)
|
||||||
var cList []*relationTb.ConversationModel
|
var cList []*relationTb.ConversationModel
|
||||||
for _, v := range NotUserIDs {
|
for _, v := range NotUserIDs {
|
||||||
temp := new(relationTb.ConversationModel)
|
temp := new(relationTb.ConversationModel)
|
||||||
|
@ -3,11 +3,12 @@ package log
|
|||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"time"
|
||||||
|
|
||||||
"github.com/pkg/errors"
|
"github.com/pkg/errors"
|
||||||
"gorm.io/gorm"
|
"gorm.io/gorm"
|
||||||
gormLogger "gorm.io/gorm/logger"
|
gormLogger "gorm.io/gorm/logger"
|
||||||
gormUtils "gorm.io/gorm/utils"
|
gormUtils "gorm.io/gorm/utils"
|
||||||
"time"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
type SqlLogger struct {
|
type SqlLogger struct {
|
||||||
@ -42,7 +43,7 @@ func (SqlLogger) Error(ctx context.Context, msg string, args ...interface{}) {
|
|||||||
ZError(ctx, msg, nil, args)
|
ZError(ctx, msg, nil, args)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (l SqlLogger) Trace(ctx context.Context, begin time.Time, fc func() (sql string, rowsAffected int64), err error) {
|
func (l *SqlLogger) Trace(ctx context.Context, begin time.Time, fc func() (sql string, rowsAffected int64), err error) {
|
||||||
if l.LogLevel <= gormLogger.Silent {
|
if l.LogLevel <= gormLogger.Silent {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
@ -297,8 +297,7 @@ type SetConversationReq struct {
|
|||||||
sizeCache protoimpl.SizeCache
|
sizeCache protoimpl.SizeCache
|
||||||
unknownFields protoimpl.UnknownFields
|
unknownFields protoimpl.UnknownFields
|
||||||
|
|
||||||
Conversation *Conversation `protobuf:"bytes,1,opt,name=conversation,proto3" json:"conversation"`
|
Conversation *Conversation `protobuf:"bytes,1,opt,name=conversation,proto3" json:"conversation"`
|
||||||
NotificationType int32 `protobuf:"varint,2,opt,name=notificationType,proto3" json:"notificationType"`
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *SetConversationReq) Reset() {
|
func (x *SetConversationReq) Reset() {
|
||||||
@ -340,13 +339,6 @@ func (x *SetConversationReq) GetConversation() *Conversation {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *SetConversationReq) GetNotificationType() int32 {
|
|
||||||
if x != nil {
|
|
||||||
return x.NotificationType
|
|
||||||
}
|
|
||||||
return 0
|
|
||||||
}
|
|
||||||
|
|
||||||
type SetConversationResp struct {
|
type SetConversationResp struct {
|
||||||
state protoimpl.MessageState
|
state protoimpl.MessageState
|
||||||
sizeCache protoimpl.SizeCache
|
sizeCache protoimpl.SizeCache
|
||||||
@ -390,10 +382,9 @@ type SetRecvMsgOptReq struct {
|
|||||||
sizeCache protoimpl.SizeCache
|
sizeCache protoimpl.SizeCache
|
||||||
unknownFields protoimpl.UnknownFields
|
unknownFields protoimpl.UnknownFields
|
||||||
|
|
||||||
OwnerUserID string `protobuf:"bytes,1,opt,name=ownerUserID,proto3" json:"ownerUserID"`
|
OwnerUserID string `protobuf:"bytes,1,opt,name=ownerUserID,proto3" json:"ownerUserID"`
|
||||||
ConversationID string `protobuf:"bytes,2,opt,name=conversationID,proto3" json:"conversationID"`
|
ConversationID string `protobuf:"bytes,2,opt,name=conversationID,proto3" json:"conversationID"`
|
||||||
RecvMsgOpt int32 `protobuf:"varint,3,opt,name=recvMsgOpt,proto3" json:"recvMsgOpt"`
|
RecvMsgOpt int32 `protobuf:"varint,3,opt,name=recvMsgOpt,proto3" json:"recvMsgOpt"`
|
||||||
NotificationType int32 `protobuf:"varint,4,opt,name=notificationType,proto3" json:"notificationType"`
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *SetRecvMsgOptReq) Reset() {
|
func (x *SetRecvMsgOptReq) Reset() {
|
||||||
@ -449,13 +440,6 @@ func (x *SetRecvMsgOptReq) GetRecvMsgOpt() int32 {
|
|||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *SetRecvMsgOptReq) GetNotificationType() int32 {
|
|
||||||
if x != nil {
|
|
||||||
return x.NotificationType
|
|
||||||
}
|
|
||||||
return 0
|
|
||||||
}
|
|
||||||
|
|
||||||
type SetRecvMsgOptResp struct {
|
type SetRecvMsgOptResp struct {
|
||||||
state protoimpl.MessageState
|
state protoimpl.MessageState
|
||||||
sizeCache protoimpl.SizeCache
|
sizeCache protoimpl.SizeCache
|
||||||
@ -797,9 +781,8 @@ type BatchSetConversationsReq struct {
|
|||||||
sizeCache protoimpl.SizeCache
|
sizeCache protoimpl.SizeCache
|
||||||
unknownFields protoimpl.UnknownFields
|
unknownFields protoimpl.UnknownFields
|
||||||
|
|
||||||
Conversations []*Conversation `protobuf:"bytes,1,rep,name=Conversations,proto3" json:"Conversations"`
|
Conversations []*Conversation `protobuf:"bytes,1,rep,name=Conversations,proto3" json:"Conversations"`
|
||||||
OwnerUserID string `protobuf:"bytes,2,opt,name=ownerUserID,proto3" json:"ownerUserID"`
|
OwnerUserID string `protobuf:"bytes,2,opt,name=ownerUserID,proto3" json:"ownerUserID"`
|
||||||
NotificationType int32 `protobuf:"varint,3,opt,name=notificationType,proto3" json:"notificationType"`
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *BatchSetConversationsReq) Reset() {
|
func (x *BatchSetConversationsReq) Reset() {
|
||||||
@ -848,13 +831,6 @@ func (x *BatchSetConversationsReq) GetOwnerUserID() string {
|
|||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *BatchSetConversationsReq) GetNotificationType() int32 {
|
|
||||||
if x != nil {
|
|
||||||
return x.NotificationType
|
|
||||||
}
|
|
||||||
return 0
|
|
||||||
}
|
|
||||||
|
|
||||||
type BatchSetConversationsResp struct {
|
type BatchSetConversationsResp struct {
|
||||||
state protoimpl.MessageState
|
state protoimpl.MessageState
|
||||||
sizeCache protoimpl.SizeCache
|
sizeCache protoimpl.SizeCache
|
||||||
@ -1058,157 +1034,148 @@ var file_conversation_conversation_proto_rawDesc = []byte{
|
|||||||
0x0a, 0x75, 0x73, 0x65, 0x72, 0x49, 0x44, 0x4c, 0x69, 0x73, 0x74, 0x18, 0x03, 0x20, 0x03, 0x28,
|
0x0a, 0x75, 0x73, 0x65, 0x72, 0x49, 0x44, 0x4c, 0x69, 0x73, 0x74, 0x18, 0x03, 0x20, 0x03, 0x28,
|
||||||
0x09, 0x52, 0x0a, 0x75, 0x73, 0x65, 0x72, 0x49, 0x44, 0x4c, 0x69, 0x73, 0x74, 0x22, 0x1d, 0x0a,
|
0x09, 0x52, 0x0a, 0x75, 0x73, 0x65, 0x72, 0x49, 0x44, 0x4c, 0x69, 0x73, 0x74, 0x22, 0x1d, 0x0a,
|
||||||
0x1b, 0x4d, 0x6f, 0x64, 0x69, 0x66, 0x79, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74,
|
0x1b, 0x4d, 0x6f, 0x64, 0x69, 0x66, 0x79, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74,
|
||||||
0x69, 0x6f, 0x6e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x52, 0x65, 0x73, 0x70, 0x22, 0x8d, 0x01, 0x0a,
|
0x69, 0x6f, 0x6e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x52, 0x65, 0x73, 0x70, 0x22, 0x61, 0x0a, 0x12,
|
||||||
0x12, 0x53, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e,
|
|
||||||
0x52, 0x65, 0x71, 0x12, 0x4b, 0x0a, 0x0c, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74,
|
|
||||||
0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x4f, 0x70, 0x65, 0x6e,
|
|
||||||
0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73,
|
|
||||||
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69,
|
|
||||||
0x6f, 0x6e, 0x52, 0x0c, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e,
|
|
||||||
0x12, 0x2a, 0x0a, 0x10, 0x6e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e,
|
|
||||||
0x54, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x10, 0x6e, 0x6f, 0x74, 0x69,
|
|
||||||
0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x22, 0x15, 0x0a, 0x13,
|
|
||||||
0x53, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52,
|
0x53, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52,
|
||||||
0x65, 0x73, 0x70, 0x22, 0xa8, 0x01, 0x0a, 0x10, 0x53, 0x65, 0x74, 0x52, 0x65, 0x63, 0x76, 0x4d,
|
0x65, 0x71, 0x12, 0x4b, 0x0a, 0x0c, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69,
|
||||||
0x73, 0x67, 0x4f, 0x70, 0x74, 0x52, 0x65, 0x71, 0x12, 0x20, 0x0a, 0x0b, 0x6f, 0x77, 0x6e, 0x65,
|
0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49,
|
||||||
0x72, 0x55, 0x73, 0x65, 0x72, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6f,
|
0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61,
|
||||||
0x77, 0x6e, 0x65, 0x72, 0x55, 0x73, 0x65, 0x72, 0x49, 0x44, 0x12, 0x26, 0x0a, 0x0e, 0x63, 0x6f,
|
0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f,
|
||||||
0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x18, 0x02, 0x20, 0x01,
|
0x6e, 0x52, 0x0c, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22,
|
||||||
0x28, 0x09, 0x52, 0x0e, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e,
|
0x15, 0x0a, 0x13, 0x53, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69,
|
||||||
0x49, 0x44, 0x12, 0x1e, 0x0a, 0x0a, 0x72, 0x65, 0x63, 0x76, 0x4d, 0x73, 0x67, 0x4f, 0x70, 0x74,
|
0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x22, 0x7c, 0x0a, 0x10, 0x53, 0x65, 0x74, 0x52, 0x65, 0x63,
|
||||||
0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x72, 0x65, 0x63, 0x76, 0x4d, 0x73, 0x67, 0x4f,
|
0x76, 0x4d, 0x73, 0x67, 0x4f, 0x70, 0x74, 0x52, 0x65, 0x71, 0x12, 0x20, 0x0a, 0x0b, 0x6f, 0x77,
|
||||||
0x70, 0x74, 0x12, 0x2a, 0x0a, 0x10, 0x6e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69,
|
0x6e, 0x65, 0x72, 0x55, 0x73, 0x65, 0x72, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
|
||||||
0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x10, 0x6e, 0x6f,
|
0x0b, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x55, 0x73, 0x65, 0x72, 0x49, 0x44, 0x12, 0x26, 0x0a, 0x0e,
|
||||||
0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x22, 0x13,
|
0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x18, 0x02,
|
||||||
0x0a, 0x11, 0x53, 0x65, 0x74, 0x52, 0x65, 0x63, 0x76, 0x4d, 0x73, 0x67, 0x4f, 0x70, 0x74, 0x52,
|
0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69,
|
||||||
0x65, 0x73, 0x70, 0x22, 0x5e, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72,
|
0x6f, 0x6e, 0x49, 0x44, 0x12, 0x1e, 0x0a, 0x0a, 0x72, 0x65, 0x63, 0x76, 0x4d, 0x73, 0x67, 0x4f,
|
||||||
0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x12, 0x26, 0x0a, 0x0e, 0x63, 0x6f, 0x6e,
|
0x70, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x72, 0x65, 0x63, 0x76, 0x4d, 0x73,
|
||||||
0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28,
|
0x67, 0x4f, 0x70, 0x74, 0x22, 0x13, 0x0a, 0x11, 0x53, 0x65, 0x74, 0x52, 0x65, 0x63, 0x76, 0x4d,
|
||||||
0x09, 0x52, 0x0e, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49,
|
0x73, 0x67, 0x4f, 0x70, 0x74, 0x52, 0x65, 0x73, 0x70, 0x22, 0x5e, 0x0a, 0x12, 0x47, 0x65, 0x74,
|
||||||
0x44, 0x12, 0x20, 0x0a, 0x0b, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x55, 0x73, 0x65, 0x72, 0x49, 0x44,
|
0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x12,
|
||||||
0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x55, 0x73, 0x65,
|
0x26, 0x0a, 0x0e, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49,
|
||||||
0x72, 0x49, 0x44, 0x22, 0x62, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72,
|
0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73,
|
||||||
0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x12, 0x4b, 0x0a, 0x0c, 0x63, 0x6f,
|
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x12, 0x20, 0x0a, 0x0b, 0x6f, 0x77, 0x6e, 0x65, 0x72,
|
||||||
0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b,
|
0x55, 0x73, 0x65, 0x72, 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6f, 0x77,
|
||||||
0x32, 0x27, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e,
|
0x6e, 0x65, 0x72, 0x55, 0x73, 0x65, 0x72, 0x49, 0x44, 0x22, 0x62, 0x0a, 0x13, 0x47, 0x65, 0x74,
|
||||||
0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x6f, 0x6e,
|
0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70,
|
||||||
0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x63, 0x6f, 0x6e, 0x76, 0x65,
|
0x12, 0x4b, 0x0a, 0x0c, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e,
|
||||||
0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x61, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x43, 0x6f,
|
0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53,
|
||||||
0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x12, 0x20,
|
0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69,
|
||||||
0x0a, 0x0b, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x55, 0x73, 0x65, 0x72, 0x49, 0x44, 0x18, 0x01, 0x20,
|
0x6f, 0x6e, 0x2e, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52,
|
||||||
0x01, 0x28, 0x09, 0x52, 0x0b, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x55, 0x73, 0x65, 0x72, 0x49, 0x44,
|
0x0c, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x61, 0x0a,
|
||||||
0x12, 0x28, 0x0a, 0x0f, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e,
|
0x13, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e,
|
||||||
0x49, 0x44, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0f, 0x63, 0x6f, 0x6e, 0x76, 0x65,
|
0x73, 0x52, 0x65, 0x71, 0x12, 0x20, 0x0a, 0x0b, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x55, 0x73, 0x65,
|
||||||
0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x73, 0x22, 0x65, 0x0a, 0x14, 0x47, 0x65,
|
0x72, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6f, 0x77, 0x6e, 0x65, 0x72,
|
||||||
0x74, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65,
|
0x55, 0x73, 0x65, 0x72, 0x49, 0x44, 0x12, 0x28, 0x0a, 0x0f, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72,
|
||||||
0x73, 0x70, 0x12, 0x4d, 0x0a, 0x0d, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69,
|
0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52,
|
||||||
0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x4f, 0x70, 0x65, 0x6e,
|
0x0f, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x73,
|
||||||
0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73,
|
0x22, 0x65, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74,
|
||||||
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69,
|
|
||||||
0x6f, 0x6e, 0x52, 0x0d, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e,
|
|
||||||
0x73, 0x22, 0x3a, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x41, 0x6c, 0x6c, 0x43, 0x6f, 0x6e, 0x76, 0x65,
|
|
||||||
0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x12, 0x20, 0x0a, 0x0b, 0x6f,
|
|
||||||
0x77, 0x6e, 0x65, 0x72, 0x55, 0x73, 0x65, 0x72, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
|
|
||||||
0x52, 0x0b, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x55, 0x73, 0x65, 0x72, 0x49, 0x44, 0x22, 0x68, 0x0a,
|
|
||||||
0x17, 0x47, 0x65, 0x74, 0x41, 0x6c, 0x6c, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74,
|
|
||||||
0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x12, 0x4d, 0x0a, 0x0d, 0x63, 0x6f, 0x6e, 0x76,
|
0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x12, 0x4d, 0x0a, 0x0d, 0x63, 0x6f, 0x6e, 0x76,
|
||||||
0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32,
|
0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32,
|
||||||
0x27, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x63,
|
0x27, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x63,
|
||||||
0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x6f, 0x6e, 0x76,
|
0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x6f, 0x6e, 0x76,
|
||||||
0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0d, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72,
|
0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0d, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72,
|
||||||
0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xb7, 0x01, 0x0a, 0x18, 0x42, 0x61, 0x74, 0x63,
|
0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x3a, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x41, 0x6c,
|
||||||
0x68, 0x53, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e,
|
0x6c, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65,
|
||||||
0x73, 0x52, 0x65, 0x71, 0x12, 0x4d, 0x0a, 0x0d, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61,
|
0x71, 0x12, 0x20, 0x0a, 0x0b, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x55, 0x73, 0x65, 0x72, 0x49, 0x44,
|
||||||
0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x4f, 0x70,
|
0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x55, 0x73, 0x65,
|
||||||
0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x63, 0x6f, 0x6e, 0x76, 0x65,
|
0x72, 0x49, 0x44, 0x22, 0x68, 0x0a, 0x17, 0x47, 0x65, 0x74, 0x41, 0x6c, 0x6c, 0x43, 0x6f, 0x6e,
|
||||||
0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61,
|
0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x12, 0x4d,
|
||||||
0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0d, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69,
|
0x0a, 0x0d, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18,
|
||||||
0x6f, 0x6e, 0x73, 0x12, 0x20, 0x0a, 0x0b, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x55, 0x73, 0x65, 0x72,
|
0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65,
|
||||||
0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x55,
|
|
||||||
0x73, 0x65, 0x72, 0x49, 0x44, 0x12, 0x2a, 0x0a, 0x10, 0x6e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63,
|
|
||||||
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52,
|
|
||||||
0x10, 0x6e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70,
|
|
||||||
0x65, 0x22, 0x4d, 0x0a, 0x19, 0x42, 0x61, 0x74, 0x63, 0x68, 0x53, 0x65, 0x74, 0x43, 0x6f, 0x6e,
|
|
||||||
0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x12, 0x18,
|
|
||||||
0x0a, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52,
|
|
||||||
0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x61, 0x69, 0x6c,
|
|
||||||
0x65, 0x64, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64,
|
|
||||||
0x22, 0x39, 0x0a, 0x1d, 0x47, 0x65, 0x74, 0x52, 0x65, 0x63, 0x76, 0x4d, 0x73, 0x67, 0x4e, 0x6f,
|
|
||||||
0x74, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x79, 0x55, 0x73, 0x65, 0x72, 0x49, 0x44, 0x73, 0x52, 0x65,
|
|
||||||
0x71, 0x12, 0x18, 0x0a, 0x07, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01,
|
|
||||||
0x28, 0x09, 0x52, 0x07, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x44, 0x22, 0x3a, 0x0a, 0x1e, 0x47,
|
|
||||||
0x65, 0x74, 0x52, 0x65, 0x63, 0x76, 0x4d, 0x73, 0x67, 0x4e, 0x6f, 0x74, 0x4e, 0x6f, 0x74, 0x69,
|
|
||||||
0x66, 0x79, 0x55, 0x73, 0x65, 0x72, 0x49, 0x44, 0x73, 0x52, 0x65, 0x73, 0x70, 0x12, 0x18, 0x0a,
|
|
||||||
0x07, 0x75, 0x73, 0x65, 0x72, 0x49, 0x44, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07,
|
|
||||||
0x75, 0x73, 0x65, 0x72, 0x49, 0x44, 0x73, 0x32, 0xf5, 0x07, 0x0a, 0x0c, 0x63, 0x6f, 0x6e, 0x76,
|
|
||||||
0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x88, 0x01, 0x0a, 0x17, 0x4d, 0x6f, 0x64,
|
|
||||||
0x69, 0x66, 0x79, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x46,
|
|
||||||
0x69, 0x65, 0x6c, 0x64, 0x12, 0x35, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72,
|
|
||||||
0x76, 0x65, 0x72, 0x2e, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e,
|
|
||||||
0x2e, 0x4d, 0x6f, 0x64, 0x69, 0x66, 0x79, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74,
|
|
||||||
0x69, 0x6f, 0x6e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x52, 0x65, 0x71, 0x1a, 0x36, 0x2e, 0x4f, 0x70,
|
|
||||||
0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x63, 0x6f, 0x6e, 0x76, 0x65,
|
|
||||||
0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x4d, 0x6f, 0x64, 0x69, 0x66, 0x79, 0x43, 0x6f,
|
|
||||||
0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x52,
|
|
||||||
0x65, 0x73, 0x70, 0x12, 0x70, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72,
|
|
||||||
0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2d, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53,
|
|
||||||
0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69,
|
|
||||||
0x6f, 0x6e, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69,
|
|
||||||
0x6f, 0x6e, 0x52, 0x65, 0x71, 0x1a, 0x2e, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65,
|
|
||||||
0x72, 0x76, 0x65, 0x72, 0x2e, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f,
|
0x72, 0x76, 0x65, 0x72, 0x2e, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f,
|
||||||
0x6e, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f,
|
0x6e, 0x2e, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0d,
|
||||||
0x6e, 0x52, 0x65, 0x73, 0x70, 0x12, 0x7c, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x41, 0x6c, 0x6c, 0x43,
|
0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x8b, 0x01,
|
||||||
0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x31, 0x2e, 0x4f,
|
0x0a, 0x18, 0x42, 0x61, 0x74, 0x63, 0x68, 0x53, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72,
|
||||||
0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x63, 0x6f, 0x6e, 0x76,
|
0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x12, 0x4d, 0x0a, 0x0d, 0x43, 0x6f,
|
||||||
0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x6c, 0x6c, 0x43,
|
0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28,
|
||||||
0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x1a,
|
0x0b, 0x32, 0x27, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72,
|
||||||
0x32, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x63,
|
0x2e, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x6f,
|
||||||
0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x47, 0x65, 0x74, 0x41,
|
0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0d, 0x43, 0x6f, 0x6e, 0x76,
|
||||||
0x6c, 0x6c, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52,
|
0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x20, 0x0a, 0x0b, 0x6f, 0x77, 0x6e,
|
||||||
0x65, 0x73, 0x70, 0x12, 0x73, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72,
|
0x65, 0x72, 0x55, 0x73, 0x65, 0x72, 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b,
|
||||||
0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x2e, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d,
|
0x6f, 0x77, 0x6e, 0x65, 0x72, 0x55, 0x73, 0x65, 0x72, 0x49, 0x44, 0x22, 0x4d, 0x0a, 0x19, 0x42,
|
||||||
0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74,
|
|
||||||
0x69, 0x6f, 0x6e, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74,
|
|
||||||
0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x1a, 0x2f, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d,
|
|
||||||
0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74,
|
|
||||||
0x69, 0x6f, 0x6e, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74,
|
|
||||||
0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x12, 0x82, 0x01, 0x0a, 0x15, 0x42, 0x61, 0x74,
|
|
||||||
0x63, 0x68, 0x53, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f,
|
|
||||||
0x6e, 0x73, 0x12, 0x33, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65,
|
|
||||||
0x72, 0x2e, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x42,
|
|
||||||
0x61, 0x74, 0x63, 0x68, 0x53, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74,
|
0x61, 0x74, 0x63, 0x68, 0x53, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74,
|
||||||
0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x1a, 0x34, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d,
|
0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x63, 0x63,
|
||||||
0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74,
|
0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65,
|
||||||
0x69, 0x6f, 0x6e, 0x2e, 0x42, 0x61, 0x74, 0x63, 0x68, 0x53, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x76,
|
0x73, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x18, 0x02, 0x20, 0x03,
|
||||||
0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x12, 0x70, 0x0a,
|
0x28, 0x09, 0x52, 0x06, 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x22, 0x39, 0x0a, 0x1d, 0x47, 0x65,
|
||||||
0x0f, 0x53, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e,
|
0x74, 0x52, 0x65, 0x63, 0x76, 0x4d, 0x73, 0x67, 0x4e, 0x6f, 0x74, 0x4e, 0x6f, 0x74, 0x69, 0x66,
|
||||||
|
0x79, 0x55, 0x73, 0x65, 0x72, 0x49, 0x44, 0x73, 0x52, 0x65, 0x71, 0x12, 0x18, 0x0a, 0x07, 0x67,
|
||||||
|
0x72, 0x6f, 0x75, 0x70, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x67, 0x72,
|
||||||
|
0x6f, 0x75, 0x70, 0x49, 0x44, 0x22, 0x3a, 0x0a, 0x1e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x63, 0x76,
|
||||||
|
0x4d, 0x73, 0x67, 0x4e, 0x6f, 0x74, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x79, 0x55, 0x73, 0x65, 0x72,
|
||||||
|
0x49, 0x44, 0x73, 0x52, 0x65, 0x73, 0x70, 0x12, 0x18, 0x0a, 0x07, 0x75, 0x73, 0x65, 0x72, 0x49,
|
||||||
|
0x44, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x75, 0x73, 0x65, 0x72, 0x49, 0x44,
|
||||||
|
0x73, 0x32, 0xf5, 0x07, 0x0a, 0x0c, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69,
|
||||||
|
0x6f, 0x6e, 0x12, 0x88, 0x01, 0x0a, 0x17, 0x4d, 0x6f, 0x64, 0x69, 0x66, 0x79, 0x43, 0x6f, 0x6e,
|
||||||
|
0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x35,
|
||||||
|
0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x63, 0x6f,
|
||||||
|
0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x4d, 0x6f, 0x64, 0x69, 0x66,
|
||||||
|
0x79, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x46, 0x69, 0x65,
|
||||||
|
0x6c, 0x64, 0x52, 0x65, 0x71, 0x1a, 0x36, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65,
|
||||||
|
0x72, 0x76, 0x65, 0x72, 0x2e, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f,
|
||||||
|
0x6e, 0x2e, 0x4d, 0x6f, 0x64, 0x69, 0x66, 0x79, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61,
|
||||||
|
0x74, 0x69, 0x6f, 0x6e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x52, 0x65, 0x73, 0x70, 0x12, 0x70, 0x0a,
|
||||||
|
0x0f, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e,
|
||||||
0x12, 0x2d, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e,
|
0x12, 0x2d, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e,
|
||||||
0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x53, 0x65, 0x74,
|
0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x47, 0x65, 0x74,
|
||||||
0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x1a,
|
0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x1a,
|
||||||
0x2e, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x63,
|
0x2e, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x63,
|
||||||
0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x53, 0x65, 0x74, 0x43,
|
0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x47, 0x65, 0x74, 0x43,
|
||||||
0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x12,
|
0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x12,
|
||||||
0x6a, 0x0a, 0x0d, 0x53, 0x65, 0x74, 0x52, 0x65, 0x63, 0x76, 0x4d, 0x73, 0x67, 0x4f, 0x70, 0x74,
|
0x7c, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x41, 0x6c, 0x6c, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73,
|
||||||
0x12, 0x2b, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e,
|
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x31, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53,
|
||||||
0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x53, 0x65, 0x74,
|
0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69,
|
||||||
0x52, 0x65, 0x63, 0x76, 0x4d, 0x73, 0x67, 0x4f, 0x70, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x2c, 0x2e,
|
0x6f, 0x6e, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x6c, 0x6c, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73,
|
||||||
0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x63, 0x6f, 0x6e,
|
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x1a, 0x32, 0x2e, 0x4f, 0x70, 0x65, 0x6e,
|
||||||
0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x53, 0x65, 0x74, 0x52, 0x65, 0x63,
|
0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73,
|
||||||
0x76, 0x4d, 0x73, 0x67, 0x4f, 0x70, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x91, 0x01, 0x0a, 0x1a,
|
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x6c, 0x6c, 0x43, 0x6f, 0x6e, 0x76,
|
||||||
0x47, 0x65, 0x74, 0x52, 0x65, 0x63, 0x76, 0x4d, 0x73, 0x67, 0x4e, 0x6f, 0x74, 0x4e, 0x6f, 0x74,
|
0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x12, 0x73, 0x0a,
|
||||||
0x69, 0x66, 0x79, 0x55, 0x73, 0x65, 0x72, 0x49, 0x44, 0x73, 0x12, 0x38, 0x2e, 0x4f, 0x70, 0x65,
|
0x10, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e,
|
||||||
|
0x73, 0x12, 0x2e, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72,
|
||||||
|
0x2e, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x47, 0x65,
|
||||||
|
0x74, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65,
|
||||||
|
0x71, 0x1a, 0x2f, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72,
|
||||||
|
0x2e, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x47, 0x65,
|
||||||
|
0x74, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65,
|
||||||
|
0x73, 0x70, 0x12, 0x82, 0x01, 0x0a, 0x15, 0x42, 0x61, 0x74, 0x63, 0x68, 0x53, 0x65, 0x74, 0x43,
|
||||||
|
0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x33, 0x2e, 0x4f,
|
||||||
|
0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x63, 0x6f, 0x6e, 0x76,
|
||||||
|
0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x42, 0x61, 0x74, 0x63, 0x68, 0x53, 0x65,
|
||||||
|
0x74, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65,
|
||||||
|
0x71, 0x1a, 0x34, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72,
|
||||||
|
0x2e, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x42, 0x61,
|
||||||
|
0x74, 0x63, 0x68, 0x53, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69,
|
||||||
|
0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x12, 0x70, 0x0a, 0x0f, 0x53, 0x65, 0x74, 0x43, 0x6f,
|
||||||
|
0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2d, 0x2e, 0x4f, 0x70, 0x65,
|
||||||
0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72,
|
0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72,
|
||||||
0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x63, 0x76, 0x4d, 0x73,
|
0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x53, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72,
|
||||||
0x67, 0x4e, 0x6f, 0x74, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x79, 0x55, 0x73, 0x65, 0x72, 0x49, 0x44,
|
0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x1a, 0x2e, 0x2e, 0x4f, 0x70, 0x65, 0x6e,
|
||||||
0x73, 0x52, 0x65, 0x71, 0x1a, 0x39, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72,
|
0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73,
|
||||||
|
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x53, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73,
|
||||||
|
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x12, 0x6a, 0x0a, 0x0d, 0x53, 0x65, 0x74,
|
||||||
|
0x52, 0x65, 0x63, 0x76, 0x4d, 0x73, 0x67, 0x4f, 0x70, 0x74, 0x12, 0x2b, 0x2e, 0x4f, 0x70, 0x65,
|
||||||
|
0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72,
|
||||||
|
0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x53, 0x65, 0x74, 0x52, 0x65, 0x63, 0x76, 0x4d, 0x73,
|
||||||
|
0x67, 0x4f, 0x70, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x2c, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d,
|
||||||
|
0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74,
|
||||||
|
0x69, 0x6f, 0x6e, 0x2e, 0x53, 0x65, 0x74, 0x52, 0x65, 0x63, 0x76, 0x4d, 0x73, 0x67, 0x4f, 0x70,
|
||||||
|
0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x91, 0x01, 0x0a, 0x1a, 0x47, 0x65, 0x74, 0x52, 0x65, 0x63,
|
||||||
|
0x76, 0x4d, 0x73, 0x67, 0x4e, 0x6f, 0x74, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x79, 0x55, 0x73, 0x65,
|
||||||
|
0x72, 0x49, 0x44, 0x73, 0x12, 0x38, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72,
|
||||||
0x76, 0x65, 0x72, 0x2e, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e,
|
0x76, 0x65, 0x72, 0x2e, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e,
|
||||||
0x2e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x63, 0x76, 0x4d, 0x73, 0x67, 0x4e, 0x6f, 0x74, 0x4e, 0x6f,
|
0x2e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x63, 0x76, 0x4d, 0x73, 0x67, 0x4e, 0x6f, 0x74, 0x4e, 0x6f,
|
||||||
0x74, 0x69, 0x66, 0x79, 0x55, 0x73, 0x65, 0x72, 0x49, 0x44, 0x73, 0x52, 0x65, 0x73, 0x70, 0x42,
|
0x74, 0x69, 0x66, 0x79, 0x55, 0x73, 0x65, 0x72, 0x49, 0x44, 0x73, 0x52, 0x65, 0x71, 0x1a, 0x39,
|
||||||
0x3c, 0x5a, 0x3a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x4f, 0x70,
|
0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x63, 0x6f,
|
||||||
0x65, 0x6e, 0x49, 0x4d, 0x53, 0x44, 0x4b, 0x2f, 0x4f, 0x70, 0x65, 0x6e, 0x2d, 0x49, 0x4d, 0x2d,
|
0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x65,
|
||||||
0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f,
|
0x63, 0x76, 0x4d, 0x73, 0x67, 0x4e, 0x6f, 0x74, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x79, 0x55, 0x73,
|
||||||
0x2f, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x62, 0x06, 0x70,
|
0x65, 0x72, 0x49, 0x44, 0x73, 0x52, 0x65, 0x73, 0x70, 0x42, 0x3c, 0x5a, 0x3a, 0x67, 0x69, 0x74,
|
||||||
0x72, 0x6f, 0x74, 0x6f, 0x33,
|
0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x44,
|
||||||
|
0x4b, 0x2f, 0x4f, 0x70, 0x65, 0x6e, 0x2d, 0x49, 0x4d, 0x2d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72,
|
||||||
|
0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x63, 0x6f, 0x6e, 0x76, 0x65,
|
||||||
|
0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||||
}
|
}
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
@ -32,7 +32,6 @@ message ModifyConversationFieldResp{
|
|||||||
|
|
||||||
message SetConversationReq{
|
message SetConversationReq{
|
||||||
Conversation conversation = 1;
|
Conversation conversation = 1;
|
||||||
int32 notificationType = 2;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
message SetConversationResp{
|
message SetConversationResp{
|
||||||
@ -42,7 +41,6 @@ message SetRecvMsgOptReq {
|
|||||||
string ownerUserID = 1;
|
string ownerUserID = 1;
|
||||||
string conversationID = 2;
|
string conversationID = 2;
|
||||||
int32 recvMsgOpt = 3;
|
int32 recvMsgOpt = 3;
|
||||||
int32 notificationType = 4;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
message SetRecvMsgOptResp {
|
message SetRecvMsgOptResp {
|
||||||
@ -77,7 +75,6 @@ message GetAllConversationsResp{
|
|||||||
message BatchSetConversationsReq{
|
message BatchSetConversationsReq{
|
||||||
repeated Conversation Conversations = 1;
|
repeated Conversation Conversations = 1;
|
||||||
string ownerUserID = 2;
|
string ownerUserID = 2;
|
||||||
int32 notificationType = 3;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
message BatchSetConversationsResp{
|
message BatchSetConversationsResp{
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -65,15 +65,10 @@ message UserInfo{
|
|||||||
string userID = 1;
|
string userID = 1;
|
||||||
string nickname = 2;
|
string nickname = 2;
|
||||||
string faceURL = 3;
|
string faceURL = 3;
|
||||||
int32 gender = 4;
|
string ex = 4;
|
||||||
string areaCode = 5;
|
int64 createTime = 5;
|
||||||
string phoneNumber = 6;
|
int32 appMangerLevel = 6;
|
||||||
int64 birth = 7;
|
int32 globalRecvMsgOpt = 7;
|
||||||
string email = 8;
|
|
||||||
string ex = 9;
|
|
||||||
int64 createTime = 10;
|
|
||||||
int32 appMangerLevel = 11;
|
|
||||||
int32 globalRecvMsgOpt = 12;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
message FriendInfo{
|
message FriendInfo{
|
||||||
|
@ -2,6 +2,8 @@ package check
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
|
"strings"
|
||||||
|
|
||||||
"github.com/OpenIMSDK/Open-IM-Server/pkg/common/config"
|
"github.com/OpenIMSDK/Open-IM-Server/pkg/common/config"
|
||||||
"github.com/OpenIMSDK/Open-IM-Server/pkg/common/log"
|
"github.com/OpenIMSDK/Open-IM-Server/pkg/common/log"
|
||||||
"github.com/OpenIMSDK/Open-IM-Server/pkg/discoveryregistry"
|
"github.com/OpenIMSDK/Open-IM-Server/pkg/discoveryregistry"
|
||||||
@ -10,7 +12,6 @@ import (
|
|||||||
"github.com/OpenIMSDK/Open-IM-Server/pkg/proto/user"
|
"github.com/OpenIMSDK/Open-IM-Server/pkg/proto/user"
|
||||||
"github.com/OpenIMSDK/Open-IM-Server/pkg/utils"
|
"github.com/OpenIMSDK/Open-IM-Server/pkg/utils"
|
||||||
"google.golang.org/grpc"
|
"google.golang.org/grpc"
|
||||||
"strings"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func NewUserCheck(client discoveryregistry.SvcDiscoveryRegistry) *UserCheck {
|
func NewUserCheck(client discoveryregistry.SvcDiscoveryRegistry) *UserCheck {
|
||||||
@ -78,7 +79,6 @@ func (u *UserCheck) GetPublicUserInfos(ctx context.Context, userIDs []string, co
|
|||||||
UserID: e.UserID,
|
UserID: e.UserID,
|
||||||
Nickname: e.Nickname,
|
Nickname: e.Nickname,
|
||||||
FaceURL: e.FaceURL,
|
FaceURL: e.FaceURL,
|
||||||
Gender: e.Gender,
|
|
||||||
Ex: e.Ex,
|
Ex: e.Ex,
|
||||||
}
|
}
|
||||||
}), nil
|
}), nil
|
||||||
|
@ -129,11 +129,9 @@ func (db *DBFriendRequest) DB2PB(ctx context.Context, friendRequests []*relation
|
|||||||
pbFriendRequest.FromUserID = users[v.FromUserID].UserID
|
pbFriendRequest.FromUserID = users[v.FromUserID].UserID
|
||||||
pbFriendRequest.FromNickname = users[v.FromUserID].Nickname
|
pbFriendRequest.FromNickname = users[v.FromUserID].Nickname
|
||||||
pbFriendRequest.FromFaceURL = users[v.FromUserID].FaceURL
|
pbFriendRequest.FromFaceURL = users[v.FromUserID].FaceURL
|
||||||
pbFriendRequest.FromGender = users[v.FromUserID].Gender
|
|
||||||
pbFriendRequest.ToUserID = users[v.ToUserID].UserID
|
pbFriendRequest.ToUserID = users[v.ToUserID].UserID
|
||||||
pbFriendRequest.ToNickname = users[v.ToUserID].Nickname
|
pbFriendRequest.ToNickname = users[v.ToUserID].Nickname
|
||||||
pbFriendRequest.ToFaceURL = users[v.ToUserID].FaceURL
|
pbFriendRequest.ToFaceURL = users[v.ToUserID].FaceURL
|
||||||
pbFriendRequest.ToGender = users[v.ToUserID].Gender
|
|
||||||
pbFriendRequest.CreateTime = v.CreateTime.Unix()
|
pbFriendRequest.CreateTime = v.CreateTime.Unix()
|
||||||
pbFriendRequest.HandleTime = v.HandleTime.Unix()
|
pbFriendRequest.HandleTime = v.HandleTime.Unix()
|
||||||
pbFriendRequest.HandlerUserID = v.HandlerUserID
|
pbFriendRequest.HandlerUserID = v.HandlerUserID
|
||||||
@ -162,14 +160,12 @@ func (db *DBFriendRequest) Convert(ctx context.Context) (*sdk.FriendRequest, err
|
|||||||
}
|
}
|
||||||
pbFriendRequest.FromNickname = user.Nickname
|
pbFriendRequest.FromNickname = user.Nickname
|
||||||
pbFriendRequest.FromFaceURL = user.FaceURL
|
pbFriendRequest.FromFaceURL = user.FaceURL
|
||||||
pbFriendRequest.FromGender = user.Gender
|
|
||||||
user, err = db.userCheck.GetUserInfo(ctx, db.ToUserID)
|
user, err = db.userCheck.GetUserInfo(ctx, db.ToUserID)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
pbFriendRequest.ToNickname = user.Nickname
|
pbFriendRequest.ToNickname = user.Nickname
|
||||||
pbFriendRequest.ToFaceURL = user.FaceURL
|
pbFriendRequest.ToFaceURL = user.FaceURL
|
||||||
pbFriendRequest.ToGender = user.Gender
|
|
||||||
pbFriendRequest.CreateTime = db.CreateTime.Unix()
|
pbFriendRequest.CreateTime = db.CreateTime.Unix()
|
||||||
pbFriendRequest.HandleTime = db.HandleTime.Unix()
|
pbFriendRequest.HandleTime = db.HandleTime.Unix()
|
||||||
return pbFriendRequest, nil
|
return pbFriendRequest, nil
|
||||||
@ -474,7 +470,6 @@ func (*DBUser) DB2PB(users []*relation.UserModel) (PBUsers []*sdk.UserInfo, err
|
|||||||
func (pb *PBUser) Convert() (*relation.UserModel, error) {
|
func (pb *PBUser) Convert() (*relation.UserModel, error) {
|
||||||
dst := &relation.UserModel{}
|
dst := &relation.UserModel{}
|
||||||
utils.CopyStructFields(dst, pb)
|
utils.CopyStructFields(dst, pb)
|
||||||
dst.Birth = utils.UnixSecondToTime(pb.Birth)
|
|
||||||
dst.CreateTime = utils.UnixSecondToTime(pb.CreateTime)
|
dst.CreateTime = utils.UnixSecondToTime(pb.CreateTime)
|
||||||
return dst, nil
|
return dst, nil
|
||||||
}
|
}
|
||||||
@ -483,7 +478,6 @@ func (db *DBUser) Convert() (*sdk.UserInfo, error) {
|
|||||||
dst := &sdk.UserInfo{}
|
dst := &sdk.UserInfo{}
|
||||||
utils.CopyStructFields(dst, db)
|
utils.CopyStructFields(dst, db)
|
||||||
dst.CreateTime = db.CreateTime.Unix()
|
dst.CreateTime = db.CreateTime.Unix()
|
||||||
dst.Birth = db.Birth.Unix()
|
|
||||||
return dst, nil
|
return dst, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user