MCPcopy Create free account
hub / github.com/compozy/agh / BridgeTargets

Method BridgeTargets

internal/cli/client.go:2523–2542  ·  view source on GitHub ↗
(
	ctx context.Context,
	id string,
	query string,
	limit int,
)

Source from the content-addressed store, hash-verified

2521}
2522
2523func (c *unixSocketClient) BridgeTargets(
2524 ctx context.Context,
2525 id string,
2526 query string,
2527 limit int,
2528) (BridgeTargetsRecord, error) {
2529 values := url.Values{}
2530 if strings.TrimSpace(query) != "" {
2531 values.Set("q", strings.TrimSpace(query))
2532 }
2533 if limit > 0 {
2534 values.Set("limit", fmt.Sprintf("%d", limit))
2535 }
2536 path := "/api/bridges/" + url.PathEscape(strings.TrimSpace(id)) + "/targets"
2537 var response BridgeTargetsRecord
2538 if err := c.doJSON(ctx, http.MethodGet, path, values, nil, &response); err != nil {
2539 return BridgeTargetsRecord{}, err
2540 }
2541 return response, nil
2542}
2543
2544func (c *unixSocketClient) ResolveBridgeTarget(
2545 ctx context.Context,

Callers 1

Calls 2

doJSONMethod · 0.95
SetMethod · 0.45

Tested by 1