(channel string, threadID string, peerID string)
| 1370 | } |
| 1371 | |
| 1372 | func networkSubscriptionDeleteBundle(channel string, threadID string, peerID string) outputBundle { |
| 1373 | payload := map[string]any{ |
| 1374 | networkChannelKey: strings.TrimSpace(channel), |
| 1375 | networkThreadIDKey: strings.TrimSpace(threadID), |
| 1376 | networkPeerIDKey: strings.TrimSpace(peerID), |
| 1377 | networkDeletedKey: true, |
| 1378 | } |
| 1379 | return outputBundle{ |
| 1380 | jsonValue: payload, |
| 1381 | human: func() (string, error) { |
| 1382 | return renderHumanSection("Network Subscription", []keyValue{ |
| 1383 | {Label: networkChannelValue, Value: stringOrDash(strings.TrimSpace(channel))}, |
| 1384 | {Label: taskThreadValue, Value: stringOrDash(strings.TrimSpace(threadID))}, |
| 1385 | {Label: taskPeerValue, Value: stringOrDash(strings.TrimSpace(peerID))}, |
| 1386 | {Label: "Deleted", Value: networkDeletedValue}, |
| 1387 | }), nil |
| 1388 | }, |
| 1389 | toon: func() (string, error) { |
| 1390 | return renderToonObject( |
| 1391 | "network_subscription", |
| 1392 | []string{networkChannelKey, networkThreadIDKey, networkPeerIDKey, networkDeletedKey}, |
| 1393 | []string{ |
| 1394 | strings.TrimSpace(channel), |
| 1395 | strings.TrimSpace(threadID), |
| 1396 | strings.TrimSpace(peerID), |
| 1397 | networkDeletedValue, |
| 1398 | }, |
| 1399 | ), nil |
| 1400 | }, |
| 1401 | } |
| 1402 | } |
| 1403 | |
| 1404 | func networkThreadsBundle(threads []NetworkThreadRecord) outputBundle { |
| 1405 | return listBundle( |
no test coverage detected