(availability contract.ToolAvailabilityPayload)
| 752 | } |
| 753 | |
| 754 | func toolAvailabilitySummary(availability contract.ToolAvailabilityPayload) string { |
| 755 | switch { |
| 756 | case availability.Conflicted: |
| 757 | return "conflicted" |
| 758 | case !availability.Registered: |
| 759 | return "unregistered" |
| 760 | case !availability.Enabled: |
| 761 | return toolOperatorDisabledKey |
| 762 | case !availability.Available: |
| 763 | return "unavailable" |
| 764 | case !availability.Authorized: |
| 765 | return "auth-required" |
| 766 | case !availability.Executable: |
| 767 | return "not-executable" |
| 768 | default: |
| 769 | return toolOperatorAvailableKey |
| 770 | } |
| 771 | } |
| 772 | |
| 773 | func joinReasons(groups ...[]toolspkg.ReasonCode) string { |
| 774 | seen := make(map[toolspkg.ReasonCode]struct{}) |
no outgoing calls