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
- Variables
- type Artifact
- type ArtifactList
- type CLIPlugin
- type CLIPluginList
- type CLIPluginSpec
- type Catalog
- type CatalogList
- type CmdGroup
- type Distro
- type Hook
- type PluginAssociation
- func (pa PluginAssociation) Add(pluginName, installationPath string)
- func (in PluginAssociation) DeepCopy() PluginAssociation
- func (in PluginAssociation) DeepCopyInto(out *PluginAssociation)
- func (pa PluginAssociation) Get(pluginName string) string
- func (pa PluginAssociation) Map() map[string]string
- func (pa PluginAssociation) Remove(pluginName string)
- type PluginCompletionType
- type PluginDescriptor
Constants ¶
const ( // NativePluginCompletion indicates command line completion is determined using the built in // cobra.Command __complete mechanism. NativePluginCompletion PluginCompletionType = iota // StaticPluginCompletion indicates command line completion will be done by using a statically // defined list of options. StaticPluginCompletion // DynamicPluginCompletion indicates command line completion will be retrieved from the plugin // at runtime. DynamicPluginCompletion // RunCmdGroup are commands associated with Tanzu Run. RunCmdGroup CmdGroup = "Run" // ManageCmdGroup are commands associated with Tanzu Manage. ManageCmdGroup CmdGroup = "Manage" // BuildCmdGroup are commands associated with Tanzu Build. BuildCmdGroup CmdGroup = "Build" // ObserveCmdGroup are commands associated with Tanzu Observe. ObserveCmdGroup CmdGroup = "Observe" // SystemCmdGroup are system commands. SystemCmdGroup CmdGroup = "System" // VersionCmdGroup are version commands. VersionCmdGroup CmdGroup = "Version" // AdminCmdGroup are admin commands. AdminCmdGroup CmdGroup = "Admin" // TestCmdGroup is the test command group. TestCmdGroup CmdGroup = "Test" // ExtraCmdGroup is the extra command group. ExtraCmdGroup CmdGroup = "Extra" )
Variables ¶
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 // GroupVersionKindCatalog has information about group, version and kind of Catalog object. GroupVersionKindCatalog = GroupVersion.WithKind("Catalog") // GroupVersionKindCLIPlugin has information about group, version and kind of CLIPlugin object. GroupVersionKindCLIPlugin = GroupVersion.WithKind("CLIPlugin") )
Functions ¶
This section is empty.
Types ¶
type Artifact ¶ added in v0.7.0
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 ¶ added in v0.7.0
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Artifact.
func (*Artifact) DeepCopyInto ¶ added in v0.7.0
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ArtifactList ¶ added in v0.7.0
type ArtifactList []Artifact
ArtifactList contains an Artifact object for every supported platform of a version.
func (ArtifactList) DeepCopy ¶ added in v0.7.0
func (in ArtifactList) DeepCopy() ArtifactList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ArtifactList.
func (ArtifactList) DeepCopyInto ¶ added in v0.7.0
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 ¶ added in v0.7.0
type CLIPlugin struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata"`
Spec CLIPluginSpec `json:"spec"`
}
CLIPlugin denotes a Tanzu cli plugin.
func (*CLIPlugin) DeepCopy ¶ added in v0.7.0
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CLIPlugin.
func (*CLIPlugin) DeepCopyInto ¶ added in v0.7.0
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*CLIPlugin) DeepCopyObject ¶ added in v0.7.0
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type CLIPluginList ¶ added in v0.7.0
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 ¶ added in v0.7.0
func (in *CLIPluginList) DeepCopy() *CLIPluginList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CLIPluginList.
func (*CLIPluginList) DeepCopyInto ¶ added in v0.7.0
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 ¶ added in v0.7.0
func (in *CLIPluginList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type CLIPluginSpec ¶ added in v0.7.0
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"`
}
CLIPluginSpec defines the desired state of CLIPlugin.
func (*CLIPluginSpec) DeepCopy ¶ added in v0.7.0
func (in *CLIPluginSpec) DeepCopy() *CLIPluginSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CLIPluginSpec.
func (*CLIPluginSpec) DeepCopyInto ¶ added in v0.7.0
func (in *CLIPluginSpec) DeepCopyInto(out *CLIPluginSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Catalog ¶
type Catalog struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
// PluginDescriptors is a list of PluginDescriptor
PluginDescriptors []*PluginDescriptor `json:"pluginDescriptors,omitempty" yaml:"pluginDescriptors"`
// IndexByPath of PluginDescriptors for all installed plugins by installation path.
IndexByPath map[string]PluginDescriptor `json:"indexByPath,omitempty"`
// IndeByName of all plugin installation paths by name.
IndexByName map[string][]string `json:"indexByName,omitempty"`
// StandAlonePlugins is a set of stand-alone plugin installations.
StandAlonePlugins PluginAssociation `json:"standAlonePlugins,omitempty"`
// ServerPlugins links a server and a set of associated plugin installations.
ServerPlugins map[string]PluginAssociation `json:"serverPlugins,omitempty"`
}
Catalog is the Schema for the catalogs API
func (*Catalog) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Catalog.
func (*Catalog) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Catalog) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type CatalogList ¶
type CatalogList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []Catalog `json:"items"`
}
CatalogList contains a list of Catalog
func (*CatalogList) DeepCopy ¶
func (in *CatalogList) DeepCopy() *CatalogList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CatalogList.
func (*CatalogList) DeepCopyInto ¶
func (in *CatalogList) DeepCopyInto(out *CatalogList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*CatalogList) DeepCopyObject ¶
func (in *CatalogList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type Distro ¶
type Distro []string
Distro is the Schema for the catalogs API
func (Distro) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Distro.
func (Distro) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Hook ¶
type Hook func() error
Hook is the mechanism used to define function for plugin hooks
func (*Hook) DeepCopyInto ¶
DeepCopyInto is an deepcopy function implementation of Hook currently there is nothing that we need to copy hence keeping this empty
type PluginAssociation ¶ added in v0.7.0
PluginAssociation is a set of plugin names and their associated installation paths.
func (PluginAssociation) Add ¶ added in v0.7.0
func (pa PluginAssociation) Add(pluginName, installationPath string)
Add adds plugin entry to the map
func (PluginAssociation) DeepCopy ¶ added in v0.7.0
func (in PluginAssociation) DeepCopy() PluginAssociation
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PluginAssociation.
func (PluginAssociation) DeepCopyInto ¶ added in v0.7.0
func (in PluginAssociation) DeepCopyInto(out *PluginAssociation)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (PluginAssociation) Get ¶ added in v0.7.0
func (pa PluginAssociation) Get(pluginName string) string
Get returns installation path for the plugin If plugin doesn't exists in map it will return empty string
func (PluginAssociation) Map ¶ added in v0.7.0
func (pa PluginAssociation) Map() map[string]string
Map returns associated list of plugins as a map
func (PluginAssociation) Remove ¶ added in v0.7.0
func (pa PluginAssociation) Remove(pluginName string)
Remove deletes plugin entry from the map
type PluginCompletionType ¶
type PluginCompletionType int
PluginCompletionType is the mechanism used for determining command line completion options.
type PluginDescriptor ¶
type PluginDescriptor struct {
// Name is the name of the plugin.
Name string `json:"name" yaml:"name"`
// Description is the plugin's description.
Description string `json:"description" yaml:"description"`
// Version of the plugin. Must be a valid semantic version https://semver.org/
Version string `json:"version" yaml:"version"`
// BuildSHA is the git commit hash the plugin was built with.
BuildSHA string `json:"buildSHA" yaml:"buildSHA"`
// Digest is the SHA256 hash of the plugin binary.
Digest string `json:"digest" yaml:"digest"`
// Command group for the plugin.
Group CmdGroup `json:"group" yaml:"group"`
// DocURL for the plugin.
DocURL string `json:"docURL" yaml:"docURL"`
// Hidden tells whether the plugin should be hidden from the help command.
Hidden bool `json:"hidden,omitempty" yaml:"hidden,omitempty"`
// CompletionType determines how command line completion will be determined.
CompletionType PluginCompletionType `json:"completionType" yaml:"completionType"`
// CompletionArgs contains the valid command line completion values if `CompletionType`
// is set to `StaticPluginCompletion`.
CompletionArgs []string `json:"completionArgs,omitempty" yaml:"completionArgs,omitempty"`
// CompletionCommand is the command to call from the plugin to retrieve a list of
// valid completion nouns when `CompletionType` is set to `DynamicPluginCompletion`.
CompletionCommand string `json:"completionCmd,omitempty" yaml:"completionCmd,omitempty"`
// Aliases are other text strings used to call this command
Aliases []string `json:"aliases,omitempty" yaml:"aliases,omitempty"`
// InstallationPath is a relative installation path for a plugin binary.
// E.g., cluster/v0.3.2@sha256:...
InstallationPath string `json:"installationPath"`
// Discovery is the name of the discovery from where
// this plugin is discovered.
Discovery string `json:"discovery"`
// Scope is the scope of the plugin. Stand-Alone or Context
Scope string `json:"scope"`
// Status is the current plugin installation status
Status string `json:"status"`
// DiscoveredRecommendedVersion specifies the recommended version of the plugin that was discovered
DiscoveredRecommendedVersion string `json:"discoveredRecommendedVersion"`
// PostInstallHook is function to be run post install of a plugin.
PostInstallHook Hook `json:"-" yaml:"-"`
}
PluginDescriptor describes a plugin binary.
func (*PluginDescriptor) DeepCopy ¶
func (in *PluginDescriptor) DeepCopy() *PluginDescriptor
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PluginDescriptor.
func (*PluginDescriptor) DeepCopyInto ¶
func (in *PluginDescriptor) DeepCopyInto(out *PluginDescriptor)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.