registry

package
v0.15.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 6, 2021 License: MPL-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsModuleNotFound added in v0.11.4

func IsModuleNotFound(err error) bool

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 IsServiceNotProvided added in v0.12.0

func IsServiceNotProvided(err error) bool

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

func IsServiceUnreachable(err error) bool

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 NewClient

func NewClient(services *disco.Disco, client *http.Client) *Client

NewClient returns a new initialized registry client.

func (*Client) Discover

func (c *Client) Discover(host svchost.Hostname, serviceID string) (*url.URL, error)

Discover queries the host, and returns the url for the registry.

func (*Client) ModuleLocation added in v0.12.0

func (c *Client) ModuleLocation(module *regsrc.Module, version string) (string, error)

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

func (c *Client) ModuleVersions(module *regsrc.Module) (*response.ModuleVersions, error)

ModuleVersions queries the registry for a module, 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

Directories

Path Synopsis
Package regsrc provides helpers for working with source strings that identify resources within a Terraform registry.
Package regsrc provides helpers for working with source strings that identify resources within a Terraform registry.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL