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

Function GetProjectIDDatabaseGroupID

backend/common/resource_name.go:81–87  ·  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

79
80// GetProjectIDDatabaseGroupID returns the project ID and database group ID from a resource name.
81func GetProjectIDDatabaseGroupID(name string) (string, string, error) {
82 tokens, err := GetNameParentTokens(name, ProjectNamePrefix, DatabaseGroupNamePrefix)
83 if err != nil {
84 return "", "", err
85 }
86 return tokens[0], tokens[1], nil
87}
88
89// GetProjectIDWebhookID returns the project ID and webhook ID from a resource name.
90func GetProjectIDWebhookID(name string) (string, string, error) {

Callers 10

unfoldDatabaseTargetsFunction · 0.92
UpdateDatabaseGroupMethod · 0.92
DeleteDatabaseGroupMethod · 0.92
getDatabaseGroupByNameFunction · 0.92
RunPlanChecksMethod · 0.92
validateSpecsFunction · 0.92
CheckReleaseMethod · 0.92

Calls 1

GetNameParentTokensFunction · 0.70

Tested by

no test coverage detected