Files
Flypaper/src/Flypaper.Storage/Queries/CatchRecords.cs
T
TomandClaude Sonnet 5.5 b7027e2a72
Build and deploy / build (push) Successful in 1m31s
Build and deploy / deploy (push) Successful in 30s
Show the strategy of each catch in the dashboard
Add a Strategie column to the catch list (searchable, filterable) and a
Strategien tab to the Top 10 card. The MCP top tool accepts strategies.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-16 23:34:10 +01:00

66 lines
1.3 KiB
C#

using Flypaper.Core.Models;
namespace Flypaper.Storage.Queries;
public sealed record CatchRecord(
long Id,
DateTime StartedAt,
DateTime EndedAt,
double DurationSeconds,
long BytesSent,
TrapOutcome Outcome,
string Strategy,
string Ip,
string? CountryCode,
string? Country,
string? City,
long? Asn,
string? Provider,
string? Target,
string? UserAgent);
public sealed record CatchFilter(
DateTime? Since = null,
DateTime? Until = null,
string? Country = null,
string? Provider = null,
string? Ip = null,
string? TargetContains = null,
int Limit = 50);
public sealed record CatchStats(
int Catches,
int Rejected,
int UniqueIps,
double TotalHoldSeconds,
double AverageHoldSeconds,
CatchRecord? Longest);
public enum TopDimension
{
Ips,
Countries,
Providers,
Targets,
Strategies,
UserAgents
}
public sealed record TopItem(string Key, string? Label, int Catches, double TotalHoldSeconds);
public sealed record IpProfile(
string Ip,
string? CountryCode,
string? Country,
string? City,
long? Asn,
string? Provider,
int Catches,
int Rejected,
double TotalHoldSeconds,
long TotalBytesSent,
DateTime? FirstSeen,
DateTime? LastSeen,
IReadOnlyList<CatchRecord> Events,
int EventsOmitted);