Documentation
¶
Overview ¶
Package backend provides the GitHub Provenance (SLSA attestation) verifier.
Package backend provides the GitLab Provenance (SLSA attestation) verifier.
Index ¶
- Variables
- func Backends() map[string]Backend
- func CalculateAssetScore(assetName string, platform Platform, toolName string) int
- func FetchAndParseChecksumFile(ctx context.Context, client *http.Client, url string) (map[string]string, error)
- func FindChecksumForAsset(ctx context.Context, client *http.Client, assets []CommonAsset, ...) (string, error)
- func FindGPGSignatureForAsset(assets []CommonAsset, targetAsset *CommonAsset) string
- func Has(name string) bool
- func InitializeTUFRoot(cacheDirName, repoBaseURL string, customRoot []byte) (*root.LiveTrustedRoot, error)
- func List() []string
- func ProbeURL(ctx context.Context, client *http.Client, url string) bool
- func Register(backend Backend)
- func ResetTrustedRootForTest()
- func ResolveAsdfToolName(tool string) string
- func ResolveGitHubTokenPublic(host string) string
- func Unregister(name string)
- type AquaBackend
- func (a *AquaBackend) AttestationType() string
- func (b *AquaBackend) Dependencies() []string
- func (a *AquaBackend) GetDownloadInfo(ctx context.Context, tool string, version string, platform Platform) (*VersionInfo, error)
- func (a *AquaBackend) GetReach() string
- func (a *AquaBackend) IsRecommended() bool
- func (a *AquaBackend) IsScriptless() bool
- func (a *AquaBackend) IsStable() bool
- func (a *AquaBackend) ListVersions(ctx context.Context, tool string, platform Platform) ([]VersionInfo, error)
- func (a *AquaBackend) Name() string
- func (a *AquaBackend) ResolveVersion(ctx context.Context, tool string, versionRequest string, platform Platform) (*VersionInfo, error)
- func (a *AquaBackend) SupportsChecksum() bool
- func (a *AquaBackend) SupportsGPG() bool
- func (a *AquaBackend) SupportsOffline() bool
- type AsdfBackend
- func (b *AsdfBackend) AttestationType() string
- func (b *AsdfBackend) Dependencies() []string
- func (b *AsdfBackend) GetDownloadInfo(ctx context.Context, tool string, version string, platform Platform) (*VersionInfo, error)
- func (b *AsdfBackend) GetReach() string
- func (b *AsdfBackend) IsRecommended() bool
- func (b *AsdfBackend) IsScriptless() bool
- func (b *AsdfBackend) IsStable() bool
- func (b *AsdfBackend) ListVersions(ctx context.Context, tool string, platform Platform) ([]VersionInfo, error)
- func (b *AsdfBackend) Name() string
- func (b *AsdfBackend) ResolveVersion(ctx context.Context, tool string, versionRequest string, platform Platform) (*VersionInfo, error)
- func (b *AsdfBackend) SupportsChecksum() bool
- func (b *AsdfBackend) SupportsGPG() bool
- func (b *AsdfBackend) SupportsOffline() bool
- type Backend
- type BackendError
- type CabalBackend
- func (b *CabalBackend) AttestationType() string
- func (b *CabalBackend) Dependencies() []string
- func (b *CabalBackend) GetDownloadInfo(ctx context.Context, tool string, version string, platform Platform) (*VersionInfo, error)
- func (b *CabalBackend) GetReach() string
- func (b *CabalBackend) IsRecommended() bool
- func (b *CabalBackend) IsScriptless() bool
- func (b *CabalBackend) IsStable() bool
- func (b *CabalBackend) ListVersions(ctx context.Context, tool string, platform Platform) ([]VersionInfo, error)
- func (b *CabalBackend) Name() string
- func (b *CabalBackend) ResolveVersion(ctx context.Context, tool string, versionRequest string, platform Platform) (*VersionInfo, error)
- func (b *CabalBackend) SupportsChecksum() bool
- func (b *CabalBackend) SupportsGPG() bool
- func (b *CabalBackend) SupportsOffline() bool
- type CargoBackend
- func (b *CargoBackend) AttestationType() string
- func (b *CargoBackend) Dependencies() []string
- func (b *CargoBackend) GetDownloadInfo(ctx context.Context, tool string, version string, platform Platform) (*VersionInfo, error)
- func (b *CargoBackend) GetReach() string
- func (b *CargoBackend) IsRecommended() bool
- func (b *CargoBackend) IsScriptless() bool
- func (b *CargoBackend) IsStable() bool
- func (b *CargoBackend) ListVersions(ctx context.Context, tool string, platform Platform) ([]VersionInfo, error)
- func (b *CargoBackend) Name() string
- func (b *CargoBackend) ResolveVersion(ctx context.Context, tool string, versionRequest string, platform Platform) (*VersionInfo, error)
- func (b *CargoBackend) SupportsChecksum() bool
- func (b *CargoBackend) SupportsGPG() bool
- func (b *CargoBackend) SupportsOffline() bool
- type CommonAsset
- type CommonRelease
- type ComposerBackend
- func (b *ComposerBackend) AttestationType() string
- func (b *ComposerBackend) Dependencies() []string
- func (b *ComposerBackend) GetDownloadInfo(ctx context.Context, tool string, version string, platform Platform) (*VersionInfo, error)
- func (b *ComposerBackend) GetReach() string
- func (b *ComposerBackend) IsRecommended() bool
- func (b *ComposerBackend) IsScriptless() bool
- func (b *ComposerBackend) IsStable() bool
- func (b *ComposerBackend) ListVersions(ctx context.Context, tool string, platform Platform) ([]VersionInfo, error)
- func (b *ComposerBackend) Name() string
- func (b *ComposerBackend) ResolveVersion(ctx context.Context, tool string, versionRequest string, platform Platform) (*VersionInfo, error)
- func (b *ComposerBackend) SupportsChecksum() bool
- func (b *ComposerBackend) SupportsGPG() bool
- func (b *ComposerBackend) SupportsOffline() bool
- type CondaBackend
- func (b *CondaBackend) AttestationType() string
- func (b *CondaBackend) Dependencies() []string
- func (b *CondaBackend) GetDownloadInfo(ctx context.Context, tool string, version string, platform Platform) (*VersionInfo, error)
- func (b *CondaBackend) GetReach() string
- func (b *CondaBackend) IsRecommended() bool
- func (b *CondaBackend) IsScriptless() bool
- func (b *CondaBackend) IsStable() bool
- func (b *CondaBackend) ListVersions(ctx context.Context, tool string, platform Platform) ([]VersionInfo, error)
- func (b *CondaBackend) Name() string
- func (b *CondaBackend) ResolveVersion(ctx context.Context, tool string, versionRequest string, platform Platform) (*VersionInfo, error)
- func (b *CondaBackend) SupportsChecksum() bool
- func (b *CondaBackend) SupportsGPG() bool
- func (b *CondaBackend) SupportsOffline() bool
- type ContainerBackend
- func (b *ContainerBackend) AttestationType() string
- func (b *ContainerBackend) Dependencies() []string
- func (b *ContainerBackend) GetDownloadInfo(ctx context.Context, tool string, version string, platform Platform) (*VersionInfo, error)
- func (b *ContainerBackend) GetReach() string
- func (b *ContainerBackend) IsRecommended() bool
- func (b *ContainerBackend) IsScriptless() bool
- func (b *ContainerBackend) IsStable() bool
- func (b *ContainerBackend) ListVersions(ctx context.Context, tool string, platform Platform) ([]VersionInfo, error)
- func (b *ContainerBackend) Name() string
- func (b *ContainerBackend) ResolveVersion(ctx context.Context, tool string, versionRequest string, platform Platform) (*VersionInfo, error)
- func (b *ContainerBackend) SupportsChecksum() bool
- func (b *ContainerBackend) SupportsGPG() bool
- func (b *ContainerBackend) SupportsOffline() bool
- type CranBackend
- func (b *CranBackend) AttestationType() string
- func (b *CranBackend) Dependencies() []string
- func (b *CranBackend) GetDownloadInfo(ctx context.Context, tool string, version string, platform Platform) (*VersionInfo, error)
- func (b *CranBackend) GetReach() string
- func (b *CranBackend) IsRecommended() bool
- func (b *CranBackend) IsScriptless() bool
- func (b *CranBackend) IsStable() bool
- func (b *CranBackend) ListVersions(ctx context.Context, tool string, platform Platform) ([]VersionInfo, error)
- func (b *CranBackend) Name() string
- func (b *CranBackend) ResolveVersion(ctx context.Context, tool string, versionRequest string, platform Platform) (*VersionInfo, error)
- func (b *CranBackend) SupportsChecksum() bool
- func (b *CranBackend) SupportsGPG() bool
- func (b *CranBackend) SupportsOffline() bool
- type DenoBackend
- func (b *DenoBackend) AttestationType() string
- func (b *DenoBackend) Dependencies() []string
- func (b *DenoBackend) GetDownloadInfo(ctx context.Context, tool string, version string, platform Platform) (*VersionInfo, error)
- func (b *DenoBackend) GetReach() string
- func (b *DenoBackend) IsRecommended() bool
- func (b *DenoBackend) IsScriptless() bool
- func (b *DenoBackend) IsStable() bool
- func (b *DenoBackend) ListVersions(ctx context.Context, tool string, platform Platform) ([]VersionInfo, error)
- func (b *DenoBackend) Name() string
- func (b *DenoBackend) ResolveVersion(ctx context.Context, tool string, versionRequest string, platform Platform) (*VersionInfo, error)
- func (b *DenoBackend) SupportsChecksum() bool
- func (b *DenoBackend) SupportsGPG() bool
- func (b *DenoBackend) SupportsOffline() bool
- type DotnetBackend
- func (b *DotnetBackend) AttestationType() string
- func (b *DotnetBackend) Dependencies() []string
- func (b *DotnetBackend) GetDownloadInfo(ctx context.Context, tool string, version string, platform Platform) (*VersionInfo, error)
- func (b *DotnetBackend) GetReach() string
- func (b *DotnetBackend) IsRecommended() bool
- func (b *DotnetBackend) IsScriptless() bool
- func (b *DotnetBackend) IsStable() bool
- func (b *DotnetBackend) ListVersions(ctx context.Context, tool string, platform Platform) ([]VersionInfo, error)
- func (b *DotnetBackend) Name() string
- func (b *DotnetBackend) ResolveVersion(ctx context.Context, tool string, versionRequest string, platform Platform) (*VersionInfo, error)
- func (b *DotnetBackend) SupportsChecksum() bool
- func (b *DotnetBackend) SupportsGPG() bool
- func (b *DotnetBackend) SupportsOffline() bool
- type ForgejoBackend
- func (b *ForgejoBackend) AttestationType() string
- func (b *ForgejoBackend) Dependencies() []string
- func (b *ForgejoBackend) FetchReleaseByTag(ctx context.Context, tool string, tag string) (*CommonRelease, error)
- func (b *ForgejoBackend) FetchReleases(ctx context.Context, tool string) ([]CommonRelease, error)
- func (b *ForgejoBackend) GetAttestationType() string
- func (b *ForgejoBackend) GetClient() *http.Client
- func (b *ForgejoBackend) GetDownloadInfo(ctx context.Context, tool string, version string, platform Platform) (*VersionInfo, error)
- func (b *ForgejoBackend) GetReach() string
- func (b *ForgejoBackend) IsRecommended() bool
- func (b *ForgejoBackend) IsScriptless() bool
- func (b *ForgejoBackend) IsStable() bool
- func (b *ForgejoBackend) ListVersions(ctx context.Context, tool string, platform Platform) ([]VersionInfo, error)
- func (b *ForgejoBackend) Name() string
- func (b *ForgejoBackend) ResolveVersion(ctx context.Context, tool string, versionRequest string, platform Platform) (*VersionInfo, error)
- func (b *ForgejoBackend) SupportsChecksum() bool
- func (b *ForgejoBackend) SupportsGPG() bool
- func (b *ForgejoBackend) SupportsOffline() bool
- type GemBackend
- func (b *GemBackend) AttestationType() string
- func (b *GemBackend) Dependencies() []string
- func (b *GemBackend) GetDownloadInfo(ctx context.Context, tool string, version string, platform Platform) (*VersionInfo, error)
- func (b *GemBackend) GetReach() string
- func (b *GemBackend) IsRecommended() bool
- func (b *GemBackend) IsScriptless() bool
- func (b *GemBackend) IsStable() bool
- func (b *GemBackend) ListVersions(ctx context.Context, tool string, platform Platform) ([]VersionInfo, error)
- func (b *GemBackend) Name() string
- func (b *GemBackend) ResolveVersion(ctx context.Context, tool string, versionRequest string, platform Platform) (*VersionInfo, error)
- func (b *GemBackend) SupportsChecksum() bool
- func (b *GemBackend) SupportsGPG() bool
- func (b *GemBackend) SupportsOffline() bool
- type GitHubBackend
- func (g *GitHubBackend) AttestationType() string
- func (b *GitHubBackend) Dependencies() []string
- func (g *GitHubBackend) FetchReleaseByTag(ctx context.Context, tool string, tag string) (*CommonRelease, error)
- func (g *GitHubBackend) FetchReleases(ctx context.Context, tool string) ([]CommonRelease, error)
- func (g *GitHubBackend) GetAttestationType() string
- func (g *GitHubBackend) GetClient() *http.Client
- func (g *GitHubBackend) GetDownloadInfo(ctx context.Context, tool string, version string, platform Platform) (*VersionInfo, error)
- func (g *GitHubBackend) GetReach() string
- func (g *GitHubBackend) IsRecommended() bool
- func (g *GitHubBackend) IsScriptless() bool
- func (g *GitHubBackend) IsStable() bool
- func (g *GitHubBackend) ListVersions(ctx context.Context, tool string, platform Platform) ([]VersionInfo, error)
- func (g *GitHubBackend) Name() string
- func (g *GitHubBackend) ResolveVersion(ctx context.Context, tool string, versionRequest string, platform Platform) (*VersionInfo, error)
- func (g *GitHubBackend) SupportsChecksum() bool
- func (g *GitHubBackend) SupportsGPG() bool
- func (g *GitHubBackend) SupportsOffline() bool
- type GitlabBackend
- func (b *GitlabBackend) AttestationType() string
- func (b *GitlabBackend) Dependencies() []string
- func (b *GitlabBackend) FetchReleaseByTag(ctx context.Context, tool string, tag string) (*CommonRelease, error)
- func (b *GitlabBackend) FetchReleases(ctx context.Context, tool string) ([]CommonRelease, error)
- func (b *GitlabBackend) GetAttestationType() string
- func (b *GitlabBackend) GetClient() *http.Client
- func (b *GitlabBackend) GetDownloadInfo(ctx context.Context, tool string, version string, platform Platform) (*VersionInfo, error)
- func (b *GitlabBackend) GetReach() string
- func (b *GitlabBackend) IsRecommended() bool
- func (b *GitlabBackend) IsScriptless() bool
- func (b *GitlabBackend) IsStable() bool
- func (b *GitlabBackend) ListVersions(ctx context.Context, tool string, platform Platform) ([]VersionInfo, error)
- func (b *GitlabBackend) Name() string
- func (b *GitlabBackend) ResolveVersion(ctx context.Context, tool string, versionRequest string, platform Platform) (*VersionInfo, error)
- func (b *GitlabBackend) SupportsChecksum() bool
- func (b *GitlabBackend) SupportsGPG() bool
- func (b *GitlabBackend) SupportsOffline() bool
- type GoBackend
- func (b *GoBackend) AttestationType() string
- func (b *GoBackend) Dependencies() []string
- func (b *GoBackend) GetDownloadInfo(ctx context.Context, tool string, version string, platform Platform) (*VersionInfo, error)
- func (b *GoBackend) GetReach() string
- func (b *GoBackend) IsRecommended() bool
- func (b *GoBackend) IsScriptless() bool
- func (b *GoBackend) IsStable() bool
- func (b *GoBackend) ListVersions(ctx context.Context, tool string, platform Platform) ([]VersionInfo, error)
- func (b *GoBackend) Name() string
- func (b *GoBackend) ResolveVersion(ctx context.Context, tool string, versionRequest string, platform Platform) (*VersionInfo, error)
- func (b *GoBackend) SupportsChecksum() bool
- func (b *GoBackend) SupportsGPG() bool
- func (b *GoBackend) SupportsOffline() bool
- type GoPkgBackend
- type HTTPBackend
- func (h *HTTPBackend) AttestationType() string
- func (h *HTTPBackend) Dependencies() []string
- func (h *HTTPBackend) GetDownloadInfo(ctx context.Context, tool string, version string, platform Platform) (*VersionInfo, error)
- func (h *HTTPBackend) GetDownloadInfoWithConfig(ctx context.Context, tool string, version string, platform Platform, ...) (*VersionInfo, error)
- func (h *HTTPBackend) GetReach() string
- func (h *HTTPBackend) IsRecommended() bool
- func (h *HTTPBackend) IsScriptless() bool
- func (h *HTTPBackend) IsStable() bool
- func (h *HTTPBackend) ListVersions(ctx context.Context, tool string, platform Platform) ([]VersionInfo, error)
- func (h *HTTPBackend) Name() string
- func (h *HTTPBackend) ResolveVersion(ctx context.Context, tool string, versionRequest string, platform Platform) (*VersionInfo, error)
- func (h *HTTPBackend) SupportsChecksum() bool
- func (h *HTTPBackend) SupportsGPG() bool
- func (h *HTTPBackend) SupportsOffline() bool
- type HTTPConfig
- type HostingProvider
- type LuarocksBackend
- func (b *LuarocksBackend) AttestationType() string
- func (b *LuarocksBackend) Dependencies() []string
- func (b *LuarocksBackend) GetDownloadInfo(ctx context.Context, tool string, version string, platform Platform) (*VersionInfo, error)
- func (b *LuarocksBackend) GetReach() string
- func (b *LuarocksBackend) IsRecommended() bool
- func (b *LuarocksBackend) IsScriptless() bool
- func (b *LuarocksBackend) IsStable() bool
- func (b *LuarocksBackend) ListVersions(ctx context.Context, tool string, platform Platform) ([]VersionInfo, error)
- func (b *LuarocksBackend) Name() string
- func (b *LuarocksBackend) ResolveVersion(ctx context.Context, tool string, versionRequest string, platform Platform) (*VersionInfo, error)
- func (b *LuarocksBackend) SupportsChecksum() bool
- func (b *LuarocksBackend) SupportsGPG() bool
- func (b *LuarocksBackend) SupportsOffline() bool
- type MavenBackend
- func (b *MavenBackend) AttestationType() string
- func (b *MavenBackend) Dependencies() []string
- func (b *MavenBackend) GetDownloadInfo(ctx context.Context, tool string, version string, platform Platform) (*VersionInfo, error)
- func (b *MavenBackend) GetReach() string
- func (b *MavenBackend) IsRecommended() bool
- func (b *MavenBackend) IsScriptless() bool
- func (b *MavenBackend) IsStable() bool
- func (b *MavenBackend) ListVersions(ctx context.Context, tool string, platform Platform) ([]VersionInfo, error)
- func (b *MavenBackend) Name() string
- func (b *MavenBackend) ResolveVersion(ctx context.Context, tool string, versionRequest string, platform Platform) (*VersionInfo, error)
- func (b *MavenBackend) SupportsChecksum() bool
- func (b *MavenBackend) SupportsGPG() bool
- func (b *MavenBackend) SupportsOffline() bool
- type NativeBackend
- func (b *NativeBackend) AttestationType() string
- func (b *NativeBackend) Dependencies() []string
- func (b *NativeBackend) GetDownloadInfo(ctx context.Context, tool, version string, platform Platform) (*VersionInfo, error)
- func (b *NativeBackend) GetReach() string
- func (b *NativeBackend) IsRecommended() bool
- func (b *NativeBackend) IsScriptless() bool
- func (b *NativeBackend) IsStable() bool
- func (b *NativeBackend) ListVersions(ctx context.Context, tool string, platform Platform) ([]VersionInfo, error)
- func (b *NativeBackend) Name() string
- func (b *NativeBackend) ResolveVersion(ctx context.Context, tool string, versionRequest string, platform Platform) (*VersionInfo, error)
- func (b *NativeBackend) SupportsChecksum() bool
- func (b *NativeBackend) SupportsGPG() bool
- func (b *NativeBackend) SupportsOffline() bool
- type NpmBackend
- func (b *NpmBackend) AttestationType() string
- func (b *NpmBackend) Dependencies() []string
- func (b *NpmBackend) GetDownloadInfo(ctx context.Context, tool string, version string, platform Platform) (*VersionInfo, error)
- func (b *NpmBackend) GetReach() string
- func (b *NpmBackend) IsRecommended() bool
- func (b *NpmBackend) IsScriptless() bool
- func (b *NpmBackend) IsStable() bool
- func (b *NpmBackend) ListVersions(ctx context.Context, tool string, platform Platform) ([]VersionInfo, error)
- func (b *NpmBackend) Name() string
- func (b *NpmBackend) ResolveVersion(ctx context.Context, tool string, versionRequest string, platform Platform) (*VersionInfo, error)
- func (b *NpmBackend) SupportsChecksum() bool
- func (b *NpmBackend) SupportsGPG() bool
- func (b *NpmBackend) SupportsOffline() bool
- type PipxBackend
- func (b *PipxBackend) AttestationType() string
- func (b *PipxBackend) Dependencies() []string
- func (b *PipxBackend) GetDownloadInfo(ctx context.Context, tool string, version string, platform Platform) (*VersionInfo, error)
- func (b *PipxBackend) GetReach() string
- func (b *PipxBackend) IsRecommended() bool
- func (b *PipxBackend) IsScriptless() bool
- func (b *PipxBackend) IsStable() bool
- func (b *PipxBackend) ListVersions(ctx context.Context, tool string, platform Platform) ([]VersionInfo, error)
- func (b *PipxBackend) Name() string
- func (b *PipxBackend) ResolveVersion(ctx context.Context, tool string, versionRequest string, platform Platform) (*VersionInfo, error)
- func (b *PipxBackend) SupportsChecksum() bool
- func (b *PipxBackend) SupportsGPG() bool
- func (b *PipxBackend) SupportsOffline() bool
- type Platform
- type ProvenanceResult
- type PypiBackend
- func (b *PypiBackend) AttestationType() string
- func (b *PypiBackend) Dependencies() []string
- func (b *PypiBackend) GetDownloadInfo(ctx context.Context, tool string, version string, platform Platform) (*VersionInfo, error)
- func (b *PypiBackend) GetReach() string
- func (b *PypiBackend) IsRecommended() bool
- func (b *PypiBackend) IsScriptless() bool
- func (b *PypiBackend) IsStable() bool
- func (b *PypiBackend) ListVersions(ctx context.Context, tool string, platform Platform) ([]VersionInfo, error)
- func (b *PypiBackend) Name() string
- func (b *PypiBackend) ResolveVersion(ctx context.Context, tool string, versionRequest string, platform Platform) (*VersionInfo, error)
- func (b *PypiBackend) SupportsChecksum() bool
- func (b *PypiBackend) SupportsGPG() bool
- func (b *PypiBackend) SupportsOffline() bool
- type Registry
- type S3Backend
- func (b *S3Backend) AttestationType() string
- func (b *S3Backend) Dependencies() []string
- func (b *S3Backend) GetDownloadInfo(ctx context.Context, tool string, version string, platform Platform) (*VersionInfo, error)
- func (b *S3Backend) GetReach() string
- func (b *S3Backend) IsRecommended() bool
- func (b *S3Backend) IsScriptless() bool
- func (b *S3Backend) IsStable() bool
- func (b *S3Backend) ListVersions(ctx context.Context, tool string, platform Platform) ([]VersionInfo, error)
- func (b *S3Backend) Name() string
- func (b *S3Backend) ResolveVersion(ctx context.Context, tool string, versionRequest string, platform Platform) (*VersionInfo, error)
- func (b *S3Backend) SupportsChecksum() bool
- func (b *S3Backend) SupportsGPG() bool
- func (b *S3Backend) SupportsOffline() bool
- type SigstoreVerifier
- type SpmBackend
- func (b *SpmBackend) AttestationType() string
- func (b *SpmBackend) Dependencies() []string
- func (b *SpmBackend) GetDownloadInfo(ctx context.Context, tool string, version string, platform Platform) (*VersionInfo, error)
- func (b *SpmBackend) GetReach() string
- func (b *SpmBackend) IsRecommended() bool
- func (b *SpmBackend) IsScriptless() bool
- func (b *SpmBackend) IsStable() bool
- func (b *SpmBackend) ListVersions(ctx context.Context, tool string, platform Platform) ([]VersionInfo, error)
- func (b *SpmBackend) Name() string
- func (b *SpmBackend) ResolveVersion(ctx context.Context, tool string, versionRequest string, platform Platform) (*VersionInfo, error)
- func (b *SpmBackend) SupportsChecksum() bool
- func (b *SpmBackend) SupportsGPG() bool
- func (b *SpmBackend) SupportsOffline() bool
- type VersionInfo
- type VfoxBackend
- func (b *VfoxBackend) AttestationType() string
- func (b *VfoxBackend) Dependencies() []string
- func (b *VfoxBackend) GetDownloadInfo(ctx context.Context, tool string, version string, platform Platform) (*VersionInfo, error)
- func (b *VfoxBackend) GetReach() string
- func (b *VfoxBackend) IsRecommended() bool
- func (b *VfoxBackend) IsScriptless() bool
- func (b *VfoxBackend) IsStable() bool
- func (b *VfoxBackend) ListVersions(ctx context.Context, tool string, platform Platform) ([]VersionInfo, error)
- func (b *VfoxBackend) Name() string
- func (b *VfoxBackend) ResolveVersion(ctx context.Context, tool string, versionRequest string, platform Platform) (*VersionInfo, error)
- func (b *VfoxBackend) SupportsChecksum() bool
- func (b *VfoxBackend) SupportsGPG() bool
- func (b *VfoxBackend) SupportsOffline() bool
- type ZigBackend
- func (b *ZigBackend) AttestationType() string
- func (b *ZigBackend) Dependencies() []string
- func (b *ZigBackend) GetDownloadInfo(ctx context.Context, tool string, version string, platform Platform) (*VersionInfo, error)
- func (b *ZigBackend) GetReach() string
- func (b *ZigBackend) IsRecommended() bool
- func (b *ZigBackend) IsScriptless() bool
- func (b *ZigBackend) IsStable() bool
- func (b *ZigBackend) ListVersions(ctx context.Context, tool string, platform Platform) ([]VersionInfo, error)
- func (b *ZigBackend) Name() string
- func (b *ZigBackend) ResolveVersion(ctx context.Context, tool string, versionRequest string, platform Platform) (*VersionInfo, error)
- func (b *ZigBackend) SupportsChecksum() bool
- func (b *ZigBackend) SupportsGPG() bool
- func (b *ZigBackend) SupportsOffline() bool
Constants ¶
This section is empty.
Variables ¶
var DefaultRegistry = NewRegistry()
DefaultRegistry is the global default backend registry.
Functions ¶
func CalculateAssetScore ¶
CalculateAssetScore calculates a compatibility score for an asset name. Returns -1 if the asset is definitely incompatible.
func FetchAndParseChecksumFile ¶
func FetchAndParseChecksumFile(ctx context.Context, client *http.Client, url string) (map[string]string, error)
FetchAndParseChecksumFile downloads and parses a checksum file from a URL.
func FindChecksumForAsset ¶
func FindChecksumForAsset(ctx context.Context, client *http.Client, assets []CommonAsset, targetAsset *CommonAsset) (string, error)
FindChecksumForAsset attempts to find a matching checksum for an asset from a list of all assets.
func FindGPGSignatureForAsset ¶
func FindGPGSignatureForAsset(assets []CommonAsset, targetAsset *CommonAsset) string
FindGPGSignatureForAsset attempts to find a matching GPG signature for an asset.
func InitializeTUFRoot ¶
func InitializeTUFRoot(cacheDirName, repoBaseURL string, customRoot []byte) (*root.LiveTrustedRoot, error)
InitializeTUFRoot sets up a Sigstore TUF root with the specified parameters.
func List ¶
func List() []string
List returns all registered backend names from the default registry.
func Register ¶
func Register(backend Backend)
Register registers a backend in the default registry.
func ResetTrustedRootForTest ¶
func ResetTrustedRootForTest()
func ResolveAsdfToolName ¶
ResolveAsdfToolName maps common tool names to their official asdf plugin names.
func ResolveGitHubTokenPublic ¶
ResolveGitHubTokenPublic is the exported wrapper for use outside the backend package.
func Unregister ¶
func Unregister(name string)
Unregister removes a backend from the default registry.
Types ¶
type AquaBackend ¶
type AquaBackend struct {
// contains filtered or unexported fields
}
AquaBackend implements the Backend interface for Aqua registry. Aqua is a declarative CLI version manager that provides a curated registry of tools.
func (*AquaBackend) AttestationType ¶
func (a *AquaBackend) AttestationType() string
AttestationType returns the type of attestation verification supported.
func (*AquaBackend) Dependencies ¶
func (b *AquaBackend) Dependencies() []string
func (*AquaBackend) GetDownloadInfo ¶
func (a *AquaBackend) GetDownloadInfo(ctx context.Context, tool string, version string, platform Platform) (*VersionInfo, error)
GetDownloadInfo retrieves download information for a specific version.
func (*AquaBackend) GetReach ¶
func (a *AquaBackend) GetReach() string
func (*AquaBackend) IsRecommended ¶
func (a *AquaBackend) IsRecommended() bool
func (*AquaBackend) IsScriptless ¶
func (a *AquaBackend) IsScriptless() bool
func (*AquaBackend) IsStable ¶
func (a *AquaBackend) IsStable() bool
func (*AquaBackend) ListVersions ¶
func (a *AquaBackend) ListVersions(ctx context.Context, tool string, platform Platform) ([]VersionInfo, error)
ListVersions returns all available versions from Aqua registry.
func (*AquaBackend) ResolveVersion ¶
func (a *AquaBackend) ResolveVersion(ctx context.Context, tool string, versionRequest string, platform Platform) (*VersionInfo, error)
ResolveVersion resolves a version request to a concrete version.
func (*AquaBackend) SupportsChecksum ¶
func (a *AquaBackend) SupportsChecksum() bool
SupportsChecksum indicates whether this backend provides checksums.
func (*AquaBackend) SupportsGPG ¶
func (a *AquaBackend) SupportsGPG() bool
SupportsGPG indicates whether this backend supports GPG signatures.
func (*AquaBackend) SupportsOffline ¶
func (a *AquaBackend) SupportsOffline() bool
type AsdfBackend ¶
type AsdfBackend struct {
// contains filtered or unexported fields
}
AsdfBackend implements the Backend interface for asdf plugins.
func (*AsdfBackend) AttestationType ¶
func (b *AsdfBackend) AttestationType() string
func (*AsdfBackend) Dependencies ¶
func (b *AsdfBackend) Dependencies() []string
func (*AsdfBackend) GetDownloadInfo ¶
func (b *AsdfBackend) GetDownloadInfo(ctx context.Context, tool string, version string, platform Platform) (*VersionInfo, error)
func (*AsdfBackend) GetReach ¶
func (b *AsdfBackend) GetReach() string
func (*AsdfBackend) IsRecommended ¶
func (b *AsdfBackend) IsRecommended() bool
func (*AsdfBackend) IsScriptless ¶
func (b *AsdfBackend) IsScriptless() bool
func (*AsdfBackend) IsStable ¶
func (b *AsdfBackend) IsStable() bool
func (*AsdfBackend) ListVersions ¶
func (b *AsdfBackend) ListVersions(ctx context.Context, tool string, platform Platform) ([]VersionInfo, error)
func (*AsdfBackend) Name ¶
func (b *AsdfBackend) Name() string
func (*AsdfBackend) ResolveVersion ¶
func (b *AsdfBackend) ResolveVersion(ctx context.Context, tool string, versionRequest string, platform Platform) (*VersionInfo, error)
func (*AsdfBackend) SupportsChecksum ¶
func (b *AsdfBackend) SupportsChecksum() bool
func (*AsdfBackend) SupportsGPG ¶
func (b *AsdfBackend) SupportsGPG() bool
func (*AsdfBackend) SupportsOffline ¶
func (b *AsdfBackend) SupportsOffline() bool
type Backend ¶
type Backend interface {
// Name returns the unique identifier for this backend (e.g., "github", "aqua", "http").
Name() string
// ListVersions returns all available versions for a tool.
// The versions are returned in descending order (newest first).
ListVersions(ctx context.Context, tool string, platform Platform) ([]VersionInfo, error)
// ResolveVersion resolves a version request (e.g., "latest", "1.20", "^1.19") to a concrete version.
// Returns the resolved VersionInfo or an error if the version cannot be resolved.
ResolveVersion(ctx context.Context, tool string, versionRequest string, platform Platform) (*VersionInfo, error)
// GetDownloadInfo retrieves download information for a specific tool version.
// This is useful when you already know the exact version you want.
GetDownloadInfo(ctx context.Context, tool string, version string, platform Platform) (*VersionInfo, error)
// SupportsChecksum indicates whether this backend provides checksum verification.
SupportsChecksum() bool
// SupportsGPG indicates whether this backend supports GPG signature verification.
SupportsGPG() bool
// AttestationType returns the type of build provenance or attestation
// verification supported (e.g., "SLSA", "GitHub", "Cosign").
// Returns an empty string if not supported.
AttestationType() string
// IsRecommended indicates whether this backend is recommended for use.
IsRecommended() bool
// IsScriptless indicates whether this backend performs installation without executing arbitrary scripts.
IsScriptless() bool
// GetReach returns the relative coverage/reach of this backend (e.g., "Small", "Medium", "Large", "Huge").
GetReach() string
// IsStable indicates whether this backend has high stability and low bit-rot.
IsStable() bool
// SupportsOffline indicates whether this backend supports offline mode or private mirrors.
SupportsOffline() bool
// Dependencies returns a list of backend names or tools that this backend depends on.
// This is used to determine the installation order.
Dependencies() []string
}
Backend defines the interface for tool version management backends. Each backend is responsible for listing available versions, resolving version requests, and providing download information for tools.
type BackendError ¶
type BackendError struct {
Backend string // The backend that produced the error
Tool string // The tool being operated on
Message string // Error message
Cause error // Underlying error, if any
}
BackendError represents an error from a backend operation.
func NewBackendError ¶
func NewBackendError(backend, tool, message string, cause error) *BackendError
NewBackendError creates a new BackendError.
func (*BackendError) Error ¶
func (e *BackendError) Error() string
Error implements the error interface.
func (*BackendError) Unwrap ¶
func (e *BackendError) Unwrap() error
Unwrap returns the underlying error.
type CabalBackend ¶
type CabalBackend struct {
// contains filtered or unexported fields
}
func NewCabalBackend ¶
func NewCabalBackend() *CabalBackend
func (*CabalBackend) AttestationType ¶
func (b *CabalBackend) AttestationType() string
func (*CabalBackend) Dependencies ¶
func (b *CabalBackend) Dependencies() []string
func (*CabalBackend) GetDownloadInfo ¶
func (b *CabalBackend) GetDownloadInfo(ctx context.Context, tool string, version string, platform Platform) (*VersionInfo, error)
func (*CabalBackend) GetReach ¶
func (b *CabalBackend) GetReach() string
func (*CabalBackend) IsRecommended ¶
func (b *CabalBackend) IsRecommended() bool
func (*CabalBackend) IsScriptless ¶
func (b *CabalBackend) IsScriptless() bool
func (*CabalBackend) IsStable ¶
func (b *CabalBackend) IsStable() bool
func (*CabalBackend) ListVersions ¶
func (b *CabalBackend) ListVersions(ctx context.Context, tool string, platform Platform) ([]VersionInfo, error)
func (*CabalBackend) Name ¶
func (b *CabalBackend) Name() string
func (*CabalBackend) ResolveVersion ¶
func (b *CabalBackend) ResolveVersion(ctx context.Context, tool string, versionRequest string, platform Platform) (*VersionInfo, error)
func (*CabalBackend) SupportsChecksum ¶
func (b *CabalBackend) SupportsChecksum() bool
func (*CabalBackend) SupportsGPG ¶
func (b *CabalBackend) SupportsGPG() bool
func (*CabalBackend) SupportsOffline ¶
func (b *CabalBackend) SupportsOffline() bool
type CargoBackend ¶
type CargoBackend struct {
// contains filtered or unexported fields
}
CargoBackend implements the Backend interface for Cargo packages.
func NewCargoBackend ¶
func NewCargoBackend() *CargoBackend
NewCargoBackend creates a new Cargo backend.
func (*CargoBackend) AttestationType ¶
func (b *CargoBackend) AttestationType() string
func (*CargoBackend) Dependencies ¶
func (b *CargoBackend) Dependencies() []string
func (*CargoBackend) GetDownloadInfo ¶
func (b *CargoBackend) GetDownloadInfo(ctx context.Context, tool string, version string, platform Platform) (*VersionInfo, error)
func (*CargoBackend) GetReach ¶
func (b *CargoBackend) GetReach() string
func (*CargoBackend) IsRecommended ¶
func (b *CargoBackend) IsRecommended() bool
func (*CargoBackend) IsScriptless ¶
func (b *CargoBackend) IsScriptless() bool
func (*CargoBackend) IsStable ¶
func (b *CargoBackend) IsStable() bool
func (*CargoBackend) ListVersions ¶
func (b *CargoBackend) ListVersions(ctx context.Context, tool string, platform Platform) ([]VersionInfo, error)
func (*CargoBackend) Name ¶
func (b *CargoBackend) Name() string
func (*CargoBackend) ResolveVersion ¶
func (b *CargoBackend) ResolveVersion(ctx context.Context, tool string, versionRequest string, platform Platform) (*VersionInfo, error)
func (*CargoBackend) SupportsChecksum ¶
func (b *CargoBackend) SupportsChecksum() bool
func (*CargoBackend) SupportsGPG ¶
func (b *CargoBackend) SupportsGPG() bool
func (*CargoBackend) SupportsOffline ¶
func (b *CargoBackend) SupportsOffline() bool
type CommonAsset ¶
CommonAsset represents a generic asset from a hosting platform.
func FindBestAsset ¶
func FindBestAsset(assets []CommonAsset, platform Platform, toolName string) (*CommonAsset, int)
FindBestAsset finds the best matching asset for a platform from a list.
type CommonRelease ¶
type CommonRelease struct {
Tag string
Prerelease bool
Assets []CommonAsset
PublishedAt time.Time
}
CommonRelease represents a generic release from any hosting platform.
type ComposerBackend ¶
type ComposerBackend struct {
// contains filtered or unexported fields
}
func NewComposerBackend ¶
func NewComposerBackend() *ComposerBackend
func (*ComposerBackend) AttestationType ¶
func (b *ComposerBackend) AttestationType() string
func (*ComposerBackend) Dependencies ¶
func (b *ComposerBackend) Dependencies() []string
func (*ComposerBackend) GetDownloadInfo ¶
func (b *ComposerBackend) GetDownloadInfo(ctx context.Context, tool string, version string, platform Platform) (*VersionInfo, error)
func (*ComposerBackend) GetReach ¶
func (b *ComposerBackend) GetReach() string
func (*ComposerBackend) IsRecommended ¶
func (b *ComposerBackend) IsRecommended() bool
func (*ComposerBackend) IsScriptless ¶
func (b *ComposerBackend) IsScriptless() bool
func (*ComposerBackend) IsStable ¶
func (b *ComposerBackend) IsStable() bool
func (*ComposerBackend) ListVersions ¶
func (b *ComposerBackend) ListVersions(ctx context.Context, tool string, platform Platform) ([]VersionInfo, error)
func (*ComposerBackend) Name ¶
func (b *ComposerBackend) Name() string
func (*ComposerBackend) ResolveVersion ¶
func (b *ComposerBackend) ResolveVersion(ctx context.Context, tool string, versionRequest string, platform Platform) (*VersionInfo, error)
func (*ComposerBackend) SupportsChecksum ¶
func (b *ComposerBackend) SupportsChecksum() bool
func (*ComposerBackend) SupportsGPG ¶
func (b *ComposerBackend) SupportsGPG() bool
func (*ComposerBackend) SupportsOffline ¶
func (b *ComposerBackend) SupportsOffline() bool
type CondaBackend ¶
type CondaBackend struct {
// contains filtered or unexported fields
}
CondaBackend implements the Backend interface for Conda packages.
func NewCondaBackend ¶
func NewCondaBackend() *CondaBackend
NewCondaBackend creates a new conda backend.
func (*CondaBackend) AttestationType ¶
func (b *CondaBackend) AttestationType() string
func (*CondaBackend) Dependencies ¶
func (b *CondaBackend) Dependencies() []string
func (*CondaBackend) GetDownloadInfo ¶
func (b *CondaBackend) GetDownloadInfo(ctx context.Context, tool string, version string, platform Platform) (*VersionInfo, error)
func (*CondaBackend) GetReach ¶
func (b *CondaBackend) GetReach() string
func (*CondaBackend) IsRecommended ¶
func (b *CondaBackend) IsRecommended() bool
func (*CondaBackend) IsScriptless ¶
func (b *CondaBackend) IsScriptless() bool
func (*CondaBackend) IsStable ¶
func (b *CondaBackend) IsStable() bool
func (*CondaBackend) ListVersions ¶
func (b *CondaBackend) ListVersions(ctx context.Context, tool string, platform Platform) ([]VersionInfo, error)
func (*CondaBackend) Name ¶
func (b *CondaBackend) Name() string
func (*CondaBackend) ResolveVersion ¶
func (b *CondaBackend) ResolveVersion(ctx context.Context, tool string, versionRequest string, platform Platform) (*VersionInfo, error)
func (*CondaBackend) SupportsChecksum ¶
func (b *CondaBackend) SupportsChecksum() bool
func (*CondaBackend) SupportsGPG ¶
func (b *CondaBackend) SupportsGPG() bool
func (*CondaBackend) SupportsOffline ¶
func (b *CondaBackend) SupportsOffline() bool
type ContainerBackend ¶ added in v0.2.0
type ContainerBackend struct {
// contains filtered or unexported fields
}
ContainerBackend implements the Backend interface for container tools. It handles tools registered with prefixes like "docker", "podman", etc.
func NewContainerBackend ¶ added in v0.2.0
func NewContainerBackend(name string) *ContainerBackend
NewContainerBackend creates a new Container backend.
func (*ContainerBackend) AttestationType ¶ added in v0.2.0
func (b *ContainerBackend) AttestationType() string
func (*ContainerBackend) Dependencies ¶ added in v0.2.0
func (b *ContainerBackend) Dependencies() []string
Dependencies returns any external dependencies required by this backend.
func (*ContainerBackend) GetDownloadInfo ¶ added in v0.2.0
func (b *ContainerBackend) GetDownloadInfo(ctx context.Context, tool string, version string, platform Platform) (*VersionInfo, error)
GetDownloadInfo returns metadata needed by the ContainerProvider.
func (*ContainerBackend) GetReach ¶ added in v0.2.0
func (b *ContainerBackend) GetReach() string
func (*ContainerBackend) IsRecommended ¶ added in v0.2.0
func (b *ContainerBackend) IsRecommended() bool
func (*ContainerBackend) IsScriptless ¶ added in v0.2.0
func (b *ContainerBackend) IsScriptless() bool
func (*ContainerBackend) IsStable ¶ added in v0.2.0
func (b *ContainerBackend) IsStable() bool
func (*ContainerBackend) ListVersions ¶ added in v0.2.0
func (b *ContainerBackend) ListVersions(ctx context.Context, tool string, platform Platform) ([]VersionInfo, error)
ListVersions returns available versions for a container tool.
func (*ContainerBackend) Name ¶ added in v0.2.0
func (b *ContainerBackend) Name() string
Name returns the backend identifier.
func (*ContainerBackend) ResolveVersion ¶ added in v0.2.0
func (b *ContainerBackend) ResolveVersion(ctx context.Context, tool string, versionRequest string, platform Platform) (*VersionInfo, error)
ResolveVersion resolves a version request.
func (*ContainerBackend) SupportsChecksum ¶ added in v0.2.0
func (b *ContainerBackend) SupportsChecksum() bool
func (*ContainerBackend) SupportsGPG ¶ added in v0.2.0
func (b *ContainerBackend) SupportsGPG() bool
func (*ContainerBackend) SupportsOffline ¶ added in v0.2.0
func (b *ContainerBackend) SupportsOffline() bool
type CranBackend ¶
type CranBackend struct {
// contains filtered or unexported fields
}
func NewCranBackend ¶
func NewCranBackend() *CranBackend
func (*CranBackend) AttestationType ¶
func (b *CranBackend) AttestationType() string
func (*CranBackend) Dependencies ¶
func (b *CranBackend) Dependencies() []string
func (*CranBackend) GetDownloadInfo ¶
func (b *CranBackend) GetDownloadInfo(ctx context.Context, tool string, version string, platform Platform) (*VersionInfo, error)
func (*CranBackend) GetReach ¶
func (b *CranBackend) GetReach() string
func (*CranBackend) IsRecommended ¶
func (b *CranBackend) IsRecommended() bool
func (*CranBackend) IsScriptless ¶
func (b *CranBackend) IsScriptless() bool
func (*CranBackend) IsStable ¶
func (b *CranBackend) IsStable() bool
func (*CranBackend) ListVersions ¶
func (b *CranBackend) ListVersions(ctx context.Context, tool string, platform Platform) ([]VersionInfo, error)
func (*CranBackend) Name ¶
func (b *CranBackend) Name() string
func (*CranBackend) ResolveVersion ¶
func (b *CranBackend) ResolveVersion(ctx context.Context, tool string, versionRequest string, platform Platform) (*VersionInfo, error)
func (*CranBackend) SupportsChecksum ¶
func (b *CranBackend) SupportsChecksum() bool
func (*CranBackend) SupportsGPG ¶
func (b *CranBackend) SupportsGPG() bool
func (*CranBackend) SupportsOffline ¶
func (b *CranBackend) SupportsOffline() bool
type DenoBackend ¶
type DenoBackend struct {
// contains filtered or unexported fields
}
func NewDenoBackend ¶
func NewDenoBackend() *DenoBackend
func (*DenoBackend) AttestationType ¶
func (b *DenoBackend) AttestationType() string
func (*DenoBackend) Dependencies ¶
func (b *DenoBackend) Dependencies() []string
func (*DenoBackend) GetDownloadInfo ¶
func (b *DenoBackend) GetDownloadInfo(ctx context.Context, tool string, version string, platform Platform) (*VersionInfo, error)
func (*DenoBackend) GetReach ¶
func (b *DenoBackend) GetReach() string
func (*DenoBackend) IsRecommended ¶
func (b *DenoBackend) IsRecommended() bool
func (*DenoBackend) IsScriptless ¶
func (b *DenoBackend) IsScriptless() bool
func (*DenoBackend) IsStable ¶
func (b *DenoBackend) IsStable() bool
func (*DenoBackend) ListVersions ¶
func (b *DenoBackend) ListVersions(ctx context.Context, tool string, platform Platform) ([]VersionInfo, error)
func (*DenoBackend) Name ¶
func (b *DenoBackend) Name() string
func (*DenoBackend) ResolveVersion ¶
func (b *DenoBackend) ResolveVersion(ctx context.Context, tool string, versionRequest string, platform Platform) (*VersionInfo, error)
func (*DenoBackend) SupportsChecksum ¶
func (b *DenoBackend) SupportsChecksum() bool
func (*DenoBackend) SupportsGPG ¶
func (b *DenoBackend) SupportsGPG() bool
func (*DenoBackend) SupportsOffline ¶
func (b *DenoBackend) SupportsOffline() bool
type DotnetBackend ¶
type DotnetBackend struct {
// contains filtered or unexported fields
}
DotnetBackend implements the Backend interface for .NET tools (NuGet).
func NewDotnetBackend ¶
func NewDotnetBackend() *DotnetBackend
NewDotnetBackend creates a new dotnet backend.
func (*DotnetBackend) AttestationType ¶
func (b *DotnetBackend) AttestationType() string
func (*DotnetBackend) Dependencies ¶
func (b *DotnetBackend) Dependencies() []string
func (*DotnetBackend) GetDownloadInfo ¶
func (b *DotnetBackend) GetDownloadInfo(ctx context.Context, tool string, version string, platform Platform) (*VersionInfo, error)
func (*DotnetBackend) GetReach ¶
func (b *DotnetBackend) GetReach() string
func (*DotnetBackend) IsRecommended ¶
func (b *DotnetBackend) IsRecommended() bool
func (*DotnetBackend) IsScriptless ¶
func (b *DotnetBackend) IsScriptless() bool
func (*DotnetBackend) IsStable ¶
func (b *DotnetBackend) IsStable() bool
func (*DotnetBackend) ListVersions ¶
func (b *DotnetBackend) ListVersions(ctx context.Context, tool string, platform Platform) ([]VersionInfo, error)
func (*DotnetBackend) Name ¶
func (b *DotnetBackend) Name() string
func (*DotnetBackend) ResolveVersion ¶
func (b *DotnetBackend) ResolveVersion(ctx context.Context, tool string, versionRequest string, platform Platform) (*VersionInfo, error)
func (*DotnetBackend) SupportsChecksum ¶
func (b *DotnetBackend) SupportsChecksum() bool
func (*DotnetBackend) SupportsGPG ¶
func (b *DotnetBackend) SupportsGPG() bool
func (*DotnetBackend) SupportsOffline ¶
func (b *DotnetBackend) SupportsOffline() bool
type ForgejoBackend ¶
type ForgejoBackend struct {
// contains filtered or unexported fields
}
ForgejoBackend implements the Backend interface using GenericReleaseManager.
func NewForgejoBackend ¶
func NewForgejoBackend() *ForgejoBackend
NewForgejoBackend creates a new Forgejo backend.
func (*ForgejoBackend) AttestationType ¶
func (b *ForgejoBackend) AttestationType() string
func (*ForgejoBackend) Dependencies ¶
func (b *ForgejoBackend) Dependencies() []string
func (*ForgejoBackend) FetchReleaseByTag ¶
func (b *ForgejoBackend) FetchReleaseByTag(ctx context.Context, tool string, tag string) (*CommonRelease, error)
FetchReleaseByTag implements HostingProvider.
func (*ForgejoBackend) FetchReleases ¶
func (b *ForgejoBackend) FetchReleases(ctx context.Context, tool string) ([]CommonRelease, error)
FetchReleases implements HostingProvider.
func (*ForgejoBackend) GetAttestationType ¶
func (b *ForgejoBackend) GetAttestationType() string
func (*ForgejoBackend) GetClient ¶
func (b *ForgejoBackend) GetClient() *http.Client
func (*ForgejoBackend) GetDownloadInfo ¶
func (b *ForgejoBackend) GetDownloadInfo(ctx context.Context, tool string, version string, platform Platform) (*VersionInfo, error)
func (*ForgejoBackend) GetReach ¶
func (b *ForgejoBackend) GetReach() string
func (*ForgejoBackend) IsRecommended ¶
func (b *ForgejoBackend) IsRecommended() bool
func (*ForgejoBackend) IsScriptless ¶
func (b *ForgejoBackend) IsScriptless() bool
func (*ForgejoBackend) IsStable ¶
func (b *ForgejoBackend) IsStable() bool
func (*ForgejoBackend) ListVersions ¶
func (b *ForgejoBackend) ListVersions(ctx context.Context, tool string, platform Platform) ([]VersionInfo, error)
func (*ForgejoBackend) Name ¶
func (b *ForgejoBackend) Name() string
func (*ForgejoBackend) ResolveVersion ¶
func (b *ForgejoBackend) ResolveVersion(ctx context.Context, tool string, versionRequest string, platform Platform) (*VersionInfo, error)
func (*ForgejoBackend) SupportsChecksum ¶
func (b *ForgejoBackend) SupportsChecksum() bool
func (*ForgejoBackend) SupportsGPG ¶
func (b *ForgejoBackend) SupportsGPG() bool
func (*ForgejoBackend) SupportsOffline ¶
func (b *ForgejoBackend) SupportsOffline() bool
type GemBackend ¶
type GemBackend struct {
// contains filtered or unexported fields
}
GemBackend implements the Backend interface for RubyGems.
func (*GemBackend) AttestationType ¶
func (b *GemBackend) AttestationType() string
func (*GemBackend) Dependencies ¶
func (b *GemBackend) Dependencies() []string
func (*GemBackend) GetDownloadInfo ¶
func (b *GemBackend) GetDownloadInfo(ctx context.Context, tool string, version string, platform Platform) (*VersionInfo, error)
func (*GemBackend) GetReach ¶
func (b *GemBackend) GetReach() string
func (*GemBackend) IsRecommended ¶
func (b *GemBackend) IsRecommended() bool
func (*GemBackend) IsScriptless ¶
func (b *GemBackend) IsScriptless() bool
func (*GemBackend) IsStable ¶
func (b *GemBackend) IsStable() bool
func (*GemBackend) ListVersions ¶
func (b *GemBackend) ListVersions(ctx context.Context, tool string, platform Platform) ([]VersionInfo, error)
func (*GemBackend) Name ¶
func (b *GemBackend) Name() string
func (*GemBackend) ResolveVersion ¶
func (b *GemBackend) ResolveVersion(ctx context.Context, tool string, versionRequest string, platform Platform) (*VersionInfo, error)
func (*GemBackend) SupportsChecksum ¶
func (b *GemBackend) SupportsChecksum() bool
func (*GemBackend) SupportsGPG ¶
func (b *GemBackend) SupportsGPG() bool
func (*GemBackend) SupportsOffline ¶
func (b *GemBackend) SupportsOffline() bool
type GitHubBackend ¶
type GitHubBackend struct {
// contains filtered or unexported fields
}
GitHubBackend implements the Backend interface using GenericReleaseManager.
func NewGitHubBackend ¶
func NewGitHubBackend() *GitHubBackend
NewGitHubBackend creates a new GitHub backend.
func (*GitHubBackend) AttestationType ¶
func (g *GitHubBackend) AttestationType() string
func (*GitHubBackend) Dependencies ¶
func (b *GitHubBackend) Dependencies() []string
func (*GitHubBackend) FetchReleaseByTag ¶
func (g *GitHubBackend) FetchReleaseByTag(ctx context.Context, tool string, tag string) (*CommonRelease, error)
FetchReleaseByTag implements HostingProvider.
func (*GitHubBackend) FetchReleases ¶
func (g *GitHubBackend) FetchReleases(ctx context.Context, tool string) ([]CommonRelease, error)
FetchReleases implements HostingProvider.
func (*GitHubBackend) GetAttestationType ¶
func (g *GitHubBackend) GetAttestationType() string
func (*GitHubBackend) GetClient ¶
func (g *GitHubBackend) GetClient() *http.Client
func (*GitHubBackend) GetDownloadInfo ¶
func (g *GitHubBackend) GetDownloadInfo(ctx context.Context, tool string, version string, platform Platform) (*VersionInfo, error)
func (*GitHubBackend) GetReach ¶
func (g *GitHubBackend) GetReach() string
func (*GitHubBackend) IsRecommended ¶
func (g *GitHubBackend) IsRecommended() bool
func (*GitHubBackend) IsScriptless ¶
func (g *GitHubBackend) IsScriptless() bool
func (*GitHubBackend) IsStable ¶
func (g *GitHubBackend) IsStable() bool
func (*GitHubBackend) ListVersions ¶
func (g *GitHubBackend) ListVersions(ctx context.Context, tool string, platform Platform) ([]VersionInfo, error)
ListVersions returns all available versions from GitHub Releases.
func (*GitHubBackend) Name ¶
func (g *GitHubBackend) Name() string
func (*GitHubBackend) ResolveVersion ¶
func (g *GitHubBackend) ResolveVersion(ctx context.Context, tool string, versionRequest string, platform Platform) (*VersionInfo, error)
func (*GitHubBackend) SupportsChecksum ¶
func (g *GitHubBackend) SupportsChecksum() bool
func (*GitHubBackend) SupportsGPG ¶
func (g *GitHubBackend) SupportsGPG() bool
func (*GitHubBackend) SupportsOffline ¶
func (g *GitHubBackend) SupportsOffline() bool
type GitlabBackend ¶
type GitlabBackend struct {
// contains filtered or unexported fields
}
GitlabBackend implements the Backend interface using GenericReleaseManager.
func NewGitlabBackend ¶
func NewGitlabBackend() *GitlabBackend
NewGitlabBackend creates a new GitLab backend.
func (*GitlabBackend) AttestationType ¶
func (b *GitlabBackend) AttestationType() string
func (*GitlabBackend) Dependencies ¶
func (b *GitlabBackend) Dependencies() []string
func (*GitlabBackend) FetchReleaseByTag ¶
func (b *GitlabBackend) FetchReleaseByTag(ctx context.Context, tool string, tag string) (*CommonRelease, error)
FetchReleaseByTag implements HostingProvider.
func (*GitlabBackend) FetchReleases ¶
func (b *GitlabBackend) FetchReleases(ctx context.Context, tool string) ([]CommonRelease, error)
FetchReleases implements HostingProvider.
func (*GitlabBackend) GetAttestationType ¶
func (b *GitlabBackend) GetAttestationType() string
func (*GitlabBackend) GetClient ¶
func (b *GitlabBackend) GetClient() *http.Client
func (*GitlabBackend) GetDownloadInfo ¶
func (b *GitlabBackend) GetDownloadInfo(ctx context.Context, tool string, version string, platform Platform) (*VersionInfo, error)
func (*GitlabBackend) GetReach ¶
func (b *GitlabBackend) GetReach() string
func (*GitlabBackend) IsRecommended ¶
func (b *GitlabBackend) IsRecommended() bool
func (*GitlabBackend) IsScriptless ¶
func (b *GitlabBackend) IsScriptless() bool
func (*GitlabBackend) IsStable ¶
func (b *GitlabBackend) IsStable() bool
func (*GitlabBackend) ListVersions ¶
func (b *GitlabBackend) ListVersions(ctx context.Context, tool string, platform Platform) ([]VersionInfo, error)
func (*GitlabBackend) Name ¶
func (b *GitlabBackend) Name() string
func (*GitlabBackend) ResolveVersion ¶
func (b *GitlabBackend) ResolveVersion(ctx context.Context, tool string, versionRequest string, platform Platform) (*VersionInfo, error)
func (*GitlabBackend) SupportsChecksum ¶
func (b *GitlabBackend) SupportsChecksum() bool
func (*GitlabBackend) SupportsGPG ¶
func (b *GitlabBackend) SupportsGPG() bool
func (*GitlabBackend) SupportsOffline ¶
func (b *GitlabBackend) SupportsOffline() bool
type GoBackend ¶
type GoBackend struct {
// contains filtered or unexported fields
}
func NewGoBackend ¶
func NewGoBackend() *GoBackend
func (*GoBackend) AttestationType ¶
func (*GoBackend) Dependencies ¶
func (*GoBackend) GetDownloadInfo ¶
func (*GoBackend) IsRecommended ¶
func (*GoBackend) IsScriptless ¶
func (*GoBackend) ListVersions ¶
func (*GoBackend) ResolveVersion ¶
func (*GoBackend) SupportsChecksum ¶
func (*GoBackend) SupportsGPG ¶
func (*GoBackend) SupportsOffline ¶
type GoPkgBackend ¶ added in v0.0.9
type GoPkgBackend struct {
*GoBackend
}
GoPkgBackend implements the backend for go packages. It embeds GoBackend to reuse its version resolution logic (proxy.golang.org).
func NewGoPkgBackend ¶ added in v0.0.9
func NewGoPkgBackend() *GoPkgBackend
func (*GoPkgBackend) Name ¶ added in v0.0.9
func (b *GoPkgBackend) Name() string
type HTTPBackend ¶
type HTTPBackend struct {
// contains filtered or unexported fields
}
HTTPBackend implements the Backend interface for direct HTTP downloads. This backend supports URL templates with placeholders for version, OS, and architecture.
func (*HTTPBackend) AttestationType ¶
func (h *HTTPBackend) AttestationType() string
func (*HTTPBackend) Dependencies ¶
func (h *HTTPBackend) Dependencies() []string
func (*HTTPBackend) GetDownloadInfo ¶
func (h *HTTPBackend) GetDownloadInfo(ctx context.Context, tool string, version string, platform Platform) (*VersionInfo, error)
GetDownloadInfo retrieves download information for a specific version. This constructs the download URL from the configured template.
func (*HTTPBackend) GetDownloadInfoWithConfig ¶
func (h *HTTPBackend) GetDownloadInfoWithConfig(ctx context.Context, tool string, version string, platform Platform, config HTTPConfig) (*VersionInfo, error)
GetDownloadInfoWithConfig retrieves download information using explicit configuration.
func (*HTTPBackend) GetReach ¶
func (h *HTTPBackend) GetReach() string
func (*HTTPBackend) IsRecommended ¶
func (h *HTTPBackend) IsRecommended() bool
func (*HTTPBackend) IsScriptless ¶
func (h *HTTPBackend) IsScriptless() bool
func (*HTTPBackend) IsStable ¶
func (h *HTTPBackend) IsStable() bool
func (*HTTPBackend) ListVersions ¶
func (h *HTTPBackend) ListVersions(ctx context.Context, tool string, platform Platform) ([]VersionInfo, error)
ListVersions returns all available versions for an HTTP backend tool. Note: HTTP backend requires versions to be explicitly configured.
func (*HTTPBackend) ResolveVersion ¶
func (h *HTTPBackend) ResolveVersion(ctx context.Context, tool string, versionRequest string, platform Platform) (*VersionInfo, error)
ResolveVersion resolves a version request to a concrete version.
func (*HTTPBackend) SupportsChecksum ¶
func (h *HTTPBackend) SupportsChecksum() bool
SupportsChecksum indicates whether this backend provides checksums.
func (*HTTPBackend) SupportsGPG ¶
func (h *HTTPBackend) SupportsGPG() bool
SupportsGPG indicates whether this backend supports GPG signatures.
func (*HTTPBackend) SupportsOffline ¶
func (h *HTTPBackend) SupportsOffline() bool
type HTTPConfig ¶
type HTTPConfig struct {
URLTemplate string // URL template with placeholders (e.g., "https://example.com/{{.version}}/{{.os}}-{{.arch}}.tar.gz")
Versions []string // List of available versions
ChecksumTemplate string // Optional checksum URL template
Replacements map[string]string // Custom placeholder replacements
}
HTTPConfig represents the configuration for an HTTP backend tool. This should be provided in the tool configuration.
type HostingProvider ¶
type HostingProvider interface {
Name() string
FetchReleases(ctx context.Context, tool string) ([]CommonRelease, error)
FetchReleaseByTag(ctx context.Context, tool string, tag string) (*CommonRelease, error)
GetAttestationType() string
GetClient() *http.Client
}
HostingProvider defines the interface for fetching data from a hosting platform (GitHub, GitLab, etc.).
type LuarocksBackend ¶
type LuarocksBackend struct {
// contains filtered or unexported fields
}
func NewLuarocksBackend ¶
func NewLuarocksBackend() *LuarocksBackend
func (*LuarocksBackend) AttestationType ¶
func (b *LuarocksBackend) AttestationType() string
func (*LuarocksBackend) Dependencies ¶
func (b *LuarocksBackend) Dependencies() []string
func (*LuarocksBackend) GetDownloadInfo ¶
func (b *LuarocksBackend) GetDownloadInfo(ctx context.Context, tool string, version string, platform Platform) (*VersionInfo, error)
func (*LuarocksBackend) GetReach ¶
func (b *LuarocksBackend) GetReach() string
func (*LuarocksBackend) IsRecommended ¶
func (b *LuarocksBackend) IsRecommended() bool
func (*LuarocksBackend) IsScriptless ¶
func (b *LuarocksBackend) IsScriptless() bool
func (*LuarocksBackend) IsStable ¶
func (b *LuarocksBackend) IsStable() bool
func (*LuarocksBackend) ListVersions ¶
func (b *LuarocksBackend) ListVersions(ctx context.Context, tool string, platform Platform) ([]VersionInfo, error)
func (*LuarocksBackend) Name ¶
func (b *LuarocksBackend) Name() string
func (*LuarocksBackend) ResolveVersion ¶
func (b *LuarocksBackend) ResolveVersion(ctx context.Context, tool string, versionRequest string, platform Platform) (*VersionInfo, error)
func (*LuarocksBackend) SupportsChecksum ¶
func (b *LuarocksBackend) SupportsChecksum() bool
func (*LuarocksBackend) SupportsGPG ¶
func (b *LuarocksBackend) SupportsGPG() bool
func (*LuarocksBackend) SupportsOffline ¶
func (b *LuarocksBackend) SupportsOffline() bool
type MavenBackend ¶
type MavenBackend struct {
// contains filtered or unexported fields
}
func NewMavenBackend ¶
func NewMavenBackend() *MavenBackend
func (*MavenBackend) AttestationType ¶
func (b *MavenBackend) AttestationType() string
func (*MavenBackend) Dependencies ¶
func (b *MavenBackend) Dependencies() []string
func (*MavenBackend) GetDownloadInfo ¶
func (b *MavenBackend) GetDownloadInfo(ctx context.Context, tool string, version string, platform Platform) (*VersionInfo, error)
func (*MavenBackend) GetReach ¶
func (b *MavenBackend) GetReach() string
func (*MavenBackend) IsRecommended ¶
func (b *MavenBackend) IsRecommended() bool
func (*MavenBackend) IsScriptless ¶
func (b *MavenBackend) IsScriptless() bool
func (*MavenBackend) IsStable ¶
func (b *MavenBackend) IsStable() bool
func (*MavenBackend) ListVersions ¶
func (b *MavenBackend) ListVersions(ctx context.Context, tool string, platform Platform) ([]VersionInfo, error)
func (*MavenBackend) Name ¶
func (b *MavenBackend) Name() string
func (*MavenBackend) ResolveVersion ¶
func (b *MavenBackend) ResolveVersion(ctx context.Context, tool string, versionRequest string, platform Platform) (*VersionInfo, error)
func (*MavenBackend) SupportsChecksum ¶
func (b *MavenBackend) SupportsChecksum() bool
func (*MavenBackend) SupportsGPG ¶
func (b *MavenBackend) SupportsGPG() bool
func (*MavenBackend) SupportsOffline ¶
func (b *MavenBackend) SupportsOffline() bool
type NativeBackend ¶
type NativeBackend struct {
// contains filtered or unexported fields
}
NativeBackend implements the Backend interface using built-in native recipes.
func NewNativeBackend ¶
func NewNativeBackend() *NativeBackend
func (*NativeBackend) AttestationType ¶
func (b *NativeBackend) AttestationType() string
func (*NativeBackend) Dependencies ¶
func (b *NativeBackend) Dependencies() []string
func (*NativeBackend) GetDownloadInfo ¶
func (b *NativeBackend) GetDownloadInfo(ctx context.Context, tool, version string, platform Platform) (*VersionInfo, error)
func (*NativeBackend) GetReach ¶
func (b *NativeBackend) GetReach() string
func (*NativeBackend) IsRecommended ¶
func (b *NativeBackend) IsRecommended() bool
func (*NativeBackend) IsScriptless ¶
func (b *NativeBackend) IsScriptless() bool
func (*NativeBackend) IsStable ¶
func (b *NativeBackend) IsStable() bool
func (*NativeBackend) ListVersions ¶
func (b *NativeBackend) ListVersions(ctx context.Context, tool string, platform Platform) ([]VersionInfo, error)
func (*NativeBackend) Name ¶
func (b *NativeBackend) Name() string
func (*NativeBackend) ResolveVersion ¶
func (b *NativeBackend) ResolveVersion(ctx context.Context, tool string, versionRequest string, platform Platform) (*VersionInfo, error)
func (*NativeBackend) SupportsChecksum ¶
func (b *NativeBackend) SupportsChecksum() bool
func (*NativeBackend) SupportsGPG ¶
func (b *NativeBackend) SupportsGPG() bool
func (*NativeBackend) SupportsOffline ¶
func (b *NativeBackend) SupportsOffline() bool
type NpmBackend ¶
type NpmBackend struct {
// contains filtered or unexported fields
}
NpmBackend implements the Backend interface for npm packages.
func (*NpmBackend) AttestationType ¶
func (b *NpmBackend) AttestationType() string
func (*NpmBackend) Dependencies ¶
func (b *NpmBackend) Dependencies() []string
func (*NpmBackend) GetDownloadInfo ¶
func (b *NpmBackend) GetDownloadInfo(ctx context.Context, tool string, version string, platform Platform) (*VersionInfo, error)
func (*NpmBackend) GetReach ¶
func (b *NpmBackend) GetReach() string
func (*NpmBackend) IsRecommended ¶
func (b *NpmBackend) IsRecommended() bool
func (*NpmBackend) IsScriptless ¶
func (b *NpmBackend) IsScriptless() bool
func (*NpmBackend) IsStable ¶
func (b *NpmBackend) IsStable() bool
func (*NpmBackend) ListVersions ¶
func (b *NpmBackend) ListVersions(ctx context.Context, tool string, platform Platform) ([]VersionInfo, error)
func (*NpmBackend) Name ¶
func (b *NpmBackend) Name() string
func (*NpmBackend) ResolveVersion ¶
func (b *NpmBackend) ResolveVersion(ctx context.Context, tool string, versionRequest string, platform Platform) (*VersionInfo, error)
func (*NpmBackend) SupportsChecksum ¶
func (b *NpmBackend) SupportsChecksum() bool
func (*NpmBackend) SupportsGPG ¶
func (b *NpmBackend) SupportsGPG() bool
func (*NpmBackend) SupportsOffline ¶
func (b *NpmBackend) SupportsOffline() bool
type PipxBackend ¶
type PipxBackend struct {
// contains filtered or unexported fields
}
PipxBackend implements the Backend interface for pipx packages. It leverages the PyPI backend for version resolution as pipx packages are hosted on PyPI.
func (*PipxBackend) AttestationType ¶
func (b *PipxBackend) AttestationType() string
func (*PipxBackend) Dependencies ¶
func (b *PipxBackend) Dependencies() []string
func (*PipxBackend) GetDownloadInfo ¶
func (b *PipxBackend) GetDownloadInfo(ctx context.Context, tool string, version string, platform Platform) (*VersionInfo, error)
func (*PipxBackend) GetReach ¶
func (b *PipxBackend) GetReach() string
func (*PipxBackend) IsRecommended ¶
func (b *PipxBackend) IsRecommended() bool
func (*PipxBackend) IsScriptless ¶
func (b *PipxBackend) IsScriptless() bool
func (*PipxBackend) IsStable ¶
func (b *PipxBackend) IsStable() bool
func (*PipxBackend) ListVersions ¶
func (b *PipxBackend) ListVersions(ctx context.Context, tool string, platform Platform) ([]VersionInfo, error)
func (*PipxBackend) Name ¶
func (b *PipxBackend) Name() string
func (*PipxBackend) ResolveVersion ¶
func (b *PipxBackend) ResolveVersion(ctx context.Context, tool string, versionRequest string, platform Platform) (*VersionInfo, error)
func (*PipxBackend) SupportsChecksum ¶
func (b *PipxBackend) SupportsChecksum() bool
func (*PipxBackend) SupportsGPG ¶
func (b *PipxBackend) SupportsGPG() bool
func (*PipxBackend) SupportsOffline ¶
func (b *PipxBackend) SupportsOffline() bool
type Platform ¶
type Platform struct {
OS string // e.g., "linux", "darwin", "windows"
Arch string // e.g., "amd64", "arm64", "386"
}
Platform represents the operating system and architecture information.
func CurrentPlatform ¶
func CurrentPlatform() Platform
CurrentPlatform returns the platform information for the current system.
type ProvenanceResult ¶
type ProvenanceResult struct {
// Supported is false when the project publishes no attestations.
Supported bool
// Verified is true when the attestation bundle passed all checks.
Verified bool
// Repository is the source repository recorded in the Fulcio cert SAN.
Repository string
// WorkflowRef is the triggering workflow path recorded in the cert.
WorkflowRef string
// PredicateType is the in-toto predicate URI in the signed statement.
PredicateType string
// BuilderID is the SLSA builder identifier from the certificate extension.
BuilderID string
}
ProvenanceResult represents the metadata extracted from a verified provenance bundle.
func VerifyArtifactProvenance ¶
func VerifyArtifactProvenance( ctx context.Context, token, owner, repo, artifactPath string, ) (*ProvenanceResult, error)
VerifyArtifactProvenance checks the GitHub attestation for the artifact at artifactPath against the repository owner/repo.
func VerifyGitlabArtifactProvenance ¶
func VerifyGitlabArtifactProvenance( ctx context.Context, token, owner, repo, artifactPath string, ) (*ProvenanceResult, error)
VerifyGitlabArtifactProvenance checks the GitLab attestation for the artifact at artifactPath against the repository owner/repo.
type PypiBackend ¶
type PypiBackend struct {
// contains filtered or unexported fields
}
PypiBackend implements the Backend interface for PyPI packages.
func (*PypiBackend) AttestationType ¶
func (b *PypiBackend) AttestationType() string
func (*PypiBackend) Dependencies ¶
func (b *PypiBackend) Dependencies() []string
func (*PypiBackend) GetDownloadInfo ¶
func (b *PypiBackend) GetDownloadInfo(ctx context.Context, tool string, version string, platform Platform) (*VersionInfo, error)
func (*PypiBackend) GetReach ¶
func (b *PypiBackend) GetReach() string
func (*PypiBackend) IsRecommended ¶
func (b *PypiBackend) IsRecommended() bool
func (*PypiBackend) IsScriptless ¶
func (b *PypiBackend) IsScriptless() bool
func (*PypiBackend) IsStable ¶
func (b *PypiBackend) IsStable() bool
func (*PypiBackend) ListVersions ¶
func (b *PypiBackend) ListVersions(ctx context.Context, tool string, platform Platform) ([]VersionInfo, error)
func (*PypiBackend) Name ¶
func (b *PypiBackend) Name() string
func (*PypiBackend) ResolveVersion ¶
func (b *PypiBackend) ResolveVersion(ctx context.Context, tool string, versionRequest string, platform Platform) (*VersionInfo, error)
func (*PypiBackend) SupportsChecksum ¶
func (b *PypiBackend) SupportsChecksum() bool
func (*PypiBackend) SupportsGPG ¶
func (b *PypiBackend) SupportsGPG() bool
func (*PypiBackend) SupportsOffline ¶
func (b *PypiBackend) SupportsOffline() bool
type Registry ¶
type Registry struct {
// contains filtered or unexported fields
}
Registry manages backend implementations and provides discovery by name.
func NewRegistry ¶
func NewRegistry() *Registry
NewRegistry creates a new backend registry with default backends registered.
func (*Registry) Get ¶
Get retrieves a backend by name. Returns an error if the backend is not found.
func (*Registry) Register ¶
Register registers a backend in the registry. If a backend with the same name already exists, it will be replaced.
func (*Registry) Unregister ¶
Unregister removes a backend from the registry.
type S3Backend ¶
type S3Backend struct {
// contains filtered or unexported fields
}
S3Backend implements the Backend interface for Amazon S3 buckets.
func (*S3Backend) AttestationType ¶
func (*S3Backend) Dependencies ¶
func (*S3Backend) GetDownloadInfo ¶
func (*S3Backend) IsRecommended ¶
func (*S3Backend) IsScriptless ¶
func (*S3Backend) ListVersions ¶
func (*S3Backend) ResolveVersion ¶
func (*S3Backend) SupportsChecksum ¶
func (*S3Backend) SupportsGPG ¶
func (*S3Backend) SupportsOffline ¶
type SigstoreVerifier ¶
type SigstoreVerifier struct {
TrustedMaterials []root.TrustedMaterial
Identities []verify.CertificateIdentity
ExpectedRepo string
}
SigstoreVerifier acts as the common orchestration engine for verifying Sigstore bundles across different platforms (GitHub, GitLab, etc.)
func (*SigstoreVerifier) VerifyBundles ¶
func (v *SigstoreVerifier) VerifyBundles(bundles []json.RawMessage, artifactDigest string) (*ProvenanceResult, error)
VerifyBundles attempts to verify a list of bundles against the provided identities and trust roots. It returns the first successful verification result.
type SpmBackend ¶
type SpmBackend struct {
}
SpmBackend implements the Backend interface for Swift Package Manager.
func (*SpmBackend) AttestationType ¶
func (b *SpmBackend) AttestationType() string
func (*SpmBackend) Dependencies ¶
func (b *SpmBackend) Dependencies() []string
func (*SpmBackend) GetDownloadInfo ¶
func (b *SpmBackend) GetDownloadInfo(ctx context.Context, tool string, version string, platform Platform) (*VersionInfo, error)
func (*SpmBackend) GetReach ¶
func (b *SpmBackend) GetReach() string
func (*SpmBackend) IsRecommended ¶
func (b *SpmBackend) IsRecommended() bool
func (*SpmBackend) IsScriptless ¶
func (b *SpmBackend) IsScriptless() bool
func (*SpmBackend) IsStable ¶
func (b *SpmBackend) IsStable() bool
func (*SpmBackend) ListVersions ¶
func (b *SpmBackend) ListVersions(ctx context.Context, tool string, platform Platform) ([]VersionInfo, error)
func (*SpmBackend) Name ¶
func (b *SpmBackend) Name() string
func (*SpmBackend) ResolveVersion ¶
func (b *SpmBackend) ResolveVersion(ctx context.Context, tool string, versionRequest string, platform Platform) (*VersionInfo, error)
func (*SpmBackend) SupportsChecksum ¶
func (b *SpmBackend) SupportsChecksum() bool
func (*SpmBackend) SupportsGPG ¶
func (b *SpmBackend) SupportsGPG() bool
func (*SpmBackend) SupportsOffline ¶
func (b *SpmBackend) SupportsOffline() bool
type VersionInfo ¶
type VersionInfo struct {
Version string // The version string (e.g., "1.20.0")
DownloadURL string // URL to download the artifact
Checksum string // SHA-256 checksum of the artifact
SignatureURL string // URL to download the GPG signature (.asc, .sig)
GPGSignature string // Raw GPG signature content
GPGKeys []string // Trusted GPG fingerprints for this version
Platform Platform // Target platform for this artifact
Metadata map[string]string // Additional metadata (e.g., release date, notes)
PublishedAt time.Time // The time this version was published/released
}
VersionInfo contains metadata about a specific tool version.
func GenericGetDownloadInfo ¶
func GenericGetDownloadInfo(ctx context.Context, p HostingProvider, tool string, version string, platform Platform) (*VersionInfo, error)
GenericGetDownloadInfo implements the common logic for retrieving download info.
func GenericResolveVersion ¶
func GenericResolveVersion(ctx context.Context, p HostingProvider, tool string, versionRequest string, platform Platform) (*VersionInfo, error)
GenericResolveVersion implements the common logic for resolving a version request.
type VfoxBackend ¶
type VfoxBackend struct {
}
VfoxBackend implements the Backend interface for vfox plugins.
func (*VfoxBackend) AttestationType ¶
func (b *VfoxBackend) AttestationType() string
func (*VfoxBackend) Dependencies ¶
func (b *VfoxBackend) Dependencies() []string
func (*VfoxBackend) GetDownloadInfo ¶
func (b *VfoxBackend) GetDownloadInfo(ctx context.Context, tool string, version string, platform Platform) (*VersionInfo, error)
func (*VfoxBackend) GetReach ¶
func (b *VfoxBackend) GetReach() string
func (*VfoxBackend) IsRecommended ¶
func (b *VfoxBackend) IsRecommended() bool
func (*VfoxBackend) IsScriptless ¶
func (b *VfoxBackend) IsScriptless() bool
func (*VfoxBackend) IsStable ¶
func (b *VfoxBackend) IsStable() bool
func (*VfoxBackend) ListVersions ¶
func (b *VfoxBackend) ListVersions(ctx context.Context, tool string, platform Platform) ([]VersionInfo, error)
func (*VfoxBackend) Name ¶
func (b *VfoxBackend) Name() string
func (*VfoxBackend) ResolveVersion ¶
func (b *VfoxBackend) ResolveVersion(ctx context.Context, tool string, versionRequest string, platform Platform) (*VersionInfo, error)
func (*VfoxBackend) SupportsChecksum ¶
func (b *VfoxBackend) SupportsChecksum() bool
func (*VfoxBackend) SupportsGPG ¶
func (b *VfoxBackend) SupportsGPG() bool
func (*VfoxBackend) SupportsOffline ¶
func (b *VfoxBackend) SupportsOffline() bool
type ZigBackend ¶
type ZigBackend struct {
// contains filtered or unexported fields
}
func NewZigBackend ¶
func NewZigBackend() *ZigBackend
func (*ZigBackend) AttestationType ¶
func (b *ZigBackend) AttestationType() string
func (*ZigBackend) Dependencies ¶
func (b *ZigBackend) Dependencies() []string
func (*ZigBackend) GetDownloadInfo ¶
func (b *ZigBackend) GetDownloadInfo(ctx context.Context, tool string, version string, platform Platform) (*VersionInfo, error)
func (*ZigBackend) GetReach ¶
func (b *ZigBackend) GetReach() string
func (*ZigBackend) IsRecommended ¶
func (b *ZigBackend) IsRecommended() bool
func (*ZigBackend) IsScriptless ¶
func (b *ZigBackend) IsScriptless() bool
func (*ZigBackend) IsStable ¶
func (b *ZigBackend) IsStable() bool
func (*ZigBackend) ListVersions ¶
func (b *ZigBackend) ListVersions(ctx context.Context, tool string, platform Platform) ([]VersionInfo, error)
func (*ZigBackend) Name ¶
func (b *ZigBackend) Name() string
func (*ZigBackend) ResolveVersion ¶
func (b *ZigBackend) ResolveVersion(ctx context.Context, tool string, versionRequest string, platform Platform) (*VersionInfo, error)
func (*ZigBackend) SupportsChecksum ¶
func (b *ZigBackend) SupportsChecksum() bool
func (*ZigBackend) SupportsGPG ¶
func (b *ZigBackend) SupportsGPG() bool
func (*ZigBackend) SupportsOffline ¶
func (b *ZigBackend) SupportsOffline() bool
Source Files
¶
- aqua.go
- asdf.go
- backend.go
- cabal.go
- cargo.go
- common.go
- composer.go
- conda.go
- container.go
- cran.go
- deno.go
- dotnet.go
- forgejo.go
- gem.go
- github.go
- github_provenance.go
- github_token.go
- github_tuf_root.go
- gitlab.go
- gitlab_provenance.go
- go.go
- go_pkg.go
- http.go
- luarocks.go
- maven.go
- native.go
- npm.go
- pipx.go
- provenance.go
- pypi.go
- registry.go
- s3.go
- spm.go
- vfox.go
- zig.go