Documentation ¶
Index ¶
- func GetTerraformVersion(ctx context.Context, mod Module)
- func IsIgnoredFile(name string) bool
- func IsModuleNotFound(err error) bool
- func IsTerraformNotFound(err error) bool
- func ObtainSchema(ctx context.Context, mod Module)
- func ParseConfiguration(mod Module)
- func ParseModuleManifest(mod Module)
- func TerraformExecPath(ctx context.Context, mod Module) (string, error)
- func TerraformExecutorForModule(ctx context.Context, mod Module) (exec.TerraformExecutor, error)
- type File
- type Module
- type ModuleFactory
- type ModuleFinder
- type ModuleLoader
- type ModuleManager
- type ModuleManagerFactory
- type ModuleManagerMockInput
- type ModuleNotFoundErr
- type ModuleOperation
- type NoTerraformExecPathErr
- type OpState
- type OpType
- type SchemaSource
- type Walker
- type WalkerFactory
- type Watcher
- type WatcherFactory
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetTerraformVersion ¶
func IsIgnoredFile ¶
IsIgnoredFile returns true if the given filename (which must not have a directory path ahead of it) should be ignored as e.g. an editor swap file.
func IsModuleNotFound ¶
func IsTerraformNotFound ¶ added in v0.14.0
func ObtainSchema ¶
func ParseConfiguration ¶
func ParseConfiguration(mod Module)
func ParseModuleManifest ¶
func ParseModuleManifest(mod Module)
func TerraformExecPath ¶ added in v0.14.0
Types ¶
type Module ¶
type Module interface { Path() string HumanReadablePath(string) string MatchesPath(path string) bool HasOpenFiles() bool TerraformExecPath() string TerraformVersion() (*version.Version, error) ProviderVersions() map[string]*version.Version ProviderSchema() (*tfjson.ProviderSchemas, error) ModuleManifest() (*datadir.ModuleManifest, error) TerraformVersionState() OpState ProviderSchemaState() OpState ParsedFiles() (map[string]*hcl.File, error) Diagnostics() map[string]hcl.Diagnostics ModuleCalls() []datadir.ModuleRecord }
func NewModule ¶
func NewModule(fs filesystem.Filesystem, dir string) Module
type ModuleFactory ¶
type ModuleFinder ¶
type ModuleFinder interface { ModuleByPath(path string) (Module, error) SchemaForModule(path string) (*schema.BodySchema, error) SchemaSourcesForModule(path string) ([]SchemaSource, error) }
type ModuleLoader ¶
type ModuleManager ¶
type ModuleManager interface { ModuleFinder SetLogger(logger *log.Logger) AddModule(modPath string) (Module, error) EnqueueModuleOp(modPath string, opType OpType) error EnqueueModuleOpWait(modPath string, opType OpType) error ListModules() []Module CancelLoading() }
func NewModuleManager ¶
func NewModuleManager(ctx context.Context, fs filesystem.Filesystem) ModuleManager
func NewSyncModuleManager ¶
func NewSyncModuleManager(ctx context.Context, fs filesystem.Filesystem) ModuleManager
type ModuleManagerFactory ¶
type ModuleManagerFactory func(context.Context, filesystem.Filesystem) ModuleManager
func NewModuleManagerMock ¶
func NewModuleManagerMock(input *ModuleManagerMockInput) ModuleManagerFactory
type ModuleManagerMockInput ¶
type ModuleManagerMockInput struct { Logger *log.Logger TerraformCalls *exec.TerraformMockCalls }
type ModuleNotFoundErr ¶
type ModuleNotFoundErr struct {
Dir string
}
func (*ModuleNotFoundErr) Error ¶
func (e *ModuleNotFoundErr) Error() string
type ModuleOperation ¶
func NewModuleOperation ¶
func NewModuleOperation(mod Module, typ OpType) ModuleOperation
func (ModuleOperation) Done ¶
func (mo ModuleOperation) Done() <-chan struct{}
type NoTerraformExecPathErr ¶ added in v0.14.0
type NoTerraformExecPathErr struct{}
func (NoTerraformExecPathErr) Error ¶ added in v0.14.0
func (NoTerraformExecPathErr) Error() string
type SchemaSource ¶
type Walker ¶
type Walker struct {
// contains filtered or unexported fields
}
func NewWalker ¶
func NewWalker(fs filesystem.Filesystem, modMgr ModuleManager) *Walker
func SyncWalker ¶
func SyncWalker(fs filesystem.Filesystem, modMgr ModuleManager) *Walker
func (*Walker) SetExcludeModulePaths ¶
func (*Walker) SetWatcher ¶
type WalkerFactory ¶
type WalkerFactory func(filesystem.Filesystem, ModuleManager) *Walker
type Watcher ¶
type Watcher interface { Start() error Stop() error SetLogger(*log.Logger) AddModule(string) error IsModuleWatched(string) bool }
func NewWatcher ¶
func NewWatcher(fs filesystem.Filesystem, modMgr ModuleManager) (Watcher, error)
type WatcherFactory ¶
type WatcherFactory func(filesystem.Filesystem, ModuleManager) (Watcher, error)
func MockWatcher ¶
func MockWatcher() WatcherFactory
Click to show internal directories.
Click to hide internal directories.