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

Method SetNetworkSubscription

internal/cli/client.go:1954–1974  ·  view source on GitHub ↗
(
	ctx context.Context,
	workspaceRef string,
	channel string,
	request NetworkSubscriptionRequest,
)

Source from the content-addressed store, hash-verified

1952}
1953
1954func (c *unixSocketClient) SetNetworkSubscription(
1955 ctx context.Context,
1956 workspaceRef string,
1957 channel string,
1958 request NetworkSubscriptionRequest,
1959) (NetworkSubscriptionRecord, error) {
1960 channel, err := requireNetworkPathValue("channel", channel)
1961 if err != nil {
1962 return NetworkSubscriptionRecord{}, err
1963 }
1964 var response contract.NetworkSubscriptionResponse
1965 path, err := networkChannelPath(workspaceRef, channel)
1966 if err != nil {
1967 return NetworkSubscriptionRecord{}, err
1968 }
1969 path += "/subscriptions"
1970 if err := c.doJSON(ctx, http.MethodPut, path, nil, request, &response); err != nil {
1971 return NetworkSubscriptionRecord{}, err
1972 }
1973 return response.Subscription, nil
1974}
1975
1976func (c *unixSocketClient) DeleteNetworkSubscription(
1977 ctx context.Context,

Callers

nothing calls this directly

Calls 3

doJSONMethod · 0.95
requireNetworkPathValueFunction · 0.85
networkChannelPathFunction · 0.85

Tested by

no test coverage detected