github.com/terramate-io/tf@v0.0.0-20230830114523-fce866b4dfcd/getproviders/source.go (about) 1 // Copyright (c) HashiCorp, Inc. 2 // SPDX-License-Identifier: MPL-2.0 3 4 package getproviders 5 6 import ( 7 "context" 8 9 "github.com/terramate-io/tf/addrs" 10 ) 11 12 // A Source can query a particular source for information about providers 13 // that are available to install. 14 type Source interface { 15 AvailableVersions(ctx context.Context, provider addrs.Provider) (VersionList, Warnings, error) 16 PackageMeta(ctx context.Context, provider addrs.Provider, version Version, target Platform) (PackageMeta, error) 17 ForDisplay(provider addrs.Provider) string 18 }