MCPcopy
hub / github.com/apache/devlake / RemoteScopes

Method RemoteScopes

backend/test/helper/api.go:318–341  ·  view source on GitHub ↗
(query RemoteScopesQuery)

Source from the content-addressed store, hash-verified

316}
317
318func (d *DevlakeClient) RemoteScopes(query RemoteScopesQuery) RemoteScopesOutput {
319 url := fmt.Sprintf("%s/plugins/%s/connections/%d/remote-scopes",
320 d.Endpoint,
321 query.PluginName,
322 query.ConnectionId,
323 )
324 if query.Params == nil {
325 query.Params = make(map[string]string)
326 }
327 if query.GroupId != "" {
328 query.Params["groupId"] = query.GroupId
329 }
330 if query.PageToken != "" {
331 query.Params["pageToken"] = query.PageToken
332 }
333 if len(query.Params) > 0 {
334 url = url + "?" + mapToQueryString(query.Params)
335 }
336 return sendHttpRequest[RemoteScopesOutput](d.testCtx, d.timeout, &testContext{
337 client: d,
338 printPayload: true,
339 inlineJson: false,
340 }, http.MethodGet, url, nil, nil)
341}
342
343// SearchRemoteScopes makes calls to the "scope API" indirectly. "Search" is the remote endpoint to hit.
344func (d *DevlakeClient) SearchRemoteScopes(query SearchRemoteScopesQuery) SearchRemoteScopesOutput {

Callers 7

TestTestmoPluginFunction · 0.80
TestPagerDutyPluginFunction · 0.80
TestAzureFunction · 0.80
TestArgoCDPluginFunction · 0.80
TestGitlabPluginFunction · 0.80
TestRemoteScopeGroupsFunction · 0.80
TestRemoteScopesFunction · 0.80

Calls 1

mapToQueryStringFunction · 0.85

Tested by 7

TestTestmoPluginFunction · 0.64
TestPagerDutyPluginFunction · 0.64
TestAzureFunction · 0.64
TestArgoCDPluginFunction · 0.64
TestGitlabPluginFunction · 0.64
TestRemoteScopeGroupsFunction · 0.64
TestRemoteScopesFunction · 0.64