Documentation
¶
Index ¶
- Variables
- func ClientInfoFileDestination() string
- func GetCredentialsFilePath() string
- func InitClients(region string) (ssooidciface.SSOOIDCAPI, ssoiface.SSOAPI)
- func WriteAWSCredentialsFile(template *CredentialsFileTemplate, profile string)
- func WriteStructToFile(payload interface{}, dest string)
- type ClientInformation
- type CredentialsFileTemplate
- type Time
- type Timer
Constants ¶
This section is empty.
Variables ¶
View Source
var AwsRegions = []string{
"us-east-2",
"us-east-1",
"us-west-1",
"us-west-2",
"af-south-1",
"ap-east-1",
"ap-south-1",
"ap-northeast-3",
"ap-northeast-2",
"ap-southeast-1",
"ap-southeast-2",
"ap-northeast-1",
"ca-central-1",
"eu-central-1",
"eu-west-1",
"eu-west-2",
"eu-south-1",
"eu-west-3",
"eu-north-1",
"me-south-1",
"sa-east-1",
"us-gov-east-1",
"us-gov-west-1",
}
View Source
var CredentialsFilePath = GetCredentialsFilePath()
Functions ¶
func ClientInfoFileDestination ¶
func ClientInfoFileDestination() string
func GetCredentialsFilePath ¶
func GetCredentialsFilePath() string
func InitClients ¶
func InitClients(region string) (ssooidciface.SSOOIDCAPI, ssoiface.SSOAPI)
func WriteAWSCredentialsFile ¶
func WriteAWSCredentialsFile(template *CredentialsFileTemplate, profile string)
func WriteStructToFile ¶
func WriteStructToFile(payload interface{}, dest string)
Types ¶
type ClientInformation ¶
type ClientInformation struct { AccessTokenExpiresAt time.Time AccessToken string ClientId string ClientSecret string ClientSecretExpiresAt string DeviceCode string VerificationUriComplete string StartUrl string }
func ProcessClientInformation ¶
func ProcessClientInformation(oidcClient ssooidciface.SSOOIDCAPI, startUrl string) ClientInformation
ProcessClientInformation tries to read available ClientInformation. If no ClientInformation is available, it creates new ones and writes this information to disk If the start url is overridden and differs from the previous one, a new Client is registered for the given start url. When the ClientInformation.AccessToken is expired, it starts retrieving a new AccessToken
func ReadClientInformation ¶
func ReadClientInformation(file string) (ClientInformation, error)
type CredentialsFileTemplate ¶
type CredentialsFileTemplate struct { AwsAccessKeyId string `ini:"aws_access_key_id,omitempty"` AwsSecretAccessKey string `ini:"aws_secret_access_key,omitempty"` AwsSessionToken string `ini:"aws_session_token,omitempty"` CredentialProcess string `ini:"credential_process,omitempty"` Output string `ini:"output,omitempty"` Region string `ini:"region,omitempty"` }
func ProcessCredentialProcessTemplate ¶
func ProcessCredentialProcessTemplate(accountId string, roleName string, region string) CredentialsFileTemplate
func ProcessPersistedCredentialsTemplate ¶
func ProcessPersistedCredentialsTemplate(credentials *sso.GetRoleCredentialsOutput, region string) CredentialsFileTemplate
Click to show internal directories.
Click to hide internal directories.