Documentation ¶
Index ¶
- func SchemaSupportsTerraform(v string) error
- type DataSource
- type MockReader
- func (r *MockReader) DataSourceSchema(dsType string) (*tfjson.Schema, error)
- func (r *MockReader) DataSources() ([]DataSource, error)
- func (r *MockReader) ProviderConfigSchema(name string) (*tfjson.Schema, error)
- func (r *MockReader) Providers() ([]string, error)
- func (r *MockReader) ResourceSchema(rType string) (*tfjson.Schema, error)
- func (r *MockReader) Resources() ([]Resource, error)
- type MockWatcher
- type NoSchemaAvailableErr
- type Reader
- type Resource
- type SchemaUnavailableErr
- type Storage
- func (s *Storage) AddWorkspaceForWatching(dir string) error
- func (s *Storage) DataSourceSchema(dsType string) (*tfjson.Schema, error)
- func (s *Storage) DataSources() ([]DataSource, error)
- func (s *Storage) ObtainSchemasForWorkspace(tf *exec.Executor, dir string) error
- func (s *Storage) ProviderConfigSchema(name string) (*tfjson.Schema, error)
- func (s *Storage) Providers() ([]string, error)
- func (s *Storage) ResourceSchema(rType string) (*tfjson.Schema, error)
- func (s *Storage) Resources() ([]Resource, error)
- func (s *Storage) SetLogger(logger *log.Logger)
- func (s *Storage) SetSynchronous()
- func (s *Storage) StartWatching(tf *exec.Executor) error
- func (s *Storage) StopWatching() error
- type Watcher
- type Writer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SchemaSupportsTerraform ¶
Types ¶
type DataSource ¶ added in v0.2.0
type DataSource struct { Name string Provider string Description string DescriptionKind tfjson.SchemaDescriptionKind }
type MockReader ¶ added in v0.2.0
type MockReader struct { ProviderSchemas *tfjson.ProviderSchemas ProviderSchemaErr error ProvidersErr error ResourceSchemaErr error ResourcesErr error DataSourceSchemaErr error DataSourcesErr error }
func (*MockReader) DataSourceSchema ¶ added in v0.2.0
func (r *MockReader) DataSourceSchema(dsType string) (*tfjson.Schema, error)
func (*MockReader) DataSources ¶ added in v0.2.0
func (r *MockReader) DataSources() ([]DataSource, error)
func (*MockReader) ProviderConfigSchema ¶ added in v0.2.0
func (r *MockReader) ProviderConfigSchema(name string) (*tfjson.Schema, error)
func (*MockReader) Providers ¶ added in v0.2.0
func (r *MockReader) Providers() ([]string, error)
func (*MockReader) ResourceSchema ¶ added in v0.2.0
func (r *MockReader) ResourceSchema(rType string) (*tfjson.Schema, error)
func (*MockReader) Resources ¶ added in v0.2.0
func (r *MockReader) Resources() ([]Resource, error)
type MockWatcher ¶
type MockWatcher struct{}
func (*MockWatcher) AddWorkspace ¶
func (w *MockWatcher) AddWorkspace(string) error
func (*MockWatcher) Close ¶
func (w *MockWatcher) Close() error
func (*MockWatcher) Errors ¶
func (w *MockWatcher) Errors() chan error
func (*MockWatcher) Events ¶
func (w *MockWatcher) Events() chan fsnotify.Event
func (*MockWatcher) OnPluginChange ¶
func (w *MockWatcher) OnPluginChange(func(*watchedWorkspace) error)
func (*MockWatcher) SetLogger ¶
func (w *MockWatcher) SetLogger(*log.Logger)
type NoSchemaAvailableErr ¶ added in v0.2.0
type NoSchemaAvailableErr struct{}
func (*NoSchemaAvailableErr) Error ¶ added in v0.2.0
func (e *NoSchemaAvailableErr) Error() string
type Resource ¶ added in v0.2.0
type Resource struct { Name string Provider string Description string DescriptionKind tfjson.SchemaDescriptionKind }
type SchemaUnavailableErr ¶
type SchemaUnavailableErr struct {}
func (*SchemaUnavailableErr) Error ¶
func (e *SchemaUnavailableErr) Error() string
type Storage ¶
type Storage struct {
// contains filtered or unexported fields
}
func MockStorage ¶
func MockStorage(ps *tfjson.ProviderSchemas) *Storage
func NewStorage ¶
func NewStorage() *Storage
func (*Storage) AddWorkspaceForWatching ¶
func (*Storage) DataSourceSchema ¶
func (*Storage) DataSources ¶ added in v0.2.0
func (s *Storage) DataSources() ([]DataSource, error)
func (*Storage) ObtainSchemasForWorkspace ¶
ObtainSchemasForWorkspace will (by default) asynchronously obtain schema via tf and store it for later consumption via Reader methods
func (*Storage) ProviderConfigSchema ¶
func (*Storage) ResourceSchema ¶
func (*Storage) SetSynchronous ¶
func (s *Storage) SetSynchronous()
func (*Storage) StartWatching ¶
StartWatching starts to watch for plugin changes in dirs that were added via AddWorkspaceForWatching until StopWatching() is called
func (*Storage) StopWatching ¶
type Watcher ¶
type Watcher struct {
// contains filtered or unexported fields
}
Watcher is a wrapper around native fsnotify.Watcher to make it swappable for MockWatcher via interface, provide higher-level ability to detect actual file changes (rather than just events that may not be changing any bytes) and hold knowledge about workspace structure
func NewWatcher ¶
func (*Watcher) AddWorkspace ¶
func (*Watcher) OnPluginChange ¶
Click to show internal directories.
Click to hide internal directories.