-
Notifications
You must be signed in to change notification settings - Fork 10
/
module_versions.go
32 lines (28 loc) · 1.27 KB
/
module_versions.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
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"`
}