namespace SQLInsight.Community;
public sealed class CommunityOptions
{
public const string SectionName = "SQLInsight:Community";
/// The signed update feed (https or folder), where releases and rule packs are published.
public string? Feed { get; set; }
///
/// Public address of the feed, for download links, when is a folder or an internal address
/// (e.g. https://hub.sqlinsight.seosoft.dk/updates/). Defaults to when that is http(s).
///
public Uri? DownloadUrl { get; set; }
/// The Discourse forum's root, e.g. https://forum.seosoft.dk/. Topic links are built from it.
public Uri? ForumUrl { get; set; }
///
/// Slug of SQLInsight Pro's category when the forum is shared with other products (e.g. "sqlinsight"). The front
/// page then only lists that category's topics, and the forum links go to the category instead of the root.
///
public string? ForumCategory { get; set; }
/// Where "Forum" links go: the category when is set, otherwise the root.
public Uri? ForumHome => ForumUrl is { } forum && !string.IsNullOrWhiteSpace(ForumCategory)
? new Uri(forum, $"c/{Uri.EscapeDataString(ForumCategory)}")
: ForumUrl;
public Uri SourceUrl { get; set; } = new("https://git.seosoft.dk/seo/sqlinsight-pro");
/// The vendor's own site, linked from the header and footer so visitors can get back to it.
public Uri CompanyUrl { get; set; } = new("https://seosoft.dk/");
/// Where Professional and Enterprise enquiries go.
public string ContactEmail { get; set; } = "salg@example.com";
/// Public keys trusted for the feed, in addition to the embedded ones (key id → base64 SubjectPublicKeyInfo).
public IDictionary TrustedKeys { get; } = new Dictionary();
/// How long releases, the rule pack and forum topics are cached.
public TimeSpan CacheFor { get; set; } = TimeSpan.FromMinutes(10);
}