Documentation ¶
Overview ¶
Code generated by "versiongen"; DO NOT EDIT.
Index ¶
- Constants
- Variables
- func AnySchemaForVariableCollection(modPath string) *schema.BodySchema
- func BuiltinReferences(modPath string) reference.Targets
- func CoreDeploySchemaForVersion(v *version.Version) (*schema.BodySchema, error)
- func CoreModuleSchemaForVersion(v *version.Version) (*schema.BodySchema, error)
- func CoreStackSchemaForVersion(v *version.Version) (*schema.BodySchema, error)
- func FunctionsForConstraint(vc version.Constraints) (map[string]schema.FunctionSignature, error)
- func FunctionsForVersion(v *version.Version) (map[string]schema.FunctionSignature, error)
- func ResolveVersion(tfVersion *version.Version, tfCons version.Constraints) *version.Version
- func SchemaForVariables(vars map[string]module.Variable, modPath string) (*schema.BodySchema, error)
- type FunctionsMerger
- type NoCompatibleSchemaErr
- type ProviderReferences
- type ProviderSchema
- type SchemaMerger
- type StateReader
Constants ¶
const ( ModuleLanguageID = "terraform" VariablesLanguageID = "terraform-vars" )
Variables ¶
var ( OldestAvailableVersion = version.Must(version.NewVersion("0.12.0")) LatestAvailableVersion = version.Must(version.NewVersion("1.9.0")) )
var SemanticTokenModifiers = tokmod.SupportedModifiers
Functions ¶
func AnySchemaForVariableCollection ¶
func AnySchemaForVariableCollection(modPath string) *schema.BodySchema
AnySchemaForVariableCollection returns a schema for collecting all variables in a variable file. It doesn't check if a variable has been defined in the module or not.
We can use this schema to collect variable references without waiting on the module metadata.
func BuiltinReferences ¶
BuiltinReferences returns known "built-in" reference targets (range-less references available within any module)
func CoreDeploySchemaForVersion ¶
func CoreDeploySchemaForVersion(v *version.Version) (*schema.BodySchema, error)
CoreDeploySchemaForVersion finds a schema for deployment configuration files that is relevant for the given Terraform version. It will return an error if such schema cannot be found.
func CoreModuleSchemaForVersion ¶
func CoreModuleSchemaForVersion(v *version.Version) (*schema.BodySchema, error)
CoreModuleSchemaForVersion finds a module schema which is relevant for the given Terraform version. It will return error if such schema cannot be found.
func CoreStackSchemaForVersion ¶
func CoreStackSchemaForVersion(v *version.Version) (*schema.BodySchema, error)
CoreStackSchemaForVersion finds a schema for stack configuration files that is relevant for the given Terraform version. It will return an error if such schema cannot be found.
func FunctionsForConstraint ¶
func FunctionsForConstraint(vc version.Constraints) (map[string]schema.FunctionSignature, error)
func FunctionsForVersion ¶
func FunctionsForVersion(v *version.Version) (map[string]schema.FunctionSignature, error)
func ResolveVersion ¶
func ResolveVersion(tfVersion *version.Version, tfCons version.Constraints) *version.Version
ResolveVersion returns Terraform version for which we have schema available based on either given version and/or constraint. Lack of constraint and version implies latest known version.
func SchemaForVariables ¶
Types ¶
type FunctionsMerger ¶
type FunctionsMerger struct {
// contains filtered or unexported fields
}
func NewFunctionsMerger ¶
func NewFunctionsMerger(coreFunctions map[string]schema.FunctionSignature) *FunctionsMerger
func (*FunctionsMerger) FunctionsForModule ¶
func (m *FunctionsMerger) FunctionsForModule(meta *tfmod.Meta) (map[string]schema.FunctionSignature, error)
func (*FunctionsMerger) SetStateReader ¶
func (m *FunctionsMerger) SetStateReader(mr StateReader)
func (*FunctionsMerger) SetTerraformVersion ¶
func (m *FunctionsMerger) SetTerraformVersion(v *version.Version)
type NoCompatibleSchemaErr ¶
type NoCompatibleSchemaErr struct { Version *version.Version Constraints version.Constraints }
func (NoCompatibleSchemaErr) Error ¶
func (e NoCompatibleSchemaErr) Error() string
type ProviderReferences ¶
type ProviderReferences map[tfmod.ProviderRef]tfaddr.Provider
func (ProviderReferences) ReferencesOfProvider ¶
func (pr ProviderReferences) ReferencesOfProvider(addr tfaddr.Provider) []tfmod.ProviderRef
type ProviderSchema ¶
type ProviderSchema struct { Provider *schema.BodySchema Resources map[string]*schema.BodySchema DataSources map[string]*schema.BodySchema Functions map[string]*schema.FunctionSignature }
func ProviderSchemaFromJson ¶
func ProviderSchemaFromJson(jsonSchema *tfjson.ProviderSchema, pAddr tfaddr.Provider) *ProviderSchema
func (*ProviderSchema) Copy ¶
func (ps *ProviderSchema) Copy() *ProviderSchema
func (*ProviderSchema) SetProviderVersion ¶
func (ps *ProviderSchema) SetProviderVersion(pAddr tfaddr.Provider, v *version.Version)
type SchemaMerger ¶
type SchemaMerger struct {
// contains filtered or unexported fields
}
func NewSchemaMerger ¶
func NewSchemaMerger(coreSchema *schema.BodySchema) *SchemaMerger
func (*SchemaMerger) SchemaForModule ¶
func (m *SchemaMerger) SchemaForModule(meta *tfmod.Meta) (*schema.BodySchema, error)
func (*SchemaMerger) SetStateReader ¶
func (m *SchemaMerger) SetStateReader(mr StateReader)
func (*SchemaMerger) SetTerraformVersion ¶
func (m *SchemaMerger) SetTerraformVersion(v *version.Version)
type StateReader ¶
type StateReader interface { // DeclaredModuleCalls returns a map of declared module calls for the given module // A declared module call refers to a module block in the configuration DeclaredModuleCalls(modPath string) (map[string]tfmod.DeclaredModuleCall, error) // InstalledModulePath checks if there is an installed module available for // the given normalized source address. InstalledModulePath(rootPath string, normalizedSource string) (string, bool) // LocalModuleMeta returns the module meta data for a local module. This is the result // of the [earlydecoder] when processing module files LocalModuleMeta(modPath string) (*tfmod.Meta, error) // RegistryModuleMeta returns the module meta data for public registry modules. We fetch this // data from the registry API. RegistryModuleMeta(addr tfaddr.Module, cons version.Constraints) (*registry.ModuleData, error) // ProviderSchema returns the schema for a provider we have stored in memory. The can come // from different sources. ProviderSchema(modPath string, addr tfaddr.Provider, vc version.Constraints) (*ProviderSchema, error) }
StateReader exposes a set of methods to read data from the internal language server state