utility

package
v0.0.0-...-955c50f Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2024 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SSMSetupCLIArtifactsFolderName = "ssm_setup_cli_artifacts"
	StableVersionString            = "stable"
	LatestVersionString            = "latest"
	VersionFile                    = "VERSION"
)
View Source
const (
	SSMSetupCLIBinary = "ssm-setup-cli"

	// ExpectedServiceRunningUser is the user we expect the agent to be running as
	ExpectedServiceRunningUser = "root"

	// AgentBinary is the name of agent binary
	AgentBinary = appconfig.DefaultAgentName
)

Variables

This section is empty.

Functions

func CleanupVersion

func CleanupVersion(version string) string

CleanupVersion is used cross package managers to remove additional characters from version

func ComputeCheckSum

func ComputeCheckSum(filePath string) (hash string, err error)

ComputeCheckSum computes check sum of binaries

func FileExists

func FileExists(filePath string) (bool, error)

FileExists checks whether the file is present on the instance

func HasRootPermissions

func HasRootPermissions(folderPath string) (bool, error)

HasRootPermissions shows whether the folder path has root permission

func HttpDownload

func HttpDownload(log log.T, fileURL string, destinationPath string) (string, error)

func HttpReadContent

func HttpReadContent(stableVersionUrl string, client *http.Client) ([]byte, error)

func IsRunningElevatedPermissions

func IsRunningElevatedPermissions() error

IsRunningElevatedPermissions checks if the ssm-setup-cli is being executed as administrator

Types

This section is empty.

Jump to

Keyboard shortcuts

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