up
This commit is contained in:
42
templates/stellaops-plugin-connector/MyConnectorOptions.cs
Normal file
42
templates/stellaops-plugin-connector/MyConnectorOptions.cs
Normal file
@@ -0,0 +1,42 @@
|
||||
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; }
|
||||
}
|
||||
Reference in New Issue
Block a user