MCPcopy Index your code
hub / github.com/bytebase/bytebase / GetWorkloadIdentityEmail

Function GetWorkloadIdentityEmail

backend/common/resource_name.go:723–729  ·  view source on GitHub ↗

GetWorkloadIdentityEmail extracts email from a workload identity resource name.

(name string)

Source from the content-addressed store, hash-verified

721
722// GetWorkloadIdentityEmail extracts email from a workload identity resource name.
723func 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.
732func BuildServiceAccountEmail(name, projectID string) string {

Callers 6

getUserByIdentifierFunction · 0.92
MemberContainsUserFunction · 0.92
GetWorkloadIdentityMethod · 0.92

Calls 1

GetNameParentTokensFunction · 0.70

Tested by

no test coverage detected