-
Notifications
You must be signed in to change notification settings - Fork 848
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
30 changed files
with
266 additions
and
964 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
52 changes: 52 additions & 0 deletions
52
src/IslandGateway.Core/Abstractions/RouteDiscovery/Contract/GatewayMatch.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
// Copyright (c) Microsoft Corporation. | ||
// Licensed under the MIT License. | ||
|
||
using System.Collections.Generic; | ||
using System.Linq; | ||
|
||
namespace IslandGateway.Core.Abstractions | ||
{ | ||
/// <summary> | ||
/// Describes the matching criteria for a route. | ||
/// </summary> | ||
public class GatewayMatch : IDeepCloneable<GatewayMatch> | ||
{ | ||
/// <summary> | ||
/// Only match requests that use these optional HTTP methods. E.g. GET, POST. | ||
/// </summary> | ||
public IReadOnlyList<string> Methods { get; set; } | ||
|
||
/// <summary> | ||
/// Only match requests with the given Host header. | ||
/// </summary> | ||
public string Host { get; set; } | ||
|
||
/// <summary> | ||
/// Only match requests with the given Path pattern. | ||
/// </summary> | ||
public string Path { get; set; } | ||
|
||
// TODO: | ||
/// <summary> | ||
/// Only match requests that contain all of these query parameters. | ||
/// </summary> | ||
// public ICollection<KeyValuePair<string, string>> QueryParameters { get; set; } | ||
|
||
// TODO: | ||
/// <summary> | ||
/// Only match requests that contain all of these request headers. | ||
/// </summary> | ||
// public ICollection<KeyValuePair<string, string>> Headers { get; set; } | ||
|
||
GatewayMatch IDeepCloneable<GatewayMatch>.DeepClone() | ||
{ | ||
return new GatewayMatch() | ||
{ | ||
Methods = Methods?.ToArray(), | ||
Host = Host, | ||
Path = Path, | ||
// Headers = Headers.DeepClone(); // TODO: | ||
}; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
22 changes: 0 additions & 22 deletions
22
src/IslandGateway.Core/Service/Config/RuleParsing/IRuleParser.cs
This file was deleted.
Oops, something went wrong.
19 changes: 0 additions & 19 deletions
19
src/IslandGateway.Core/Service/Config/RuleParsing/Matchers/HostMatcher.cs
This file was deleted.
Oops, something went wrong.
18 changes: 0 additions & 18 deletions
18
src/IslandGateway.Core/Service/Config/RuleParsing/Matchers/MethodMatcher.cs
This file was deleted.
Oops, something went wrong.
19 changes: 0 additions & 19 deletions
19
src/IslandGateway.Core/Service/Config/RuleParsing/Matchers/PathMatcher.cs
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.