Documentation ¶
Overview ¶
*
- Copyright (C) 2015 Red Hat, Inc. *
- 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.
*
- Copyright (C) 2015 Red Hat, Inc. *
- 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.
*
- Copyright (C) 2015 Red Hat, Inc. *
- 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 ¶
- Constants
- func AskForConfirmation(def bool) bool
- func Blank()
- func Error(msg string)
- func Errorf(msg string, args ...interface{})
- func Failure(msg string)
- func Failuref(msg string, args ...interface{})
- func Fatal(msg string)
- func Fatalf(msg string, args ...interface{})
- func GetCurrentContext() (string, error)
- func GetMiniType() (string, bool, error)
- func Info(msg string)
- func Infof(msg string, args ...interface{})
- func IsMini() (bool, error)
- func IsMiniShift(currentContext string) bool
- func Success(msg string)
- func Successf(msg string, args ...interface{})
- func Warn(msg string)
- func Warnf(msg string, args ...interface{})
- type MasterType
Constants ¶
View Source
const ( // Minikube context name Minikube = "minikube" // Minishift context name Minishift = "minishift" // CDK seems like an odd context name, lets try it for now in the absence of anything else CDK = "default/10-1-2-2:8443/admin" )
Variables ¶
This section is empty.
Functions ¶
func AskForConfirmation ¶
AskForConfirmation uses Scanln to parse user input. A user must type in "yes" or "no" and then press enter. It has fuzzy matching, so "y", "Y", "yes", "YES", and "Yes" all count as confirmations. If the input is not recognized, it will ask again. The function does not return until it gets a valid response from the user. Typically, you should use fmt to print out a question before calling askForConfirmation. E.g. fmt.Println("WARNING: Are you sure? (yes/no)")
func GetCurrentContext ¶ added in v0.4.68
GetCurrentContext gets the current context from local config
func GetMiniType ¶ added in v0.4.67
GetMiniType returns whether this is a minishift or minikube including which one
func IsMiniShift ¶ added in v0.4.95
Types ¶
type MasterType ¶
type MasterType string
const ( OpenShift MasterType = "OpenShift" Kubernetes MasterType = "Kubernetes" )
func TypeOfMaster ¶
func TypeOfMaster(c *clientset.Clientset) MasterType
Click to show internal directories.
Click to hide internal directories.