Documentation ¶
Index ¶
- type ClusterCluster
- type ClusterElement
- type ContextContext
- type ContextElement
- type KubeConfig
- type Module
- func (m *Module) AddCluster(cluster ClusterElement) error
- func (m *Module) AddContext(context ContextElement) error
- func (m *Module) AddCredentials(user UserElement) error
- func (m *Module) AddKubeConfig(kubeConfig string) error
- func (m *Module) Delete(manifestPath string) error
- func (m *Module) DeleteNamespace(namespace string) error
- func (m *Module) GetAllNamespace() error
- func (m *Module) GetKubeConfig() *KubeConfig
- func (m *Module) GetModule()
- func (m *Module) GetVersion() error
- func (m *Module) SetContext(contextName string) error
- func (m *Module) SetExists() bool
- type Preferences
- type UserElement
- type UserUser
- type Version
- type VersionInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClusterCluster ¶
type ClusterCluster struct { CertificateAuthorityData string `json:"certificate-authority-data" yaml:"certificate-authority-data"` CertificateAuthority string `json:"certificate-authority" yaml:"certificate-authority"` Server string `json:"server" yaml:"server"` }
ClusterCluster entity
type ClusterElement ¶
type ClusterElement struct { Cluster ClusterCluster `json:"cluster" yaml:"cluster"` Name string `json:"name" yaml:"name"` }
ClusterElement entity
type ContextContext ¶
type ContextContext struct { Cluster string `json:"cluster" yaml:"cluster"` Namespace string `json:"namespace" yaml:"namespace"` User string `json:"user" yaml:"user"` }
ContextContext entity
type ContextElement ¶
type ContextElement struct { Context ContextContext `json:"context" yaml:"context"` Name string `json:"name" yaml:"name"` }
ContextElement entity
type KubeConfig ¶
type KubeConfig struct { APIVersion string `json:"apiVersion" yaml:"apiVersion"` Kind string `json:"kind" yaml:"kind"` Preferences Preferences `json:"preferences" yaml:"preferences"` Clusters []ClusterElement `json:"clusters" yaml:"clusters"` Users []UserElement `json:"users" yaml:"users"` Contexts []ContextElement `json:"contexts" yaml:"contexts"` CurrentContext string `json:"current-context" yaml:"current-context"` }
KubeConfig entity
type Module ¶
type Module struct { Exists bool ClientVersion string ServerVersion string Version Version Exec string Path string CurrentContext string KubeConfig KubeConfig }
Module Entity
func (*Module) AddCluster ¶
func (m *Module) AddCluster(cluster ClusterElement) error
AddCluster Adds a cluster to the kubectl config
func (*Module) AddContext ¶
func (m *Module) AddContext(context ContextElement) error
AddContext Adds a context to the kubectl config
func (*Module) AddCredentials ¶
func (m *Module) AddCredentials(user UserElement) error
AddCredentials Adds a credential to the kubectl config
func (*Module) AddKubeConfig ¶
AddKubeConfig adds a kubeconfig string into the Kubectl config
func (*Module) DeleteNamespace ¶
DeleteNamespace Deletes a manifest from the default context
func (*Module) GetAllNamespace ¶
GetAllNamespace Deletes a manifest from the default context
func (*Module) GetKubeConfig ¶
func (m *Module) GetKubeConfig() *KubeConfig
GetKubeConfig gets Kubectl config from system
func (*Module) GetModule ¶
func (m *Module) GetModule()
GetModule GetModule Istio into the tools folder
func (*Module) GetVersion ¶
GetVersion gets Istio latest version from github
func (*Module) SetContext ¶
SetContext Sets the default context for kubectl
type UserElement ¶
type UserElement struct { Name string `json:"name" yaml:"name"` User UserUser `json:"user" yaml:"user"` }
UserElement entity
type UserUser ¶
type UserUser struct { AsUserExtra Preferences `json:"as-user-extra" yaml:"as-user-extra"` Token string `json:"token" yaml:"token"` ClientCertificate string `json:"client-certificate" yaml:"client-certificate"` ClientKey string `json:"client-key" yaml:"client-key"` Username string `json:"username" yaml:"username"` Password string `json:"password" yaml:"password"` }
UserUser entity
type Version ¶
type Version struct { ClientVersion VersionInfo `json:"clientVersion"` ServerVersion VersionInfo `json:"serverVersion"` }
Version entity
type VersionInfo ¶
type VersionInfo struct { Major string `json:"major"` Minor string `json:"minor"` GitVersion string `json:"gitVersion"` GitCommit string `json:"gitCommit"` GitTreeState string `json:"gitTreeState"` BuildDate string `json:"buildDate"` GoVersion string `json:"goVersion"` Compiler string `json:"compiler"` Platform string `json:"platform"` }
VersionInfo entity