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

Function GetRoleID

backend/common/resource_name.go:430–436  ·  view source on GitHub ↗

GetRoleID returns the role ID from a resource name.

(name string)

Source from the content-addressed store, hash-verified

428
429// GetRoleID returns the role ID from a resource name.
430func GetRoleID(name string) (string, error) {
431 tokens, err := GetNameParentTokens(name, RolePrefix)
432 if err != nil {
433 return "", err
434 }
435 return tokens[0], nil
436}
437
438// GetProjectResourceIDSheetSha256 returns the project ID and sheet SHA256 from a resource name.
439func GetProjectResourceIDSheetSha256(name string) (string, string, error) {

Callers 3

GetRoleMethod · 0.92
UpdateRoleMethod · 0.92
DeleteRoleMethod · 0.92

Calls 1

GetNameParentTokensFunction · 0.70

Tested by

no test coverage detected