internal

package
v1.0.10 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckError

func CheckError(err error)

CheckError is a simple wrapper for log.Fatalln()

func CreateConfig

func CreateConfig(ctx context.Context, profileLongTerm string) (aws.Config, error)

CreateConfig creates an AWS configuration from the given profile

func DumpConfig

func DumpConfig()

DumpConfig logs the current viper configuration for debugging

func GetMFAToken

func GetMFAToken() string

GetMFAToken retrieves MFA token codes from either stdin or the "token" flag

Types

type CredentialsShortTerm

type CredentialsShortTerm struct {
	AssumedRole        string `ini:"assumed_role"`
	AssumedRoleARN     string `ini:"assumed_role_arn,omitempty"`
	ExternalID         string `ini:"external_id,omitempty"`
	AWSAccessKeyID     string `ini:"aws_access_key_id"`
	AWSSecretAccessKey string `ini:"aws_secret_access_key"`
	AWSSessionToken    string `ini:"aws_session_token"`
	AWSSecurityToken   string `ini:"aws_security_token"`
	Expiration         string `ini:"expiration"`
}

CredentialsShortTerm is used to reflect updated credentials

func GetCredsWithRole

func GetCredsWithRole(ctx context.Context, cfg aws.Config) CredentialsShortTerm

GetCredsWithRole is used to get temporary AWS credentials when assuming a role

func GetCredsWithoutRole

func GetCredsWithoutRole(ctx context.Context, cfg aws.Config) CredentialsShortTerm

GetCredsWithoutRole is used to get temporary AWS credentials when NOT assuming a role

Jump to

Keyboard shortcuts

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