Documentation ¶
Index ¶
- func CanImpersonate(project, serviceAccountEmail string) (bool, error)
- func CheckActiveAccountSet() (string, error)
- func ClientWithReason(reason string) (*credentials.IamCredentialsClient, error)
- func ConfigureGcloudProxy(project string) error
- func FetchAvailableServiceAccounts(project string) ([]*iam.ServiceAccount, error)
- func GenerateTemporaryAccessToken(svcAcct, reason string) (*credentialspb.GenerateAccessTokenResponse, error)
- func GetClusters(project, reason string) ([]map[string]string, error)
- func GetCurrentProject() (string, error)
- func GetCurrentRegion() (string, error)
- func GetCurrentZone() (string, error)
- func UnsetGcloudProxy() error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CanImpersonate ¶
CanImpersonate checks if a given service account can be impersonated by the authenticated user.
func CheckActiveAccountSet ¶
CheckActiveAccountSet ensures that the current gcloud config has an active account value and if an account is set, it returns the value.
func ClientWithReason ¶
func ClientWithReason(reason string) (*credentials.IamCredentialsClient, error)
ClientWithReason creates a client SDK with the provided reason field.
func ConfigureGcloudProxy ¶
ConfigureGcloudProxy configures the current gcloud configuration to use the auth proxy.
func FetchAvailableServiceAccounts ¶ added in v0.0.18
FetchAvailableServiceAccounts gets a list of service accounts that the user can impersonate.
func GenerateTemporaryAccessToken ¶
func GenerateTemporaryAccessToken(svcAcct, reason string) (*credentialspb.GenerateAccessTokenResponse, error)
GenerateTemporaryAccessToken generates short-lived credentials for the given service account.
func GetClusters ¶
GetClusters gets the list of clusters in the current project.
func GetCurrentProject ¶
GetCurrentProject get the active project from the gcloud config.
func GetCurrentRegion ¶
GetCurrentRegion get the active region from the gcloud config.
func GetCurrentZone ¶
GetCurrentZone get the active zone from the gcloud config.
func UnsetGcloudProxy ¶
func UnsetGcloudProxy() error
UnsetGcloudProxy restores the auth proxy changes made to the gcloud config.
Types ¶
This section is empty.