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