(subscription NetworkSubscriptionRecord)
| 1342 | } |
| 1343 | |
| 1344 | func networkSubscriptionBundle(subscription NetworkSubscriptionRecord) outputBundle { |
| 1345 | return outputBundle{ |
| 1346 | jsonValue: contract.NetworkSubscriptionResponse{Subscription: subscription}, |
| 1347 | human: func() (string, error) { |
| 1348 | return renderHumanSection("Network Subscription", []keyValue{ |
| 1349 | {Label: networkChannelValue, Value: stringOrDash(subscription.Channel)}, |
| 1350 | {Label: taskThreadValue, Value: stringOrDash(subscription.ThreadID)}, |
| 1351 | {Label: taskPeerValue, Value: stringOrDash(subscription.PeerID)}, |
| 1352 | {Label: networkModeValue, Value: stringOrDash(subscription.Mode)}, |
| 1353 | {Label: "Keywords", Value: stringOrDash(strings.Join(subscription.KeywordFilters, ", "))}, |
| 1354 | }), nil |
| 1355 | }, |
| 1356 | toon: func() (string, error) { |
| 1357 | return renderToonObject( |
| 1358 | "network_subscription", |
| 1359 | []string{networkChannelKey, networkThreadIDKey, networkPeerIDKey, networkModeKey, "keyword_filters"}, |
| 1360 | []string{ |
| 1361 | subscription.Channel, |
| 1362 | subscription.ThreadID, |
| 1363 | subscription.PeerID, |
| 1364 | subscription.Mode, |
| 1365 | strings.Join(subscription.KeywordFilters, ","), |
| 1366 | }, |
| 1367 | ), nil |
| 1368 | }, |
| 1369 | } |
| 1370 | } |
| 1371 | |
| 1372 | func networkSubscriptionDeleteBundle(channel string, threadID string, peerID string) outputBundle { |
| 1373 | payload := map[string]any{ |
no test coverage detected