- Events: CRUD commands/queries + EventCreatedNotification for SignalR - Agents: Register (with API key gen), Heartbeat, queries - Assignments: Assign, Failover, Release commands + queries - Discovery: 10 handlers delegating to existing probes/services - Groups/Persons/Settings/Audit/Stats: full CQRS for remaining domains - Extend IApplicationDbContext with all DbSets
21 lines
475 B
C#
21 lines
475 B
C#
using FluentValidation;
|
|
|
|
namespace Heimdall.Application.Agents.Commands.RegisterAgent;
|
|
|
|
public class RegisterAgentValidator : AbstractValidator<RegisterAgentCommand>
|
|
{
|
|
public RegisterAgentValidator()
|
|
{
|
|
RuleFor(x => x.Token)
|
|
.NotEmpty();
|
|
|
|
RuleFor(x => x.Hostname)
|
|
.NotEmpty()
|
|
.MaximumLength(255);
|
|
|
|
RuleFor(x => x.Version)
|
|
.MaximumLength(50)
|
|
.When(x => x.Version is not null);
|
|
}
|
|
}
|