| 418 | } |
| 419 | |
| 420 | func (c *Setup) certStyle(ctx context.Context, cfg *cli.Config, drv *ui.Driver) (string, error) { |
| 421 | if cfg.Service.CertStyle != "" { |
| 422 | drv.Activate(ctx, &componentmodels.ConfigVia{ |
| 423 | Config: cfg, |
| 424 | ConfigFetchFn: func(cfg *cli.Config) any { return cfg.Service.CertStyle }, |
| 425 | Flag: "--cert-style", |
| 426 | Singular: "certificate style", |
| 427 | }) |
| 428 | return cfg.Service.CertStyle, nil |
| 429 | } |
| 430 | |
| 431 | choicec := make(chan string) |
| 432 | drv.Activate(ctx, &models.SetupMethod{ |
| 433 | ChoiceCh: choicec, |
| 434 | }) |
| 435 | |
| 436 | select { |
| 437 | case certStyle := <-choicec: |
| 438 | return certStyle, nil |
| 439 | case <-ctx.Done(): |
| 440 | return "", ctx.Err() |
| 441 | } |
| 442 | } |
| 443 | |
| 444 | func (c *Setup) setupServiceEnv(ctx context.Context, drv *ui.Driver, orgAPID, realmAPID, serviceAPID string) error { |
| 445 | drv.Activate(ctx, servicemodels.ServiceEnvHeader) |