GetProjectIDWebhookID returns the project ID and webhook ID from a resource name.
(name string)
| 88 | |
| 89 | // GetProjectIDWebhookID returns the project ID and webhook ID from a resource name. |
| 90 | func GetProjectIDWebhookID(name string) (string, string, error) { |
| 91 | tokens, err := GetNameParentTokens(name, ProjectNamePrefix, WebhookIDPrefix) |
| 92 | if err != nil { |
| 93 | return "", "", err |
| 94 | } |
| 95 | return tokens[0], tokens[1], nil |
| 96 | } |
| 97 | |
| 98 | // GetProjectIDAccessGrantID returns the project ID and access grant ID from a resource name. |
| 99 | func GetProjectIDAccessGrantID(name string) (string, string, error) { |
no test coverage detected