Documentation ¶
Index ¶
Constants ¶
const (
ENABLED = "true"
)
Variables ¶
var ErrParse = errors.New("failed to parse environment variables for the given prefix")
Functions ¶
func HasBilling ¶ added in v0.8.0
func HasBilling() bool
HasBilling returns true if the current ShellHub server instance has billing feature enabled.
func IsCloud ¶
func IsCloud() bool
IsCloud returns true if the current ShellHub server instance is cloud.
func IsCommunity ¶ added in v0.12.5
func IsCommunity() bool
IsCommunity return true if the current ShellHub server instance is community. It evaluates if the current ShellHub instance is neither enterprise or cloud .
func IsEnterprise ¶
func IsEnterprise() bool
IsEnterprise returns true if the current ShellHub server instance is enterprise.
func ParseWithPrefix ¶ added in v0.13.0
ParseWithPrefix parses the environment variables for the a given prefix.
This function uses the envconfig package as its default backend, so it requires the struct to be annotated with the envconfig tags. Check the envconfig documentation for more information.
The T generic parameter must be a struct with the fields annotated with the envconfig tags, that will be returned with the values parsed from the environment variables.