43 lines
1.1 KiB
C#
43 lines
1.1 KiB
C#
using System.ComponentModel.DataAnnotations;
|
|
|
|
namespace StellaOps.Plugin.MyConnector;
|
|
|
|
/// <summary>
|
|
/// Configuration options for the MyConnector plugin.
|
|
/// </summary>
|
|
public sealed class MyConnectorOptions
|
|
{
|
|
/// <summary>
|
|
/// The configuration section name.
|
|
/// </summary>
|
|
public const string SectionName = "Plugins:MyConnector";
|
|
|
|
/// <summary>
|
|
/// Gets or sets the base URL for the connector's data source.
|
|
/// </summary>
|
|
[Required]
|
|
public required string BaseUrl { get; set; }
|
|
|
|
/// <summary>
|
|
/// Gets or sets the API key for authentication.
|
|
/// </summary>
|
|
public string? ApiKey { get; set; }
|
|
|
|
/// <summary>
|
|
/// Gets or sets the request timeout in seconds. Default is 30.
|
|
/// </summary>
|
|
[Range(1, 300)]
|
|
public int TimeoutSeconds { get; set; } = 30;
|
|
|
|
/// <summary>
|
|
/// Gets or sets the maximum number of retry attempts. Default is 3.
|
|
/// </summary>
|
|
[Range(0, 10)]
|
|
public int MaxRetries { get; set; } = 3;
|
|
|
|
/// <summary>
|
|
/// Gets or sets whether to enable verbose logging.
|
|
/// </summary>
|
|
public bool EnableVerboseLogging { get; set; }
|
|
}
|