aboutsummaryrefslogtreecommitdiffstats
path: root/src/slskd/Options.cs
diff options
context:
space:
mode:
authorJP Dillingham <jpdillingham@gmail.com>2021-01-20 22:26:31 -0600
committerJP Dillingham <jpdillingham@gmail.com>2021-01-20 22:26:31 -0600
commit4876d4a5f024e2223312e95999f9be12bd8511fc (patch)
treefe0e16fa2f4bb3873f321f9d5da244b0d2473a44 /src/slskd/Options.cs
parentcec869b9456cf6fe5597847948b2d75b9846755a (diff)
downloadslskd-4876d4a5f024e2223312e95999f9be12bd8511fc.tar.gz
wip
Diffstat (limited to 'src/slskd/Options.cs')
-rw-r--r--src/slskd/Options.cs52
1 files changed, 52 insertions, 0 deletions
diff --git a/src/slskd/Options.cs b/src/slskd/Options.cs
new file mode 100644
index 00000000..f02f4d49
--- /dev/null
+++ b/src/slskd/Options.cs
@@ -0,0 +1,52 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel.DataAnnotations;
+using System.Linq;
+using System.Threading.Tasks;
+
+namespace slskd
+{
+ public class Options
+ {
+ public class slskd
+ {
+ public Soulseek Soulseek { get; set; }
+ public IEnumerable<User> Users { get; set; }
+ public IEnumerable<ApiKey> ApiKeys { get; set; }
+ }
+
+ public class Soulseek
+ {
+ public SoulseekCredentials Credentials { get; set; }
+ public SoulseekDistributedNetwork DistributedNetwork { get; set; }
+
+ [Range(1024, 65535)]
+ public int ListenPort { get; set; }
+
+ public class SoulseekCredentials
+ {
+ public string Username { get; set; }
+ public string Password { get; set; }
+ }
+
+ public class SoulseekDistributedNetwork
+ {
+ public bool Enable { get; set; }
+ public int ChildLimit { get; set; }
+ }
+ }
+
+ public class User
+ {
+ public string Username { get; set; }
+ public string PasswordHash { get; set; }
+ public Roles Role { get; set; }
+ }
+
+ public class ApiKey
+ {
+ public string Key { get; set; }
+ public Roles Role { get; set; }
+ }
+ }
+}