diff options
Diffstat (limited to 'src/SMAPI.Web/Framework/ConfigModels')
-rw-r--r-- | src/SMAPI.Web/Framework/ConfigModels/ApiClientsConfig.cs | 27 | ||||
-rw-r--r-- | src/SMAPI.Web/Framework/ConfigModels/MongoDbConfig.cs | 23 | ||||
-rw-r--r-- | src/SMAPI.Web/Framework/ConfigModels/SiteConfig.cs | 3 |
3 files changed, 18 insertions, 35 deletions
diff --git a/src/SMAPI.Web/Framework/ConfigModels/ApiClientsConfig.cs b/src/SMAPI.Web/Framework/ConfigModels/ApiClientsConfig.cs index 7119ef03..878130bf 100644 --- a/src/SMAPI.Web/Framework/ConfigModels/ApiClientsConfig.cs +++ b/src/SMAPI.Web/Framework/ConfigModels/ApiClientsConfig.cs @@ -14,19 +14,16 @@ namespace StardewModdingAPI.Web.Framework.ConfigModels /**** - ** Amazon Web Services + ** Azure ****/ - /// <summary>The access key for AWS authentication.</summary> - public string AmazonAccessKey { get; set; } + /// <summary>The connection string for the Azure Blob storage account.</summary> + public string AzureBlobConnectionString { get; set; } - /// <summary>The secret key for AWS authentication.</summary> - public string AmazonSecretKey { get; set; } + /// <summary>The Azure Blob container in which to store temporary uploaded logs.</summary> + public string AzureBlobTempContainer { get; set; } - /// <summary>The AWS region endpoint (like 'us-east-1').</summary> - public string AmazonRegion { get; set; } - - /// <summary>The AWS bucket in which to store temporary uploaded logs.</summary> - public string AmazonLogBucket { get; set; } + /// <summary>The number of days since the blob's last-modified date when it will be deleted.</summary> + public int AzureBlobTempExpiryDays { get; set; } /**** @@ -61,6 +58,7 @@ namespace StardewModdingAPI.Web.Framework.ConfigModels /// <summary>The password with which to authenticate to the GitHub API (if any).</summary> public string GitHubPassword { get; set; } + /**** ** ModDrop ****/ @@ -70,6 +68,7 @@ namespace StardewModdingAPI.Web.Framework.ConfigModels /// <summary>The URL for a ModDrop mod page for the user, where {0} is the mod ID.</summary> public string ModDropModPageUrl { get; set; } + /**** ** Nexus Mods ****/ @@ -85,17 +84,11 @@ namespace StardewModdingAPI.Web.Framework.ConfigModels /// <summary>The Nexus API authentication key.</summary> public string NexusApiKey { get; set; } + /**** ** Pastebin ****/ /// <summary>The base URL for the Pastebin API.</summary> public string PastebinBaseUrl { get; set; } - - /// <summary>The user key used to authenticate with the Pastebin API.</summary> - public string PastebinUserKey { get; set; } - - /// <summary>The developer key used to authenticate with the Pastebin API.</summary> - public string PastebinDevKey { get; set; } - } } diff --git a/src/SMAPI.Web/Framework/ConfigModels/MongoDbConfig.cs b/src/SMAPI.Web/Framework/ConfigModels/MongoDbConfig.cs index 3c508300..c7b6cb00 100644 --- a/src/SMAPI.Web/Framework/ConfigModels/MongoDbConfig.cs +++ b/src/SMAPI.Web/Framework/ConfigModels/MongoDbConfig.cs @@ -1,5 +1,3 @@ -using System; - namespace StardewModdingAPI.Web.Framework.ConfigModels { /// <summary>The config settings for mod compatibility list.</summary> @@ -8,14 +6,8 @@ namespace StardewModdingAPI.Web.Framework.ConfigModels /********* ** Accessors *********/ - /// <summary>The MongoDB hostname.</summary> - public string Host { get; set; } - - /// <summary>The MongoDB username (if any).</summary> - public string Username { get; set; } - - /// <summary>The MongoDB password (if any).</summary> - public string Password { get; set; } + /// <summary>The MongoDB connection string.</summary> + public string ConnectionString { get; set; } /// <summary>The database name.</summary> public string Database { get; set; } @@ -24,15 +16,10 @@ namespace StardewModdingAPI.Web.Framework.ConfigModels /********* ** Public method *********/ - /// <summary>Get the MongoDB connection string.</summary> - public string GetConnectionString() + /// <summary>Get whether a MongoDB instance is configured.</summary> + public bool IsConfigured() { - bool isLocal = this.Host == "localhost"; - bool hasLogin = !string.IsNullOrWhiteSpace(this.Username) && !string.IsNullOrWhiteSpace(this.Password); - - return $"mongodb{(isLocal ? "" : "+srv")}://" - + (hasLogin ? $"{Uri.EscapeDataString(this.Username)}:{Uri.EscapeDataString(this.Password)}@" : "") - + $"{this.Host}/{this.Database}?retryWrites=true&w=majority"; + return !string.IsNullOrWhiteSpace(this.ConnectionString); } } } diff --git a/src/SMAPI.Web/Framework/ConfigModels/SiteConfig.cs b/src/SMAPI.Web/Framework/ConfigModels/SiteConfig.cs index d379c423..43969f51 100644 --- a/src/SMAPI.Web/Framework/ConfigModels/SiteConfig.cs +++ b/src/SMAPI.Web/Framework/ConfigModels/SiteConfig.cs @@ -11,5 +11,8 @@ namespace StardewModdingAPI.Web.Framework.ConfigModels /// <summary>A short sentence shown under the beta download button, if any.</summary> public string BetaBlurb { get; set; } + + /// <summary>A list of supports to credit on the main page, in Markdown format.</summary> + public string SupporterList { get; set; } } } |