Documentation ¶
Index ¶
- Constants
- Variables
- func AskConfirmation(message string) bool
- func Contains(s []string, e string) bool
- func EnsurePrerequisitesAreSet(apiKey, workspaceID, workspaceName string) error
- func FormatMemory(memory *float64) string
- func FormatProcessor(proc *float64) string
- func GenerateRandomString(length int) string
- func GenerateSpec(numTargetsPerSource int) pkg.Spec
- func GunzipIt(src, dest string) error
- func GzipIt(src, dest string) error
- func IsGzip(source string) (bool, error)
- func PollUntil(pollInterval, timeOut <-chan time.Time, condition func() (bool, error)) error
- func ReadUserInput(message string) string
- func RetrieveValFromMap[K comparable, V any](m map[K]V, key K) V
- func RunCMD(cmd string, args ...string) (int, string, string)
- func SanitizeExtractPath(filePath string, destination string) error
- func SelectItem(msg string, instances []string) (string, error)
- func SpinnerPollUntil(pollInterval, timeOut <-chan time.Time, condition func() (string, bool, error)) error
- func Untar(tarball, target, filename string) error
- type Table
Constants ¶
const ( // CosResourceID is IBM COS service id, can be retrieved using ibmcloud cli // ibmcloud catalog service cloud-object-storage. CosResourceID = "dff97f5c-bc5e-4455-b470-411c3edbe49c" // PowerVSResourceID is Power VS power-iaas service id, can be retrieved using ibmcloud cli // ibmcloud catalog service power-iaas. PowerVSResourceID = "abd259f0-9990-11e8-acc8-b9f54a8f1661" // PowerVSResourcePlanID is Power VS power-iaas plan id, can be retrieved using ibmcloud cli // ibmcloud catalog service power-iaas. PowerVSResourcePlanID = "f165dd34-3a40-423b-9d95-e90a23f724dd" )
const (
DeletePromptMessage = "Deleting all the above %s and the action is irreversible. Do you really want to continue?"
)
const (
ServiceTypeCloudObjectStorage = "cloud-object-storage"
)
Variables ¶
var CosResourcePlanIDs = map[string]string{
"onerate": "1e4e33e4-cfa6-4f12-9016-be594a6d5f87",
"lite": "2fdf0c08-2d32-4f46-84b5-32e0c92fffd8",
"standard": "744bfc56-d12c-4866-88d5-dac9139e0e5d",
}
Functions ¶
func AskConfirmation ¶
func EnsurePrerequisitesAreSet ¶ added in v0.1.18
Ensure that either the workspaceID or the workspaceName is set, along with the API Key.
func FormatMemory ¶
func FormatProcessor ¶
func GenerateRandomString ¶ added in v0.1.3
Generate random string of given length
func GenerateSpec ¶ added in v0.1.3
Generate Specifications
func PollUntil ¶ added in v0.1.15
PollUntil validates if a certain condition is met at defined poll intervals. If a timeout is reached, an associated error is returned to the caller. condition contains the use-case specific code that returns true when a certain condition is achieved.
func ReadUserInput ¶
func RetrieveValFromMap ¶ added in v0.1.16
func RetrieveValFromMap[K comparable, V any](m map[K]V, key K) V
func SanitizeExtractPath ¶ added in v0.1.9
func SpinnerPollUntil ¶ added in v0.1.19
func SpinnerPollUntil(pollInterval, timeOut <-chan time.Time, condition func() (string, bool, error)) error
SpinnerPollUntil validates if a certain condition is met at defined poll intervals. until the condition is met, a loading spinner is displayed If a timeout is reached, an associated error is returned to the caller. condition contains the use-case specific code that returns true when a certain condition is achieved.