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

Method DeleteNetworkSubscription

internal/cli/client.go:1976–2001  ·  view source on GitHub ↗
(
	ctx context.Context,
	workspaceRef string,
	channel string,
	peerID string,
	threadID string,
)

Source from the content-addressed store, hash-verified

1974}
1975
1976func (c *unixSocketClient) DeleteNetworkSubscription(
1977 ctx context.Context,
1978 workspaceRef string,
1979 channel string,
1980 peerID string,
1981 threadID string,
1982) error {
1983 channel, err := requireNetworkPathValue("channel", channel)
1984 if err != nil {
1985 return err
1986 }
1987 peerID, err = requireNetworkPathValue("peer_id", peerID)
1988 if err != nil {
1989 return err
1990 }
1991 path, err := networkChannelPath(workspaceRef, channel)
1992 if err != nil {
1993 return err
1994 }
1995 values := url.Values{}
1996 if trimmed := strings.TrimSpace(threadID); trimmed != "" {
1997 values.Set("thread_id", trimmed)
1998 }
1999 path += "/subscriptions/" + url.PathEscape(peerID)
2000 return c.doJSON(ctx, http.MethodDelete, path, values, nil, nil)
2001}
2002
2003func (c *unixSocketClient) NetworkThreads(
2004 ctx context.Context,

Callers

nothing calls this directly

Calls 4

doJSONMethod · 0.95
requireNetworkPathValueFunction · 0.85
networkChannelPathFunction · 0.85
SetMethod · 0.45

Tested by

no test coverage detected