mirror of
https://github.com/openimsdk/open-im-server.git
synced 2026-05-12 04:55:59 +08:00
push
This commit is contained in:
+10
-10
@@ -16,24 +16,24 @@ type CallbackBeforePushReq struct {
|
||||
|
||||
type CallbackBeforePushResp struct {
|
||||
CommonCallbackResp
|
||||
UserIDList []string `json:"userIDList"`
|
||||
UserIDs []string `json:"userIDList"`
|
||||
OfflinePushInfo *common.OfflinePushInfo `json:"offlinePushInfo"`
|
||||
}
|
||||
|
||||
type CallbackBeforeSuperGroupOnlinePushReq struct {
|
||||
UserStatusBaseCallback
|
||||
ClientMsgID string `json:"clientMsgID"`
|
||||
SendID string `json:"sendID"`
|
||||
GroupID string `json:"groupID"`
|
||||
ContentType int32 `json:"contentType"`
|
||||
SessionType int32 `json:"sessionType"`
|
||||
AtUserIDList []string `json:"atUserIDList"`
|
||||
Content string `json:"content"`
|
||||
Seq int64 `json:"seq"`
|
||||
ClientMsgID string `json:"clientMsgID"`
|
||||
SendID string `json:"sendID"`
|
||||
GroupID string `json:"groupID"`
|
||||
ContentType int32 `json:"contentType"`
|
||||
SessionType int32 `json:"sessionType"`
|
||||
AtUserIDs []string `json:"atUserIDList"`
|
||||
Content string `json:"content"`
|
||||
Seq int64 `json:"seq"`
|
||||
}
|
||||
|
||||
type CallbackBeforeSuperGroupOnlinePushResp struct {
|
||||
CommonCallbackResp
|
||||
UserIDList []string `json:"userIDList"`
|
||||
UserIDs []string `json:"userIDList"`
|
||||
OfflinePushInfo *common.OfflinePushInfo `json:"offlinePushInfo"`
|
||||
}
|
||||
|
||||
+12
-13
@@ -129,20 +129,19 @@ type config struct {
|
||||
OpenImPushPort []int `yaml:"openImPushPort"`
|
||||
OpenImConversationPort []int `yaml:"openImConversationPort"`
|
||||
OpenImCachePort []int `yaml:"openImCachePort"`
|
||||
OpenImRealTimeCommPort []int `yaml:"openImRealTimeCommPort"`
|
||||
OpenImRtcPort []int `yaml:"openImRtcPort"`
|
||||
}
|
||||
RpcRegisterName struct {
|
||||
OpenImUserName string `yaml:"openImUserName"`
|
||||
OpenImFriendName string `yaml:"openImFriendName"`
|
||||
// OpenImOfflineMessageName string `yaml:"openImOfflineMessageName"`
|
||||
OpenImMsgName string `yaml:"openImMsgName"`
|
||||
OpenImPushName string `yaml:"openImPushName"`
|
||||
OpenImRelayName string `yaml:"openImRelayName"`
|
||||
OpenImGroupName string `yaml:"openImGroupName"`
|
||||
OpenImAuthName string `yaml:"openImAuthName"`
|
||||
OpenImConversationName string `yaml:"openImConversationName"`
|
||||
OpenImCacheName string `yaml:"openImCacheName"`
|
||||
OpenImRealTimeCommName string `yaml:"openImRealTimeCommName"`
|
||||
OpenImUserName string `yaml:"openImUserName"`
|
||||
OpenImFriendName string `yaml:"openImFriendName"`
|
||||
OpenImMsgName string `yaml:"openImMsgName"`
|
||||
OpenImPushName string `yaml:"openImPushName"`
|
||||
OpenImMessageGatewayName string `yaml:"openImMessageGatewayName"`
|
||||
OpenImGroupName string `yaml:"openImGroupName"`
|
||||
OpenImAuthName string `yaml:"openImAuthName"`
|
||||
OpenImConversationName string `yaml:"openImConversationName"`
|
||||
OpenImCacheName string `yaml:"openImCacheName"`
|
||||
OpenImRtcName string `yaml:"openImRtcName"`
|
||||
}
|
||||
Zookeeper struct {
|
||||
Schema string `yaml:"schema"`
|
||||
@@ -481,7 +480,7 @@ type config struct {
|
||||
AuthPrometheusPort []int `yaml:"authPrometheusPort"`
|
||||
PushPrometheusPort []int `yaml:"pushPrometheusPort"`
|
||||
ConversationPrometheusPort []int `yaml:"conversationPrometheusPort"`
|
||||
RealTimeCommPrometheusPort []int `yaml:"realTimeCommPrometheusPort"`
|
||||
RtcPrometheusPort []int `yaml:"RtcPrometheusPort"`
|
||||
MessageTransferPrometheusPort []int `yaml:"messageTransferPrometheusPort"`
|
||||
} `yaml:"prometheus"`
|
||||
}
|
||||
|
||||
Vendored
+5
-6
@@ -308,17 +308,16 @@ func (r *RedisClient) HandleSignalInfo(ctx context.Context, operationID string,
|
||||
if err := proto.Unmarshal(msg.Content, req); err != nil {
|
||||
return false, err
|
||||
}
|
||||
//log.NewDebug(pushMsg.OperationID, utils.GetSelfFuncName(), "SignalReq: ", req.String())
|
||||
var inviteeUserIDList []string
|
||||
var inviteeUserIDs []string
|
||||
var isInviteSignal bool
|
||||
switch signalInfo := req.Payload.(type) {
|
||||
case *pbRtc.SignalReq_Invite:
|
||||
inviteeUserIDList = signalInfo.Invite.Invitation.InviteeUserIDList
|
||||
inviteeUserIDs = signalInfo.Invite.Invitation.InviteeUserIDList
|
||||
isInviteSignal = true
|
||||
case *pbRtc.SignalReq_InviteInGroup:
|
||||
inviteeUserIDList = signalInfo.InviteInGroup.Invitation.InviteeUserIDList
|
||||
inviteeUserIDs = signalInfo.InviteInGroup.Invitation.InviteeUserIDList
|
||||
isInviteSignal = true
|
||||
if !utils.IsContain(pushToUserID, inviteeUserIDList) {
|
||||
if !utils.IsContain(pushToUserID, inviteeUserIDs) {
|
||||
return false, nil
|
||||
}
|
||||
case *pbRtc.SignalReq_HungUp, *pbRtc.SignalReq_Cancel, *pbRtc.SignalReq_Reject, *pbRtc.SignalReq_Accept:
|
||||
@@ -327,7 +326,7 @@ func (r *RedisClient) HandleSignalInfo(ctx context.Context, operationID string,
|
||||
return false, nil
|
||||
}
|
||||
if isInviteSignal {
|
||||
for _, userID := range inviteeUserIDList {
|
||||
for _, userID := range inviteeUserIDs {
|
||||
timeout, err := strconv.Atoi(config.Config.Rtc.SignalTimeout)
|
||||
if err != nil {
|
||||
return false, err
|
||||
|
||||
@@ -93,7 +93,7 @@ func (g *GroupController) DismissGroup(ctx context.Context, groupID string) erro
|
||||
}
|
||||
|
||||
func (g *GroupController) GetGroupIDsByGroupType(ctx context.Context, groupType int) (groupIDs []string, err error) {
|
||||
return g.database.
|
||||
return g.database.GetGroupIDsByGroupType(ctx, groupType)
|
||||
}
|
||||
|
||||
func (g *GroupController) TakeGroupMember(ctx context.Context, groupID string, userID string) (groupMember *relationTb.GroupMemberModel, err error) {
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
package controller
|
||||
|
||||
import (
|
||||
"Open_IM/pkg/common/db/cache"
|
||||
"context"
|
||||
)
|
||||
|
||||
type PushInterface interface {
|
||||
DelFcmToken(ctx context.Context, userID string, platformID int) error
|
||||
}
|
||||
|
||||
type PushDataBase struct {
|
||||
cache cache.Cache
|
||||
}
|
||||
|
||||
func (p *PushDataBase) DelFcmToken(ctx context.Context, userID string, platformID int) error {
|
||||
return p.cache.DelFcmToken(ctx, userID, platformID)
|
||||
}
|
||||
@@ -25,5 +25,5 @@ func NewConversationLocalCache(client discoveryRegistry.SvcDiscoveryRegistry) Co
|
||||
|
||||
func (g *ConversationLocalCache) GetRecvMsgNotNotifyUserIDs(ctx context.Context, groupID string) ([]string, error) {
|
||||
g.client.GetConn()
|
||||
return []string{}
|
||||
return []string{}, nil
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@ package localcache
|
||||
import (
|
||||
"Open_IM/pkg/common/config"
|
||||
"Open_IM/pkg/common/constant"
|
||||
discoveryRegistry "Open_IM/pkg/discoveryregistry"
|
||||
"Open_IM/pkg/discoveryregistry"
|
||||
"Open_IM/pkg/proto/group"
|
||||
"context"
|
||||
"sync"
|
||||
@@ -16,7 +16,7 @@ type GroupLocalCacheInterface interface {
|
||||
type GroupLocalCache struct {
|
||||
lock sync.Mutex
|
||||
cache map[string]GroupMemberIDsHash
|
||||
client discoveryRegistry.SvcDiscoveryRegistry
|
||||
client discoveryregistry.SvcDiscoveryRegistry
|
||||
}
|
||||
|
||||
type GroupMemberIDsHash struct {
|
||||
@@ -24,7 +24,7 @@ type GroupMemberIDsHash struct {
|
||||
userIDs []string
|
||||
}
|
||||
|
||||
func NewGroupMemberIDsLocalCache(client discoveryRegistry.SvcDiscoveryRegistry) *GroupLocalCache {
|
||||
func NewGroupMemberIDsLocalCache(client discoveryregistry.SvcDiscoveryRegistry) *GroupLocalCache {
|
||||
return &GroupLocalCache{
|
||||
cache: make(map[string]GroupMemberIDsHash, 0),
|
||||
client: client,
|
||||
@@ -34,7 +34,7 @@ func NewGroupMemberIDsLocalCache(client discoveryRegistry.SvcDiscoveryRegistry)
|
||||
func (g *GroupLocalCache) GetGroupMemberIDs(ctx context.Context, groupID string) ([]string, error) {
|
||||
g.lock.Lock()
|
||||
defer g.lock.Unlock()
|
||||
conn, err := g.client.GetConn(config.Config.RpcRegisterName.OpenImGroupName, nil)
|
||||
conn, err := g.client.GetConn(config.Config.RpcRegisterName.OpenImGroupName)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
@@ -33,7 +33,7 @@ func Get(url string) (response []byte, err error) {
|
||||
}
|
||||
|
||||
// application/json; charset=utf-8
|
||||
func Post(url string, header map[string]string, data interface{}, timeOutSecond int) (content []byte, err error) {
|
||||
func Post(url string, header map[string]string, data interface{}, timeout int) (content []byte, err error) {
|
||||
jsonStr, err := json.Marshal(data)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -42,9 +42,12 @@ func Post(url string, header map[string]string, data interface{}, timeOutSecond
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
for k, v := range header {
|
||||
req.Header.Set(k, v)
|
||||
}
|
||||
req.Close = true
|
||||
req.Header.Add("content-type", "application/json; charset=utf-8")
|
||||
client := &http.Client{Timeout: time.Duration(timeOutSecond) * time.Second}
|
||||
client := &http.Client{Timeout: time.Duration(timeout) * time.Second}
|
||||
resp, err := client.Do(req)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
||||
@@ -11,10 +11,10 @@ import (
|
||||
"github.com/prometheus/client_golang/prometheus/promhttp"
|
||||
)
|
||||
|
||||
func StartPromeSrv(promethuesPort int) error {
|
||||
func StartPromeSrv(prometheusPort int) error {
|
||||
if config.Config.Prometheus.Enable {
|
||||
http.Handle("/metrics", promhttp.Handler())
|
||||
err := http.ListenAndServe(":"+strconv.Itoa(promethuesPort), nil)
|
||||
err := http.ListenAndServe(":"+strconv.Itoa(prometheusPort), nil)
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
|
||||
@@ -14,15 +14,3 @@ func (r *Robin) Robin(slice []*grpc.ClientConn) int {
|
||||
}
|
||||
return index
|
||||
}
|
||||
|
||||
type Hash struct {
|
||||
}
|
||||
|
||||
func (r *Hash) Hash(slice []*grpc.ClientConn) int {
|
||||
index := r.next
|
||||
r.next += 1
|
||||
if r.next > len(slice)-1 {
|
||||
r.next = 0
|
||||
}
|
||||
return index
|
||||
}
|
||||
|
||||
+31
-75
@@ -25,9 +25,8 @@ var _ = math.Inf
|
||||
const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
|
||||
|
||||
type PushMsgReq struct {
|
||||
OperationID string `protobuf:"bytes,1,opt,name=operationID" json:"operationID,omitempty"`
|
||||
MsgData *sdkws.MsgData `protobuf:"bytes,2,opt,name=msgData" json:"msgData,omitempty"`
|
||||
PushToUserID string `protobuf:"bytes,3,opt,name=pushToUserID" json:"pushToUserID,omitempty"`
|
||||
MsgData *sdkws.MsgData `protobuf:"bytes,1,opt,name=msgData" json:"msgData,omitempty"`
|
||||
SourceID string `protobuf:"bytes,2,opt,name=sourceID" json:"sourceID,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
@@ -37,7 +36,7 @@ func (m *PushMsgReq) Reset() { *m = PushMsgReq{} }
|
||||
func (m *PushMsgReq) String() string { return proto.CompactTextString(m) }
|
||||
func (*PushMsgReq) ProtoMessage() {}
|
||||
func (*PushMsgReq) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_push_17f752d1b1c8edd5, []int{0}
|
||||
return fileDescriptor_push_534b6eabcdc561f2, []int{0}
|
||||
}
|
||||
func (m *PushMsgReq) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_PushMsgReq.Unmarshal(m, b)
|
||||
@@ -57,13 +56,6 @@ func (m *PushMsgReq) XXX_DiscardUnknown() {
|
||||
|
||||
var xxx_messageInfo_PushMsgReq proto.InternalMessageInfo
|
||||
|
||||
func (m *PushMsgReq) GetOperationID() string {
|
||||
if m != nil {
|
||||
return m.OperationID
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *PushMsgReq) GetMsgData() *sdkws.MsgData {
|
||||
if m != nil {
|
||||
return m.MsgData
|
||||
@@ -71,15 +63,14 @@ func (m *PushMsgReq) GetMsgData() *sdkws.MsgData {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *PushMsgReq) GetPushToUserID() string {
|
||||
func (m *PushMsgReq) GetSourceID() string {
|
||||
if m != nil {
|
||||
return m.PushToUserID
|
||||
return m.SourceID
|
||||
}
|
||||
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:"-"`
|
||||
@@ -89,7 +80,7 @@ func (m *PushMsgResp) Reset() { *m = PushMsgResp{} }
|
||||
func (m *PushMsgResp) String() string { return proto.CompactTextString(m) }
|
||||
func (*PushMsgResp) ProtoMessage() {}
|
||||
func (*PushMsgResp) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_push_17f752d1b1c8edd5, []int{1}
|
||||
return fileDescriptor_push_534b6eabcdc561f2, []int{1}
|
||||
}
|
||||
func (m *PushMsgResp) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_PushMsgResp.Unmarshal(m, b)
|
||||
@@ -109,17 +100,9 @@ func (m *PushMsgResp) XXX_DiscardUnknown() {
|
||||
|
||||
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"`
|
||||
UserID string `protobuf:"bytes,1,opt,name=userID" json:"userID,omitempty"`
|
||||
PlatformID int32 `protobuf:"varint,2,opt,name=platformID" json:"platformID,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
@@ -129,7 +112,7 @@ 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}
|
||||
return fileDescriptor_push_534b6eabcdc561f2, []int{2}
|
||||
}
|
||||
func (m *DelUserPushTokenReq) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_DelUserPushTokenReq.Unmarshal(m, b)
|
||||
@@ -149,13 +132,6 @@ func (m *DelUserPushTokenReq) XXX_DiscardUnknown() {
|
||||
|
||||
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
|
||||
@@ -171,8 +147,6 @@ func (m *DelUserPushTokenReq) GetPlatformID() int32 {
|
||||
}
|
||||
|
||||
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:"-"`
|
||||
@@ -182,7 +156,7 @@ 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}
|
||||
return fileDescriptor_push_534b6eabcdc561f2, []int{3}
|
||||
}
|
||||
func (m *DelUserPushTokenResp) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_DelUserPushTokenResp.Unmarshal(m, b)
|
||||
@@ -202,20 +176,6 @@ func (m *DelUserPushTokenResp) XXX_DiscardUnknown() {
|
||||
|
||||
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")
|
||||
@@ -328,30 +288,26 @@ var _PushMsgService_serviceDesc = grpc.ServiceDesc{
|
||||
Metadata: "push/push.proto",
|
||||
}
|
||||
|
||||
func init() { proto.RegisterFile("push/push.proto", fileDescriptor_push_17f752d1b1c8edd5) }
|
||||
func init() { proto.RegisterFile("push/push.proto", fileDescriptor_push_534b6eabcdc561f2) }
|
||||
|
||||
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,
|
||||
var fileDescriptor_push_534b6eabcdc561f2 = []byte{
|
||||
// 279 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x91, 0x41, 0x4f, 0xc2, 0x40,
|
||||
0x10, 0x85, 0x53, 0xa3, 0x20, 0x43, 0x44, 0x5c, 0x0d, 0xc1, 0x26, 0x2a, 0xe9, 0x45, 0x2e, 0xb4,
|
||||
0x09, 0x1e, 0xbd, 0x99, 0x5e, 0x7a, 0xd8, 0x68, 0x56, 0xbd, 0x78, 0x31, 0x05, 0xc7, 0x62, 0x0a,
|
||||
0xec, 0xb8, 0xd3, 0xca, 0x8f, 0xf0, 0x4f, 0x9b, 0xdd, 0x56, 0x24, 0xa8, 0x97, 0xa6, 0xf3, 0xcd,
|
||||
0xcb, 0x7b, 0x79, 0xb3, 0x70, 0x48, 0x25, 0xcf, 0x22, 0xfb, 0x09, 0xc9, 0xe8, 0x42, 0x8b, 0x5d,
|
||||
0xfb, 0xef, 0x5f, 0xde, 0x12, 0x2e, 0x47, 0x89, 0x1c, 0xdd, 0xa3, 0xf9, 0x40, 0x13, 0x51, 0x9e,
|
||||
0x45, 0x6e, 0x1f, 0xf1, 0x4b, 0xbe, 0xe2, 0x68, 0xc5, 0x95, 0x3c, 0x50, 0x00, 0x77, 0x25, 0xcf,
|
||||
0x24, 0x67, 0x0a, 0xdf, 0xc5, 0x10, 0x9a, 0x0b, 0xce, 0xe2, 0xb4, 0x48, 0xfb, 0xde, 0xc0, 0x1b,
|
||||
0xb6, 0xc7, 0x9d, 0xd0, 0xe9, 0x43, 0x59, 0x51, 0xf5, 0xbd, 0x16, 0x3e, 0xec, 0xb3, 0x2e, 0xcd,
|
||||
0x14, 0x93, 0xb8, 0xbf, 0x33, 0xf0, 0x86, 0x2d, 0xb5, 0x9e, 0x83, 0x03, 0x68, 0xaf, 0x3d, 0x99,
|
||||
0x02, 0x09, 0xc7, 0x31, 0xce, 0x1f, 0x19, 0x8d, 0xa5, 0x0f, 0x3a, 0xc7, 0xa5, 0xcd, 0xea, 0x41,
|
||||
0xa3, 0x64, 0x34, 0x49, 0xec, 0xa2, 0x5a, 0xaa, 0x9e, 0xc4, 0x39, 0x00, 0xcd, 0xd3, 0xe2, 0x55,
|
||||
0x9b, 0x45, 0xed, 0xbd, 0xa7, 0x36, 0x48, 0xd0, 0x83, 0x93, 0xdf, 0x76, 0x4c, 0xe3, 0x4f, 0x0f,
|
||||
0x3a, 0x75, 0xac, 0x2d, 0xfd, 0x36, 0x45, 0x11, 0x42, 0xb3, 0x26, 0xa2, 0x1b, 0xba, 0x1b, 0xfd,
|
||||
0x74, 0xf5, 0x8f, 0xb6, 0x08, 0x93, 0x48, 0xa0, 0xbb, 0x6d, 0x2d, 0x4e, 0x2b, 0xd9, 0x1f, 0x0d,
|
||||
0x7c, 0xff, 0xbf, 0x15, 0xd3, 0xcd, 0xc5, 0xd3, 0x99, 0x7d, 0x82, 0xe7, 0x44, 0x6e, 0xdc, 0xde,
|
||||
0xca, 0xaf, 0x69, 0x62, 0x95, 0x93, 0x86, 0x43, 0x57, 0x5f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x04,
|
||||
0x7d, 0xb3, 0xcd, 0xc1, 0x01, 0x00, 0x00,
|
||||
}
|
||||
|
||||
+12
-35
@@ -4,46 +4,23 @@ option go_package = "Open_IM/pkg/proto/push;pbPush";
|
||||
package push;
|
||||
|
||||
message PushMsgReq {
|
||||
string operationID = 1;
|
||||
sdkws.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;
|
||||
sdkws.MsgData msgData = 1;
|
||||
string sourceID = 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;
|
||||
//
|
||||
//}
|
||||
message PushMsgResp{
|
||||
}
|
||||
|
||||
message DelUserPushTokenReq{
|
||||
string userID = 1;
|
||||
int32 platformID = 2;
|
||||
}
|
||||
|
||||
message DelUserPushTokenResp{
|
||||
}
|
||||
|
||||
service PushMsgService {
|
||||
rpc PushMsg(PushMsgReq) returns(PushMsgResp);
|
||||
rpc DelUserPushToken(DelUserPushTokenReq) returns(DelUserPushTokenResp);
|
||||
// rpc InternalPushMsg(InternalPushMsgReq)returns(PushMsgResp);
|
||||
}
|
||||
|
||||
|
||||
@@ -131,6 +131,7 @@ func DifferenceString(slice1, slice2 []string) []string {
|
||||
}
|
||||
return n
|
||||
}
|
||||
|
||||
func OperationIDGenerator() string {
|
||||
return strconv.FormatInt(time.Now().UnixNano()+int64(rand.Uint32()), 10)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user