You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
49 lines
1004 B
49 lines
1004 B
package rpcclient
|
|
|
|
import (
|
|
"github.com/OpenIMSDK/Open-IM-Server/pkg/discoveryregistry"
|
|
"google.golang.org/grpc"
|
|
)
|
|
|
|
type MetaClient struct {
|
|
// contains filtered or unexported fields
|
|
client discoveryregistry.SvcDiscoveryRegistry
|
|
rpcRegisterName string
|
|
}
|
|
|
|
func NewMetaClient(client discoveryregistry.SvcDiscoveryRegistry, rpcRegisterName string) *MetaClient {
|
|
return &MetaClient{
|
|
client: client,
|
|
rpcRegisterName: rpcRegisterName,
|
|
}
|
|
}
|
|
|
|
func (m *MetaClient) getConn() (*grpc.ClientConn, error) {
|
|
return m.client.GetConn(m.rpcRegisterName)
|
|
}
|
|
|
|
type NotificationMsg struct {
|
|
SendID string
|
|
RecvID string
|
|
Content []byte
|
|
MsgFrom int32
|
|
ContentType int32
|
|
SessionType int32
|
|
SenderNickname string
|
|
SenderFaceURL string
|
|
}
|
|
|
|
type CommonUser interface {
|
|
GetNickname() string
|
|
GetFaceURL() string
|
|
GetUserID() string
|
|
GetEx() string
|
|
}
|
|
|
|
type CommonGroup interface {
|
|
GetNickname() string
|
|
GetFaceURL() string
|
|
GetGroupID() string
|
|
GetEx() string
|
|
}
|