53 lines
1.3 KiB
C#
53 lines
1.3 KiB
C#
using System.Collections.Generic;
|
|
|
|
namespace StellaOps.Excititor.WebService.Options;
|
|
|
|
public sealed class MirrorDistributionOptions
|
|
{
|
|
public const string SectionName = "Excititor:Mirror";
|
|
|
|
public List<MirrorDomainOptions> Domains { get; } = new();
|
|
}
|
|
|
|
public sealed class MirrorDomainOptions
|
|
{
|
|
public string Id { get; set; } = string.Empty;
|
|
|
|
public string DisplayName { get; set; } = string.Empty;
|
|
|
|
public bool RequireAuthentication { get; set; }
|
|
= false;
|
|
|
|
/// <summary>
|
|
/// Maximum index requests allowed per rolling window.
|
|
/// </summary>
|
|
public int MaxIndexRequestsPerHour { get; set; } = 120;
|
|
|
|
/// <summary>
|
|
/// Maximum export downloads allowed per rolling window.
|
|
/// </summary>
|
|
public int MaxDownloadRequestsPerHour { get; set; } = 600;
|
|
|
|
public List<MirrorExportOptions> Exports { get; } = new();
|
|
}
|
|
|
|
public sealed class MirrorExportOptions
|
|
{
|
|
public string Key { get; set; } = string.Empty;
|
|
|
|
public string Format { get; set; } = string.Empty;
|
|
|
|
public Dictionary<string, string> Filters { get; } = new();
|
|
|
|
public Dictionary<string, bool> Sort { get; } = new();
|
|
|
|
public int? Limit { get; set; }
|
|
= null;
|
|
|
|
public int? Offset { get; set; }
|
|
= null;
|
|
|
|
public string? View { get; set; }
|
|
= null;
|
|
}
|