v1alpha1

package
v0.0.0-...-b25b198 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2023 License: Apache-2.0 Imports: 4 Imported by: 18

Documentation

Overview

Package v1alpha1 contains API Schema definitions for the cli v1alpha1 API group +kubebuilder:object:generate=true +groupName=cli.tanzu.vmware.com

Index

Constants

This section is empty.

Variables

View Source
var (
	// GroupVersion is group version used to register these objects
	GroupVersion = schema.GroupVersion{Group: "cli.tanzu.vmware.com", Version: "v1alpha1"}

	// SchemeBuilder is used to add go types to the GroupVersionKind scheme
	SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion}

	// AddToScheme adds the types in this group-version to the given scheme.
	AddToScheme = SchemeBuilder.AddToScheme

	// GroupVersionKindCLIPlugin has information about group, version and kind of CLIPlugin object.
	GroupVersionKindCLIPlugin = GroupVersion.WithKind("CLIPlugin")
)
View Source
var (
	// SupportedTargets is a list of all supported Target
	SupportedTargets = []Target{TargetK8s, TargetTMC}
)

Functions

func IsValidTarget

func IsValidTarget(target string) bool

Types

type Artifact

type Artifact struct {
	// Image is a fully qualified OCI image for the plugin binary.
	Image string `json:"image,omitempty"`
	// AssetURI is a URI of the plugin binary. This can be a fully qualified HTTP path or a local path.
	URI string `json:"uri,omitempty"`
	// SHA256 hash of the plugin binary.
	Digest string `json:"digest,omitempty"`
	// Type of the binary artifact. Valid values are S3, GCP, OCIImage.
	Type string `json:"type"`
	// OS of the plugin binary in `GOOS` format.
	OS string `json:"os"`
	// Arch is CPU architecture of the plugin binary in `GOARCH` format.
	Arch string `json:"arch"`
}

Artifact points to an individual plugin binary specific to a version and platform.

func (*Artifact) DeepCopy

func (in *Artifact) DeepCopy() *Artifact

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Artifact.

func (*Artifact) DeepCopyInto

func (in *Artifact) DeepCopyInto(out *Artifact)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ArtifactList

type ArtifactList []Artifact

ArtifactList contains an Artifact object for every supported platform of a version.

func (ArtifactList) DeepCopy

func (in ArtifactList) DeepCopy() ArtifactList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ArtifactList.

func (ArtifactList) DeepCopyInto

func (in ArtifactList) DeepCopyInto(out *ArtifactList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type CLIPlugin

type CLIPlugin struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata"`
	Spec              CLIPluginSpec `json:"spec"`
}

CLIPlugin denotes a Tanzu cli plugin.

func (*CLIPlugin) DeepCopy

func (in *CLIPlugin) DeepCopy() *CLIPlugin

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CLIPlugin.

func (*CLIPlugin) DeepCopyInto

func (in *CLIPlugin) DeepCopyInto(out *CLIPlugin)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*CLIPlugin) DeepCopyObject

func (in *CLIPlugin) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type CLIPluginList

type CLIPluginList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []CLIPlugin `json:"items"`
}

CLIPluginList contains a list of CLIPlugin

func (*CLIPluginList) DeepCopy

func (in *CLIPluginList) DeepCopy() *CLIPluginList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CLIPluginList.

func (*CLIPluginList) DeepCopyInto

func (in *CLIPluginList) DeepCopyInto(out *CLIPluginList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*CLIPluginList) DeepCopyObject

func (in *CLIPluginList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type CLIPluginSpec

type CLIPluginSpec struct {
	// Description is the plugin's description.
	Description string `json:"description"`
	// Recommended version that Tanzu CLI should use if available.
	// The value should be a valid semantic version as defined in
	// https://semver.org/. E.g., 2.0.1
	RecommendedVersion string `json:"recommendedVersion"`
	// Artifacts contains an artifact list for every supported version.
	Artifacts map[string]ArtifactList `json:"artifacts"`
	// Optional specifies whether the plugin is mandatory or optional
	// If optional, the plugin will not get auto-downloaded as part of
	// `tanzu login` or `tanzu plugin sync` command
	// To view the list of plugin, user can use `tanzu plugin list` and
	// to download a specific plugin run, `tanzu plugin install <plugin-name>`
	Optional bool `json:"optional"`
	// Target specifies the target of the plugin. Only needed for standalone plugins
	Target Target `json:"target,omitempty"`
}

CLIPluginSpec defines the desired state of CLIPlugin.

func (*CLIPluginSpec) DeepCopy

func (in *CLIPluginSpec) DeepCopy() *CLIPluginSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CLIPluginSpec.

func (*CLIPluginSpec) DeepCopyInto

func (in *CLIPluginSpec) DeepCopyInto(out *CLIPluginSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Target

type Target string

Target is the namespace of the CLI to which plugin is applicable

const (
	// TargetK8s is a kubernetes target of the CLI
	TargetK8s Target = "kubernetes"

	// TargetTMC is a Tanzu Mission Control target of the CLI
	TargetTMC Target = "mission-control"

	// TargetNone is used for plugins that are not associated with any target
	TargetNone Target = ""
)

func StringToTarget

func StringToTarget(target string) Target

StringToTarget converts string to Target type

Jump to

Keyboard shortcuts

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