mirror of
https://github.com/hassio-addons/bashio.git
synced 2025-05-06 20:11:24 +00:00
✨ Adds support for Hass.io Ingress (#2)
This commit is contained in:
parent
2f2f529ecd
commit
ca249a22ba
1 changed files with 69 additions and 0 deletions
|
@ -803,6 +803,75 @@ function bashio::addon.audio_output() {
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# ------------------------------------------------------------------------------
|
||||||
|
# Returns IP address assigned on the hassio network for an add-on.
|
||||||
|
#
|
||||||
|
# Arguments:
|
||||||
|
# $1 Add-on slug
|
||||||
|
# ------------------------------------------------------------------------------
|
||||||
|
function bashio::addon.ip_address() {
|
||||||
|
local slug=${1:-'self'}
|
||||||
|
bashio::log.trace "${FUNCNAME[0]}" "$@"
|
||||||
|
bashio::addons "${slug}" "addons.${slug}.ip_address" '.ip_address // empty'
|
||||||
|
}
|
||||||
|
|
||||||
|
# ------------------------------------------------------------------------------
|
||||||
|
# Returns if the add-on support ingress mode.
|
||||||
|
#
|
||||||
|
# Arguments:
|
||||||
|
# $1 Add-on slug
|
||||||
|
# ------------------------------------------------------------------------------
|
||||||
|
function bashio::addon.ingress() {
|
||||||
|
local slug=${1:-'self'}
|
||||||
|
bashio::log.trace "${FUNCNAME[0]}" "$@"
|
||||||
|
bashio::addons "${slug}" "addons.${slug}.ingress" '.ingress // false'
|
||||||
|
}
|
||||||
|
|
||||||
|
# ------------------------------------------------------------------------------
|
||||||
|
# Returns the ingress entry point of the add-on.
|
||||||
|
#
|
||||||
|
# Arguments:
|
||||||
|
# $1 Add-on slug
|
||||||
|
# ------------------------------------------------------------------------------
|
||||||
|
function bashio::addon.ingress_entry() {
|
||||||
|
local slug=${1:-'self'}
|
||||||
|
bashio::log.trace "${FUNCNAME[0]}" "$@"
|
||||||
|
bashio::addons \
|
||||||
|
"${slug}" \
|
||||||
|
"addons.${slug}.ingress_entry" \
|
||||||
|
'.ingress_entry // empty'
|
||||||
|
}
|
||||||
|
|
||||||
|
# ------------------------------------------------------------------------------
|
||||||
|
# Returns the ingress url of the add-on.
|
||||||
|
#
|
||||||
|
# Arguments:
|
||||||
|
# $1 Add-on slug
|
||||||
|
# ------------------------------------------------------------------------------
|
||||||
|
function bashio::addon.ingress_url() {
|
||||||
|
local slug=${1:-'self'}
|
||||||
|
bashio::log.trace "${FUNCNAME[0]}" "$@"
|
||||||
|
bashio::addons \
|
||||||
|
"${slug}" \
|
||||||
|
"addons.${slug}.ingress_url" \
|
||||||
|
'.ingress_url // empty'
|
||||||
|
}
|
||||||
|
|
||||||
|
# ------------------------------------------------------------------------------
|
||||||
|
# Returns the ingress port of the add-on.
|
||||||
|
#
|
||||||
|
# Arguments:
|
||||||
|
# $1 Add-on slug
|
||||||
|
# ------------------------------------------------------------------------------
|
||||||
|
function bashio::addon.ingress_port() {
|
||||||
|
local slug=${1:-'self'}
|
||||||
|
bashio::log.trace "${FUNCNAME[0]}" "$@"
|
||||||
|
bashio::addons \
|
||||||
|
"${slug}" \
|
||||||
|
"addons.${slug}.ingress_port" \
|
||||||
|
'.ingress_port // empty'
|
||||||
|
}
|
||||||
|
|
||||||
# ------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------
|
||||||
# List all available stats about an add-on.
|
# List all available stats about an add-on.
|
||||||
#
|
#
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue