schema

package
v0.4.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 25, 2020 License: MPL-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SchemaSupportsTerraform

func SchemaSupportsTerraform(v string) error

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 NoSchemaAvailableErr added in v0.2.0

type NoSchemaAvailableErr struct{}

func (*NoSchemaAvailableErr) Error added in v0.2.0

func (e *NoSchemaAvailableErr) Error() string

type Reader

type Reader interface {
	ProviderConfigSchema(name string) (*tfjson.Schema, error)
	Providers() ([]string, error)
	ResourceSchema(rType string) (*tfjson.Schema, error)
	Resources() ([]Resource, error)
	DataSourceSchema(dsType string) (*tfjson.Schema, error)
	DataSources() ([]DataSource, error)
}

type Resource added in v0.2.0

type Resource struct {
	Name            string
	Provider        string
	Description     string
	DescriptionKind tfjson.SchemaDescriptionKind
}

type SchemaUnavailableErr

type SchemaUnavailableErr struct {
	BlockType string
	FullName  string
}

func (*SchemaUnavailableErr) Error

func (e *SchemaUnavailableErr) Error() string

type Storage

type Storage struct {
	// contains filtered or unexported fields
}

func NewStorage

func NewStorage() *Storage

func (*Storage) DataSourceSchema

func (s *Storage) DataSourceSchema(dsType string) (*tfjson.Schema, error)

func (*Storage) DataSources added in v0.2.0

func (s *Storage) DataSources() ([]DataSource, error)

func (*Storage) ObtainSchemasForModule added in v0.4.0

func (s *Storage) ObtainSchemasForModule(tf *exec.Executor, dir string) error

ObtainSchemasForModule will (by default) asynchronously obtain schema via tf and store it for later consumption via Reader methods

func (*Storage) ProviderConfigSchema

func (s *Storage) ProviderConfigSchema(name string) (*tfjson.Schema, error)

func (*Storage) Providers added in v0.2.0

func (s *Storage) Providers() ([]string, error)

func (*Storage) ResourceSchema

func (s *Storage) ResourceSchema(rType string) (*tfjson.Schema, error)

func (*Storage) Resources added in v0.2.0

func (s *Storage) Resources() ([]Resource, error)

func (*Storage) SetLogger

func (s *Storage) SetLogger(logger *log.Logger)

func (*Storage) SetSynchronous

func (s *Storage) SetSynchronous()

type StorageFactory added in v0.4.0

type StorageFactory func() *Storage

func MockStorage

func MockStorage(ps *tfjson.ProviderSchemas) StorageFactory

type Writer

type Writer interface {
	ObtainSchemasForModule(*exec.Executor, string) error
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL