{"modulePath":"github.com/windsorcli/cli","version":"v0.1.5","isLatest":false,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package controller\n\n## Types\n\n```go\ntype BaseController struct {\n\t// contains filtered or unexported fields\n}\n```\nBaseController struct implements the Controller interface.\n\n```go\nfunc NewController(injector di.Injector) *BaseController\n```\nNewController creates a new controller.\n\n```go\nfunc (c *BaseController) CreateCommonComponents() error\n```\nCreateCommonComponents creates the common components.\n\n```go\nfunc (c *BaseController) CreateEnvComponents() error\n```\nCreateEnvComponents creates the env components.\n\n```go\nfunc (c *BaseController) CreateServiceComponents() error\n```\nCreateServiceComponents creates the service components.\n\n```go\nfunc (c *BaseController) CreateStackComponents() error\n```\nCreateStackComponents creates the stack components.\n\n```go\nfunc (c *BaseController) CreateVirtualizationComponents() error\n```\nCreateVirtualizationComponents creates the virtualization components.\n\n```go\nfunc (c *BaseController) Initialize() error\n```\nInitialize the controller.\n\n```go\nfunc (c *BaseController) InitializeComponents() error\n```\nInitializeComponents initializes all components.\n\n```go\nfunc (c *BaseController) ResolveAllEnvPrinters() []env.EnvPrinter\n```\nResolveAllEnvPrinters resolves all envPrinter instances.\n\n```go\nfunc (c *BaseController) ResolveAllGenerators() []generators.Generator\n```\nResolveAllGenerators resolves all generator instances.\n\n```go\nfunc (c *BaseController) ResolveAllServices() []services.Service\n```\nResolveAllServices resolves all service instances.\n\n```go\nfunc (c *BaseController) ResolveBlueprintHandler() blueprint.BlueprintHandler\n```\nResolveBlueprintHandler resolves the blueprintHandler instance.\n\n```go\nfunc (c *BaseController) ResolveConfigHandler() config.ConfigHandler\n```\nResolveConfigHandler resolves the configHandler instance.\n\n```go\nfunc (c *BaseController) ResolveContainerRuntime() virt.ContainerRuntime\n```\nResolveContainerRuntime resolves the requested containerRuntime instance.\n\n```go\nfunc (c *BaseController) ResolveContextHandler() context.ContextHandler\n```\nResolveContextHandler resolves the contextHandler instance.\n\n```go\nfunc (c *BaseController) ResolveEnvPrinter(name string) env.EnvPrinter\n```\nResolveEnvPrinter resolves the envPrinter instance.\n\n```go\nfunc (c *BaseController) ResolveInjector() di.Injector\n```\nResolveInjector resolves the injector instance.\n\n```go\nfunc (c *BaseController) ResolveNetworkManager() network.NetworkManager\n```\nResolveNetworkManager resolves the networkManager instance.\n\n```go\nfunc (c *BaseController) ResolveSecureShell() shell.Shell\n```\nResolveSecureShell resolves the secureShell instance.\n\n```go\nfunc (c *BaseController) ResolveService(name string) services.Service\n```\nResolveService resolves the requested service instance.\n\n```go\nfunc (c *BaseController) ResolveShell() shell.Shell\n```\nResolveShell resolves the shell instance.\n\n```go\nfunc (c *BaseController) ResolveStack() stack.Stack\n```\nResolveStack resolves the requested stack instance.\n\n```go\nfunc (c *BaseController) ResolveVirtualMachine() virt.VirtualMachine\n```\nResolveVirtualMachine resolves the requested virtualMachine instance.\n\n```go\nfunc (c *BaseController) WriteConfigurationFiles() error\n```\nWriteConfigurationFiles writes the configuration files.\n\n```go\ntype Controller interface {\n\tInitialize() error\n\tInitializeComponents() error\n\tCreateCommonComponents() error\n\tCreateEnvComponents() error\n\tCreateServiceComponents() error\n\tCreateVirtualizationComponents() error\n\tCreateStackComponents() error\n\tResolveInjector() di.Injector\n\tResolveConfigHandler() config.ConfigHandler\n\tResolveContextHandler() context.ContextHandler\n\tResolveEnvPrinter(name string) env.EnvPrinter\n\tResolveAllEnvPrinters() []env.EnvPrinter\n\tResolveShell() shell.Shell\n\tResolveSecureShell() shell.Shell\n\tResolveNetworkManager() network.NetworkManager\n\tResolveBlueprintHandler() blueprint.BlueprintHandler\n\tResolveService(name string) services.Service\n\tResolveAllServices() []services.Service\n\tResolveVirtualMachine() virt.VirtualMachine\n\tResolveContainerRuntime() virt.ContainerRuntime\n\tResolveStack() stack.Stack\n\tResolveAllGenerators() []generators.Generator\n\tWriteConfigurationFiles() error\n}\n```\nController interface defines the methods for the controller.\n\n```go\ntype MockController struct {\n\tBaseController\n\tInitializeFunc                     func() error\n\tInitializeComponentsFunc           func() error\n\tCreateCommonComponentsFunc         func() error\n\tCreateEnvComponentsFunc            func() error\n\tCreateServiceComponentsFunc        func() error\n\tCreateVirtualizationComponentsFunc func() error\n\tCreateStackComponentsFunc          func() error\n\tResolveInjectorFunc                func() di.Injector\n\tResolveConfigHandlerFunc           func() config.ConfigHandler\n\tResolveContextHandlerFunc          func() context.ContextHandler\n\tResolveEnvPrinterFunc              func(name string) env.EnvPrinter\n\tResolveAllEnvPrintersFunc          func() []env.EnvPrinter\n\tResolveShellFunc                   func() shell.Shell\n\tResolveSecureShellFunc             func() shell.Shell\n\tResolveNetworkManagerFunc          func() network.NetworkManager\n\tResolveServiceFunc                 func(name string) services.Service\n\tResolveAllServicesFunc             func() []services.Service\n\tResolveVirtualMachineFunc          func() virt.VirtualMachine\n\tResolveContainerRuntimeFunc        func() virt.ContainerRuntime\n\tResolveAllGeneratorsFunc           func() []generators.Generator\n\tResolveStackFunc                   func() stack.Stack\n\tWriteConfigurationFilesFunc        func() error\n}\n```\nMockController is a mock implementation of the Controller interface\n\n```go\nfunc NewMockController(injector di.Injector) *MockController\n```\n\n```go\nfunc (m *MockController) CreateCommonComponents() error\n```\nCreateCommonComponents calls the mock CreateCommonComponentsFunc if set, otherwise creates mock components\n\n```go\nfunc (m *MockController) CreateEnvComponents() error\n```\nCreateEnvComponents calls the mock CreateEnvComponentsFunc if set, otherwise creates mock components\n\n```go\nfunc (m *MockController) CreateServiceComponents() error\n```\nCreateServiceComponents calls the mock CreateServiceComponentsFunc if set, otherwise creates mock components\n\n```go\nfunc (c *MockController) CreateStackComponents() error\n```\nCreateStackComponents calls the mock CreateStackComponentsFunc if set, otherwise creates mock components\n\n```go\nfunc (c *MockController) CreateVirtualizationComponents() error\n```\nCreateVirtualizationComponents calls the mock CreateVirtualizationComponentsFunc if set, otherwise creates mock components\n\n```go\nfunc (m *MockController) Initialize() error\n```\nInitialize calls the mock InitializeFunc if set, otherwise calls the parent function\n\n```go\nfunc (m *MockController) InitializeComponents() error\n```\nInitializeComponents calls the mock InitializeComponentsFunc if set, otherwise calls the parent function\n\n```go\nfunc (c *MockController) ResolveAllEnvPrinters() []env.EnvPrinter\n```\nResolveAllEnvPrinters calls the mock ResolveAllEnvPrintersFunc if set, otherwise calls the parent function\n\n```go\nfunc (c *MockController) ResolveAllGenerators() []generators.Generator\n```\nResolveAllGenerators calls the mock ResolveAllGeneratorsFunc if set, otherwise calls the parent function\n\n```go\nfunc (c *MockController) ResolveAllServices() []services.Service\n```\nResolveAllServices calls the mock ResolveAllServicesFunc if set, otherwise calls the parent function\n\n```go\nfunc (c *MockController) ResolveConfigHandler() config.ConfigHandler\n```\nResolveConfigHandler calls the mock ResolveConfigHandlerFunc if set, otherwise calls the parent function\n\n```go\nfunc (c *MockController) ResolveContainerRuntime() virt.ContainerRuntime\n```\nResolveContainerRuntime calls the mock ResolveContainerRuntimeFunc if set, otherwise calls the parent function\n\n```go\nfunc (c *MockController) ResolveContextHandler() context.ContextHandler\n```\nResolveContextHandler calls the mock ResolveContextHandlerFunc if set, otherwise calls the parent function\n\n```go\nfunc (c *MockController) ResolveEnvPrinter(name string) env.EnvPrinter\n```\nResolveEnvPrinter calls the mock ResolveEnvPrinterFunc if set, otherwise calls the parent function\n\n```go\nfunc (c *MockController) ResolveInjector() di.Injector\n```\nResolveInjector calls the mock ResolveInjectorFunc if set, otherwise returns a mock injector\n\n```go\nfunc (c *MockController) ResolveNetworkManager() network.NetworkManager\n```\nResolveNetworkManager calls the mock ResolveNetworkManagerFunc if set, otherwise calls the parent function\n\n```go\nfunc (c *MockController) ResolveSecureShell() shell.Shell\n```\nResolveSecureShell calls the mock ResolveSecureShellFunc if set, otherwise calls the parent function\n\n```go\nfunc (c *MockController) ResolveService(name string) services.Service\n```\nResolveService calls the mock ResolveServiceFunc if set, otherwise calls the parent function\n\n```go\nfunc (c *MockController) ResolveShell() shell.Shell\n```\nResolveShell calls the mock ResolveShellFunc if set, otherwise calls the parent function\n\n```go\nfunc (c *MockController) ResolveStack() stack.Stack\n```\nResolveStack calls the mock ResolveStackFunc if set, otherwise calls the parent function\n\n```go\nfunc (c *MockController) ResolveVirtualMachine() virt.VirtualMachine\n```\nResolveVirtualMachine calls the mock ResolveVirtualMachineFunc if set, otherwise calls the parent function\n\n```go\nfunc (c *MockController) WriteConfigurationFiles() error\n```\nWriteConfigurationFiles calls the mock WriteConfigurationFilesFunc if set, otherwise calls the parent function\n\n```go\ntype RealController struct {\n\tBaseController\n}\n```\nRealController struct implements the RealController interface.\n\n```go\nfunc NewRealController(injector di.Injector) *RealController\n```\nNewRealController creates a new controller.\n\n```go\nfunc (c *RealController) CreateCommonComponents() error\n```\nCreateCommonComponents creates components commonly used by all commands.\n\n```go\nfunc (c *RealController) CreateEnvComponents() error\n```\nCreateEnvComponents creates components required for env and exec commands\n\n```go\nfunc (c *RealController) CreateServiceComponents() error\n```\nCreateServiceComponents creates components required for services\n\n```go\nfunc (c *RealController) CreateStackComponents() error\n```\nCreateStackComponents creates stack components\n\n```go\nfunc (c *RealController) CreateVirtualizationComponents() error\n```\nCreateVirtualizationComponents creates virtualization components\n\n","path":"github.com/windsorcli/cli/internal/controller","name":"controller","synopsis":"","isRedistributable":true}
