MCPcopy Create free account
hub / github.com/cloudfoundry/multiapps-cli-plugin / Initialize

Method Initialize

commands/base_command.go:62–72  ·  view source on GitHub ↗

Initialize initializes the command with the specified name and CLI connection

(name string, cliConnection plugin.CliConnection)

Source from the content-addressed store, hash-verified

60
61// Initialize initializes the command with the specified name and CLI connection
62func (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.
75func (c *BaseCommand) InitializeAll(name string, cliConnection plugin.CliConnection, transport http.RoundTripper, clientFactory clients.ClientFactory, tokenFactory baseclient.TokenFactory, deployServiceURLCalculator util.DeployServiceURLCalculator) {

Callers

nothing calls this directly

Calls 6

InitializeAllMethod · 0.95
TracefFunction · 0.92
NewDefaultClientFactoryFunction · 0.92
newTransportFunction · 0.85
NewDefaultTokenFactoryFunction · 0.85

Tested by

no test coverage detected