Documentation ¶
Index ¶
- func CacheGetK8sConfigOutput(cacheKey string, tenantName string) (creds *clientauthv1beta1.ExecCredential)
- func ConvertK8sCreds(creds *duplocloud.DuploPlanK8ClusterConfig) *clientauthv1beta1.ExecCredential
- func DieIf(err error, msg string)
- func Fatal(msg string, err error)
- func MustInitCache(cmd string, disabled bool)
- func OutputAwsCreds(creds *AwsConfigOutput, cacheKey string)
- func OutputDuploCreds(creds *DuploCredsOutput)
- func OutputK8sCreds(creds *clientauthv1beta1.ExecCredential, cacheKey string)
- func PingAWSCreds(creds *AwsConfigOutput) error
- func PingDuploCreds(creds *DuploCredsOutput, host string) error
- func PingK8sCreds(creds *clientauthv1beta1.ExecCredential, tenantName string) error
- type AwsConfigOutput
- type DuploCredsOutput
- type TokenResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CacheGetK8sConfigOutput ¶
func CacheGetK8sConfigOutput(cacheKey string, tenantName string) (creds *clientauthv1beta1.ExecCredential)
CacheGetAwsConfigOutput tries to read prior K8s creds from the cache.
func ConvertK8sCreds ¶
func ConvertK8sCreds(creds *duplocloud.DuploPlanK8ClusterConfig) *clientauthv1beta1.ExecCredential
func MustInitCache ¶
MustInitCache initializes the cacheDir or panics.
func OutputAwsCreds ¶
func OutputAwsCreds(creds *AwsConfigOutput, cacheKey string)
func OutputDuploCreds ¶
func OutputDuploCreds(creds *DuploCredsOutput)
func OutputK8sCreds ¶
func OutputK8sCreds(creds *clientauthv1beta1.ExecCredential, cacheKey string)
func PingAWSCreds ¶ added in v0.5.5
func PingAWSCreds(creds *AwsConfigOutput) error
func PingDuploCreds ¶ added in v0.5.5
func PingDuploCreds(creds *DuploCredsOutput, host string) error
func PingK8sCreds ¶ added in v0.5.5
func PingK8sCreds(creds *clientauthv1beta1.ExecCredential, tenantName string) error
Types ¶
type AwsConfigOutput ¶
type AwsConfigOutput struct { Version int `json:"Version"` ConsoleUrl string `json:"ConsoleUrl"` AccessKeyId string `json:"AccessKeyId"` SecretAccessKey string `json:"SecretAccessKey"` Region string `json:"Region"` SessionToken string `json:"SessionToken,omitempty"` Expiration string `json:"Expiration,omitempty"` }
func CacheGetAwsConfigOutput ¶
func CacheGetAwsConfigOutput(cacheKey string) (creds *AwsConfigOutput)
CacheGetAwsConfigOutput tries to read prior AWS creds from the cache.
func ConvertAwsCreds ¶
func ConvertAwsCreds(creds *duplocloud.AwsJitCredentials) *AwsConfigOutput
type DuploCredsOutput ¶
type DuploCredsOutput struct { Version int `json:"Version"` DuploToken string `json:"DuploToken,omitempty"` NeedOTP bool `json:"NeedOTP"` }
func CacheGetDuploOutput ¶
func CacheGetDuploOutput(cacheKey string, host string) (creds *DuploCredsOutput)
CacheGetDuploOutput tries to read prior AWS creds from the cache.
func MustDuploClient ¶
func MustDuploClient(host, token string, interactive, admin bool) (client *duplocloud.Client, creds *DuploCredsOutput)
MustDuploClient retrieves a duplo client (and credentials) or panics.
type TokenResult ¶
type TokenResult struct { Token string `json:"token"` OTP string `json:"otp,omitempty"` // contains filtered or unexported fields }
func MustTokenInteractive ¶
func MustTokenInteractive(host string, admin bool, cmd string) (tokenResult TokenResult)
func TokenViaPost ¶
Click to show internal directories.
Click to hide internal directories.