Add app source and tests
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
36
lib/Peach/see/redis/ConnectRedis.dart
Normal file
36
lib/Peach/see/redis/ConnectRedis.dart
Normal file
@@ -0,0 +1,36 @@
|
||||
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);
|
||||
}
|
||||
Reference in New Issue
Block a user