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

Function GetWorkspaceID

backend/common/resource_name.go:534–540  ·  view source on GitHub ↗
(name string)

Source from the content-addressed store, hash-verified

532}
533
534func GetWorkspaceID(name string) (string, error) {
535 tokens, err := GetNameParentTokens(name, WorkspacePrefix)
536 if err != nil {
537 return "", err
538 }
539 return tokens[0], nil
540}
541
542func FormatWorkspace(id string) string {
543 return fmt.Sprintf("%s%s", WorkspacePrefix, id)

Callers 9

ListIdentityProvidersMethod · 0.92
GetActuatorInfoMethod · 0.92
populateRawResourcesFunction · 0.92
createAuditLogMethod · 0.92
SwitchWorkspaceMethod · 0.92
parseOptionalWorkspaceFunction · 0.92
GetWorkspaceMethod · 0.92
DeleteWorkspaceMethod · 0.92
LeaveWorkspaceMethod · 0.92

Calls 1

GetNameParentTokensFunction · 0.70

Tested by

no test coverage detected