registry

package
v2.39.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 14, 2024 License: MIT Imports: 14 Imported by: 2

Documentation

Index

Constants

View Source
const (
	PkgInfoTypeGitHubRelease = "github_release"
	PkgInfoTypeGitHubContent = "github_content"
	PkgInfoTypeGitHubArchive = "github_archive"
	PkgInfoTypeHTTP          = "http"
	PkgInfoTypeGoInstall     = "go_install"
	PkgInfoTypeGoBuild       = "go_build"
	PkgInfoTypeCargo         = "cargo"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Alias

type Alias struct {
	Name string `json:"name"`
}

type Build added in v2.13.0

type Build struct {
	Enabled      *bool         `json:"enabled,omitempty" yaml:",omitempty"`
	Type         string        `json:"type,omitempty" yaml:",omitempty" jsonschema:"enum=go_install,enum=go_build"`
	Path         string        `json:"path,omitempty" yaml:",omitempty"`
	Files        []*File       `json:"files,omitempty" yaml:",omitempty"`
	ExcludedEnvs SupportedEnvs `yaml:"excluded_envs,omitempty" json:"excluded_envs,omitempty"`
}

func (*Build) CheckEnabled added in v2.13.0

func (b *Build) CheckEnabled() bool

type Cargo added in v2.8.0

type Cargo struct {
	Features    []string `json:"features,omitempty"`
	AllFeatures bool     `yaml:"all_features" json:"all_features,omitempty"`
}

type Checksum

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"`
	Minisign                   *Minisign                   `json:"minisign,omitempty"`
	GitHubArtifactAttestations *GitHubArtifactAttestations `json:"github_artifact_attestations,omitempty" yaml:"github_artifact_attestations,omitempty"`
}

func (*Checksum) GetAlgorithm

func (c *Checksum) GetAlgorithm() string

func (*Checksum) GetCosign

func (c *Checksum) GetCosign() *Cosign

func (*Checksum) GetEnabled

func (c *Checksum) GetEnabled() bool

func (*Checksum) GetGitHubArtifactAttestations added in v2.35.0

func (c *Checksum) GetGitHubArtifactAttestations() *GitHubArtifactAttestations

func (*Checksum) GetMinisign added in v2.34.0

func (c *Checksum) GetMinisign() *Minisign

func (*Checksum) GetReplacements

func (c *Checksum) GetReplacements() Replacements

type ChecksumPattern

type ChecksumPattern struct {
	Checksum string `json:"checksum"`
	File     string `json:"file,omitempty"`
}

type Config

type Config struct {
	PackageInfos PackageInfos `yaml:"packages" validate:"dive" json:"packages"`
}

type Cosign

type Cosign struct {
	Enabled     *bool           `json:"enabled,omitempty"`
	Opts        []string        `json:"opts,omitempty"`
	Signature   *DownloadedFile `json:"signature,omitempty"`
	Certificate *DownloadedFile `json:"certificate,omitempty"`
	Key         *DownloadedFile `json:"key,omitempty"`
}

func (*Cosign) GetEnabled

func (c *Cosign) GetEnabled() bool

func (*Cosign) RenderOpts

func (c *Cosign) RenderOpts(rt *runtime.Runtime, art *template.Artifact) ([]string, error)

type DownloadedFile

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 File

type File struct {
	Name string `validate:"required" json:"name,omitempty" yaml:",omitempty"`
	Src  string `json:"src,omitempty" yaml:",omitempty"`
	Dir  string `json:"dir,omitempty" yaml:",omitempty"`
	// Link is the relative path from Src to the link
	Link string `json:"link,omitempty" yaml:",omitempty"`
}

type FormatOverride

type FormatOverride struct {
	GOOS   string `` /* 199-byte string literal not displayed */
	Format string `yaml:",omitempty" json:"format" jsonschema:"example=tar.gz,example=raw,example=zip"`
}

type FormatOverrides

type FormatOverrides []*FormatOverride

func (FormatOverrides) IsZero

func (o FormatOverrides) IsZero() bool

type GitHubArtifactAttestations added in v2.35.0

type GitHubArtifactAttestations struct {
	Enabled        *bool  `json:"enabled,omitempty"`
	SignerWorkflow string `yaml:"signer-workflow,omitempty" json:"signer-workflow,omitempty"`
}

func (*GitHubArtifactAttestations) GetEnabled added in v2.35.0

func (m *GitHubArtifactAttestations) GetEnabled() bool

type Minisign added in v2.31.0

type Minisign 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"`
	PublicKey string  `json:"public_key,omitempty" yaml:"public_key,omitempty"`
}

func (*Minisign) GetDownloadedFile added in v2.31.0

func (m *Minisign) GetDownloadedFile() *DownloadedFile

func (*Minisign) GetEnabled added in v2.31.0

func (m *Minisign) GetEnabled() bool

func (*Minisign) ToDownloadedFile added in v2.31.0

func (m *Minisign) ToDownloadedFile() *DownloadedFile

type Override

type Override struct {
	GOOS                       string                      `` /* 209-byte string literal not displayed */
	GOArch                     string                      `` /* 190-byte string literal not displayed */
	Type                       string                      `` /* 153-byte string literal not displayed */
	Format                     string                      `yaml:",omitempty" json:"format,omitempty" jsonschema:"example=tar.gz,example=raw,example=zip"`
	Asset                      string                      `yaml:",omitempty" json:"asset,omitempty"`
	Crate                      string                      `json:"crate,omitempty" yaml:",omitempty"`
	URL                        string                      `yaml:",omitempty" json:"url,omitempty"`
	Path                       string                      `yaml:",omitempty" json:"path,omitempty"`
	GoVersionPath              *string                     `yaml:"go_version_path,omitempty" json:"go_version_path,omitempty"`
	CompleteWindowsExt         *bool                       `json:"complete_windows_ext,omitempty" yaml:"complete_windows_ext,omitempty"`
	WindowsExt                 string                      `json:"windows_ext,omitempty" yaml:"windows_ext,omitempty"`
	AppendExt                  *bool                       `json:"append_ext,omitempty" yaml:"append_ext,omitempty"`
	Cargo                      *Cargo                      `json:"cargo,omitempty"`
	Files                      []*File                     `yaml:",omitempty" json:"files,omitempty"`
	Replacements               Replacements                `yaml:",omitempty" json:"replacements,omitempty"`
	Checksum                   *Checksum                   `json:"checksum,omitempty"`
	Cosign                     *Cosign                     `json:"cosign,omitempty"`
	SLSAProvenance             *SLSAProvenance             `json:"slsa_provenance,omitempty" yaml:"slsa_provenance,omitempty"`
	Minisign                   *Minisign                   `json:"minisign,omitempty" yaml:",omitempty"`
	GitHubArtifactAttestations *GitHubArtifactAttestations `json:"github_artifact_attestations,omitempty" yaml:"github_artifact_attestations,omitempty"`
	Vars                       []*Var                      `json:"vars,omitempty" yaml:",omitempty"`
	Envs                       SupportedEnvs               `yaml:",omitempty" json:"envs,omitempty"`
}

func (*Override) Match

func (ov *Override) Match(rt *runtime.Runtime) bool

type Overrides

type Overrides []*Override

func (Overrides) IsZero

func (o Overrides) IsZero() bool

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                      `` /* 163-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"`
	Crate                      string                      `json:"crate,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,example=dmg" yaml:",omitempty"`
	VersionFilter              string                      `yaml:"version_filter,omitempty" json:"version_filter,omitempty"`
	VersionPrefix              string                      `yaml:"version_prefix,omitempty" json:"version_prefix,omitempty"`
	GoVersionPath              string                      `yaml:"go_version_path,omitempty" json:"go_version_path,omitempty"`
	Rosetta2                   bool                        `yaml:",omitempty" json:"rosetta2,omitempty"`
	WindowsARMEmulation        bool                        `yaml:"windows_arm_emulation,omitempty" json:"windows_arm_emulation,omitempty"`
	NoAsset                    bool                        `yaml:"no_asset,omitempty" json:"no_asset,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"`
	Private                    bool                        `json:"private,omitempty"`
	ErrorMessage               string                      `json:"-" yaml:"-"`
	AppendExt                  *bool                       `json:"append_ext,omitempty" yaml:"append_ext,omitempty"`
	Cargo                      *Cargo                      `json:"cargo,omitempty"`
	Build                      *Build                      `json:"build,omitempty" 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"`
	SupportedEnvs              SupportedEnvs               `yaml:"supported_envs,omitempty" json:"supported_envs,omitempty"`
	Checksum                   *Checksum                   `json:"checksum,omitempty"`
	Cosign                     *Cosign                     `json:"cosign,omitempty"`
	SLSAProvenance             *SLSAProvenance             `json:"slsa_provenance,omitempty" yaml:"slsa_provenance,omitempty"`
	Minisign                   *Minisign                   `json:"minisign,omitempty" yaml:",omitempty"`
	GitHubArtifactAttestations *GitHubArtifactAttestations `json:"github_artifact_attestations,omitempty" yaml:"github_artifact_attestations,omitempty"`
	Vars                       []*Var                      `json:"vars,omitempty" yaml:",omitempty"`
	VersionConstraints         string                      `yaml:"version_constraint,omitempty" json:"version_constraint,omitempty"`
	VersionOverrides           []*VersionOverride          `yaml:"version_overrides,omitempty" json:"version_overrides,omitempty"`
}

func (*PackageInfo) CheckSupported

func (p *PackageInfo) CheckSupported(rt *runtime.Runtime, env string) (bool, error)

func (*PackageInfo) CheckSupportedEnvs

func (p *PackageInfo) CheckSupportedEnvs(goos, goarch, env string) bool

func (*PackageInfo) Copy

func (p *PackageInfo) Copy() *PackageInfo

func (*PackageInfo) GetAppendExt added in v2.13.0

func (p *PackageInfo) GetAppendExt() bool

func (*PackageInfo) GetChecksumReplacements

func (p *PackageInfo) GetChecksumReplacements() Replacements

func (*PackageInfo) GetFiles

func (p *PackageInfo) GetFiles() []*File

func (*PackageInfo) GetFormat

func (p *PackageInfo) GetFormat() string
func (p *PackageInfo) GetLink() string

func (*PackageInfo) GetName

func (p *PackageInfo) GetName() string

func (*PackageInfo) GetPath

func (p *PackageInfo) GetPath() string

func (*PackageInfo) HasRepo

func (p *PackageInfo) HasRepo() bool

func (*PackageInfo) Override

func (p *PackageInfo) Override(logE *logrus.Entry, v string, rt *runtime.Runtime) (*PackageInfo, error)

func (*PackageInfo) OverrideByBuild added in v2.13.0

func (p *PackageInfo) OverrideByBuild()

func (*PackageInfo) OverrideByRuntime

func (p *PackageInfo) OverrideByRuntime(rt *runtime.Runtime)

func (*PackageInfo) PkgPaths added in v2.33.0

func (p *PackageInfo) PkgPaths() map[string]struct{}

func (*PackageInfo) SLSASourceURI

func (p *PackageInfo) SLSASourceURI() string

func (*PackageInfo) SetVersion

func (p *PackageInfo) SetVersion(logE *logrus.Entry, v string) (*PackageInfo, error)

func (*PackageInfo) Validate

func (p *PackageInfo) Validate() error

type PackageInfos

type PackageInfos []*PackageInfo

func (*PackageInfos) ToMap

func (p *PackageInfos) ToMap(logE *logrus.Entry) map[string]*PackageInfo

type Replacements

type Replacements map[string]string

func (Replacements) IsZero

func (r Replacements) IsZero() bool

func (Replacements) JSONSchema

func (Replacements) JSONSchema() *jsonschema.Schema

type SLSAProvenance

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

func (sp *SLSAProvenance) GetDownloadedFile() *DownloadedFile

func (*SLSAProvenance) GetEnabled

func (sp *SLSAProvenance) GetEnabled() bool

func (*SLSAProvenance) GetSourceURI

func (sp *SLSAProvenance) GetSourceURI() string

func (*SLSAProvenance) ToDownloadedFile

func (sp *SLSAProvenance) ToDownloadedFile() *DownloadedFile

type SupportedEnvs

type SupportedEnvs []string

func (SupportedEnvs) JSONSchema

func (SupportedEnvs) JSONSchema() *jsonschema.Schema

type Var added in v2.31.0

type Var struct {
	Name     string `json:"name"`
	Required bool   `json:"required,omitempty"`
	Default  any    `json:"default,omitempty"`
}

type VersionOverride

type VersionOverride struct {
	VersionConstraints         string                      `yaml:"version_constraint,omitempty" json:"version_constraint,omitempty"`
	Type                       string                      `` /* 171-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"`
	Crate                      string                      `json:"crate,omitempty" yaml:",omitempty"`
	Path                       string                      `yaml:",omitempty" json:"path,omitempty"`
	URL                        string                      `yaml:",omitempty" json:"url,omitempty"`
	Format                     string                      `yaml:",omitempty" json:"format,omitempty" jsonschema:"example=tar.gz,example=raw,example=zip"`
	GoVersionPath              *string                     `yaml:"go_version_path,omitempty" json:"go_version_path,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"`
	WindowsExt                 string                      `json:"windows_ext,omitempty" yaml:"windows_ext,omitempty"`
	ErrorMessage               *string                     `json:"error_message,omitempty" yaml:"error_message,omitempty"`
	Rosetta2                   *bool                       `yaml:",omitempty" json:"rosetta2,omitempty"`
	WindowsARMEmulation        *bool                       `yaml:"windows_arm_emulation,omitempty" json:"windows_arm_emulation,omitempty"`
	CompleteWindowsExt         *bool                       `json:"complete_windows_ext,omitempty" yaml:"complete_windows_ext,omitempty"`
	NoAsset                    *bool                       `yaml:"no_asset,omitempty" json:"no_asset,omitempty"`
	AppendExt                  *bool                       `json:"append_ext,omitempty" yaml:"append_ext,omitempty"`
	Cargo                      *Cargo                      `json:"cargo,omitempty"`
	Files                      []*File                     `yaml:",omitempty" json:"files,omitempty"`
	FormatOverrides            FormatOverrides             `yaml:"format_overrides,omitempty" json:"format_overrides,omitempty"`
	Replacements               Replacements                `yaml:",omitempty" json:"replacements,omitempty"`
	Checksum                   *Checksum                   `json:"checksum,omitempty"`
	Cosign                     *Cosign                     `json:"cosign,omitempty"`
	SLSAProvenance             *SLSAProvenance             `json:"slsa_provenance,omitempty" yaml:"slsa_provenance,omitempty"`
	Minisign                   *Minisign                   `json:"minisign,omitempty" yaml:",omitempty"`
	GitHubArtifactAttestations *GitHubArtifactAttestations `json:"github_artifact_attestations,omitempty" yaml:"github_artifact_attestations,omitempty"`
	Build                      *Build                      `json:"build,omitempty" yaml:",omitempty"`
	Vars                       []*Var                      `json:"vars,omitempty" yaml:",omitempty"`
	Overrides                  Overrides                   `yaml:",omitempty" json:"overrides,omitempty"`
	SupportedEnvs              SupportedEnvs               `yaml:"supported_envs,omitempty" json:"supported_envs,omitempty"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL