chore: initial project import

This commit is contained in:
justme committed 2026-10-04 21:46:39 +08:00
commit 26620707a0
347 files changed
+56172

No files matched your search

@@ -0,0 +1,48 @@
using Fleet.Core;
namespace Fleet.Server;
/// <summary>pending 能连接,但不下发状态、不接收上报;disabled 拒绝连接。</summary>
public enum NodeStatus
{
Pending,
Active,
Disabled,
}
public sealed record NodeRecord(
NodeId Id,
string Name,
NodeStatus Status,
byte[] PublicKey,
byte[] TlsSpki,
IReadOnlyList<string> Labels,
string? MetaJson,
string? NodeVersion,
long CreatedAtMs,
long? LastSeenAtMs);
public sealed record NewNode(
NodeId Id,
string Name,
NodeStatus Status,
byte[] PublicKey,
byte[] TlsSpki,
IReadOnlyList<string> Labels,
string? MetaJson,
string? NodeVersion,
long NowMs);
public sealed record JoinTokenRecord(
string Id,
byte[] TokenSha256,
string? Note,
IReadOnlyList<string> Labels,
bool AutoApprove,
int MaxUses,
int Uses,
long ExpiresAtMs,
long? RevokedAtMs,
long CreatedAtMs);
public sealed record Presence(bool Online, long AtMs, string? NodeVersion, IReadOnlyList<string> Capabilities, string? HelloMetaJson);