- KeyScannerService als BackgroundService (Timer + manueller Trigger) - GitHub Code Search: sucht nach sk-ant-oat01-* Keys in Dotenv-Dateien - AnthropicKeyChecker: shared Key-Check-Logik (ersetzt Duplikat in ApiKeysEndpoint) - ScannedKeyRecord Model mit Soft-Delete und Adopt-Verknüpfung - Scan-Endpoints: trigger, status, list, recheck, adopt, delete - API-Keys-Page: Scanner-UI mit Status-Indikator und Scanned-Keys-Liste - GitHub-URL pro gefundenem Key (html_url aus Search API) - Server-Settings: GitHubToken + ScanIntervalHours konfigurierbar - DB-Migration: scanned_keys Tabelle + api_keys Meta-Spalten (status, plan, usage) - ApiKeyRecord erweitert um Status/Plan/Usage-Felder mit UpdateApiKeyMeta()
19 lines
851 B
C#
19 lines
851 B
C#
namespace Gott.Models;
|
|
|
|
public class ApiKeyRecord
|
|
{
|
|
public long Id { get; set; }
|
|
public string KeyId { get; set; }
|
|
public string Provider { get; set; } // anthropic, gemini, openai, ...
|
|
public string Name { get; set; } // Anzeigename z.B. "Tausi Pro Key"
|
|
public string ApiKey { get; set; } // Der eigentliche Key
|
|
public bool IsActive { get; set; } // Nur einer pro Provider aktiv
|
|
public string Status { get; set; } // ok, invalid, rate_limited, quota_exceeded, error
|
|
public string Plan { get; set; } // Pro, Max, Pro/Max, API Console, Unknown
|
|
public double? Usage7d { get; set; }
|
|
public double? Usage5h { get; set; }
|
|
public string CheckedAt { get; set; } // Wann zuletzt geprüft
|
|
public string CreatedAt { get; set; }
|
|
public string UpdatedAt { get; set; }
|
|
}
|