59 lines
1.6 KiB
C#
59 lines
1.6 KiB
C#
using System.Text.Json.Serialization;
|
|
|
|
namespace StellaOps.Signals.Models;
|
|
|
|
/// <summary>
|
|
/// Represents a discovered entrypoint into the call graph.
|
|
/// </summary>
|
|
public sealed class CallgraphEntrypoint
|
|
{
|
|
/// <summary>
|
|
/// Reference to the node that is an entrypoint.
|
|
/// </summary>
|
|
[JsonPropertyName("nodeId")]
|
|
public string NodeId { get; set; } = string.Empty;
|
|
|
|
/// <summary>
|
|
/// Type of entrypoint.
|
|
/// </summary>
|
|
[JsonPropertyName("kind")]
|
|
public EntrypointKind Kind { get; set; } = EntrypointKind.Unknown;
|
|
|
|
/// <summary>
|
|
/// HTTP route pattern (for http/grpc kinds).
|
|
/// Example: "/api/orders/{id}"
|
|
/// </summary>
|
|
[JsonPropertyName("route")]
|
|
public string? Route { get; set; }
|
|
|
|
/// <summary>
|
|
/// HTTP method (GET, POST, etc.) if applicable.
|
|
/// </summary>
|
|
[JsonPropertyName("httpMethod")]
|
|
public string? HttpMethod { get; set; }
|
|
|
|
/// <summary>
|
|
/// Framework that exposes this entrypoint.
|
|
/// </summary>
|
|
[JsonPropertyName("framework")]
|
|
public EntrypointFramework Framework { get; set; } = EntrypointFramework.Unknown;
|
|
|
|
/// <summary>
|
|
/// Discovery source (attribute, convention, config).
|
|
/// </summary>
|
|
[JsonPropertyName("source")]
|
|
public string? Source { get; set; }
|
|
|
|
/// <summary>
|
|
/// Execution phase when this entrypoint is invoked.
|
|
/// </summary>
|
|
[JsonPropertyName("phase")]
|
|
public EntrypointPhase Phase { get; set; } = EntrypointPhase.Runtime;
|
|
|
|
/// <summary>
|
|
/// Deterministic ordering for stable serialization.
|
|
/// </summary>
|
|
[JsonPropertyName("order")]
|
|
public int Order { get; set; }
|
|
}
|