Documentation ¶
Overview ¶
Package artifact implements interface to fetch the binary artifacts from different sources
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Artifact ¶
Artifact is an interface to download a single plugin binary.
func NewHTTPArtifact ¶ added in v0.16.0
NewHTTPArtifact creates HTTP Artifact object
func NewLocalArtifact ¶
NewLocalArtifact creates Local Artifact object If path is not an absolute path search under `xdg.ConfigHome/tanzu-plugin/distribution` directory
func NewOCIArtifact ¶
NewOCIArtifact creates OCI Artifact object
func NewURIArtifact ¶
NewURIArtifact creates new artifacts based on the URI
type HTTPArtifact ¶ added in v0.16.0
type HTTPArtifact struct {
URL string
}
HTTPArtifact defines HTTP artifact location. Sample URI: https://storage.googleapis.com/tanzu-cli/artifacts/cluster/latest/tanzu-cluster-mac_amd64
func (*HTTPArtifact) Fetch ¶ added in v0.16.0
func (g *HTTPArtifact) Fetch() ([]byte, error)
Fetch an artifact.
type LocalArtifact ¶
type LocalArtifact struct { // Path is path to local binary artifact // if path is not an absolute path search under // `xdg.ConfigHome/tanzu-plugin/localPath` directory Path string }
LocalArtifact defines local artifact path. Sample URI: file://home/user/workspace/tanzu-framework/artifacts/darwin/amd64/cli/login/v0.10.0-dev/tanzu-login-darwin_amd64
func (*LocalArtifact) Fetch ¶
func (l *LocalArtifact) Fetch() ([]byte, error)
Fetch reads the local artifact from its path
type OCIArtifact ¶
type OCIArtifact struct { Image string // contains filtered or unexported fields }
OCIArtifact defines OCI artifact image endpoint