GetProjectIDAccessGrantID returns the project ID and access grant ID from a resource name.
(name string)
| 97 | |
| 98 | // GetProjectIDAccessGrantID returns the project ID and access grant ID from a resource name. |
| 99 | func GetProjectIDAccessGrantID(name string) (string, string, error) { |
| 100 | tokens, err := GetNameParentTokens(name, ProjectNamePrefix, AccessGrantNamePrefix) |
| 101 | if err != nil { |
| 102 | return "", "", err |
| 103 | } |
| 104 | return tokens[0], tokens[1], nil |
| 105 | } |
| 106 | |
| 107 | // GetProjectIDQueryHistoryID returns the project ID and query history ID from a resource name. |
| 108 | func GetProjectIDQueryHistoryID(name string) (string, string, error) { |
no test coverage detected