use structopt::StructOpt;
use dsf_core::types::*;
use crate::helpers::try_parse_sock_addr;
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, StructOpt)]
pub enum ConfigCommands {
#[structopt(name = "add-address")]
AddAddress(SocketAddress),
#[structopt(name = "remove-address")]
RemoveAddress(SocketAddress),
}
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, StructOpt)]
pub struct SocketAddress {
#[structopt(parse(try_from_str = try_parse_sock_addr))]
pub address: Address,
}