opentofu/internal/getproviders/source.go
Kristin Laemmert 47e657c611
internal/getproviders: decode and return any registry warnings (#25337)
* internal/getproviders: decode and return any registry warnings

The public registry may include a list of warnings in the "versions"
response for any given provider. This PR adds support for warnings from
the registry and an installer event to return those warnings to the
user.
2020-06-25 10:49:48 -04:00

14 lines
420 B
Go

package getproviders
import (
"github.com/hashicorp/terraform/addrs"
)
// A Source can query a particular source for information about providers
// that are available to install.
type Source interface {
AvailableVersions(provider addrs.Provider) (VersionList, Warnings, error)
PackageMeta(provider addrs.Provider, version Version, target Platform) (PackageMeta, error)
ForDisplay(provider addrs.Provider) string
}