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

Function GetProjectIDAccessGrantID

backend/common/resource_name.go:99–105  ·  view source on GitHub ↗

GetProjectIDAccessGrantID returns the project ID and access grant ID from a resource name.

(name string)

Source from the content-addressed store, hash-verified

97
98// GetProjectIDAccessGrantID returns the project ID and access grant ID from a resource name.
99func GetProjectIDAccessGrantID(name string) (string, string, error) {
100 tokens, err := GetNameParentTokens(name, ProjectNamePrefix, AccessGrantNamePrefix)
101 if err != nil {
102 return "", "", err
103 }
104 return tokens[0], tokens[1], nil
105}
106
107// GetProjectIDQueryHistoryID returns the project ID and query history ID from a resource name.
108func GetProjectIDQueryHistoryID(name string) (string, string, error) {

Callers 4

GetListAccessGrantFilterFunction · 0.92
GetAccessGrantMethod · 0.92
activateAccessGrantFunction · 0.92
RevokeAccessGrantMethod · 0.92

Calls 1

GetNameParentTokensFunction · 0.70

Tested by

no test coverage detected