GetWorkloadIdentityEmail extracts email from a workload identity resource name.
(name string)
| 721 | |
| 722 | // GetWorkloadIdentityEmail extracts email from a workload identity resource name. |
| 723 | func GetWorkloadIdentityEmail(name string) (string, error) { |
| 724 | tokens, err := GetNameParentTokens(name, WorkloadIdentityNamePrefix) |
| 725 | if err != nil { |
| 726 | return "", err |
| 727 | } |
| 728 | return tokens[0], nil |
| 729 | } |
| 730 | |
| 731 | // BuildServiceAccountEmail constructs a full email from name and optional project ID. |
| 732 | func BuildServiceAccountEmail(name, projectID string) string { |
no test coverage detected