Files
PeachDeployments/lib/Peach/see/redis/ConnectRedis.dart
alvocool 38881d1fe1 Add app source and tests
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-11 10:15:30 +03:00

37 lines
998 B
Dart

import '../../about/external/data/Redis.dart';
/// One scan's worth of results — the key list plus the context needed to
/// label it (per-database counts, DBSIZE, and per-key types when filtering).
class RedisScan {
final int databaseCount;
final Map<int, int> databaseCounts;
final int total;
final List<String> keys;
final Map<String, String> keyTypes;
const RedisScan({
required this.databaseCount,
required this.databaseCounts,
required this.total,
required this.keys,
required this.keyTypes,
});
}
abstract class ConnectRedis {
/// A scan completed.
void onScanned(RedisScan scan);
/// The scan couldn't run; [message] is already phrased for the user.
void onScanFailed(String message);
/// A password was read out of the server's redis.conf.
void onPasswordDetected(String password);
/// No `requirepass` was present in redis.conf.
void onPasswordMissing();
/// One key's value was read.
void onValueLoaded(RedisEntry entry);
}