Documentation ¶
Index ¶
- func IsModuleNotFound(err error) bool
- func IsProviderNotFound(err error) bool
- func IsServiceNotProvided(err error) bool
- func IsServiceUnreachable(err error) bool
- type Client
- func (c *Client) Discover(host svchost.Hostname, serviceID string) (*url.URL, error)
- func (c *Client) ModuleLocation(module *regsrc.Module, version string) (string, error)
- func (c *Client) ModuleVersions(module *regsrc.Module) (*response.ModuleVersions, error)
- func (c *Client) TerraformProviderLocation(provider *regsrc.TerraformProvider, version string) (*response.TerraformProviderPlatformLocation, error)
- func (c *Client) TerraformProviderVersions(provider *regsrc.TerraformProvider) (*response.TerraformProviderVersions, error)
- type ServiceUnreachableError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsModuleNotFound ¶ added in v0.11.4
IsModuleNotFound returns true only if the given error is a "module not found" error. This allows callers to recognize this particular error condition as distinct from operational errors such as poor network connectivity.
func IsProviderNotFound ¶ added in v0.12.0
IsProviderNotFound returns true only if the given error is a "provider not found" error. This allows callers to recognize this particular error condition as distinct from operational errors such as poor network connectivity.
func IsServiceNotProvided ¶ added in v0.12.0
IsServiceNotProvided returns true only if the given error is a "service not provided" error. This allows callers to recognize this particular error condition as distinct from operational errors such as poor network connectivity.
func IsServiceUnreachable ¶ added in v0.12.0
IsServiceUnreachable returns true if the registry/discovery service was unreachable
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client provides methods to query Terraform Registries.
func (*Client) ModuleLocation ¶ added in v0.12.0
ModuleLocation find the download location for a specific version module. This returns a string, because the final location may contain special go-getter syntax.
func (*Client) ModuleVersions ¶ added in v0.12.0
ModuleVersions queries the registry for a module, and returns the available versions.
func (*Client) TerraformProviderLocation ¶ added in v0.12.0
func (c *Client) TerraformProviderLocation(provider *regsrc.TerraformProvider, version string) (*response.TerraformProviderPlatformLocation, error)
TerraformProviderLocation queries the registry for a provider download metadata
func (*Client) TerraformProviderVersions ¶ added in v0.12.0
func (c *Client) TerraformProviderVersions(provider *regsrc.TerraformProvider) (*response.TerraformProviderVersions, error)
TerraformProviderVersions queries the registry for a provider, and returns the available versions.
type ServiceUnreachableError ¶ added in v0.12.0
type ServiceUnreachableError struct {
// contains filtered or unexported fields
}
ServiceUnreachableError Registry service is unreachable
func (*ServiceUnreachableError) Error ¶ added in v0.12.0
func (e *ServiceUnreachableError) Error() string