MCPcopy Create free account
hub / github.com/bytebase/bytebase / GetProjectIDDatabaseGroupID

Function GetProjectIDDatabaseGroupID

action/common/resource_name.go:19–25  ·  view source on GitHub ↗

GetProjectIDDatabaseGroupID returns the project ID and database group ID from a resource name.

(name string)

Source from the content-addressed store, hash-verified

17
18// GetProjectIDDatabaseGroupID returns the project ID and database group ID from a resource name.
19func GetProjectIDDatabaseGroupID(name string) (string, string, error) {
20 tokens, err := GetNameParentTokens(name, ProjectNamePrefix, DatabaseGroupNamePrefix)
21 if err != nil {
22 return "", "", err
23 }
24 return tokens[0], tokens[1], nil
25}
26
27// GetInstanceDatabaseID returns the instance ID and database ID from a resource name.
28func GetInstanceDatabaseID(name string) (string, string, error) {

Callers 1

validateTargetsFunction · 0.92

Calls 1

GetNameParentTokensFunction · 0.70

Tested by

no test coverage detected