im 服务端
This commit is contained in:
@@ -219,6 +219,15 @@ type testSecurityStore struct {
|
||||
lockedUntil *time.Time
|
||||
notifications []types.SystemNotification
|
||||
readNotificationID string
|
||||
realNameTenant types.TenantID
|
||||
realNameUser types.Uid
|
||||
listTenant types.TenantID
|
||||
listUser types.Uid
|
||||
listCursor string
|
||||
listLimit int
|
||||
nextCursor string
|
||||
readTenant types.TenantID
|
||||
readUser types.Uid
|
||||
}
|
||||
|
||||
func (s *testSecurityStore) GetAuthVersion(types.TenantID, types.Uid) (int, error) {
|
||||
@@ -238,7 +247,9 @@ func (s *testSecurityStore) BumpAuthVersion(_ types.TenantID, uid types.Uid, _ t
|
||||
return s.version, s.err
|
||||
}
|
||||
|
||||
func (s *testSecurityStore) GetRealName(types.TenantID, types.Uid) (*types.RealNameVerification, error) {
|
||||
func (s *testSecurityStore) GetRealName(tenantID types.TenantID, uid types.Uid) (*types.RealNameVerification, error) {
|
||||
s.realNameTenant = tenantID
|
||||
s.realNameUser = uid
|
||||
if s.err != nil {
|
||||
return nil, s.err
|
||||
}
|
||||
@@ -340,11 +351,17 @@ func (s *testSecurityStore) CreateSystemNotification(_ types.TenantID, notificat
|
||||
return s.err
|
||||
}
|
||||
|
||||
func (s *testSecurityStore) ListSystemNotifications(types.TenantID, types.Uid, string, int) ([]types.SystemNotification, string, error) {
|
||||
return s.notifications, "", s.err
|
||||
func (s *testSecurityStore) ListSystemNotifications(tenantID types.TenantID, uid types.Uid, cursor string, limit int) ([]types.SystemNotification, string, error) {
|
||||
s.listTenant = tenantID
|
||||
s.listUser = uid
|
||||
s.listCursor = cursor
|
||||
s.listLimit = limit
|
||||
return s.notifications, s.nextCursor, s.err
|
||||
}
|
||||
|
||||
func (s *testSecurityStore) MarkSystemNotificationRead(_ types.TenantID, _ types.Uid, eventID string, readAt time.Time) error {
|
||||
func (s *testSecurityStore) MarkSystemNotificationRead(tenantID types.TenantID, uid types.Uid, eventID string, readAt time.Time) error {
|
||||
s.readTenant = tenantID
|
||||
s.readUser = uid
|
||||
s.readNotificationID = eventID
|
||||
for i := range s.notifications {
|
||||
if s.notifications[i].EventID == eventID {
|
||||
|
||||
Reference in New Issue
Block a user