internal

package
v0.0.0-...-8a53e8f Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2023 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckError

func CheckError(err error, msg string)

func GetProfileChain

func GetProfileChain(awsConfigFiles *ini.File, profileName string) ([]AwsProfile, AwsProfile)

func OutputAwsCredentials

func OutputAwsCredentials(profileName string, creds AwsCredentials, format string)

func ParseArgs

func ParseArgs() (string, int, *ini.File, string)

func StartAssumeRoleMessage

func StartAssumeRoleMessage(profile AwsProfile)

func SuccessAssumeRoleMessage

func SuccessAssumeRoleMessage(creds AwsCredentials)

func Usage

func Usage()

Types

type AwsCredentials

type AwsCredentials struct {
	AccessKeyId     string
	SecretAccessKey string
	ExpiresAt       time.Time
	SessionToken    string
}

func AssumeBaseRoleSso

func AssumeBaseRoleSso(profile AwsProfile) AwsCredentials

func AssumeBaseRoleSts

func AssumeBaseRoleSts(profile AwsProfile, duration int) AwsCredentials

func AssumeRoleSts

func AssumeRoleSts(profile AwsProfile, currentCreds AwsCredentials, duration int) AwsCredentials

type AwsProfile

type AwsProfile struct {
	Name                  string
	RoleArn               string
	SourceProfile         string
	MfaSerial             string
	Region                string
	SsoRegion             string
	SsoRoleName           string
	SsoAccountId          string
	SsoSession            string
	SsoStartUrl           string
	SsoRegistrationScopes string
	AwsAccessKeyId        string
	AwsSecretAccessKey    string
}

type SsoClientState

type SsoClientState struct {
	AccessToken             string
	ClientId                string
	ClientSecret            string
	DeviceCode              string
	VerificationUriComplete string
	StartUrl                string
}

Jump to

Keyboard shortcuts

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