MCPcopy Create free account
hub / github.com/auth0/auth0-cli / showEmailProviderCmd

Function showEmailProviderCmd

internal/cli/email_provider.go:104–130  ·  view source on GitHub ↗
(cli *cli)

Source from the content-addressed store, hash-verified

102}
103
104func showEmailProviderCmd(cli *cli) *cobra.Command {
105 cmd := &cobra.Command{
106 Use: "show",
107 Args: cobra.NoArgs,
108 Short: "Show the email provider",
109 Long: "Display information about the email provider.",
110 Example: ` auth0 email provider show
111 auth0 email provider show --json
112 auth0 email provider show --json-compact`,
113 RunE: func(cmd *cobra.Command, args []string) error {
114 var emailProvider *management.EmailProvider
115 if err := ansi.Waiting(func() (err error) {
116 emailProvider, err = cli.api.EmailProvider.Read(cmd.Context())
117 return err
118 }); err != nil {
119 return fmt.Errorf("failed to read email provider: %w", err)
120 }
121
122 return cli.renderer.EmailProviderShow(emailProvider)
123 },
124 }
125
126 cmd.Flags().BoolVar(&cli.json, "json", false, "Output in json format.")
127 cmd.Flags().BoolVar(&cli.jsonCompact, "json-compact", false, "Output in compact json format.")
128
129 return cmd
130}
131
132func createEmailProviderCmd(cli *cli) *cobra.Command {
133 var inputs struct {

Callers 1

emailProviderCmdFunction · 0.85

Calls 4

WaitingFunction · 0.92
ErrorfMethod · 0.80
EmailProviderShowMethod · 0.80
ReadMethod · 0.65

Tested by

no test coverage detected