Documentation
¶
Index ¶
- Constants
- func ModuleManifestFilePath(fs fs.StatFS, modulePath string) (string, bool)
- func ModulePath(filePath string) (string, bool)
- func ModuleUriFromDataDir(rawUri string) (string, bool)
- func ModuleUriFromModuleLockFile(rawUri string) (string, bool)
- func ModuleUriFromPluginLockFile(rawUri string) (string, bool)
- func PluginLockFilePath(fs fs.StatFS, modPath string) (string, bool)
- type DataDir
- type EventType
- type FS
- type ModuleManifest
- type ModuleRecord
- type PluginVersionMap
- type WatchPattern
- type WatchablePaths
Constants ¶
View Source
const DataDirName = ".terraform"
Variables ¶
This section is empty.
Functions ¶
func ModuleManifestFilePath ¶
func ModulePath ¶
ModulePath strips known lock file paths to get the path to the (closest) module these files belong to
func ModuleUriFromDataDir ¶ added in v0.29.0
func ModuleUriFromModuleLockFile ¶ added in v0.29.0
func ModuleUriFromPluginLockFile ¶ added in v0.29.0
Types ¶
type ModuleManifest ¶
type ModuleManifest struct {
Records []ModuleRecord `json:"Modules"`
// contains filtered or unexported fields
}
func NewModuleManifest ¶ added in v0.16.0
func NewModuleManifest(rootDir string, records []ModuleRecord) *ModuleManifest
func ParseModuleManifestFromFile ¶
func ParseModuleManifestFromFile(path string) (*ModuleManifest, error)
func (*ModuleManifest) ContainsLocalModule ¶ added in v0.16.0
func (mm *ModuleManifest) ContainsLocalModule(path string) bool
func (*ModuleManifest) Copy ¶ added in v0.17.1
func (mm *ModuleManifest) Copy() *ModuleManifest
func (*ModuleManifest) RootDir ¶
func (mm *ModuleManifest) RootDir() string
type ModuleRecord ¶
type ModuleRecord struct {
// Key is a unique identifier for this particular module, based on its
// position within the static module tree.
Key string `json:"Key"`
// SourceAddr is the source address for the module.
SourceAddr tfmod.ModuleSourceAddr `json:"-"`
// RawSourceAddr is the raw source address for the module
// as it appears in the manifest.
RawSourceAddr string `json:"Source"`
// Version is the exact version of the module, which results from parsing
// VersionStr. nil for un-versioned modules.
Version *version.Version `json:"-"`
// VersionStr is the version specifier string. This is used only for
// serialization in snapshots and should not be accessed or updated
// by any other codepaths; use "Version" instead.
VersionStr string `json:"Version,omitempty"`
// Dir is the path to the local directory where the module is installed.
Dir string `json:"Dir"`
}
ModuleRecord represents some metadata about an installed module, as part of a ModuleManifest.
func (*ModuleRecord) IsExternal ¶
func (r *ModuleRecord) IsExternal() bool
func (*ModuleRecord) IsRoot ¶
func (r *ModuleRecord) IsRoot() bool
func (*ModuleRecord) UnmarshalJSON ¶
func (r *ModuleRecord) UnmarshalJSON(b []byte) error
type PluginVersionMap ¶ added in v0.29.0
func ParsePluginVersions ¶ added in v0.29.0
func ParsePluginVersions(filesystem FS, modPath string) (PluginVersionMap, error)
type WatchPattern ¶ added in v0.29.0
func PathGlobPatternsForWatching ¶ added in v0.29.0
func PathGlobPatternsForWatching() []WatchPattern
type WatchablePaths ¶
func WatchableModulePaths ¶
func WatchableModulePaths(modPath string) *WatchablePaths
Click to show internal directories.
Click to hide internal directories.