diff options
| author | historia <[not public]> | 2026-06-29 22:31:11 -0400 |
|---|---|---|
| committer | historia <[not public]> | 2026-06-29 22:31:11 -0400 |
| commit | 069d3c1c81d71042706372df153254487a765dfc (patch) | |
| tree | d83a4a3954d2b8304f49d83e365f4c2b075b91eb /internal/config | |
| parent | 6c5271fb085b4571a10f106391974c249cd84317 (diff) | |
| download | thehouseoficarus-069d3c1c81d71042706372df153254487a765dfc.tar.gz | |
feat: wip web admin for mapping and crud
Diffstat (limited to 'internal/config')
| -rw-r--r-- | internal/config/config.go | 48 |
1 files changed, 33 insertions, 15 deletions
diff --git a/internal/config/config.go b/internal/config/config.go index 716f7ec..15f75d4 100644 --- a/internal/config/config.go +++ b/internal/config/config.go @@ -7,14 +7,16 @@ import ( ) type Config struct { - TickLength int `yaml:"tick_length"` - StartingRoom int `yaml:"starting_room"` - StartupValidation ValidationConfig `yaml:"startup_validation"` - DefaultColors ColorsConfig `yaml:"default_colors"` - Telnet TelnetConfig `yaml:"telnet"` - TelnetTLS TelnetTLSConfig `yaml:"telnet_tls"` - HTTP HTTPConfig `yaml:"http"` - HTTPS HTTPSConfig `yaml:"https"` + TickLength int `yaml:"tick_length"` + StartingRoom int `yaml:"starting_room"` + StartupValidation ValidationConfig `yaml:"startup_validation"` + DefaultColors ColorsConfig `yaml:"default_colors"` + TLS TLSConfig `yaml:"tls"` + Telnet TelnetConfig `yaml:"telnet"` + TelnetTLS TelnetTLSConfig `yaml:"telnet_tls"` + HTTP HTTPConfig `yaml:"http"` + HTTPS HTTPSConfig `yaml:"https"` + AdminHTTPS AdminHTTPSConfig `yaml:"admin_https"` } type ColorsConfig map[string]string @@ -77,23 +79,30 @@ type TelnetConfig struct { Port int `yaml:"port"` } -type TelnetTLSConfig struct { - Enabled bool `yaml:"enabled"` - Port int `yaml:"port"` +type TLSConfig struct { CertFile string `yaml:"cert_file"` KeyFile string `yaml:"key_file"` } +type TelnetTLSConfig struct { + Enabled bool `yaml:"enabled"` + Port int `yaml:"port"` +} + type HTTPConfig struct { Enabled bool `yaml:"enabled"` Port int `yaml:"port"` } type HTTPSConfig struct { - Enabled bool `yaml:"enabled"` - Port int `yaml:"port"` - CertFile string `yaml:"cert_file"` - KeyFile string `yaml:"key_file"` + Enabled bool `yaml:"enabled"` + Port int `yaml:"port"` +} + +type AdminHTTPSConfig struct { + Enabled bool `yaml:"enabled"` + Port int `yaml:"port"` + AdminAccounts []string `yaml:"admin_accounts"` } func Default() *Config { @@ -105,6 +114,10 @@ func Default() *Config { IgnoreUnreachable: []int{}, }, DefaultColors: DefaultColors(), + TLS: TLSConfig{ + CertFile: "", + KeyFile: "", + }, Telnet: TelnetConfig{ Enabled: true, Port: 4000, @@ -121,6 +134,11 @@ func Default() *Config { Enabled: false, Port: 8443, }, + AdminHTTPS: AdminHTTPSConfig{ + Enabled: false, + Port: 9090, + AdminAccounts: []string{}, + }, } } |
