geekbot/Geekbot.net/Lib/RunParameters.cs

72 lines
3 KiB
C#
Raw Normal View History

using CommandLine;
2018-05-02 20:19:11 +02:00
namespace Geekbot.net.Lib
{
public class RunParameters
{
/************************************
* General *
************************************/
[Option('V', "verbose", Default = false, HelpText = "Logs everything.")]
2018-05-02 20:19:11 +02:00
public bool Verbose { get; set; }
[Option('j', "log-json", Default = false, HelpText = "Logger outputs json")]
2018-05-02 20:19:11 +02:00
public bool LogJson { get; set; }
2018-05-10 03:29:11 +02:00
[Option('a', "disable-api", Default = false, HelpText = "Disables the web api")]
2018-05-02 20:19:11 +02:00
public bool DisableApi { get; set; }
[Option('e', "expose-errors", Default = false, HelpText = "Shows internal errors in the chat")]
public bool ExposeErrors { get; set; }
2018-05-02 23:32:40 +02:00
[Option("token", Default = null, HelpText = "Set a new bot token")]
public string Token { get; set; }
/************************************
* Database *
************************************/
[Option("in-memory", Default = false, HelpText = "Uses the in-memory database instead of postgresql")]
public bool InMemory { get; set; }
// Postresql connection
2018-05-10 03:29:11 +02:00
[Option("database", Default = "geekbot", HelpText = "Select a postgresql database")]
public string DbDatabase { get; set; }
2018-05-10 03:29:11 +02:00
[Option("db-host", Default = "localhost", HelpText = "Set a postgresql host (e.g. 127.0.0.1)")]
public string DbHost { get; set; }
2018-05-10 03:29:11 +02:00
[Option("db-port", Default = "5432", HelpText = "Set a postgresql host (e.g. 5432)")]
public string DbPort { get; set; }
2018-05-10 03:29:11 +02:00
[Option("db-user", Default = "geekbot", HelpText = "Set a postgresql user")]
public string DbUser { get; set; }
2018-05-10 03:29:11 +02:00
[Option("db-password", Default = "", HelpText = "Set a posgresql password")]
public string DbPassword { get; set; }
/************************************
* Redis *
************************************/
[Option("redis-host", Default = "127.0.0.1", HelpText = "Set a redis host")]
public string RedisHost { get; set; }
[Option("redis-port", Default = "6379", HelpText = "Set a redis port")]
public string RedisPort { get; set; }
[Option("redis-database", Default = "6", HelpText = "Select a redis database (1-15)")]
public string RedisDatabase { get; set; }
/************************************
* WebApi *
************************************/
2018-05-14 00:41:05 +02:00
[Option("api-host", Default = "localhost", HelpText = "Host on which the WebApi listens")]
public string ApiHost { get; set; }
[Option("api-port", Default = "12995", HelpText = "Port on which the WebApi listens")]
public string ApiPort { get; set; }
2018-05-02 20:19:11 +02:00
}
}