Documentation ¶
Index ¶
- Constants
- type Alias
- type Checksum
- type ChecksumPattern
- type Config
- type Cosign
- type DownloadedFile
- type File
- type FormatOverride
- type Override
- type PackageInfo
- func (pkgInfo *PackageInfo) CheckSupported(rt *runtime.Runtime, env string) (bool, error)
- func (pkgInfo *PackageInfo) CheckSupportedEnvs(goos, goarch, env string) bool
- func (pkgInfo *PackageInfo) Copy() *PackageInfo
- func (pkgInfo *PackageInfo) GetAsset() *string
- func (pkgInfo *PackageInfo) GetChecksumReplacements() Replacements
- func (pkgInfo *PackageInfo) GetDescription() string
- func (pkgInfo *PackageInfo) GetFiles() []*File
- func (pkgInfo *PackageInfo) GetFormat() string
- func (pkgInfo *PackageInfo) GetLink() string
- func (pkgInfo *PackageInfo) GetName() string
- func (pkgInfo *PackageInfo) GetPath() string
- func (pkgInfo *PackageInfo) GetReplacements() Replacements
- func (pkgInfo *PackageInfo) GetRosetta2() bool
- func (pkgInfo *PackageInfo) GetType() string
- func (pkgInfo *PackageInfo) GetVersionPrefix() string
- func (pkgInfo *PackageInfo) HasRepo() bool
- func (pkgInfo *PackageInfo) Override(v string, rt *runtime.Runtime) (*PackageInfo, error)
- func (pkgInfo *PackageInfo) OverrideByRuntime(rt *runtime.Runtime)
- func (pkgInfo *PackageInfo) SLSASourceURI() string
- func (pkgInfo *PackageInfo) SetVersion(v string) (*PackageInfo, error)
- func (pkgInfo *PackageInfo) Validate() error
- type PackageInfos
- type Replacements
- type SLSAProvenance
- type SupportedEnvs
- type VersionOverride
Constants ¶
View Source
const ( PkgInfoTypeGitHubRelease = "github_release" PkgInfoTypeGitHubContent = "github_content" PkgInfoTypeGitHubArchive = "github_archive" PkgInfoTypeHTTP = "http" PkgInfoTypeGo = "go" PkgInfoTypeGoInstall = "go_install" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Checksum ¶ added in v1.18.0
type Checksum struct { Type string `json:"type,omitempty" jsonschema:"enum=github_release,enum=http"` Asset string `json:"asset,omitempty"` URL string `json:"url,omitempty"` FileFormat string `yaml:"file_format,omitempty" json:"file_format,omitempty"` Algorithm string `json:"algorithm,omitempty" jsonschema:"enum=md5,enum=sha1,enum=sha256,enum=sha512"` Pattern *ChecksumPattern `json:"pattern,omitempty"` Enabled *bool `json:"enabled,omitempty"` Replacements Replacements `json:"replacements,omitempty"` Cosign *Cosign `json:"cosign,omitempty"` }
func (*Checksum) GetAlgorithm ¶ added in v1.19.3
func (*Checksum) GetEnabled ¶ added in v1.19.3
func (*Checksum) GetReplacements ¶ added in v1.19.3
func (chk *Checksum) GetReplacements() Replacements
type ChecksumPattern ¶ added in v1.18.0
type Config ¶
type Config struct {
PackageInfos PackageInfos `yaml:"packages" validate:"dive" json:"packages"`
}
type Cosign ¶ added in v1.26.0
type Cosign struct { Enabled *bool `json:"enabled,omitempty"` CosignExperimental bool `yaml:"cosign_experimental" json:"cosign_experimental,omitempty"` Opts []string `json:"opts,omitempty"` Signature *DownloadedFile `json:"signature,omitempty"` Certificate *DownloadedFile `json:"certificate,omitempty"` Key *DownloadedFile `json:"key,omitempty"` }
func (*Cosign) GetEnabled ¶ added in v1.26.0
type DownloadedFile ¶ added in v1.26.0
type DownloadedFile struct { Type string `validate:"required" json:"type" jsonschema:"enum=github_release,enum=http"` RepoOwner string `yaml:"repo_owner,omitempty" json:"repo_owner,omitempty"` RepoName string `yaml:"repo_name,omitempty" json:"repo_name,omitempty"` Asset *string `json:"asset,omitempty" yaml:",omitempty"` URL *string `json:"url,omitempty" yaml:",omitempty"` }
type FormatOverride ¶
type Override ¶
type Override struct { GOOS string `` /* 209-byte string literal not displayed */ GOArch string `` /* 190-byte string literal not displayed */ Replacements Replacements `yaml:",omitempty" json:"replacements,omitempty"` Format string `yaml:",omitempty" json:"format,omitempty" jsonschema:"example=tar.gz,example=raw,example=zip"` Asset *string `yaml:",omitempty" json:"asset,omitempty"` Files []*File `yaml:",omitempty" json:"files,omitempty"` URL *string `yaml:",omitempty" json:"url,omitempty"` CompleteWindowsExt *bool `json:"complete_windows_ext,omitempty" yaml:"complete_windows_ext,omitempty"` WindowsExt string `json:"windows_ext,omitempty" yaml:"windows_ext,omitempty"` Checksum *Checksum `json:"checksum,omitempty"` Type string `` /* 128-byte string literal not displayed */ Cosign *Cosign `json:"cosign,omitempty"` SLSAProvenance *SLSAProvenance `json:"slsa_provenance,omitempty" yaml:"slsa_provenance,omitempty"` }
type PackageInfo ¶
type PackageInfo struct { Name string `json:"name,omitempty" yaml:",omitempty"` Aliases []*Alias `yaml:",omitempty" json:"aliases,omitempty"` SearchWords []string `json:"search_words,omitempty" yaml:"search_words,omitempty"` Type string `` /* 138-byte string literal not displayed */ RepoOwner string `yaml:"repo_owner,omitempty" json:"repo_owner,omitempty"` RepoName string `yaml:"repo_name,omitempty" json:"repo_name,omitempty"` Description string `json:"description,omitempty" yaml:",omitempty"` Link string `json:"link,omitempty" yaml:",omitempty"` Asset *string `json:"asset,omitempty" yaml:",omitempty"` URL *string `json:"url,omitempty" yaml:",omitempty"` Path *string `json:"path,omitempty" yaml:",omitempty"` Format string `json:"format,omitempty" jsonschema:"example=tar.gz,example=raw,example=zip" yaml:",omitempty"` Overrides []*Override `json:"overrides,omitempty" yaml:",omitempty"` FormatOverrides []*FormatOverride `yaml:"format_overrides,omitempty" json:"format_overrides,omitempty"` Files []*File `json:"files,omitempty" yaml:",omitempty"` Replacements Replacements `json:"replacements,omitempty" yaml:",omitempty"` SupportedIf *string `yaml:"supported_if,omitempty" json:"supported_if,omitempty"` SupportedEnvs SupportedEnvs `yaml:"supported_envs,omitempty" json:"supported_envs,omitempty"` VersionFilter *string `yaml:"version_filter,omitempty" json:"version_filter,omitempty"` VersionPrefix *string `yaml:"version_prefix,omitempty" json:"version_prefix,omitempty"` Rosetta2 *bool `yaml:",omitempty" json:"rosetta2,omitempty"` VersionSource string `json:"version_source,omitempty" yaml:"version_source,omitempty" jsonschema:"enum=github_tag"` CompleteWindowsExt *bool `json:"complete_windows_ext,omitempty" yaml:"complete_windows_ext,omitempty"` WindowsExt string `json:"windows_ext,omitempty" yaml:"windows_ext,omitempty"` Checksum *Checksum `json:"checksum,omitempty"` Cosign *Cosign `json:"cosign,omitempty"` SLSAProvenance *SLSAProvenance `json:"slsa_provenance,omitempty" yaml:"slsa_provenance,omitempty"` Private bool `json:"private,omitempty"` VersionConstraints string `yaml:"version_constraint,omitempty" json:"version_constraint,omitempty"` VersionOverrides []*VersionOverride `yaml:"version_overrides,omitempty" json:"version_overrides,omitempty"` }
func (*PackageInfo) CheckSupported ¶ added in v1.12.0
func (*PackageInfo) CheckSupportedEnvs ¶ added in v1.12.0
func (pkgInfo *PackageInfo) CheckSupportedEnvs(goos, goarch, env string) bool
func (*PackageInfo) Copy ¶ added in v1.19.3
func (pkgInfo *PackageInfo) Copy() *PackageInfo
func (*PackageInfo) GetAsset ¶
func (pkgInfo *PackageInfo) GetAsset() *string
func (*PackageInfo) GetChecksumReplacements ¶ added in v1.19.3
func (pkgInfo *PackageInfo) GetChecksumReplacements() Replacements
func (*PackageInfo) GetDescription ¶
func (pkgInfo *PackageInfo) GetDescription() string
func (*PackageInfo) GetFiles ¶
func (pkgInfo *PackageInfo) GetFiles() []*File
func (*PackageInfo) GetFormat ¶
func (pkgInfo *PackageInfo) GetFormat() string
func (*PackageInfo) GetLink ¶
func (pkgInfo *PackageInfo) GetLink() string
func (*PackageInfo) GetName ¶
func (pkgInfo *PackageInfo) GetName() string
func (*PackageInfo) GetPath ¶
func (pkgInfo *PackageInfo) GetPath() string
func (*PackageInfo) GetReplacements ¶
func (pkgInfo *PackageInfo) GetReplacements() Replacements
func (*PackageInfo) GetRosetta2 ¶
func (pkgInfo *PackageInfo) GetRosetta2() bool
func (*PackageInfo) GetType ¶
func (pkgInfo *PackageInfo) GetType() string
func (*PackageInfo) GetVersionPrefix ¶ added in v1.31.0
func (pkgInfo *PackageInfo) GetVersionPrefix() string
func (*PackageInfo) HasRepo ¶
func (pkgInfo *PackageInfo) HasRepo() bool
func (*PackageInfo) Override ¶
func (pkgInfo *PackageInfo) Override(v string, rt *runtime.Runtime) (*PackageInfo, error)
func (*PackageInfo) OverrideByRuntime ¶ added in v1.19.3
func (pkgInfo *PackageInfo) OverrideByRuntime(rt *runtime.Runtime)
func (*PackageInfo) SLSASourceURI ¶ added in v1.26.0
func (pkgInfo *PackageInfo) SLSASourceURI() string
func (*PackageInfo) SetVersion ¶ added in v1.19.3
func (pkgInfo *PackageInfo) SetVersion(v string) (*PackageInfo, error)
func (*PackageInfo) Validate ¶
func (pkgInfo *PackageInfo) Validate() error
type PackageInfos ¶
type PackageInfos []*PackageInfo
func (*PackageInfos) ToMap ¶
func (pkgInfos *PackageInfos) ToMap(logE *logrus.Entry) map[string]*PackageInfo
func (*PackageInfos) ToMapWarn ¶ added in v1.10.2
func (pkgInfos *PackageInfos) ToMapWarn(logE *logrus.Entry) map[string]*PackageInfo
type Replacements ¶ added in v1.14.0
func (Replacements) JSONSchema ¶ added in v1.14.0
func (Replacements) JSONSchema() *jsonschema.Schema
type SLSAProvenance ¶ added in v1.26.0
type SLSAProvenance struct { Enabled *bool `json:"enabled,omitempty"` Type string `json:"type,omitempty" jsonschema:"enum=github_release,enum=http"` RepoOwner string `yaml:"repo_owner,omitempty" json:"repo_owner,omitempty"` RepoName string `yaml:"repo_name,omitempty" json:"repo_name,omitempty"` Asset *string `json:"asset,omitempty" yaml:",omitempty"` URL *string `json:"url,omitempty" yaml:",omitempty"` SourceURI *string `json:"source_uri,omitempty" yaml:"source_uri"` }
func (*SLSAProvenance) GetDownloadedFile ¶ added in v1.26.0
func (sp *SLSAProvenance) GetDownloadedFile() *DownloadedFile
func (*SLSAProvenance) GetEnabled ¶ added in v1.26.0
func (sp *SLSAProvenance) GetEnabled() bool
func (*SLSAProvenance) GetSourceURI ¶ added in v1.26.0
func (sp *SLSAProvenance) GetSourceURI() string
func (*SLSAProvenance) ToDownloadedFile ¶ added in v1.26.0
func (sp *SLSAProvenance) ToDownloadedFile() *DownloadedFile
type SupportedEnvs ¶ added in v1.14.0
type SupportedEnvs []string
func (SupportedEnvs) JSONSchema ¶ added in v1.14.0
func (SupportedEnvs) JSONSchema() *jsonschema.Schema
type VersionOverride ¶
type VersionOverride struct { Type string `` /* 146-byte string literal not displayed */ RepoOwner string `yaml:"repo_owner,omitempty" json:"repo_owner,omitempty"` RepoName string `yaml:"repo_name,omitempty" json:"repo_name,omitempty"` Asset *string `yaml:",omitempty" json:"asset,omitempty"` Path *string `yaml:",omitempty" json:"path,omitempty"` Format string `yaml:",omitempty" json:"format,omitempty" jsonschema:"example=tar.gz,example=raw,example=zip"` Files []*File `yaml:",omitempty" json:"files,omitempty"` URL *string `yaml:",omitempty" json:"url,omitempty"` Replacements Replacements `yaml:",omitempty" json:"replacements,omitempty"` Overrides []*Override `yaml:",omitempty" json:"overrides,omitempty"` FormatOverrides []*FormatOverride `yaml:"format_overrides,omitempty" json:"format_overrides,omitempty"` SupportedIf *string `yaml:"supported_if,omitempty" json:"supported_if,omitempty"` SupportedEnvs SupportedEnvs `yaml:"supported_envs,omitempty" json:"supported_envs,omitempty"` VersionConstraints string `yaml:"version_constraint,omitempty" json:"version_constraint,omitempty"` VersionFilter *string `yaml:"version_filter,omitempty" json:"version_filter,omitempty"` VersionPrefix *string `yaml:"version_prefix,omitempty" json:"version_prefix,omitempty"` VersionSource string `json:"version_source,omitempty" yaml:"version_source,omitempty"` Rosetta2 *bool `yaml:",omitempty" json:"rosetta2,omitempty"` CompleteWindowsExt *bool `json:"complete_windows_ext,omitempty" yaml:"complete_windows_ext,omitempty"` WindowsExt string `json:"windows_ext,omitempty" yaml:"windows_ext,omitempty"` Checksum *Checksum `json:"checksum,omitempty"` Cosign *Cosign `json:"cosign,omitempty"` SLSAProvenance *SLSAProvenance `json:"slsa_provenance,omitempty" yaml:"slsa_provenance,omitempty"` }
Click to show internal directories.
Click to hide internal directories.