Documentation
¶
Overview ¶
Copyright © 2021 Rasa Technologies GmbH
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
- func AskForConfirmation(s string, retry int, in io.Reader) (bool, error)
- func CheckHelmChartDir()
- func CommandExists(cmd string) bool
- func GetActiveNamespace(log logr.Logger) string
- func GetPasswordStdin() (string, error)
- func GetRasaXURLEnv(namespace string) string
- func HelmChartVersionConstrains(helmChartVersion string) error
- func IsDebugOrVerboseEnabled() bool
- func IsURLAccessible(address string) bool
- func MergeMaps(maps ...map[string]interface{}) map[string]interface{}
- func RasaXVersionConstrains(version string, constraint string) bool
- func ReadCredentials(flags *types.RasaCtlFlags) (string, string, error)
- func ReadLicense(flags *types.RasaCtlFlags) (string, error)
- func StringSliceToJSON(d [][]string) (string, error)
- func ValidateName(name string) error
- type NetworkError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AskForConfirmation ¶
AskForConfirmation waits for a input to confirm an operation and returns `true` if the input == 'yes'.
func CheckHelmChartDir ¶
func CheckHelmChartDir()
CheckHelmChartDir checks if a local Helm chart directory exists.
func GetActiveNamespace ¶
GetActiveNamespace returns an active namespace, it checks the .rasactl file if exists and reads a namespace from the file or it gets the current-deployment from the rasactl configuration file.
func GetPasswordStdin ¶
GetPasswordStdin reads a password from STDIN.
func GetRasaXURLEnv ¶
GetRasaXURLEnv returns Rasa X URL passed via environment variables.
func HelmChartVersionConstrains ¶
HelmChartVersionConstrains checks if the rasa-x-helm chart version is within constraints boundaries.
func IsDebugOrVerboseEnabled ¶
func IsDebugOrVerboseEnabled() bool
func IsURLAccessible ¶
IsURLAccessible returns `true` if a client can connect to a given URL.
func RasaXVersionConstrains ¶
RasaXVersionConstrains checks if Rasa X version is within constraints boundaries.
func ReadCredentials ¶
func ReadCredentials(flags *types.RasaCtlFlags) (string, string, error)
ReadCredentials reads a username and a password from input.
func ReadLicense ¶
func ReadLicense(flags *types.RasaCtlFlags) (string, error)
ReadLicense reads an Enterprise license from input.
func StringSliceToJSON ¶
StringSliceToJSON converts [][]string{} to JSON.
func ValidateName ¶
Types ¶
type NetworkError ¶
type NetworkError string
const (
NetworkErrorConnectionRefused NetworkError = "ConnectionRefused"
)
func CheckNetworkError ¶
func CheckNetworkError(err error) (NetworkError, error)