| 316 | } |
| 317 | |
| 318 | func (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. |
| 344 | func (d *DevlakeClient) SearchRemoteScopes(query SearchRemoteScopesQuery) SearchRemoteScopesOutput { |