mirror of
https://github.com/opentofu/opentofu.git
synced 2025-01-04 13:17:43 -06:00
4c5b866dea
This is part of a general effort to move all of Terraform's non-library package surface under internal in order to reinforce that these are for internal use within Terraform only. If you were previously importing packages under this prefix into an external codebase, you could pin to an earlier release tag as an interim solution until you've make a plan to achieve the same functionality some other way.
33 lines
1.3 KiB
Go
33 lines
1.3 KiB
Go
package response
|
|
|
|
// ModuleVersions is the response format that contains all metadata about module
|
|
// versions needed for terraform CLI to resolve version constraints. See RFC
|
|
// TF-042 for details on this format.
|
|
type ModuleVersions struct {
|
|
Modules []*ModuleProviderVersions `json:"modules"`
|
|
}
|
|
|
|
// ModuleProviderVersions is the response format for a single module instance,
|
|
// containing metadata about all versions and their dependencies.
|
|
type ModuleProviderVersions struct {
|
|
Source string `json:"source"`
|
|
Versions []*ModuleVersion `json:"versions"`
|
|
}
|
|
|
|
// ModuleVersion is the output metadata for a given version needed by CLI to
|
|
// resolve candidate versions to satisfy requirements.
|
|
type ModuleVersion struct {
|
|
Version string `json:"version"`
|
|
Root VersionSubmodule `json:"root"`
|
|
Submodules []*VersionSubmodule `json:"submodules"`
|
|
}
|
|
|
|
// VersionSubmodule is the output metadata for a submodule within a given
|
|
// version needed by CLI to resolve candidate versions to satisfy requirements.
|
|
// When representing the Root in JSON the path is omitted.
|
|
type VersionSubmodule struct {
|
|
Path string `json:"path,omitempty"`
|
|
Providers []*ModuleProviderDep `json:"providers"`
|
|
Dependencies []*ModuleDep `json:"dependencies"`
|
|
}
|