shared

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2025 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	KeySSOStartURL      = "sso.start_url"
	KeySSORegion        = "sso.region"
	KeySSORole          = "sso.role"
	KeyAWSDefaultRegion = "aws.default_region"
	KeyAWSConfigFile    = "aws.config_file"
)

Configuration key constants

Variables

View Source
var KeyDescriptions = map[string]string{
	KeySSOStartURL:      "Your AWS SSO start URL",
	KeySSORegion:        "AWS region for SSO (e.g., us-east-1)",
	KeySSORole:          "SSO role name (e.g., AdministratorAccess)",
	KeyAWSDefaultRegion: "Default AWS region for profiles",
	KeyAWSConfigFile:    "Path to AWS config file",
}

KeyDescriptions maps configuration keys to their descriptions

ValidKeys contains all valid configuration keys

Functions

func GetConfigValue

func GetConfigValue(config *appconfig.Config, key string) (string, error)

GetConfigValue gets the value for the specified key from the config

func IsValidKey

func IsValidKey(key string) bool

IsValidKey checks if the given key is a valid configuration key

func OutputAvailableKeys

func OutputAvailableKeys(ui interface{ Output(string) })

OutputAvailableKeys prints all available configuration keys with descriptions to Output

func PrintAvailableKeys

func PrintAvailableKeys(ui interface{ Error(string) })

PrintAvailableKeys prints all available configuration keys with descriptions to Error

func SaveConfigValue

func SaveConfigValue(configFile string, key string, value string) error

SaveConfigValue saves a configuration value to the configuration file

func SetConfigValue

func SetConfigValue(config *appconfig.Config, key string, value string) error

SetConfigValue sets the value for the specified key in the config

Types

This section is empty.

Jump to

Keyboard shortcuts

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