2018-05-13 18:47:01 +02:00
|
|
|
|
using CommandLine;
|
2018-05-02 20:19:11 +02:00
|
|
|
|
|
|
|
|
|
namespace Geekbot.net.Lib
|
|
|
|
|
{
|
|
|
|
|
public class RunParameters
|
|
|
|
|
{
|
2018-05-13 18:47:01 +02:00
|
|
|
|
/************************************
|
|
|
|
|
* General *
|
|
|
|
|
************************************/
|
|
|
|
|
|
|
|
|
|
[Option('V', "verbose", Default = false, HelpText = "Logs everything.")]
|
2018-05-02 20:19:11 +02:00
|
|
|
|
public bool Verbose { get; set; }
|
|
|
|
|
|
2018-05-13 18:47:01 +02:00
|
|
|
|
[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; }
|
2018-05-09 01:21:39 +02:00
|
|
|
|
|
2018-05-13 18:47:01 +02:00
|
|
|
|
/************************************
|
|
|
|
|
* Database *
|
|
|
|
|
************************************/
|
|
|
|
|
|
2018-05-10 00:00:51 +02:00
|
|
|
|
[Option("in-memory", Default = false, HelpText = "Uses the in-memory database instead of postgresql")]
|
2018-05-09 01:21:39 +02:00
|
|
|
|
public bool InMemory { get; set; }
|
2018-05-10 00:00:51 +02:00
|
|
|
|
|
|
|
|
|
// 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 00:00:51 +02:00
|
|
|
|
|
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 00:00:51 +02:00
|
|
|
|
|
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 00:00:51 +02:00
|
|
|
|
|
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 00:00:51 +02:00
|
|
|
|
|
2018-05-10 03:29:11 +02:00
|
|
|
|
[Option("db-password", Default = "", HelpText = "Set a posgresql password")]
|
|
|
|
|
public string DbPassword { get; set; }
|
2018-05-13 18:47:01 +02:00
|
|
|
|
|
|
|
|
|
/************************************
|
|
|
|
|
* 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")]
|
2018-05-13 18:47:01 +02:00
|
|
|
|
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
|
|
|
|
}
|
|
|
|
|
}
|