Documentation ¶
Index ¶
- func CanImpersonate(project, serviceAccountEmail, reason string) (bool, error)
- func CheckActiveAccountSet() (string, error)
- func ClientWithReason(reason string) (*credentials.IamCredentialsClient, error)
- func ConfigureGcloudProxy(project string) error
- func GenerateTemporaryAccessToken(serviceAccountEmail, 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 GetServiceAccounts(project, reason string) ([]*iam.ServiceAccount, 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 GenerateTemporaryAccessToken ¶
func GenerateTemporaryAccessToken(serviceAccountEmail, reason string) (*credentialspb.GenerateAccessTokenResponse, error)
GenerateTemporaryAccessToken generates short-lived credentials for the given service account
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 GetServiceAccounts ¶
GetServiceAccounts fetches each of the service accounts that the authenticated user can impersonate in the active project.
func UnsetGcloudProxy ¶
func UnsetGcloudProxy() error
UnsetGcloudProxy restores the auth proxy changes made to the gcloud config
Types ¶
This section is empty.