(record providerAuthStatusRecord)
| 619 | } |
| 620 | |
| 621 | func 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 | |
| 657 | func providerAuthProbeBundle(record contract.ProviderAuthProbeResponse) outputBundle { |
| 658 | return outputBundle{ |
no test coverage detected