notification

package
v3.3.3-bate.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 19, 2023 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithDBFunc

func WithDBFunc(
	fn func(ctx context.Context, userIDs []string) (users []*relationtb.UserModel, err error),
) friendNotificationSenderOptions

func WithFriendDB

func WithFriendDB(db controller.FriendDatabase) friendNotificationSenderOptions

func WithRpcFunc

func WithRpcFunc(
	fn func(ctx context.Context, userIDs []string) ([]*sdkws.UserInfo, error),
) friendNotificationSenderOptions

func WithUserDB

func WithUserDB(db controller.UserDatabase) userNotificationSenderOptions

func WithUserFunc

func WithUserFunc(
	fn func(ctx context.Context, userIDs []string) (users []*relationtb.UserModel, err error),
) userNotificationSenderOptions

Types

type CommonGroup

type CommonGroup interface {
	GetNickname() string
	GetFaceURL() string
	GetGroupID() string
	GetEx() string
}

type CommonUser

type CommonUser interface {
	GetNickname() string
	GetFaceURL() string
	GetUserID() string
	GetEx() string
}

type ConversationNotificationSender

type ConversationNotificationSender struct {
	*rpcclient.NotificationSender
}

func NewConversationNotificationSender

func NewConversationNotificationSender(msgRpcClient *rpcclient.MessageRpcClient) *ConversationNotificationSender

func (*ConversationNotificationSender) ConversationChangeNotification

func (c *ConversationNotificationSender) ConversationChangeNotification(ctx context.Context, userID string, conversationIDs []string) error

会话改变.

func (*ConversationNotificationSender) ConversationSetPrivateNotification

func (c *ConversationNotificationSender) ConversationSetPrivateNotification(ctx context.Context, sendID, recvID string,
	isPrivateChat bool, conversationID string,
) error

SetPrivate调用.

func (*ConversationNotificationSender) ConversationUnreadChangeNotification

func (c *ConversationNotificationSender) ConversationUnreadChangeNotification(
	ctx context.Context,
	userID, conversationID string,
	unreadCountTime, hasReadSeq int64,
) error

会话未读数同步.

type FriendNotificationSender

type FriendNotificationSender struct {
	*rpcclient.NotificationSender
	// contains filtered or unexported fields
}

func NewFriendNotificationSender

func NewFriendNotificationSender(
	msgRpcClient *rpcclient.MessageRpcClient,
	opts ...friendNotificationSenderOptions,
) *FriendNotificationSender

func (*FriendNotificationSender) BlackAddedNotification

func (f *FriendNotificationSender) BlackAddedNotification(ctx context.Context, req *pbfriend.AddBlackReq) error

func (*FriendNotificationSender) BlackDeletedNotification

func (f *FriendNotificationSender) BlackDeletedNotification(ctx context.Context, req *pbfriend.RemoveBlackReq)

func (*FriendNotificationSender) FriendAddedNotification

func (f *FriendNotificationSender) FriendAddedNotification(
	ctx context.Context,
	operationID, opUserID, fromUserID, toUserID string,
) error

func (*FriendNotificationSender) FriendApplicationAddNotification

func (f *FriendNotificationSender) FriendApplicationAddNotification(
	ctx context.Context,
	req *pbfriend.ApplyToAddFriendReq,
) error

func (*FriendNotificationSender) FriendApplicationAgreedNotification

func (f *FriendNotificationSender) FriendApplicationAgreedNotification(
	ctx context.Context,
	req *pbfriend.RespondFriendApplyReq,
) error

func (*FriendNotificationSender) FriendApplicationRefusedNotification

func (f *FriendNotificationSender) FriendApplicationRefusedNotification(
	ctx context.Context,
	req *pbfriend.RespondFriendApplyReq,
) error

func (*FriendNotificationSender) FriendDeletedNotification

func (f *FriendNotificationSender) FriendDeletedNotification(ctx context.Context, req *pbfriend.DeleteFriendReq) error

func (*FriendNotificationSender) FriendInfoUpdatedNotification

func (f *FriendNotificationSender) FriendInfoUpdatedNotification(
	ctx context.Context,
	changedUserID string,
	needNotifiedUserID string,
)

func (*FriendNotificationSender) FriendRemarkSetNotification

func (f *FriendNotificationSender) FriendRemarkSetNotification(ctx context.Context, fromUserID, toUserID string) error

func (*FriendNotificationSender) UserInfoUpdatedNotification

func (f *FriendNotificationSender) UserInfoUpdatedNotification(ctx context.Context, changedUserID string) error

type GroupNotificationSender

type GroupNotificationSender struct {
	*rpcclient.NotificationSender
	// contains filtered or unexported fields
}

func NewGroupNotificationSender

func NewGroupNotificationSender(
	db controller.GroupDatabase,
	msgRpcClient *rpcclient.MessageRpcClient,
	userRpcClient *rpcclient.UserRpcClient,
	fn func(ctx context.Context, userIDs []string) ([]CommonUser, error),
) *GroupNotificationSender

func (*GroupNotificationSender) GroupApplicationAcceptedNotification

func (g *GroupNotificationSender) GroupApplicationAcceptedNotification(ctx context.Context, req *pbgroup.GroupApplicationResponseReq) (err error)

func (*GroupNotificationSender) GroupApplicationRejectedNotification

func (g *GroupNotificationSender) GroupApplicationRejectedNotification(ctx context.Context, req *pbgroup.GroupApplicationResponseReq) (err error)

func (*GroupNotificationSender) GroupCancelMutedNotification

func (g *GroupNotificationSender) GroupCancelMutedNotification(ctx context.Context, groupID string) (err error)

func (*GroupNotificationSender) GroupCreatedNotification

func (g *GroupNotificationSender) GroupCreatedNotification(ctx context.Context, tips *sdkws.GroupCreatedTips) (err error)

func (*GroupNotificationSender) GroupDismissedNotification

func (g *GroupNotificationSender) GroupDismissedNotification(ctx context.Context, tips *sdkws.GroupDismissedTips) (err error)

func (*GroupNotificationSender) GroupInfoSetAnnouncementNotification

func (g *GroupNotificationSender) GroupInfoSetAnnouncementNotification(ctx context.Context, tips *sdkws.GroupInfoSetAnnouncementTips) (err error)

func (*GroupNotificationSender) GroupInfoSetNameNotification

func (g *GroupNotificationSender) GroupInfoSetNameNotification(ctx context.Context, tips *sdkws.GroupInfoSetNameTips) (err error)

func (*GroupNotificationSender) GroupInfoSetNotification

func (g *GroupNotificationSender) GroupInfoSetNotification(ctx context.Context, tips *sdkws.GroupInfoSetTips) (err error)

func (*GroupNotificationSender) GroupMemberCancelMutedNotification

func (g *GroupNotificationSender) GroupMemberCancelMutedNotification(ctx context.Context, groupID, groupMemberUserID string) (err error)

func (*GroupNotificationSender) GroupMemberInfoSetNotification

func (g *GroupNotificationSender) GroupMemberInfoSetNotification(ctx context.Context, groupID, groupMemberUserID string) (err error)

func (*GroupNotificationSender) GroupMemberMutedNotification

func (g *GroupNotificationSender) GroupMemberMutedNotification(ctx context.Context, groupID, groupMemberUserID string, mutedSeconds uint32) (err error)

func (*GroupNotificationSender) GroupMemberSetToAdminNotification

func (g *GroupNotificationSender) GroupMemberSetToAdminNotification(ctx context.Context, groupID, groupMemberUserID string) (err error)

func (*GroupNotificationSender) GroupMemberSetToOrdinaryUserNotification

func (g *GroupNotificationSender) GroupMemberSetToOrdinaryUserNotification(ctx context.Context, groupID, groupMemberUserID string) (err error)

func (*GroupNotificationSender) GroupMutedNotification

func (g *GroupNotificationSender) GroupMutedNotification(ctx context.Context, groupID string) (err error)

func (*GroupNotificationSender) GroupOwnerTransferredNotification

func (g *GroupNotificationSender) GroupOwnerTransferredNotification(ctx context.Context, req *pbgroup.TransferGroupOwnerReq) (err error)

func (*GroupNotificationSender) JoinGroupApplicationNotification

func (g *GroupNotificationSender) JoinGroupApplicationNotification(ctx context.Context, req *pbgroup.JoinGroupReq) (err error)

func (*GroupNotificationSender) MemberEnterNotification

func (g *GroupNotificationSender) MemberEnterNotification(ctx context.Context, groupID string, entrantUserID string) (err error)

func (*GroupNotificationSender) MemberInvitedNotification

func (g *GroupNotificationSender) MemberInvitedNotification(ctx context.Context, groupID, reason string, invitedUserIDList []string) (err error)

func (*GroupNotificationSender) MemberKickedNotification

func (g *GroupNotificationSender) MemberKickedNotification(ctx context.Context, tips *sdkws.MemberKickedTips) (err error)

func (*GroupNotificationSender) MemberQuitNotification

func (g *GroupNotificationSender) MemberQuitNotification(ctx context.Context, member *sdkws.GroupMemberFullInfo) (err error)

func (*GroupNotificationSender) SuperGroupNotification

func (g *GroupNotificationSender) SuperGroupNotification(ctx context.Context, sendID, recvID string) (err error)

type MsgNotificationSender

type MsgNotificationSender struct {
	*rpcclient.NotificationSender
}

func (*MsgNotificationSender) MarkAsReadNotification

func (m *MsgNotificationSender) MarkAsReadNotification(ctx context.Context, conversationID string, sesstionType int32, sendID, recvID string, seqs []int64, hasReadSeq int64) error

func (*MsgNotificationSender) UserDeleteMsgsNotification

func (m *MsgNotificationSender) UserDeleteMsgsNotification(ctx context.Context, userID, conversationID string, seqs []int64) error

type UserNotificationSender

type UserNotificationSender struct {
	*rpcclient.NotificationSender
	// contains filtered or unexported fields
}

func NewUserNotificationSender

func NewUserNotificationSender(
	msgRpcClient *rpcclient.MessageRpcClient,
	opts ...userNotificationSenderOptions,
) *UserNotificationSender

func (*UserNotificationSender) UserStatusChangeNotification

func (u *UserNotificationSender) UserStatusChangeNotification(
	ctx context.Context,
	tips *sdkws.UserStatusChangeTips,
) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL