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

Function showDefaultCustomDomainCmd

internal/cli/custom_domains.go:535–564  ·  view source on GitHub ↗
(cli *cli)

Source from the content-addressed store, hash-verified

533}
534
535func showDefaultCustomDomainCmd(cli *cli) *cobra.Command {
536 cmd := &cobra.Command{
537 Use: "show",
538 Args: cobra.NoArgs,
539 Short: "Show the default custom domain",
540 Long: "Display the default custom domain configuration for the tenant.",
541 Example: ` auth0 domains default show
542 auth0 domains default show --json
543 auth0 domains default show --json-compact`,
544 RunE: func(cmd *cobra.Command, args []string) error {
545 var defaultDomain *management.CustomDomain
546
547 if err := ansi.Waiting(func() (err error) {
548 defaultDomain, err = cli.api.CustomDomain.ReadDefault(cmd.Context())
549 return err
550 }); err != nil {
551 return fmt.Errorf("failed to read default custom domain: %w", err)
552 }
553
554 cli.renderer.CustomDomainDefaultShow(defaultDomain)
555
556 return nil
557 },
558 }
559
560 cmd.Flags().BoolVar(&cli.json, "json", false, "Output in json format.")
561 cmd.Flags().BoolVar(&cli.jsonCompact, "json-compact", false, "Output in compact json format.")
562
563 return cmd
564}
565
566func setDefaultCustomDomainCmd(cli *cli) *cobra.Command {
567 var inputs struct {

Callers 1

defaultCustomDomainCmdFunction · 0.85

Calls 4

WaitingFunction · 0.92
ErrorfMethod · 0.80
ReadDefaultMethod · 0.65

Tested by

no test coverage detected