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.
This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.
package database
import (
"context"
"github.com/openimsdk/open-im-server/v3/pkg/common/storage/model"
"github.com/openimsdk/tools/db/pagination"
)
// UserGlobalBlack 全局黑名单持久化接口
type UserGlobalBlack interface {
// Add 批量添加用户到全局黑名单
Add ( ctx context . Context , blacks [ ] * model . UserGlobalBlack ) error
// Remove 按 userID 从全局黑名单移除用户
Remove ( ctx context . Context , userIDs [ ] string ) error
// Find 查询指定用户是否在黑名单(返回在黑名单中的记录)
Find ( ctx context . Context , userIDs [ ] string ) ( [ ] * model . UserGlobalBlack , error )
// IsBlocked 检查单个用户是否在黑名单
IsBlocked ( ctx context . Context , userID string ) ( bool , error )
// GetStatus 返回用户限制状态: 0=正常, 1=冻结, 2=黑名单
GetStatus ( ctx context . Context , userID string ) ( int32 , error )
// Page 分页查询黑名单列表
Page ( ctx context . Context , pagination pagination . Pagination ) ( count int64 , blacks [ ] * model . UserGlobalBlack , err error )
}