Initialize initializes the command with the specified name and CLI connection
(name string, cliConnection plugin.CliConnection)
| 60 | |
| 61 | // Initialize initializes the command with the specified name and CLI connection |
| 62 | func (c *BaseCommand) Initialize(name string, cliConnection plugin.CliConnection) { |
| 63 | log.Tracef("Initializing command %q\n", name) |
| 64 | isSslDisabled, err := cliConnection.IsSSLDisabled() |
| 65 | if err != nil { |
| 66 | log.Tracef("Error while determining skip-ssl-validation: %v", err) |
| 67 | isSslDisabled = false |
| 68 | } |
| 69 | transport := newTransport(isSslDisabled) |
| 70 | tokenFactory := NewDefaultTokenFactory(cliConnection) |
| 71 | c.InitializeAll(name, cliConnection, transport, clients.NewDefaultClientFactory(), tokenFactory, util.NewDeployServiceURLCalculator(cliConnection)) |
| 72 | } |
| 73 | |
| 74 | // InitializeAll initializes the command with the specified name, CLI connection, transport, client & token factories and deploy service URL calculator. |
| 75 | func (c *BaseCommand) InitializeAll(name string, cliConnection plugin.CliConnection, transport http.RoundTripper, clientFactory clients.ClientFactory, tokenFactory baseclient.TokenFactory, deployServiceURLCalculator util.DeployServiceURLCalculator) { |
nothing calls this directly
no test coverage detected