Documentation ¶
Overview ¶
Package modsdir is an internal package containing the model types used to represent the manifest of modules in a local modules cache directory.
Index ¶
Constants ¶
View Source
const ManifestSnapshotFilename = "modules.json"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Manifest ¶
Manifest is a map used to keep track of the filesystem locations and other metadata about installed modules.
The configuration loader refers to this, while the module installer updates it to reflect any changes to the installed modules.
func (Manifest) WriteSnapshotToDir ¶
type Record ¶
type Record 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 given for this module in configuration. // This is used only to detect if the source was changed in configuration // since the module was last installed, which means that the installer // must re-install it. // // This should always be the result of calling method String on an // addrs.ModuleSource value, to get a suitably-normalized result. SourceAddr 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"` }
Record represents some metadata about an installed module, as part of a ModuleManifest.
Click to show internal directories.
Click to hide internal directories.