mirror of
https://github.com/speatzle/nfsense.git
synced 2025-05-10 10:38:20 +00:00
minor field renaming
This commit is contained in:
parent
cdfa7efd2d
commit
9172f56fd9
1 changed files with 4 additions and 3 deletions
|
@ -18,10 +18,10 @@ pub struct Address {
|
||||||
#[derive(Serialize, Deserialize, Clone, Debug)]
|
#[derive(Serialize, Deserialize, Clone, Debug)]
|
||||||
#[serde(rename_all = "snake_case")]
|
#[serde(rename_all = "snake_case")]
|
||||||
pub enum AddressType {
|
pub enum AddressType {
|
||||||
Host { host: String },
|
Host { address: String },
|
||||||
Range { range: IpAddr },
|
Range { range: IpAddr },
|
||||||
Network { network: IpNet },
|
Network { network: IpNet },
|
||||||
Group { children: Vec<String> },
|
Group { members: Vec<String> },
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Serialize, Deserialize, Clone, Validate, Debug)]
|
#[derive(Serialize, Deserialize, Clone, Validate, Debug)]
|
||||||
|
@ -31,7 +31,7 @@ pub struct Service {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Serialize, Deserialize, Clone, Debug)]
|
#[derive(Serialize, Deserialize, Clone, Debug)]
|
||||||
#[serde(rename_all = "snake_case")]
|
#[serde(rename_all = "lowercase")]
|
||||||
pub enum ServiceType {
|
pub enum ServiceType {
|
||||||
TCP {
|
TCP {
|
||||||
source: PortDefinition,
|
source: PortDefinition,
|
||||||
|
@ -52,6 +52,7 @@ pub enum ServiceType {
|
||||||
#[derive(Serialize, Deserialize, Clone, Debug)]
|
#[derive(Serialize, Deserialize, Clone, Debug)]
|
||||||
#[serde(rename_all = "snake_case")]
|
#[serde(rename_all = "snake_case")]
|
||||||
pub enum PortDefinition {
|
pub enum PortDefinition {
|
||||||
|
Any,
|
||||||
Single { port: u64 },
|
Single { port: u64 },
|
||||||
Range { start_port: u64, end_port: u64 },
|
Range { start_port: u64, end_port: u64 },
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue