( ctx context.Context, workspaceRef string, channel string, request NetworkSubscriptionRequest, )
| 1952 | } |
| 1953 | |
| 1954 | func (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 | |
| 1976 | func (c *unixSocketClient) DeleteNetworkSubscription( |
| 1977 | ctx context.Context, |
nothing calls this directly
no test coverage detected