Documentation ¶
Index ¶
- Constants
- func WithRecvPushMsgCallback(callback func(msg *sdkws.MsgData)) func(core *SendMsgUser)
- type ApiMsgSender
- type ConnListner
- type MetaManager
- type SendMsg
- type SendMsgReq
- type SendMsgUser
- func (b *SendMsgUser) BatchSendGroupMsg(ctx context.Context, groupID string, index int) error
- func (b *SendMsgUser) BatchSendSingleMsg(ctx context.Context, userID string, index int) error
- func (b *SendMsgUser) Close(ctx context.Context)
- func (b SendMsgUser) GetUserID() string
- func (b *SendMsgUser) SendGroupMsg(ctx context.Context, groupID string, index int) error
- func (b *SendMsgUser) SendGroupMsgWithContext(groupID string, index int) error
- func (b *SendMsgUser) SendMsgWithContext(userID string, index int) error
- func (b *SendMsgUser) SendSingleMsg(ctx context.Context, userID string, index int) error
- type TestFriendManager
- type TestGroupManager
- type TestUserManager
- func (t *TestUserManager) GenUserIDs(num int) (userIDs []string)
- func (t *TestUserManager) GenUserIDsWithPrefix(num int, prefix string) (userIDs []string)
- func (t *TestUserManager) GetToken(userID string, platformID int32) (string, error)
- func (t *TestUserManager) RegisterUsers(userIDs ...string) error
Constants ¶
View Source
const (
ManagerUserID = "openIMAdmin"
)
Variables ¶
This section is empty.
Functions ¶
func WithRecvPushMsgCallback ¶
func WithRecvPushMsgCallback(callback func(msg *sdkws.MsgData)) func(core *SendMsgUser)
Types ¶
type ApiMsgSender ¶
type ApiMsgSender struct {
*MetaManager
}
type ConnListner ¶
type ConnListner struct { }
func (*ConnListner) OnConnectFailed ¶
func (c *ConnListner) OnConnectFailed(errCode int32, errMsg string)
func (*ConnListner) OnConnectSuccess ¶
func (c *ConnListner) OnConnectSuccess()
func (*ConnListner) OnConnecting ¶
func (c *ConnListner) OnConnecting()
func (*ConnListner) OnKickedOffline ¶
func (c *ConnListner) OnKickedOffline()
func (*ConnListner) OnUserTokenExpired ¶
func (c *ConnListner) OnUserTokenExpired()
type MetaManager ¶
type MetaManager struct {
// contains filtered or unexported fields
}
func NewMetaManager ¶
func NewMetaManager(apiAddr, secret, managerUserID string) *MetaManager
func (*MetaManager) GetServerTime ¶
func (m *MetaManager) GetServerTime() (int64, error)
func (*MetaManager) NewApiMsgSender ¶
func (m *MetaManager) NewApiMsgSender() *ApiMsgSender
func (*MetaManager) NewFriendManager ¶
func (m *MetaManager) NewFriendManager() *TestFriendManager
func (*MetaManager) NewGroupMananger ¶
func (m *MetaManager) NewGroupMananger() *TestGroupManager
func (*MetaManager) NewUserManager ¶
func (m *MetaManager) NewUserManager() *TestUserManager
type SendMsg ¶
type SendMsg struct { SendID string `json:"sendID" binding:"required"` GroupID string `json:"groupID" binding:"required_if=SessionType 2|required_if=SessionType 3"` SenderNickname string `json:"senderNickname"` SenderFaceURL string `json:"senderFaceURL"` SenderPlatformID int32 `json:"senderPlatformID"` Content map[string]interface{} `json:"content" binding:"required" swaggerignore:"true"` ContentType int32 `json:"contentType" binding:"required"` SessionType int32 `json:"sessionType" binding:"required"` IsOnlineOnly bool `json:"isOnlineOnly"` NotOfflinePush bool `json:"notOfflinePush"` OfflinePushInfo *sdkws.OfflinePushInfo `json:"offlinePushInfo"` }
type SendMsgReq ¶
type SendMsgUser ¶
type SendMsgUser struct {
// contains filtered or unexported fields
}
func NewUser ¶
func NewUser(userID, token string, imConfig sdk_struct.IMConfig, opts ...func(core *SendMsgUser)) *SendMsgUser
func (*SendMsgUser) BatchSendGroupMsg ¶
func (*SendMsgUser) BatchSendSingleMsg ¶
func (*SendMsgUser) Close ¶
func (b *SendMsgUser) Close(ctx context.Context)
func (SendMsgUser) GetUserID ¶
func (b SendMsgUser) GetUserID() string
func (*SendMsgUser) SendGroupMsg ¶
func (*SendMsgUser) SendGroupMsgWithContext ¶
func (b *SendMsgUser) SendGroupMsgWithContext(groupID string, index int) error
func (*SendMsgUser) SendMsgWithContext ¶
func (b *SendMsgUser) SendMsgWithContext(userID string, index int) error
func (*SendMsgUser) SendSingleMsg ¶
type TestFriendManager ¶
type TestFriendManager struct {
*MetaManager
}
func (*TestFriendManager) ImportFriends ¶
func (t *TestFriendManager) ImportFriends(ownerUserID string, friendUserIDs []string) error
type TestGroupManager ¶
type TestGroupManager struct {
*MetaManager
}
func (*TestGroupManager) CreateGroup ¶
func (*TestGroupManager) GenGroupID ¶
func (t *TestGroupManager) GenGroupID(prefix string) string
func (*TestGroupManager) InviteUserToGroup ¶
type TestUserManager ¶
type TestUserManager struct {
*MetaManager
}
func (*TestUserManager) GenUserIDs ¶
func (t *TestUserManager) GenUserIDs(num int) (userIDs []string)
func (*TestUserManager) GenUserIDsWithPrefix ¶
func (t *TestUserManager) GenUserIDsWithPrefix(num int, prefix string) (userIDs []string)
func (*TestUserManager) GetToken ¶
func (t *TestUserManager) GetToken(userID string, platformID int32) (string, error)
func (*TestUserManager) RegisterUsers ¶
func (t *TestUserManager) RegisterUsers(userIDs ...string) error
Click to show internal directories.
Click to hide internal directories.