MCPcopy Create free account
hub / github.com/cloudwan/gohan / getResourceIDForSchemaID

Method getResourceIDForSchemaID

cli/client/arguments.go:196–202  ·  view source on GitHub ↗
(schemaID, identifier string)

Source from the content-addressed store, hash-verified

194}
195
196func (gohanClientCLI *GohanClientCLI) getResourceIDForSchemaID(schemaID, identifier string) (string, error) {
197 relatedSchema, err := gohanClientCLI.getSchemaByID(schemaID)
198 if err != nil {
199 return "", err
200 }
201 return gohanClientCLI.getResourceID(relatedSchema, identifier)
202}
203
204func (gohanClientCLI *GohanClientCLI) getResourceID(s *schema.Schema, identifier string) (string, error) {
205 url := fmt.Sprintf("%s%s/%s", gohanClientCLI.opts.gohanEndpointURL, s.URL, u.QueryEscape(identifier))

Callers 2

client_test.goFile · 0.80

Calls 2

getSchemaByIDMethod · 0.95
getResourceIDMethod · 0.95

Tested by

no test coverage detected