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

Function providerListBundle

internal/cli/provider.go:689–716  ·  view source on GitHub ↗
(record contract.ProviderListResponse)

Source from the content-addressed store, hash-verified

687}
688
689func providerListBundle(record contract.ProviderListResponse) outputBundle {
690 return outputBundle{
691 jsonValue: record,
692 human: func() (string, error) {
693 rows := make([][]string, 0, len(record.Providers))
694 for _, provider := range record.Providers {
695 rows = append(rows, []string{
696 stringOrDash(provider.Name),
697 stringOrDash(provider.DisplayName),
698 stringOrDash(provider.AuthStatus.State),
699 stringOrDash(provider.AuthStatus.Mode),
700 })
701 }
702 return renderHumanTable(
703 "Providers",
704 []string{providerNameValue, "Display Name", providerStateValue, providerAuthModeValue},
705 rows,
706 ), nil
707 },
708 toon: func() (string, error) {
709 return renderToonObject(
710 "providers",
711 []string{"count"},
712 []string{fmt.Sprintf("%d", len(record.Providers))},
713 ), nil
714 },
715 }
716}
717
718func providerAuthStatusRows(record providerAuthStatusRecord) []keyValue {
719 rows := []keyValue{

Callers 1

newProviderListCommandFunction · 0.85

Calls 4

appendFunction · 0.85
stringOrDashFunction · 0.85
renderHumanTableFunction · 0.85
renderToonObjectFunction · 0.85

Tested by

no test coverage detected