mirror of
https://github.com/Radarr/Radarr
synced 2025-12-06 08:28:50 +01:00
28 lines
853 B
C#
28 lines
853 B
C#
using Microsoft.Extensions.Configuration;
|
|
|
|
namespace NzbDrone.Core.Datastore
|
|
{
|
|
public class PostgresOptions
|
|
{
|
|
public string Host { get; set; }
|
|
public int Port { get; set; }
|
|
public string User { get; set; }
|
|
public string Password { get; set; }
|
|
public string MainDb { get; set; }
|
|
public string LogDb { get; set; }
|
|
public string MainDbConnectionString { get; set; }
|
|
public string LogDbConnectionString { get; set; }
|
|
|
|
public static PostgresOptions GetOptions()
|
|
{
|
|
var config = new ConfigurationBuilder()
|
|
.AddEnvironmentVariables()
|
|
.Build();
|
|
|
|
var postgresOptions = new PostgresOptions();
|
|
config.GetSection("Radarr:Postgres").Bind(postgresOptions);
|
|
|
|
return postgresOptions;
|
|
}
|
|
}
|
|
}
|