refactor: new directory structure where the flake module lives in a directory with the template in a subdirectory

This commit is contained in:
2026-04-26 18:40:32 -05:00
parent 36ac1b58d6
commit fbaed7851b
11 changed files with 2 additions and 2 deletions
+27
View File
@@ -0,0 +1,27 @@
use either::{Either, Either::Left};
use serde::Deserialize;
#[derive(Deserialize, Clone, Debug)]
pub struct CommandConfig {
/// The port(s) to listen on.
///
/// If you are using Docker, don't change this, you'll need to map an
/// external port to this.
///
/// To listen on multiple ports, specify a vector e.g. [8080, 8448]
///
/// default: 8008
#[serde(default = "default_port")]
pub port: ListeningPort,
}
#[derive(Deserialize, Clone, Debug)]
#[serde(transparent)]
pub struct ListeningPort {
#[serde(with = "either::serde_untagged")]
pub ports: Either<u16, Vec<u16>>,
}
fn default_port() -> ListeningPort {
ListeningPort { ports: Left(8008) }
}