-
-
Notifications
You must be signed in to change notification settings - Fork 207
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
1 parent
7463c4c
commit be8b06c
Showing
4 changed files
with
102 additions
and
7 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
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
63 changes: 63 additions & 0 deletions
63
src/platform/mix.shared/Models/Configurations/OcelotConfigurations.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,63 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
namespace Mix.Shared.Models.Configurations | ||
{ | ||
public class OcelotConfigurations | ||
{ | ||
public List<OcelotRoute> Routes { get; set; } | ||
public OcelotGlobalConfiguration GlobalConfiguration { get; set; } | ||
} | ||
|
||
public class OcelotGlobalConfiguration | ||
{ | ||
public OcelotRateLimitOptions RateLimitOptions { get; set; } | ||
public OcelotHttpHandlerOptions HttpHandlerOptions { get; set; } | ||
public string BaseUrl { get; set; } | ||
} | ||
|
||
public class OcelotRoute | ||
{ | ||
public int Priority { get; set; } | ||
public string DownstreamPathTemplate { get; set; } | ||
public string DownstreamScheme { get; set; } | ||
public OcelotHost DownstreamHostAndPorts { get; set; } | ||
public string UpstreamPathTemplate { get; set; } | ||
public string[] UpstreamHttpMethod { get; set; } | ||
public OcelotRateLimitOptions RateLimitOptions { get; set; } | ||
public OcelotFileCacheOptions FileCacheOptions { get; set; } | ||
public OcelotHttpHandlerOptions HttpHandlerOptions { get; set; } | ||
} | ||
|
||
public class OcelotHttpHandlerOptions | ||
{ | ||
public bool AllowAutoRedirect { get; set; } | ||
public bool UseCookieContainer { get; set; } | ||
public bool UseTracing { get; set; } | ||
public int MaxConnectionsPerServer { get; set; } | ||
} | ||
|
||
public class OcelotFileCacheOptions | ||
{ | ||
public int TtlSeconds { get; set; } | ||
public string Region { get; set; } | ||
} | ||
|
||
public class OcelotRateLimitOptions | ||
{ | ||
public string[] ClientWhitelist { get; set; } | ||
public bool EnableRateLimiting { get; set; } | ||
public string Period { get; set; } | ||
public int PeriodTimespan { get; set; } | ||
public int Limit { get; set; } | ||
} | ||
|
||
public class OcelotHost | ||
{ | ||
public string Host { get; set; } | ||
public int Port { get; set; } | ||
} | ||
} |