state

package
v0.36.3 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2024 License: MPL-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ModuleIds

type ModuleIds struct {
	Path string
	ID   string
}

type ModuleMetadata

type ModuleMetadata struct {
	CoreRequirements     version.Constraints
	Backend              *tfmod.Backend
	Cloud                *backend.Cloud
	ProviderReferences   map[tfmod.ProviderRef]tfaddr.Provider
	ProviderRequirements tfmod.ProviderRequirements
	Variables            map[string]tfmod.Variable
	Outputs              map[string]tfmod.Output
	Filenames            []string
	ModuleCalls          map[string]tfmod.DeclaredModuleCall
}

ModuleMetadata contains the result of the early decoding of a module, it will be used obtain the correct provider and related module schemas

func (ModuleMetadata) Copy

func (mm ModuleMetadata) Copy() ModuleMetadata

type ModuleRecord

type ModuleRecord struct {

	// PreloadEmbeddedSchemaState tracks if we tried loading all provider
	// schemas from our embedded schema data
	PreloadEmbeddedSchemaState op.OpState

	RefTargets      reference.Targets
	RefTargetsErr   error
	RefTargetsState op.OpState

	RefOrigins      reference.Origins
	RefOriginsErr   error
	RefOriginsState op.OpState

	ParsedModuleFiles ast.ModFiles
	ModuleParsingErr  error

	Meta      ModuleMetadata
	MetaErr   error
	MetaState op.OpState

	ModuleDiagnostics      ast.SourceModDiags
	ModuleDiagnosticsState globalAst.DiagnosticSourceState
	// contains filtered or unexported fields
}

ModuleRecord contains all information about module files we have for a certain path

func NewModuleTest

func NewModuleTest(path string) *ModuleRecord

NewModuleTest is a test helper to create a new Module object

func (*ModuleRecord) Copy

func (m *ModuleRecord) Copy() *ModuleRecord

func (*ModuleRecord) Path

func (m *ModuleRecord) Path() string

type ModuleStore

type ModuleStore struct {

	// MaxModuleNesting represents how many nesting levels we'd attempt
	// to parse provider requirements before returning error.
	MaxModuleNesting int
	// contains filtered or unexported fields
}

func NewModuleStore

func NewModuleStore(providerSchemasStore *globalState.ProviderSchemaStore, registryModuleStore *globalState.RegistryModuleStore, changeStore *globalState.ChangeStore) (*ModuleStore, error)

func (*ModuleStore) Add

func (s *ModuleStore) Add(modPath string) error

func (*ModuleStore) AddIfNotExists

func (s *ModuleStore) AddIfNotExists(path string) error

func (*ModuleStore) DeclaredModuleCalls

func (s *ModuleStore) DeclaredModuleCalls(modPath string) (map[string]tfmod.DeclaredModuleCall, error)

func (*ModuleStore) Exists

func (s *ModuleStore) Exists(path string) bool

func (*ModuleStore) GetModuleID

func (s *ModuleStore) GetModuleID(path string) (string, error)

func (*ModuleStore) List

func (s *ModuleStore) List() ([]*ModuleRecord, error)

func (*ModuleStore) LocalModuleMeta

func (s *ModuleStore) LocalModuleMeta(modPath string) (*tfmod.Meta, error)

func (*ModuleStore) MetadataReady

func (f *ModuleStore) MetadataReady(dir document.DirHandle) (<-chan struct{}, bool, error)

func (*ModuleStore) ModuleRecordByPath

func (s *ModuleStore) ModuleRecordByPath(path string) (*ModuleRecord, error)

func (*ModuleStore) ProviderRequirementsForModule

func (s *ModuleStore) ProviderRequirementsForModule(modPath string) (tfmod.ProviderRequirements, error)

func (*ModuleStore) ProviderSchema

func (s *ModuleStore) ProviderSchema(modPath string, addr tfaddr.Provider, vc version.Constraints) (*tfschema.ProviderSchema, error)

func (*ModuleStore) RegistryModuleMeta

func (s *ModuleStore) RegistryModuleMeta(addr tfaddr.Module, cons version.Constraints) (*registry.ModuleData, error)

func (*ModuleStore) Remove

func (s *ModuleStore) Remove(modPath string) error

func (*ModuleStore) SetLogger

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

func (*ModuleStore) SetMetaState

func (s *ModuleStore) SetMetaState(path string, state op.OpState) error

func (*ModuleStore) SetModuleDiagnosticsState

func (s *ModuleStore) SetModuleDiagnosticsState(path string, source globalAst.DiagnosticSource, state op.OpState) error

func (*ModuleStore) SetPreloadEmbeddedSchemaState

func (s *ModuleStore) SetPreloadEmbeddedSchemaState(path string, state op.OpState) error

func (*ModuleStore) SetReferenceOriginsState

func (s *ModuleStore) SetReferenceOriginsState(path string, state op.OpState) error

func (*ModuleStore) SetReferenceTargetsState

func (s *ModuleStore) SetReferenceTargetsState(path string, state op.OpState) error

func (*ModuleStore) UpdateMetadata

func (s *ModuleStore) UpdateMetadata(path string, meta *tfmod.Meta, mErr error) error

func (*ModuleStore) UpdateModuleDiagnostics

func (s *ModuleStore) UpdateModuleDiagnostics(path string, source globalAst.DiagnosticSource, diags ast.ModDiags) error

func (*ModuleStore) UpdateParsedModuleFiles

func (s *ModuleStore) UpdateParsedModuleFiles(path string, pFiles ast.ModFiles, pErr error) error

func (*ModuleStore) UpdateReferenceOrigins

func (s *ModuleStore) UpdateReferenceOrigins(path string, origins reference.Origins, roErr error) error

func (*ModuleStore) UpdateReferenceTargets

func (s *ModuleStore) UpdateReferenceTargets(path string, refs reference.Targets, rErr error) error

Jump to

Keyboard shortcuts

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