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

Method ListNetworkSubscriptions

internal/cli/client.go:1934–1952  ·  view source on GitHub ↗
(
	ctx context.Context,
	query NetworkSubscriptionsQuery,
)

Source from the content-addressed store, hash-verified

1932}
1933
1934func (c *unixSocketClient) ListNetworkSubscriptions(
1935 ctx context.Context,
1936 query NetworkSubscriptionsQuery,
1937) ([]NetworkSubscriptionRecord, error) {
1938 channel, err := requireNetworkPathValue("channel", query.Channel)
1939 if err != nil {
1940 return nil, err
1941 }
1942 var response contract.NetworkSubscriptionsResponse
1943 path, err := networkChannelPath(query.WorkspaceRef, channel)
1944 if err != nil {
1945 return nil, err
1946 }
1947 path += "/subscriptions"
1948 if err := c.doJSON(ctx, http.MethodGet, path, networkSubscriptionsValues(query), nil, &response); err != nil {
1949 return nil, err
1950 }
1951 return response.Subscriptions, nil
1952}
1953
1954func (c *unixSocketClient) SetNetworkSubscription(
1955 ctx context.Context,

Callers

nothing calls this directly

Calls 4

doJSONMethod · 0.95
requireNetworkPathValueFunction · 0.85
networkChannelPathFunction · 0.85

Tested by

no test coverage detected