185
|
459 |
49 |
if exists {"Address" => "address","Alias" => "alias","AllowedIPs" => "allowed-ips","Checksum" => "checksum","DNS" => "dns","Disabled" => "disabled","Endpoint" => "endpoint","Fwmark" => "fwmark","ListenPort" => "listen-port","MTU" => "mtu","PersistentKeepalive" => "persistent-keepalive","PostDown" => "post-down","PostUP" => "post-up","PreDown" => "pre-down","PreUp" => "pre-up","PresharedKey" => "preshared-key","PrivateKey" => "private-key","PublicKey" => "public-key","SaveConfig" => "save-config","Table" => "table"}->{$raw_key} |
299
|
321 |
41 |
exists {address => {in_config_name => 'Address', type => 12, validator => sub ($input) {
package Wireguard::WGmeta::Validator;
;
return 1;
}
}, alias => {in_config_name => 'Alias', type => 10, validator => sub ($input) {
package Wireguard::WGmeta::Validator;
;
return 1;
}
}, allowed-ips => {in_config_name => 'AllowedIPs', type => 14, validator => sub ($input) {
package Wireguard::WGmeta::Validator;
;
return 1;
}
}, checksum => {in_config_name => 'Checksum', type => 10, validator => sub ($input) {
package Wireguard::WGmeta::Validator;
;
return 1;
}
}, disabled => {in_config_name => 'Disabled', type => 10, validator => sub ($input) {
package Wireguard::WGmeta::Validator;
;
return 1;
}
}, dns => {in_config_name => 'DNS', type => 12, validator => sub ($input) {
package Wireguard::WGmeta::Validator;
;
return 1;
}
}, endpoint => {in_config_name => 'Endpoint', type => 14, validator => sub ($input) {
package Wireguard::WGmeta::Validator;
;
return 1;
}
}, fwmark => {in_config_name => 'Fwmark', type => 13, validator => sub ($input) {
package Wireguard::WGmeta::Validator;
;
return 1;
}
}, listen-port => {in_config_name => 'ListenPort', type => 13, validator => sub ($input) {
package Wireguard::WGmeta::Validator;
;
return &looks_like_number($input);
}
}, mtu => {in_config_name => 'MTU', type => 12, validator => sub ($input) {
package Wireguard::WGmeta::Validator;
;
return 1;
}
}, persistent-keepalive => {in_config_name => 'PersistentKeepalive', type => 14, validator => sub ($input) {
package Wireguard::WGmeta::Validator;
;
return 1;
}
}, post-down => {in_config_name => 'PostDown', type => 12, validator => sub ($input) {
package Wireguard::WGmeta::Validator;
;
return 1;
}
}, post-up => {in_config_name => 'PostUP', type => 12, validator => sub ($input) {
package Wireguard::WGmeta::Validator;
;
return 1;
}
}, pre-down => {in_config_name => 'PreDown', type => 12, validator => sub ($input) {
package Wireguard::WGmeta::Validator;
;
return 1;
}
}, pre-up => {in_config_name => 'PreUp', type => 12, validator => sub ($input) {
package Wireguard::WGmeta::Validator;
;
return 1;
}
}, preshared-key => {in_config_name => 'PresharedKey', type => 14, validator => sub ($input) {
package Wireguard::WGmeta::Validator;
;
return 1;
}
}, private-key => {in_config_name => 'PrivateKey', type => 13, validator => sub ($input) {
package Wireguard::WGmeta::Validator;
;
return 1;
}
}, public-key => {in_config_name => 'PublicKey', type => 14, validator => sub ($input) {
package Wireguard::WGmeta::Validator;
;
return 1;
}
}, save-config => {in_config_name => 'SaveConfig', type => 12, validator => sub ($input) {
package Wireguard::WGmeta::Validator;
;
return 1;
}
}, table => {in_config_name => 'Table', type => 12, validator => sub ($input) {
package Wireguard::WGmeta::Validator;
;
return 1;
}
}}->{$attr_name} ? : |