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

Function GetProjectResourceIDSheetSha256

backend/common/resource_name.go:439–445  ·  view source on GitHub ↗

GetProjectResourceIDSheetSha256 returns the project ID and sheet SHA256 from a resource name.

(name string)

Source from the content-addressed store, hash-verified

437
438// GetProjectResourceIDSheetSha256 returns the project ID and sheet SHA256 from a resource name.
439func GetProjectResourceIDSheetSha256(name string) (string, string, error) {
440 tokens, err := GetNameParentTokens(name, ProjectNamePrefix, SheetIDPrefix)
441 if err != nil {
442 return "", "", err
443 }
444 return tokens[0], tokens[1], nil
445}
446
447// GetProjectIDWorksheetID returns the project ID and worksheet ID (resource_id) from a resource name.
448// Format: projects/{project}/worksheets/{worksheet}

Callers 7

GetSheetMethod · 0.92
CreateReleaseMethod · 0.92
createRevisionsMethod · 0.92
validateSpecsFunction · 0.92

Calls 1

GetNameParentTokensFunction · 0.70

Tested by

no test coverage detected