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

Function providerAuthStatusBundle

internal/cli/provider.go:621–655  ·  view source on GitHub ↗
(record providerAuthStatusRecord)

Source from the content-addressed store, hash-verified

619}
620
621func providerAuthStatusBundle(record providerAuthStatusRecord) outputBundle {
622 return outputBundle{
623 jsonValue: record,
624 human: func() (string, error) {
625 sections := []string{renderHumanSection("Provider Auth", providerAuthStatusRows(record))}
626 if len(record.Credentials) > 0 {
627 sections = append(sections, renderHumanTable(
628 "Credentials",
629 []string{
630 providerNameValue,
631 "Target",
632 authoredContextSourceValue,
633 "Required",
634 authoredContextPresentValue,
635 },
636 providerCredentialStatusRows(record.Credentials),
637 ))
638 }
639 return strings.Join(sections, "\n"), nil
640 },
641 toon: func() (string, error) {
642 return renderToonObject(
643 "provider_auth",
644 []string{
645 providerProviderKey,
646 providerAuthModeKey,
647 providerEnvPolicyKey,
648 providerHomePolicyKey,
649 providerStateKey,
650 },
651 []string{record.Provider, record.AuthMode, record.EnvPolicy, record.HomePolicy, record.State},
652 ), nil
653 },
654 }
655}
656
657func providerAuthProbeBundle(record contract.ProviderAuthProbeResponse) outputBundle {
658 return outputBundle{

Callers 2

Calls 6

renderHumanSectionFunction · 0.85
providerAuthStatusRowsFunction · 0.85
appendFunction · 0.85
renderHumanTableFunction · 0.85
renderToonObjectFunction · 0.85

Tested by

no test coverage detected