aws_config_client

package
v0.14.0 Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2020 License: MIT Imports: 19 Imported by: 0

Documentation

Index

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

func NewCompleter(
	prompt Prompt,
	awsConfig *server.AWSConfig,
) *completer

func RequestConfig added in v0.7.0

func RequestConfig(
	ctx context.Context,
	token *client.Token,
	configServiceURI string,
) (*server.AWSConfig, error)

Types

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
}

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)
}

type Survey

type Survey struct{}

func (*Survey) Confirm

func (s *Survey) Confirm(prompt string, defaulted bool, surveryOptions ...survey.AskOpt) (bool, error)

func (*Survey) Input

func (s *Survey) Input(prompt string, defaulted string, surveyOptions ...survey.AskOpt) (string, error)

func (*Survey) Select

func (s *Survey) Select(prompt string, options []string, surveyOptions ...survey.AskOpt) (int, error)

Jump to

Keyboard shortcuts

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