37 lines
998 B
Dart
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);
|
|
}
|