util

package
v1.247349.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 17, 2021 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	OsTypeLinux   = "linux"
	OsTypeWindows = "windows"
	OsTypeDarwin  = "darwin"

	MapKeyMetricsCollectionInterval = "metrics_collection_interval"
	MapKeyInstances                 = "resources"
	MapKeyMeasurement               = "measurement"
)

Variables

This section is empty.

Functions

func AddToMap

func AddToMap(ctx *runtime.Context, resultMap map[string]interface{}, obj interfaze.ConvertibleToMap)

func Ask

func Ask(question string) string

func AskWithDefault

func AskWithDefault(question, defaultValue string) string

func Choice

func Choice(question string, defaultOption int, validValues []string) string

defaultOption value starts from 1

func ConfigFilePath

func ConfigFilePath() string

func CurOS

func CurOS() string

func CurPath

func CurPath() string

func DefaultEC2Region

func DefaultEC2Region() (region string)

func EnterToExit

func EnterToExit()

func No

func No(question string) bool

func PermissionCheck

func PermissionCheck()

func ReadConfigFromJsonFile

func ReadConfigFromJsonFile() string

func SDKCredentials

func SDKCredentials() (accessKey, secretKey string, creds *credentials.Credentials)

func SDKRegion

func SDKRegion() (region string)

func SDKRegionWithProfile

func SDKRegionWithProfile(profile string) (region string)

func SaveResultByteArrayToJsonFile

func SaveResultByteArrayToJsonFile(resultByteArray []byte) string

func SerializeResultMapToJsonByteArray

func SerializeResultMapToJsonByteArray(resultMap map[string]interface{}) []byte

func Yes

func Yes(question string) bool

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL