aboutsummaryrefslogtreecommitdiffhomepage
path: root/vendor/github.com/hashicorp/terraform/registry/response/module_versions.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/hashicorp/terraform/registry/response/module_versions.go')
-rw-r--r--vendor/github.com/hashicorp/terraform/registry/response/module_versions.go32
1 files changed, 32 insertions, 0 deletions
diff --git a/vendor/github.com/hashicorp/terraform/registry/response/module_versions.go b/vendor/github.com/hashicorp/terraform/registry/response/module_versions.go
new file mode 100644
index 0000000..f69e975
--- /dev/null
+++ b/vendor/github.com/hashicorp/terraform/registry/response/module_versions.go
@@ -0,0 +1,32 @@
1package response
2
3// ModuleVersions is the response format that contains all metadata about module
4// versions needed for terraform CLI to resolve version constraints. See RFC
5// TF-042 for details on this format.
6type ModuleVersions struct {
7 Modules []*ModuleProviderVersions `json:"modules"`
8}
9
10// ModuleProviderVersions is the response format for a single module instance,
11// containing metadata about all versions and their dependencies.
12type ModuleProviderVersions struct {
13 Source string `json:"source"`
14 Versions []*ModuleVersion `json:"versions"`
15}
16
17// ModuleVersion is the output metadata for a given version needed by CLI to
18// resolve candidate versions to satisfy requirements.
19type ModuleVersion struct {
20 Version string `json:"version"`
21 Root VersionSubmodule `json:"root"`
22 Submodules []*VersionSubmodule `json:"submodules"`
23}
24
25// VersionSubmodule is the output metadata for a submodule within a given
26// version needed by CLI to resolve candidate versions to satisfy requirements.
27// When representing the Root in JSON the path is omitted.
28type VersionSubmodule struct {
29 Path string `json:"path,omitempty"`
30 Providers []*ModuleProviderDep `json:"providers"`
31 Dependencies []*ModuleDep `json:"dependencies"`
32}