Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrGhAssetNotFound = errors.New("github asset not found")
View Source
var ErrVersionsNotSupported = errors.New("fetcher does not support listing versions")
Functions ¶
This section is empty.
Types ¶
type ArtifactKind ¶ added in v0.3.0
type ArtifactKind int
const ( ArchiveKind ArtifactKind = iota SourceKind )
type Fetch ¶ added in v0.7.0
type Fetch struct {
GitHubRelease *GitHubRelease `yaml:"github_release,omitempty"`
GitHubTag *GitHubTag `yaml:"github_tag,omitempty"`
HTTP *HTTP `yaml:"http,omitempty"`
OCI *OCI `yaml:"oci,omitempty"`
}
type Fetcher ¶
type Fetcher struct {
// contains filtered or unexported fields
}
func NewFetcher ¶ added in v0.7.0
func NewFetcher(resolver auth.Resolver, opts ...FetcherOption) *Fetcher
func (*Fetcher) FetchArtifact ¶ added in v0.7.0
type FetcherOption ¶ added in v0.7.0
type FetcherOption func(*Fetcher)
func WithOCIClient ¶ added in v0.3.0
func WithOCIClient(c oci.Client) FetcherOption
WithOCIClient overrides the OCI client, e.g. to inject a fake in tests.
type GitHubRelease ¶ added in v0.7.0
type GitHubRelease struct {
Repo string `yaml:"repo"`
AssetName string `yaml:"assetName"`
TemplateOverrides map[string]string `yaml:"templateOverrides,omitempty"`
ReleaseFilter string `yaml:"releaseFilter,omitempty"`
VersionTemplate string `yaml:"versionTemplate,omitempty"`
ReleaseTemplate string `yaml:"releaseTemplate,omitempty"`
}
type GitHubTag ¶ added in v0.7.0
type GitHubTagVersionSource ¶
type HTTP ¶ added in v0.7.0
type HTTP struct {
URL string `yaml:"url"`
TemplateOverrides map[string]string `yaml:"templateOverrides,omitempty"`
VersionsFrom *VersionsFrom `yaml:"versionsFrom,omitempty"`
}
type Platform ¶
func CurrentPlatform ¶
func CurrentPlatform() Platform
type Verify ¶
type Verify struct {
Algorithm string `yaml:"algorithm,omitempty"`
Checksum string `yaml:"checksum,omitempty"`
ChecksumURL string `yaml:"checksumURL,omitempty"`
ChecksumGitHubAsset string `yaml:"checksumGitHubAsset,omitempty"`
// Legacy sha256* aliases imply algorithm sha256; kept so existing
// manifests keep working unchanged.
SHA256 string `yaml:"sha256,omitempty"`
SHA256URL string `yaml:"sha256URL,omitempty"`
SHA256GitHubAsset string `yaml:"sha256GitHubAsset,omitempty"`
}
func (Verify) HasChecksumSource ¶ added in v0.7.0
func (Verify) UsesGitHubAsset ¶ added in v0.7.0
type VersionsFrom ¶
type VersionsFrom struct {
GitHubRelease *GitHubReleaseVersionSource `yaml:"github_release,omitempty"`
GitHubTag *GitHubTagVersionSource `yaml:"github_tag,omitempty"`
}
func (VersionsFrom) Validate ¶
func (v VersionsFrom) Validate() error
Click to show internal directories.
Click to hide internal directories.