Documentation
¶
Overview ¶
Package distribution implements plugin distribution interface Distribution is the interface to download a plugin version binary for a given OS and architecture combination. E.g. an OCI compliant image repository, etc.
Index ¶
- type Artifact
- type ArtifactList
- type Artifacts
- func (aMap Artifacts) DescribeArtifact(version, os, arch string) (Artifact, error)
- func (aMap Artifacts) Fetch(version, os, arch string) ([]byte, error)
- func (aMap Artifacts) FetchTest(version, os, arch string) ([]byte, error)
- func (aMap Artifacts) GetArtifact(version, os, arch string) (Artifact, error)
- func (aMap Artifacts) GetDigest(version, os, arch string) (string, error)
- type Distribution
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Artifact ¶
type Artifact struct {
// Image is a fully qualified OCI image for the plugin binary.
Image string
// AssetURI is a URI of the plugin binary.
URI string
// SHA256 hash of the plugin binary.
Digest string
// OS of the plugin binary in `GOOS` format.
OS string
// Arch of the plugin binary in `GOARCH` format.
Arch string
}
Artifact points to an individual plugin binary specific to a version and platform.
func ArtifactFromK8sV1alpha1 ¶
func ArtifactFromK8sV1alpha1(a cliv1alpha1.Artifact) Artifact
ArtifactFromK8sV1alpha1 returns Artifact from k8sV1alpha1
type ArtifactList ¶
type ArtifactList []Artifact
ArtifactList contains an Artifact object for every supported platform of a version.
func ArtifactListFromK8sV1alpha1 ¶
func ArtifactListFromK8sV1alpha1(l cliv1alpha1.ArtifactList) ArtifactList
ArtifactListFromK8sV1alpha1 returns ArtifactList from k8sV1alpha1
type Artifacts ¶
type Artifacts map[string]ArtifactList
Artifacts contains an artifact list for every supported version.
func ArtifactsFromK8sV1alpha1 ¶
func ArtifactsFromK8sV1alpha1(m map[string]cliv1alpha1.ArtifactList) Artifacts
ArtifactsFromK8sV1alpha1 returns Artifacts from k8sV1alpha1
func (Artifacts) DescribeArtifact ¶
DescribeArtifact returns the artifact resource based plugin metadata
func (Artifacts) GetArtifact ¶
GetArtifact returns Artifact object
type Distribution ¶
type Distribution interface {
// Fetch the binary for a plugin version.
Fetch(version, os, arch string) ([]byte, error)
// FetchTest the test binary for a plugin version.
FetchTest(version, os, arch string) ([]byte, error)
// GetDigest returns the SHA256 hash of the binary for a plugin version.
GetDigest(version, os, arch string) (string, error)
// DescribeArtifact returns the artifact resource based plugin metadata
DescribeArtifact(version, os, arch string) (Artifact, error)
}
Distribution is an interface to download a single plugin binary.