From 4876d4a5f024e2223312e95999f9be12bd8511fc Mon Sep 17 00:00:00 2001 From: JP Dillingham Date: Wed, 20 Jan 2021 22:26:31 -0600 Subject: wip --- src/slskd/Options.cs | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 src/slskd/Options.cs (limited to 'src/slskd/Options.cs') 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 Users { get; set; } + public IEnumerable 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; } + } + } +} -- cgit v1.2.3