Documentation
¶
Index ¶
- Constants
- func ServerGroupMemberToLocalGroupMember(info *sdkws.GroupMemberFullInfo) *model_struct.LocalGroupMember
- func ServerGroupRequestToLocalGroupRequest(info *sdkws.GroupRequest) *model_struct.LocalGroupRequest
- func ServerGroupRequestToLocalGroupRequestForNotification(groupInfo *sdkws.GroupInfo, groupRequest *sdkws.GroupRequest) *model_struct.LocalGroupRequest
- func ServerGroupToLocalGroup(info *sdkws.GroupInfo) *model_struct.LocalGroup
- type Group
- func (g *Group) AcceptGroupApplication(ctx context.Context, groupID, fromUserID, handleMsg string) error
- func (g *Group) ChangeGroupMemberMute(ctx context.Context, groupID, userID string, mutedSeconds int) error
- func (g *Group) ChangeGroupMute(ctx context.Context, groupID string, isMute bool) (err error)
- func (g *Group) CreateGroup(ctx context.Context, req *group.CreateGroupReq) (*sdkws.GroupInfo, error)
- func (g *Group) DismissGroup(ctx context.Context, groupID string) error
- func (g *Group) DoNotification(ctx context.Context, msg *sdkws.MsgData)
- func (g *Group) FetchGroupOrError(ctx context.Context, groupID string) (*model_struct.LocalGroup, error)
- func (g *Group) GetGroupApplicationListAsApplicant(ctx context.Context, ...) ([]*model_struct.LocalGroupRequest, error)
- func (g *Group) GetGroupApplicationListAsRecipient(ctx context.Context, ...) ([]*model_struct.LocalGroupRequest, error)
- func (g *Group) GetGroupApplicationUnhandledCount(ctx context.Context, ...) (int32, error)
- func (g *Group) GetGroupMemberList(ctx context.Context, groupID string, filter, offset, count int32) ([]*model_struct.LocalGroupMember, error)
- func (g *Group) GetGroupMemberListByJoinTimeFilter(ctx context.Context, groupID string, offset, count int32, ...) ([]*model_struct.LocalGroupMember, error)
- func (g *Group) GetGroupMemberNameAndFaceURL(ctx context.Context, groupID string, userIDs []string) (map[string]*model_struct.LocalGroupMember, error)
- func (g *Group) GetGroupMemberOwnerAndAdmin(ctx context.Context, groupID string) ([]*model_struct.LocalGroupMember, error)
- func (g *Group) GetGroupMembersInfo(ctx context.Context, groupID string, userIDs []string) (map[string]*model_struct.LocalGroupMember, error)
- func (g *Group) GetGroupMembersInfoFunc(ctx context.Context, groupID string, userIDs []string, ...) (map[string]*model_struct.LocalGroupMember, error)
- func (g *Group) GetJoinedGroupList(ctx context.Context) ([]*model_struct.LocalGroup, error)
- func (g *Group) GetJoinedGroupListPage(ctx context.Context, offset, count int32) ([]*model_struct.LocalGroup, error)
- func (g *Group) GetServerJoinGroup(ctx context.Context) ([]*sdkws.GroupInfo, error)
- func (g *Group) GetSpecifiedGroupMembersInfo(ctx context.Context, groupID string, userIDList []string) ([]*model_struct.LocalGroupMember, error)
- func (g *Group) GetSpecifiedGroupsInfo(ctx context.Context, groupIDs []string) ([]*model_struct.LocalGroup, error)
- func (g *Group) GetUsersInGroup(ctx context.Context, groupID string, userIDList []string) ([]string, error)
- func (g *Group) HandlerGroupApplication(ctx context.Context, req *group.GroupApplicationResponseReq) error
- func (g *Group) IncrSyncGroupAndMember(ctx context.Context, groupIDs ...string) error
- func (g *Group) IncrSyncJoinGroup(ctx context.Context) error
- func (g *Group) IncrSyncJoinGroupMember(ctx context.Context) error
- func (g *Group) InviteUserToGroup(ctx context.Context, groupID, reason string, userIDList []string) error
- func (g *Group) IsJoinGroup(ctx context.Context, groupID string) (bool, error)
- func (g *Group) JoinGroup(ctx context.Context, groupID, reqMsg string, joinSource int32, ex string) error
- func (g *Group) KickGroupMember(ctx context.Context, groupID string, reason string, userIDList []string) error
- func (g *Group) QuitGroup(ctx context.Context, groupID string) error
- func (g *Group) RefuseGroupApplication(ctx context.Context, groupID, fromUserID, handleMsg string) error
- func (g *Group) SearchGroupMembers(ctx context.Context, searchParam *sdk_params_callback.SearchGroupMembersParam) ([]*model_struct.LocalGroupMember, error)
- func (g *Group) SearchGroups(ctx context.Context, param sdk_params_callback.SearchGroupsParam) ([]*model_struct.LocalGroup, error)
- func (g *Group) SetGroupInfo(ctx context.Context, groupInfo *group.SetGroupInfoExReq) error
- func (g *Group) SetGroupListener(listener func() open_im_sdk_callback.OnGroupListener)
- func (g *Group) SetGroupMemberInfo(ctx context.Context, groupMemberInfo *group.SetGroupMemberInfo) error
- func (g *Group) SetListenerForService(listener open_im_sdk_callback.OnListenerForService)
- func (g *Group) SyncAllJoinedGroupsAndMembers(ctx context.Context) error
- func (g *Group) SyncAllJoinedGroupsAndMembersWithLock(ctx context.Context) error
- func (g *Group) TransferGroupOwner(ctx context.Context, groupID, newOwnerUserID string) error
- type NotificationFilter
Constants ¶
View Source
const ( NotificationFilterCacheSize = 1024 NotificationFilterTimeout = 10 * time.Second )
Variables ¶
This section is empty.
Functions ¶
func ServerGroupMemberToLocalGroupMember ¶
func ServerGroupMemberToLocalGroupMember(info *sdkws.GroupMemberFullInfo) *model_struct.LocalGroupMember
func ServerGroupRequestToLocalGroupRequest ¶
func ServerGroupRequestToLocalGroupRequest(info *sdkws.GroupRequest) *model_struct.LocalGroupRequest
func ServerGroupRequestToLocalGroupRequestForNotification ¶
func ServerGroupRequestToLocalGroupRequestForNotification(groupInfo *sdkws.GroupInfo, groupRequest *sdkws.GroupRequest) *model_struct.LocalGroupRequest
func ServerGroupToLocalGroup ¶
func ServerGroupToLocalGroup(info *sdkws.GroupInfo) *model_struct.LocalGroup
Types ¶
type Group ¶
type Group struct {
// contains filtered or unexported fields
}
func (*Group) AcceptGroupApplication ¶
func (*Group) ChangeGroupMemberMute ¶
func (*Group) ChangeGroupMute ¶
func (*Group) CreateGroup ¶
func (*Group) DismissGroup ¶
func (*Group) DoNotification ¶
func (*Group) FetchGroupOrError ¶ added in v3.8.1
func (g *Group) FetchGroupOrError(ctx context.Context, groupID string) (*model_struct.LocalGroup, error)
func (*Group) GetGroupApplicationListAsApplicant ¶
func (g *Group) GetGroupApplicationListAsApplicant(ctx context.Context, req *sdk_params_callback.GetGroupApplicationListAsApplicantReq) ([]*model_struct.LocalGroupRequest, error)
func (*Group) GetGroupApplicationListAsRecipient ¶
func (g *Group) GetGroupApplicationListAsRecipient(ctx context.Context, req *sdk_params_callback.GetGroupApplicationListAsRecipientReq) ([]*model_struct.LocalGroupRequest, error)
func (*Group) GetGroupApplicationUnhandledCount ¶
func (g *Group) GetGroupApplicationUnhandledCount(ctx context.Context, req *sdk_params_callback.GetGroupApplicationUnhandledCountReq) (int32, error)
func (*Group) GetGroupMemberList ¶
func (g *Group) GetGroupMemberList(ctx context.Context, groupID string, filter, offset, count int32) ([]*model_struct.LocalGroupMember, error)
func (*Group) GetGroupMemberListByJoinTimeFilter ¶
func (g *Group) GetGroupMemberListByJoinTimeFilter(ctx context.Context, groupID string, offset, count int32, joinTimeBegin, joinTimeEnd int64, userIDs []string) ([]*model_struct.LocalGroupMember, error)
func (*Group) GetGroupMemberNameAndFaceURL ¶ added in v3.8.1
func (g *Group) GetGroupMemberNameAndFaceURL(ctx context.Context, groupID string, userIDs []string) (map[string]*model_struct.LocalGroupMember, error)
func (*Group) GetGroupMemberOwnerAndAdmin ¶
func (g *Group) GetGroupMemberOwnerAndAdmin(ctx context.Context, groupID string) ([]*model_struct.LocalGroupMember, error)
func (*Group) GetGroupMembersInfo ¶ added in v3.8.1
func (g *Group) GetGroupMembersInfo(ctx context.Context, groupID string, userIDs []string) (map[string]*model_struct.LocalGroupMember, error)
func (*Group) GetGroupMembersInfoFunc ¶ added in v3.8.1
func (g *Group) GetGroupMembersInfoFunc(ctx context.Context, groupID string, userIDs []string, fetchFunc func(ctx context.Context, missingKeys []string) ([]*model_struct.LocalGroupMember, error), ) (map[string]*model_struct.LocalGroupMember, error)
func (*Group) GetJoinedGroupList ¶
func (g *Group) GetJoinedGroupList(ctx context.Context) ([]*model_struct.LocalGroup, error)
func (*Group) GetJoinedGroupListPage ¶ added in v3.8.0
func (g *Group) GetJoinedGroupListPage(ctx context.Context, offset, count int32) ([]*model_struct.LocalGroup, error)
func (*Group) GetServerJoinGroup ¶
func (*Group) GetSpecifiedGroupMembersInfo ¶
func (g *Group) GetSpecifiedGroupMembersInfo(ctx context.Context, groupID string, userIDList []string) ([]*model_struct.LocalGroupMember, error)
func (*Group) GetSpecifiedGroupsInfo ¶
func (g *Group) GetSpecifiedGroupsInfo(ctx context.Context, groupIDs []string) ([]*model_struct.LocalGroup, error)
func (*Group) GetUsersInGroup ¶ added in v3.8.0
func (*Group) HandlerGroupApplication ¶
func (*Group) IncrSyncGroupAndMember ¶ added in v3.8.0
func (*Group) IncrSyncJoinGroup ¶ added in v3.8.0
func (*Group) IncrSyncJoinGroupMember ¶ added in v3.8.0
func (*Group) InviteUserToGroup ¶
func (*Group) IsJoinGroup ¶
func (*Group) KickGroupMember ¶
func (*Group) RefuseGroupApplication ¶
func (*Group) SearchGroupMembers ¶
func (g *Group) SearchGroupMembers(ctx context.Context, searchParam *sdk_params_callback.SearchGroupMembersParam) ([]*model_struct.LocalGroupMember, error)
func (*Group) SearchGroups ¶
func (g *Group) SearchGroups(ctx context.Context, param sdk_params_callback.SearchGroupsParam) ([]*model_struct.LocalGroup, error)
func (*Group) SetGroupInfo ¶
func (*Group) SetGroupListener ¶
func (g *Group) SetGroupListener(listener func() open_im_sdk_callback.OnGroupListener)
func (*Group) SetGroupMemberInfo ¶
func (*Group) SetListenerForService ¶
func (g *Group) SetListenerForService(listener open_im_sdk_callback.OnListenerForService)
func (*Group) SyncAllJoinedGroupsAndMembers ¶
func (*Group) SyncAllJoinedGroupsAndMembersWithLock ¶
type NotificationFilter ¶
type NotificationFilter struct {
// contains filtered or unexported fields
}
NotificationFilter deduplicates events by UUID, ensuring that the same UUID is only processed once within the specified timeout.
func NewNotificationFilter ¶
func NewNotificationFilter(size int, timeout time.Duration) *NotificationFilter
NewNotificationFilter creates a NotificationFilter with the given capacity (size) and timeout duration.
func (*NotificationFilter) ExecuteIfNew ¶
func (f *NotificationFilter) ExecuteIfNew(uuid string, fn func())
ExecuteIfNew calls fn only if the UUID has not been processed within the timeout period. Otherwise, it does nothing.
func (*NotificationFilter) ShouldExecute ¶
func (f *NotificationFilter) ShouldExecute(uuid string) bool
ShouldExecute returns true if the UUID has not been processed within the timeout period. It also records the current time for this UUID. If the UUID was processed less than timeout ago, it returns false.
Click to show internal directories.
Click to hide internal directories.