Versions in this module Expand all Collapse all v0 v0.1.1 Nov 14, 2023 v0.1.0 Oct 2, 2023 Changes in this version + const HashicorpPartnersKey + const HashicorpPublicKey + const NilHash + const Wildcard + var CurrentPlatform = Platform + var SupportedPluginProtocols = MustParseVersionConstraints(">= 5, <7") + func ErrIsNotExist(err error) bool + func HostFromRequest(req *http.Request) string + func MissingProviderSuggestion(ctx context.Context, addr addrs.Provider, source Source, reqs Requirements) addrs.Provider + func PackageMatchesAnyHash(loc PackageLocation, allowed []Hash) (bool, error) + func PackageMatchesHash(loc PackageLocation, want Hash) (bool, error) + func PackedFilePathForPackage(baseDir string, provider addrs.Provider, version Version, platform Platform) string + func SearchLocalDirectory(baseDir string) (map[addrs.Provider]PackageMetaList, error) + func UnpackedDirectoryPathForPackage(baseDir string, provider addrs.Provider, version Version, platform Platform) string + func VersionConstraintsString(spec VersionConstraints) string + type ErrHostNoProviders struct + HasOtherVersion bool + Hostname svchost.Hostname + func (err ErrHostNoProviders) Error() string + type ErrHostUnreachable struct + Hostname svchost.Hostname + Wrapped error + func (err ErrHostUnreachable) Error() string + func (err ErrHostUnreachable) Unwrap() error + type ErrPlatformNotSupported struct + MirrorURL *url.URL + Platform Platform + Provider addrs.Provider + Version Version + func (err ErrPlatformNotSupported) Error() string + type ErrProtocolNotSupported struct + Provider addrs.Provider + Suggestion Version + Version Version + func (err ErrProtocolNotSupported) Error() string + type ErrProviderNotFound struct + Provider addrs.Provider + Sources []string + func (err ErrProviderNotFound) Error() string + type ErrQueryFailed struct + MirrorURL *url.URL + Provider addrs.Provider + Wrapped error + func (err ErrQueryFailed) Error() string + func (err ErrQueryFailed) Unwrap() error + type ErrRegistryProviderNotKnown struct + Provider addrs.Provider + func (err ErrRegistryProviderNotKnown) Error() string + type ErrRequestCanceled struct + func (err ErrRequestCanceled) Error() string + type ErrUnauthorized struct + HaveCredentials bool + Hostname svchost.Hostname + func (err ErrUnauthorized) Error() string + type FilesystemMirrorSource struct + func NewFilesystemMirrorSource(baseDir string) *FilesystemMirrorSource + func (s *FilesystemMirrorSource) AllAvailablePackages() (map[addrs.Provider]PackageMetaList, error) + func (s *FilesystemMirrorSource) AvailableVersions(ctx context.Context, provider addrs.Provider) (VersionList, Warnings, error) + func (s *FilesystemMirrorSource) ForDisplay(provider addrs.Provider) string + func (s *FilesystemMirrorSource) PackageMeta(ctx context.Context, provider addrs.Provider, version Version, target Platform) (PackageMeta, error) + type HTTPMirrorSource struct + func NewHTTPMirrorSource(baseURL *url.URL, creds svcauth.CredentialsSource) *HTTPMirrorSource + func (s *HTTPMirrorSource) AvailableVersions(ctx context.Context, provider addrs.Provider) (VersionList, Warnings, error) + func (s *HTTPMirrorSource) ForDisplay(provider addrs.Provider) string + func (s *HTTPMirrorSource) PackageMeta(ctx context.Context, provider addrs.Provider, version Version, target Platform) (PackageMeta, error) + type HangingSource struct + func (s *HangingSource) AvailableVersions(ctx context.Context, provider addrs.Provider) (VersionList, Warnings, error) + func (s *HangingSource) ForDisplay(provider addrs.Provider) string + func (s *HangingSource) PackageMeta(ctx context.Context, provider addrs.Provider, version Version, target Platform) (PackageMeta, error) + type Hash string + func HashLegacyZipSHAFromSHA(sum [sha256.Size]byte) Hash + func MustParseHash(s string) Hash + func PackageHash(loc PackageLocation) (Hash, error) + func PackageHashLegacyZipSHA(loc PackageLocalArchive) (Hash, error) + func PackageHashV1(loc PackageLocation) (Hash, error) + func ParseHash(s string) (Hash, error) + func PreferredHashes(given []Hash) []Hash + func (h Hash) GoString() string + func (h Hash) HasScheme(want HashScheme) bool + func (h Hash) Scheme() HashScheme + func (h Hash) String() string + func (h Hash) Value() string + type HashScheme string + const HashScheme1 + const HashSchemeZip + func (hs HashScheme) New(value string) Hash + type MemoizeSource struct + func NewMemoizeSource(underlying Source) *MemoizeSource + func (s *MemoizeSource) AvailableVersions(ctx context.Context, provider addrs.Provider) (VersionList, Warnings, error) + func (s *MemoizeSource) ForDisplay(provider addrs.Provider) string + func (s *MemoizeSource) PackageMeta(ctx context.Context, provider addrs.Provider, version Version, target Platform) (PackageMeta, error) + type MockSource struct + func NewMockSource(packages []PackageMeta, warns map[addrs.Provider]Warnings) *MockSource + func (s *MockSource) AvailableVersions(ctx context.Context, provider addrs.Provider) (VersionList, Warnings, error) + func (s *MockSource) CallLog() [][]interface{} + func (s *MockSource) ForDisplay(provider addrs.Provider) string + func (s *MockSource) PackageMeta(ctx context.Context, provider addrs.Provider, version Version, target Platform) (PackageMeta, error) + type MultiSource []MultiSourceSelector + func (s MultiSource) AvailableVersions(ctx context.Context, provider addrs.Provider) (VersionList, Warnings, error) + func (s MultiSource) ForDisplay(provider addrs.Provider) string + func (s MultiSource) PackageMeta(ctx context.Context, provider addrs.Provider, version Version, target Platform) (PackageMeta, error) + type MultiSourceMatchingPatterns []addrs.Provider + func ParseMultiSourceMatchingPatterns(strs []string) (MultiSourceMatchingPatterns, error) + func (ps MultiSourceMatchingPatterns) MatchesProvider(addr addrs.Provider) bool + type MultiSourceSelector struct + Exclude MultiSourceMatchingPatterns + Include MultiSourceMatchingPatterns + Source Source + func (s MultiSourceSelector) CanHandleProvider(addr addrs.Provider) bool + type PackageAuthentication interface + AuthenticatePackage func(localLocation PackageLocation) (*PackageAuthenticationResult, error) + func NewArchiveChecksumAuthentication(platform Platform, wantSHA256Sum [sha256.Size]byte) PackageAuthentication + func NewMatchingChecksumAuthentication(document []byte, filename string, wantSHA256Sum [sha256.Size]byte) PackageAuthentication + func NewPackageHashAuthentication(platform Platform, validHashes []Hash) PackageAuthentication + func NewSignatureAuthentication(document, signature []byte, keys []SigningKey) PackageAuthentication + func PackageAuthenticationAll(checks ...PackageAuthentication) PackageAuthentication + type PackageAuthenticationHashes interface + AcceptableHashes func() []Hash + type PackageAuthenticationResult struct + KeyID string + func (t *PackageAuthenticationResult) SignedByAnyParty() bool + func (t *PackageAuthenticationResult) SignedByHashiCorp() bool + func (t *PackageAuthenticationResult) String() string + func (t *PackageAuthenticationResult) ThirdPartySigned() bool + type PackageHTTPURL string + func (p PackageHTTPURL) String() string + type PackageLocalArchive string + func (p PackageLocalArchive) String() string + type PackageLocalDir string + func (p PackageLocalDir) String() string + type PackageLocation interface + String func() string + type PackageMeta struct + Authentication PackageAuthentication + Filename string + Location PackageLocation + ProtocolVersions VersionList + Provider addrs.Provider + TargetPlatform Platform + Version Version + func FakeInstallablePackageMeta(provider addrs.Provider, version Version, protocols VersionList, ...) (PackageMeta, func(), error) + func FakePackageMeta(provider addrs.Provider, version Version, protocols VersionList, ...) PackageMeta + func (m PackageMeta) AcceptableHashes() []Hash + func (m PackageMeta) Hash() (Hash, error) + func (m PackageMeta) HashV1() (Hash, error) + func (m PackageMeta) LessThan(other PackageMeta) bool + func (m PackageMeta) MatchesAnyHash(acceptable []Hash) (bool, error) + func (m PackageMeta) MatchesHash(want Hash) (bool, error) + func (m PackageMeta) PackedFilePath(baseDir string) string + func (m PackageMeta) UnpackedDirectoryPath(baseDir string) string + type PackageMetaList []PackageMeta + func (l PackageMetaList) FilterPlatform(target Platform) PackageMetaList + func (l PackageMetaList) FilterProviderExactVersion(provider addrs.Provider, version Version) PackageMetaList + func (l PackageMetaList) FilterProviderPlatformExactVersion(provider addrs.Provider, platform Platform, version Version) PackageMetaList + func (l PackageMetaList) Len() int + func (l PackageMetaList) Less(i, j int) bool + func (l PackageMetaList) Sort() + func (l PackageMetaList) Swap(i, j int) + type Platform struct + Arch string + OS string + func ParsePlatform(str string) (Platform, error) + func (p Platform) LessThan(other Platform) bool + func (p Platform) String() string + type RegistrySource struct + func NewRegistrySource(services *disco.Disco) *RegistrySource + func (s *RegistrySource) AvailableVersions(ctx context.Context, provider addrs.Provider) (VersionList, Warnings, error) + func (s *RegistrySource) ForDisplay(provider addrs.Provider) string + func (s *RegistrySource) PackageMeta(ctx context.Context, provider addrs.Provider, version Version, target Platform) (PackageMeta, error) + type Requirements map[addrs.Provider]VersionConstraints + func (r Requirements) Merge(other Requirements) Requirements + type Selections map[addrs.Provider]Version + type SigningKey struct + ASCIIArmor string + TrustSignature string + type Source interface + AvailableVersions func(ctx context.Context, provider addrs.Provider) (VersionList, Warnings, error) + ForDisplay func(provider addrs.Provider) string + PackageMeta func(ctx context.Context, provider addrs.Provider, version Version, target Platform) (PackageMeta, error) + type Version = versions.Version + var UnspecifiedVersion Version = versions.Unspecified + func MustParseVersion(str string) Version + func ParseVersion(str string) (Version, error) + type VersionConstraints = constraints.IntersectionSpec + func MustParseVersionConstraints(str string) VersionConstraints + func ParseVersionConstraints(str string) (VersionConstraints, error) + type VersionList = versions.List + type VersionSet = versions.Set + func MeetingConstraints(vc VersionConstraints) VersionSet + type Warnings = []string