Documentation
¶
Index ¶
- Constants
- func NewCompleter(prompt Prompt, awsConfig *server.AWSConfig, defaultRegion string, ...) *completer
- func RequestConfig(ctx context.Context, token *client.Token, configServiceURI string) (*server.AWSConfig, error)
- type AWSConfigFile
- type AWSConfigSTDOUTWriter
- type AWSConfigWriter
- type AWSNamedProfile
- type AWSOIDCConfiguration
- type Prompt
- type Survey
- func (s *Survey) Confirm(prompt string, defaulted bool, surveyOptions ...survey.AskOpt) (bool, error)
- func (s *Survey) Input(prompt string, defaulted string, surveyOptions ...survey.AskOpt) (string, error)
- func (s *Survey) Select(prompt string, options []string, surveyOptions ...survey.AskOpt) (int, error)
Constants ¶
View Source
const ( AWSConfigSectionOutput = "output" AWSConfigSectionCredentialProcess = "credential_process" AWSConfigSectionRegion = "region" )
View Source
const ( FlagProfile = "profile" DefaultAWSConfigPath = "~/.aws/config" )
View Source
const DefaultAWSRegion = "us-west-2"
Variables ¶
This section is empty.
Functions ¶
func NewCompleter ¶
Types ¶
type AWSConfigFile ¶ added in v0.16.0
type AWSConfigFile struct {
// contains filtered or unexported fields
}
func NewAWSConfigFileWriter ¶ added in v0.17.2
func NewAWSConfigFileWriter(awsConfigPath string) *AWSConfigFile
func (*AWSConfigFile) Finalize ¶ added in v0.17.2
func (a *AWSConfigFile) Finalize() error
func (*AWSConfigFile) MergeAWSConfigs ¶ added in v0.16.0
func (a *AWSConfigFile) MergeAWSConfigs(new *ini.File, old *ini.File) (*ini.File, error)
mergeConfig will merge the new config with the existing aws config
giving precedence to the new aws config blocks
type AWSConfigSTDOUTWriter ¶ added in v0.17.2
type AWSConfigSTDOUTWriter struct {
// contains filtered or unexported fields
}
func (*AWSConfigSTDOUTWriter) MergeAWSConfigs ¶ added in v0.17.2
func (a *AWSConfigSTDOUTWriter) MergeAWSConfigs(new *ini.File, old *ini.File) (*ini.File, error)
stdout writer only returns the new config
up to users to figure out how to merge
type AWSConfigWriter ¶ added in v0.16.0
type AWSNamedProfile ¶ added in v0.7.0
type AWSNamedProfile struct { Name string AWSProfile server.AWSProfile }
type AWSOIDCConfiguration ¶ added in v0.12.0
type AWSOIDCConfiguration struct { ClientID string IssuerURL string RoleARN string Region *string Output *string }
func FetchParamsFromAWSConfig ¶ added in v0.12.0
func FetchParamsFromAWSConfig(cmd *cobra.Command, awsConfigPath string) (*AWSOIDCConfiguration, error)
type Prompt ¶
type Prompt interface { // Select surveys the user for an answer // returns the int corresponding to the slice's selected element Select(prompt string, options []string, surveyOptions ...survey.AskOpt) (int, error) // Input will ask the user for a free-form input // with a default option Input(prompt string, defaulted string, surveyOptions ...survey.AskOpt) (string, error) // Confirm will confirm with the user with a defaulted option Confirm(prompt string, defaulted bool, surveryOptions ...survey.AskOpt) (bool, error) }
Click to show internal directories.
Click to hide internal directories.