namespace StellaOps.Router.Gateway.Authorization; /// /// Key for identifying an endpoint by service name, method, and path. /// /// The name of the service. /// The HTTP method. /// The path template. public readonly record struct EndpointKey(string ServiceName, string Method, string Path) { /// /// Creates an endpoint key with normalized values. /// public static EndpointKey Create(string serviceName, string method, string path) { return new EndpointKey( serviceName.ToLowerInvariant(), method.ToUpperInvariant(), path.ToLowerInvariant()); } /// public override string ToString() => $"{ServiceName}:{Method} {Path}"; }