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

Function GetEnvironmentID

backend/common/resource_name.go:131–137  ·  view source on GitHub ↗

GetEnvironmentID returns the environment ID from a resource name.

(name string)

Source from the content-addressed store, hash-verified

129
130// GetEnvironmentID returns the environment ID from a resource name.
131func GetEnvironmentID(name string) (string, error) {
132 tokens, err := GetNameParentTokens(name, EnvironmentNamePrefix)
133 if err != nil {
134 return "", err
135 }
136 return tokens[0], nil
137}
138
139// GetInstanceID returns the instance ID from a resource name.
140func GetInstanceID(name string) (string, error) {

Callers 11

RunOnceMethod · 0.92
GetListDatabaseFilterFunction · 0.92
GetListInstanceFilterFunction · 0.92
filterTasksByStageFunction · 0.92
UpdateInstanceMethod · 0.92
convertToStoreInstanceFunction · 0.92
UpdateDatabaseMethod · 0.92

Calls 1

GetNameParentTokensFunction · 0.70

Tested by 2