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

Function FormatAccessGrant

backend/common/resource_name.go:117–119  ·  view source on GitHub ↗

FormatAccessGrant returns the resource name for an access grant.

(projectID string, id string)

Source from the content-addressed store, hash-verified

115
116// FormatAccessGrant returns the resource name for an access grant.
117func FormatAccessGrant(projectID string, id string) string {
118 return fmt.Sprintf("%s/%s%s", FormatProject(projectID), AccessGrantNamePrefix, id)
119}
120
121// TrimSuffixAndGetInstanceDatabaseID trims the suffix from the name and returns the instance ID and database ID.
122func TrimSuffixAndGetInstanceDatabaseID(name string, suffix string) (string, string, error) {

Callers 5

convertToIssueMethod · 0.92
QueryMethod · 0.92
ExportMethod · 0.92
convertToAccessGrantFunction · 0.92

Calls 1

FormatProjectFunction · 0.85

Tested by

no test coverage detected