Documentation ¶
Index ¶
- type GPGKey
- 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 Provider
- type ProviderDetail
- type ProviderList
- type ProviderVersionCollection
- type Redirect
- type SigningKeyList
- type TerraformProvider
- type TerraformProviderPlatform
- type TerraformProviderPlatformLocation
- type TerraformProviderVersion
- type TerraformProviderVersions
- type VersionSubmodule
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GPGKey ¶ added in v0.12.0
type GPGKey struct { ASCIIArmor string `json:"ascii_armor"` Source string `json:"source"` SourceURL *string `json:"source_url"` }
GPGKey is the response structure for a GPG key.
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 Provider ¶ added in v0.12.0
type Provider struct { ID string `json:"id"` Owner string `json:"owner"` Namespace string `json:"namespace"` Name string `json:"name"` Version string `json:"version"` Description string `json:"description"` Source string `json:"source"` PublishedAt time.Time `json:"published_at"` Downloads int `json:"downloads"` }
Provider is the response structure with the data for a single provider version. This is just the metadata. A full provider response will be ProviderDetail.
type ProviderDetail ¶ added in v0.12.0
ProviderDetail represents a Provider with full detail.
type ProviderList ¶ added in v0.12.0
type ProviderList struct { Meta PaginationMeta `json:"meta"` Providers []*Provider `json:"providers"` }
ProviderList is the response structure for a pageable list of providers.
type ProviderVersionCollection ¶ added in v0.12.0
type ProviderVersionCollection []*TerraformProviderVersion
Collection type for TerraformProviderVersion
func (ProviderVersionCollection) Sort ¶ added in v0.12.0
func (v ProviderVersionCollection) Sort()
Sort sorts versions from newest to oldest.
type Redirect ¶
type Redirect struct {
URL string `json:"url"`
}
Redirect causes the frontend to perform a window redirect.
type SigningKeyList ¶ added in v0.12.0
type SigningKeyList struct {
GPGKeys []*GPGKey `json:"gpg_public_keys"`
}
SigningKeyList is the response structure for a list of signing keys.
func (*SigningKeyList) GPGASCIIArmor ¶ added in v0.12.0
func (signingKeys *SigningKeyList) GPGASCIIArmor() string
GPGASCIIArmor returns an ASCII-armor-formatted string for all of the gpg keys in the response.
type TerraformProvider ¶ added in v0.12.0
type TerraformProvider struct { ID string `json:"id"` Verified bool `json:"verified"` Versions []*TerraformProviderVersion `json:"versions"` }
TerraformProvider is the response structure for all required information for Terraform to choose a download URL. It must include all versions and all platforms for Terraform to perform version and os/arch constraint matching locally.
type TerraformProviderPlatform ¶ added in v0.12.0
TerraformProviderPlatform is the Terraform-specific response structure for a provider platform.
type TerraformProviderPlatformLocation ¶ added in v0.12.0
type TerraformProviderPlatformLocation struct { Protocols []string `json:"protocols"` OS string `json:"os"` Arch string `json:"arch"` Filename string `json:"filename"` DownloadURL string `json:"download_url"` ShasumsURL string `json:"shasums_url"` ShasumsSignatureURL string `json:"shasums_signature_url"` Shasum string `json:"shasum"` SigningKeys SigningKeyList `json:"signing_keys"` }
TerraformProviderPlatformLocation is the Terraform-specific response structure for a provider platform with all details required to perform a download.
type TerraformProviderVersion ¶ added in v0.12.0
type TerraformProviderVersion struct { Version string `json:"version"` Protocols []string `json:"protocols"` Platforms []*TerraformProviderPlatform `json:"platforms"` }
TerraformProviderVersion is the Terraform-specific response structure for a provider version.
type TerraformProviderVersions ¶ added in v0.12.0
type TerraformProviderVersions struct { ID string `json:"id"` Versions []*TerraformProviderVersion `json:"versions"` Warnings []string `json:"warnings"` }
TerraformProviderVersions is the Terraform-specific response structure for an array of provider versions
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.