Documentation ¶
Index ¶
- type Module
- type ModuleDep
- type ModuleDetail
- type ModuleInput
- type ModuleList
- type ModuleOutput
- type ModuleProvider
- type ModuleProviderDep
- type ModuleProviderList
- type ModuleProviderVersions
- type ModuleResource
- type ModuleSubmodule
- type ModuleVersion
- type ModuleVersions
- type PaginationMeta
- type Redirect
- type VersionSubmodule
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Module ¶
type Module struct { ID string `json:"id"` Owner string `json:"owner"` Namespace string `json:"namespace"` Name string `json:"name"` Version string `json:"version"` Provider string `json:"provider"` Description string `json:"description"` Source string `json:"source"` PublishedAt time.Time `json:"published_at"` Downloads int `json:"downloads"` Verified bool `json:"verified"` }
Module is the response structure with the data for a single module version.
type ModuleDep ¶
type ModuleDep struct { Name string `json:"name"` Source string `json:"source"` Version string `json:"version"` }
ModuleDep is an output for a module.
type ModuleDetail ¶
type ModuleDetail struct { Module // Root is the root module. Root *ModuleSubmodule `json:"root"` // Submodules are the other submodules that are available within // this module. Submodules []*ModuleSubmodule `json:"submodules"` Providers []string `json:"providers"` // All available providers Versions []string `json:"versions"` // All versions }
ModuleDetail represents a module in full detail.
type ModuleInput ¶
type ModuleInput struct { Name string `json:"name"` Description string `json:"description"` Default string `json:"default"` }
ModuleInput is an input for a module.
type ModuleList ¶
type ModuleList struct { Meta PaginationMeta `json:"meta"` Modules []*Module `json:"modules"` }
ModuleList is the response structure for a pageable list of modules.
type ModuleOutput ¶
ModuleOutput is an output for a module.
type ModuleProvider ¶
type ModuleProvider struct { Name string `json:"name"` Downloads int `json:"downloads"` ModuleCount int `json:"module_count"` }
ModuleProvider represents a single provider for modules.
type ModuleProviderDep ¶
ModuleProviderDep is the output for a provider dependency
type ModuleProviderList ¶
type ModuleProviderList struct { Meta PaginationMeta `json:"meta"` Providers []*ModuleProvider `json:"providers"` }
ModuleProviderList is the response structure for a pageable list of ModuleProviders.
type ModuleProviderVersions ¶
type ModuleProviderVersions struct { Source string `json:"source"` Versions []*ModuleVersion `json:"versions"` }
ModuleProviderVersions is the response format for a single module instance, containing metadata about all versions and their dependencies.
type ModuleResource ¶
ModuleResource is an output for a module.
type ModuleSubmodule ¶
type ModuleSubmodule struct { Path string `json:"path"` Readme string `json:"readme"` Empty bool `json:"empty"` Inputs []*ModuleInput `json:"inputs"` Outputs []*ModuleOutput `json:"outputs"` Dependencies []*ModuleDep `json:"dependencies"` Resources []*ModuleResource `json:"resources"` }
ModuleSubmodule is the metadata about a specific submodule within a module. This includes the root module as a special case.
type ModuleVersion ¶
type ModuleVersion struct { Version string `json:"version"` Root VersionSubmodule `json:"root"` Submodules []*VersionSubmodule `json:"submodules"` }
ModuleVersion is the output metadata for a given version needed by CLI to resolve candidate versions to satisfy requirements.
type ModuleVersions ¶
type ModuleVersions struct {
Modules []*ModuleProviderVersions `json:"modules"`
}
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 PaginationMeta ¶
type PaginationMeta struct { Limit int `json:"limit"` CurrentOffset int `json:"current_offset"` NextOffset *int `json:"next_offset,omitempty"` PrevOffset *int `json:"prev_offset,omitempty"` NextURL string `json:"next_url,omitempty"` PrevURL string `json:"prev_url,omitempty"` }
PaginationMeta is a structure included in responses for pagination.
func NewPaginationMeta ¶
func NewPaginationMeta(offset, limit int, hasMore bool, currentURL string) PaginationMeta
NewPaginationMeta populates pagination meta data from result parameters
type Redirect ¶
type Redirect struct {
URL string `json:"url"`
}
Redirect causes the frontend to perform a window redirect.
type VersionSubmodule ¶
type VersionSubmodule struct { Path string `json:"path,omitempty"` Providers []*ModuleProviderDep `json:"providers"` Dependencies []*ModuleDep `json:"dependencies"` }
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.