util

package
v1.300037.0 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2024 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

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

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

	StandardLogGroupClass         = "STANDARD"
	InfrequentAccessLogGroupClass = "INFREQUENT_ACCESS"
)

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 ChoiceIndex added in v1.300028.0

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

ChoiceIndex returns index of choice chosen

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 FileBackup added in v1.300028.0

func FileBackup(filePath string, dirPath string) error

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, filePath string) 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