refactor: rename functions to be plural
They are plural for the scheduler-k3s plugin.
This commit is contained in:
@@ -5,28 +5,28 @@ source "$PLUGIN_AVAILABLE_PATH/openresty-vhosts/internal-functions"
|
||||
set -eo pipefail
|
||||
[[ $DOKKU_TRACE ]] && set -x
|
||||
|
||||
cmd-openresty-label-add() {
|
||||
cmd-openresty-labels-add() {
|
||||
declare desc="adds container label to app for specified proxy"
|
||||
declare cmd="openresty:label:add"
|
||||
declare cmd="openresty:labels:add"
|
||||
[[ "$1" == "$cmd" ]] && shift 1
|
||||
|
||||
cmd-proxy-label-add "proxy:label:add" "openresty" "$@"
|
||||
cmd-proxy-labels-add "proxy:labels:add" "openresty" "$@"
|
||||
}
|
||||
|
||||
cmd-openresty-label-remove() {
|
||||
cmd-openresty-labels-remove() {
|
||||
declare desc="removes container label from app for specified proxy"
|
||||
declare cmd="openresty:label:remove"
|
||||
declare cmd="openresty:labels:remove"
|
||||
[[ "$1" == "$cmd" ]] && shift 1
|
||||
|
||||
cmd-proxy-label-remove "proxy:label:remove" "openresty" "$@"
|
||||
cmd-proxy-labels-remove "proxy:labels:remove" "openresty" "$@"
|
||||
}
|
||||
|
||||
cmd-openresty-label-show() {
|
||||
cmd-openresty-labels-show() {
|
||||
declare desc="shows container labels for app for specified proxy"
|
||||
declare cmd="openresty:label:show"
|
||||
declare cmd="openresty:labels:show"
|
||||
[[ "$1" == "$cmd" ]] && shift 1
|
||||
|
||||
cmd-proxy-label-show "proxy:label:show" "openresty" "$@"
|
||||
cmd-proxy-labels-show "proxy:labels:show" "openresty" "$@"
|
||||
}
|
||||
|
||||
cmd-openresty-report() {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env bash
|
||||
[[ " openresty:help openresty:label:add openresty:label:remove openresty:label:show help " == *" $1 "* ]] || exit "$DOKKU_NOT_IMPLEMENTED_EXIT"
|
||||
[[ " openresty:help openresty:labels:add openresty:labels:remove openresty:labels:show help " == *" $1 "* ]] || exit "$DOKKU_NOT_IMPLEMENTED_EXIT"
|
||||
source "$PLUGIN_AVAILABLE_PATH/openresty-vhosts/help-functions"
|
||||
source "$PLUGIN_AVAILABLE_PATH/openresty-vhosts/command-functions"
|
||||
set -eo pipefail
|
||||
@@ -10,16 +10,16 @@ case "$1" in
|
||||
cmd-openresty-help "$@"
|
||||
;;
|
||||
|
||||
openresty:label:add)
|
||||
cmd-openresty-label-add "$@"
|
||||
openresty:labels:add)
|
||||
cmd-openresty-labels-add "$@"
|
||||
;;
|
||||
|
||||
openresty:label:remove)
|
||||
cmd-openresty-label-remove "$@"
|
||||
openresty:labels:remove)
|
||||
cmd-openresty-labels-remove "$@"
|
||||
;;
|
||||
|
||||
openresty:label:show)
|
||||
cmd-openresty-label-show "$@"
|
||||
openresty:labels:show)
|
||||
cmd-openresty-labels-show "$@"
|
||||
;;
|
||||
|
||||
*)
|
||||
|
||||
@@ -30,9 +30,9 @@ fn-help-content() {
|
||||
openresty:report [<app>] [<flag>], Displays an openresty report for one or more apps
|
||||
openresty:set <app> <property> (<value>), Set or clear an openresty property for an app
|
||||
openresty:show-config <app>, Display openresty compose config
|
||||
openresty:label:add <app> <label> <value>, Add a label to an openresty app
|
||||
openresty:label:remove <app> <label>, Remove a label from an openresty app
|
||||
openresty:label:show <app> [<label>], Show labels for an openresty app
|
||||
openresty:labels:add <app> <label> <value>, Add a label to an openresty app
|
||||
openresty:labels:remove <app> <label>, Remove a label from an openresty app
|
||||
openresty:labels:show <app> [<label>], Show labels for an openresty app
|
||||
openresty:start, Starts the openresty server
|
||||
openresty:stop, Stops the openresty server
|
||||
help_content
|
||||
|
||||
Reference in New Issue
Block a user