wabbajack/Wabbajack.Server/DTOs/BunnyCdnFtpInfo.cs

26 lines
629 B
C#
Raw Normal View History

using System.Collections.Generic;
using System.Threading.Tasks;
using Wabbajack.Common;
namespace Wabbajack.Server.DTOs
2020-05-09 22:16:16 +00:00
{
public enum StorageSpace
{
AuthoredFiles,
Patches,
Mirrors
}
2020-05-09 22:16:16 +00:00
public class BunnyCdnFtpInfo
{
public string Username { get; set; }
public string Password { get; set; }
public string Hostname { get; set; }
public static async Task<BunnyCdnFtpInfo> GetCreds(StorageSpace space)
{
return (await Utils.FromEncryptedJson<Dictionary<string, BunnyCdnFtpInfo>>("bunnycdn"))[space.ToString()];
}
2020-05-09 22:16:16 +00:00
}
}