refactor: standardize command naming
This standardization makes it somewhat easier to read stacktraces as the command names are all uniform, so it will be slightly easier to scan trace output.
This commit is contained in:
@@ -6,7 +6,7 @@ set -eo pipefail
|
||||
|
||||
case "$1" in
|
||||
help | proxy:help)
|
||||
proxy_help_cmd "$@"
|
||||
cmd-proxy-help "$@"
|
||||
;;
|
||||
|
||||
*)
|
||||
|
||||
@@ -92,7 +92,7 @@ proxy_help_content_func() {
|
||||
help_content
|
||||
}
|
||||
|
||||
proxy_help_cmd() {
|
||||
cmd-proxy-help() {
|
||||
if [[ $1 == "proxy:help" ]]; then
|
||||
echo -e 'Usage: dokku proxy[:COMMAND]'
|
||||
echo ''
|
||||
|
||||
@@ -4,7 +4,7 @@ set -eo pipefail
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
source "$PLUGIN_AVAILABLE_PATH/proxy/functions"
|
||||
|
||||
proxy_main_cmd() {
|
||||
cmd-proxy-default() {
|
||||
declare desc="displays app proxy implementation via command line"
|
||||
local cmd="proxy"
|
||||
[[ "$1" == "$cmd" ]] && shift 1
|
||||
@@ -22,4 +22,4 @@ proxy_main_cmd() {
|
||||
done
|
||||
}
|
||||
|
||||
proxy_main_cmd "$@"
|
||||
cmd-proxy-default "$@"
|
||||
|
||||
@@ -5,7 +5,7 @@ source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
source "$PLUGIN_AVAILABLE_PATH/config/functions"
|
||||
source "$PLUGIN_AVAILABLE_PATH/proxy/functions"
|
||||
|
||||
proxy_disable_cmd() {
|
||||
cmd-proxy-disable() {
|
||||
declare desc="disable proxy for app via command line"
|
||||
local cmd="proxy:disable"
|
||||
[[ -z $1 ]] && dokku_log_fail "Please specify an app to run the command on"
|
||||
@@ -23,4 +23,4 @@ proxy_disable_cmd() {
|
||||
fi
|
||||
}
|
||||
|
||||
proxy_disable_cmd "$2" --no-restart
|
||||
cmd-proxy-disable "$2" --no-restart
|
||||
|
||||
@@ -5,7 +5,7 @@ source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
source "$PLUGIN_AVAILABLE_PATH/config/functions"
|
||||
source "$PLUGIN_AVAILABLE_PATH/proxy/functions"
|
||||
|
||||
proxy_enable_cmd() {
|
||||
cmd-proxy-enable() {
|
||||
declare desc="enable proxy for app via command line"
|
||||
local cmd="proxy:enable"
|
||||
[[ -z $1 ]] && dokku_log_fail "Please specify an app to run the command on"
|
||||
@@ -23,4 +23,4 @@ proxy_enable_cmd() {
|
||||
fi
|
||||
}
|
||||
|
||||
proxy_enable_cmd "$2" --no-restart
|
||||
cmd-proxy-enable "$2" --no-restart
|
||||
|
||||
@@ -5,7 +5,7 @@ source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
source "$PLUGIN_AVAILABLE_PATH/proxy/functions"
|
||||
source "$PLUGIN_AVAILABLE_PATH/config/functions"
|
||||
|
||||
proxy_ports_cmd() {
|
||||
cmd-proxy-ports() {
|
||||
declare desc="cmd wrapper to list proxy port mappings for an app"
|
||||
local cmd="proxy:ports"
|
||||
local APP="$2"
|
||||
@@ -14,4 +14,4 @@ proxy_ports_cmd() {
|
||||
list_app_proxy_ports "$APP"
|
||||
}
|
||||
|
||||
proxy_ports_cmd "$@"
|
||||
cmd-proxy-ports "$@"
|
||||
|
||||
@@ -4,7 +4,7 @@ set -eo pipefail
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
source "$PLUGIN_AVAILABLE_PATH/proxy/functions"
|
||||
|
||||
proxy_ports_add_cmd() {
|
||||
cmd-proxy-ports-add() {
|
||||
declare desc="add proxy port mappings to an app"
|
||||
local cmd="proxy:add"
|
||||
local APP="$2"
|
||||
@@ -15,4 +15,4 @@ proxy_ports_add_cmd() {
|
||||
plugn trigger post-proxy-ports-update "$APP" "add"
|
||||
}
|
||||
|
||||
proxy_ports_add_cmd "$@"
|
||||
cmd-proxy-ports-add "$@"
|
||||
|
||||
@@ -4,7 +4,7 @@ set -eo pipefail
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
source "$PLUGIN_AVAILABLE_PATH/config/functions"
|
||||
|
||||
proxy_ports_clear_cmd() {
|
||||
cmd-proxy-ports-clear() {
|
||||
declare desc="clear all proxy port mappings for an app"
|
||||
local cmd="proxy:clear"
|
||||
local APP="$2"
|
||||
@@ -14,4 +14,4 @@ proxy_ports_clear_cmd() {
|
||||
plugn trigger post-proxy-ports-update "$APP" "clear"
|
||||
}
|
||||
|
||||
proxy_ports_clear_cmd "$@"
|
||||
cmd-proxy-ports-clear "$@"
|
||||
|
||||
@@ -4,7 +4,7 @@ set -eo pipefail
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
source "$PLUGIN_AVAILABLE_PATH/proxy/functions"
|
||||
|
||||
proxy_ports_remove_cmd() {
|
||||
cmd-proxy-ports-remove() {
|
||||
declare desc="remove specific proxy port mappings from an app"
|
||||
local cmd="proxy:ports-remove"
|
||||
local APP="$2"
|
||||
@@ -22,4 +22,4 @@ proxy_ports_remove_cmd() {
|
||||
plugn trigger post-proxy-ports-update "$APP" "remove"
|
||||
}
|
||||
|
||||
proxy_ports_remove_cmd "$@"
|
||||
cmd-proxy-ports-remove "$@"
|
||||
|
||||
@@ -4,7 +4,7 @@ set -eo pipefail
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
source "$PLUGIN_AVAILABLE_PATH/proxy/functions"
|
||||
|
||||
proxy_ports_set_cmd() {
|
||||
cmd-proxy-ports-set() {
|
||||
declare desc="set proxy port mappings for an app"
|
||||
local cmd="proxy:set"
|
||||
local APP="$2"
|
||||
@@ -15,4 +15,4 @@ proxy_ports_set_cmd() {
|
||||
plugn trigger post-proxy-ports-update "$APP" "set"
|
||||
}
|
||||
|
||||
proxy_ports_set_cmd "$@"
|
||||
cmd-proxy-ports-set "$@"
|
||||
|
||||
@@ -4,7 +4,7 @@ set -eo pipefail
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
source "$PLUGIN_AVAILABLE_PATH/config/functions"
|
||||
|
||||
proxy_set_cmd() {
|
||||
cmd-proxy-set() {
|
||||
declare desc="enable proxy for app via command line"
|
||||
local cmd="proxy:set"
|
||||
[[ -z $2 ]] && dokku_log_fail "Please specify an app to run the command on"
|
||||
@@ -20,4 +20,4 @@ proxy_set_cmd() {
|
||||
fi
|
||||
}
|
||||
|
||||
proxy_set_cmd "$@"
|
||||
cmd-proxy-set "$@"
|
||||
|
||||
Reference in New Issue
Block a user