package store import ( "context" "telesrv/internal/domain" ) // ReservedUsernameStore owns the operator username blocklist. IsReserved is the // hot path consulted on every editable-username write; the rest are the admin // lifecycle. type ReservedUsernameStore interface { // IsReserved reports whether usernameLower (already lowercased) is blocked. IsReserved(ctx context.Context, usernameLower string) (bool, error) // ReserveUsername adds an entry. Returns created=false if it already existed // (the existing reason/actor are kept). ReserveUsername(ctx context.Context, username, reason, actor string) (created bool, err error) // UnreserveUsername removes an entry. Returns removed=false if absent. UnreserveUsername(ctx context.Context, username string) (removed bool, err error) // ReservedUsernames pages the blocklist, newest first. ReservedUsernames(ctx context.Context, filter domain.ReservedUsernameFilter) ([]domain.ReservedUsername, error) }