Documentation
¶
Index ¶
- func IsInClusterAuthenticationAvailable(ctx context.Context) bool
- func MustSortResourcesYaml(resourcesYaml string) (sortedResourcesYaml string)
- func SortResourcesYaml(resourcesYaml string) (sortedResourcesYaml string, err error)
- type CommandExecutorKubernetes
- func (c *CommandExecutorKubernetes) CreateNamespaceByName(name string, verbose bool) (createdNamespace Namespace, err error)
- func (c *CommandExecutorKubernetes) DeleteNamespaceByName(name string, verbose bool) (err error)
- func (c *CommandExecutorKubernetes) GetCachedContextName() (cachedContextName string, err error)
- func (c *CommandExecutorKubernetes) GetCachedKubectlContext(verbose bool) (context string, err error)
- func (c *CommandExecutorKubernetes) GetCommandExecutor() (commandExecutor commandexecutor.CommandExecutor, err error)
- func (c *CommandExecutorKubernetes) GetKubectlContext(verbose bool) (context string, err error)
- func (c *CommandExecutorKubernetes) GetKubectlContexts() (contexts []KubectlContext, err error)
- func (c *CommandExecutorKubernetes) GetName() (name string, err error)
- func (c *CommandExecutorKubernetes) GetNamespaceByName(name string) (namespace Namespace, err error)
- func (c *CommandExecutorKubernetes) GetResourceByNames(resourceName string, resourceType string, namespaceName string) (resource Resource, err error)
- func (c *CommandExecutorKubernetes) ListNamespaceNames(verbose bool) (namespaceNames []string, err error)
- func (c *CommandExecutorKubernetes) ListNamespaces(verbose bool) (namespaces []Namespace, err error)
- func (c *CommandExecutorKubernetes) ListResourceNames(options *parameteroptions.ListKubernetesResourcesOptions) (resourceNames []string, err error)
- func (c *CommandExecutorKubernetes) ListResources(options *parameteroptions.ListKubernetesResourcesOptions) (resources []Resource, err error)
- func (c *CommandExecutorKubernetes) MustCreateNamespaceByName(name string, verbose bool) (createdNamespace Namespace)
- func (c *CommandExecutorKubernetes) MustDeleteNamespaceByName(name string, verbose bool)
- func (c *CommandExecutorKubernetes) MustGetCachedContextName() (cachedContextName string)
- func (c *CommandExecutorKubernetes) MustGetCachedKubectlContext(verbose bool) (context string)
- func (c *CommandExecutorKubernetes) MustGetCommandExecutor() (commandExecutor commandexecutor.CommandExecutor)
- func (c *CommandExecutorKubernetes) MustGetKubectlContext(verbose bool) (context string)
- func (c *CommandExecutorKubernetes) MustGetKubectlContexts() (contexts []KubectlContext)
- func (c *CommandExecutorKubernetes) MustGetName() (name string)
- func (c *CommandExecutorKubernetes) MustGetNamespaceByName(name string) (namespace Namespace)
- func (c *CommandExecutorKubernetes) MustGetResourceByNames(resourceName string, resourceType string, namespaceName string) (resource Resource)
- func (c *CommandExecutorKubernetes) MustListNamespaceNames(verbose bool) (namespaceNames []string)
- func (c *CommandExecutorKubernetes) MustListNamespaces(verbose bool) (namespaces []Namespace)
- func (c *CommandExecutorKubernetes) MustListResourceNames(options *parameteroptions.ListKubernetesResourcesOptions) (resourceNames []string)
- func (c *CommandExecutorKubernetes) MustListResources(options *parameteroptions.ListKubernetesResourcesOptions) (resources []Resource)
- func (c *CommandExecutorKubernetes) MustNamespaceByNameExists(name string, verbose bool) (exists bool)
- func (c *CommandExecutorKubernetes) MustSetCachedContextName(cachedContextName string)
- func (c *CommandExecutorKubernetes) MustSetCommandExecutor(commandExecutor commandexecutor.CommandExecutor)
- func (c *CommandExecutorKubernetes) MustSetName(name string)
- func (c *CommandExecutorKubernetes) NamespaceByNameExists(name string, verbose bool) (exists bool, err error)
- func (c *CommandExecutorKubernetes) RunCommand(ctx context.Context, runCommandOptions *parameteroptions.RunCommandOptions) (commandOutput *commandexecutor.CommandOutput, err error)
- func (c *CommandExecutorKubernetes) RunCommandAndGetStdoutAsLines(ctx context.Context, runCommandOptions *parameteroptions.RunCommandOptions) (lines []string, err error)
- func (c *CommandExecutorKubernetes) SetCachedContextName(cachedContextName string) (err error)
- func (c *CommandExecutorKubernetes) SetCommandExecutor(commandExecutor commandexecutor.CommandExecutor) (err error)
- func (c *CommandExecutorKubernetes) SetName(name string) (err error)
- type CommandExecutorNamespace
- func (c *CommandExecutorNamespace) Create(ctx context.Context) (err error)
- func (c *CommandExecutorNamespace) CreateRole(createOptions *CreateRoleOptions) (createdRole Role, err error)
- func (c *CommandExecutorNamespace) DeleteRoleByName(name string, verbose bool) (err error)
- func (c *CommandExecutorNamespace) GetCachedKubectlContext(verbose bool) (context string, err error)
- func (c *CommandExecutorNamespace) GetClusterName() (clusterName string, err error)
- func (c *CommandExecutorNamespace) GetCommandExecutor() (commandExecutor commandexecutor.CommandExecutor, err error)
- func (c *CommandExecutorNamespace) GetKubectlContext(ctx context.Context) (contextName string, err error)
- func (c *CommandExecutorNamespace) GetKubernetesCluster() (kubernetesCluster KubernetesCluster, err error)
- func (c *CommandExecutorNamespace) GetName() (name string, err error)
- func (c *CommandExecutorNamespace) GetResourceByNames(resourceName string, resourceType string) (resource Resource, err error)
- func (c *CommandExecutorNamespace) GetRoleByName(name string) (role Role, err error)
- func (c *CommandExecutorNamespace) ListRoleNames(verbose bool) (roleNames []string, err error)
- func (c *CommandExecutorNamespace) MustDeleteRoleByName(name string, verbose bool)
- func (c *CommandExecutorNamespace) MustGetCachedKubectlContext(verbose bool) (context string)
- func (c *CommandExecutorNamespace) MustGetClusterName() (clusterName string)
- func (c *CommandExecutorNamespace) MustGetCommandExecutor() (commandExecutor commandexecutor.CommandExecutor)
- func (c *CommandExecutorNamespace) MustGetKubernetesCluster() (kubernetesCluster KubernetesCluster)
- func (c *CommandExecutorNamespace) MustGetName() (name string)
- func (c *CommandExecutorNamespace) MustGetResourceByNames(resourceName string, resourceType string) (resource Resource)
- func (c *CommandExecutorNamespace) MustGetRoleByName(name string) (role Role)
- func (c *CommandExecutorNamespace) MustListRoleNames(verbose bool) (roleNames []string)
- func (c *CommandExecutorNamespace) MustRoleByNameExists(name string, verbose bool) (exists bool)
- func (c *CommandExecutorNamespace) MustSetKubernetesCluster(kubernetesCluster KubernetesCluster)
- func (c *CommandExecutorNamespace) MustSetName(name string)
- func (c *CommandExecutorNamespace) RoleByNameExists(name string, verbose bool) (exists bool, err error)
- func (c *CommandExecutorNamespace) RunCommand(ctx context.Context, runCommandOptions *parameteroptions.RunCommandOptions) (commandOutput *commandexecutor.CommandOutput, err error)
- func (c *CommandExecutorNamespace) RunCommandAndGetStdoutAsLines(ctx context.Context, runCommandOptions *parameteroptions.RunCommandOptions) (lines []string, err error)
- func (c *CommandExecutorNamespace) SetKubernetesCluster(kubernetesCluster KubernetesCluster) (err error)
- func (c *CommandExecutorNamespace) SetName(name string) (err error)
- type CommandExecutorResource
- func (c *CommandExecutorResource) CreateByYamlString(ctx context.Context, yamlString string) (err error)
- func (c *CommandExecutorResource) Delete(ctx context.Context) (err error)
- func (c *CommandExecutorResource) EnsureNamespaceExists(ctx context.Context) (err error)
- func (c *CommandExecutorResource) Exists(ctx context.Context) (exists bool, err error)
- func (c *CommandExecutorResource) GetAsYamlString() (yamlString string, err error)
- func (c *CommandExecutorResource) GetClusterName() (clusterName string, err error)
- func (c *CommandExecutorResource) GetCommandExecutor() (commandExecutor commandexecutor.CommandExecutor, err error)
- func (c *CommandExecutorResource) GetKubectlContext(ctx context.Context) (contextName string, err error)
- func (c *CommandExecutorResource) GetName() (name string, err error)
- func (c *CommandExecutorResource) GetNamespace() (namespace Namespace, err error)
- func (c *CommandExecutorResource) GetNamespaceName() (namsepaceName string, err error)
- func (c *CommandExecutorResource) GetResourceAndTypeAndNamespaceAndClusterName() (resourceName string, resourceTypeName string, namespaceName string, ...)
- func (c *CommandExecutorResource) GetTypeName() (typeName string, err error)
- func (c *CommandExecutorResource) MustGetAsYamlString() (yamlString string)
- func (c *CommandExecutorResource) MustGetClusterName() (clusterName string)
- func (c *CommandExecutorResource) MustGetCommandExecutor() (commandExecutor commandexecutor.CommandExecutor)
- func (c *CommandExecutorResource) MustGetName() (name string)
- func (c *CommandExecutorResource) MustGetNamespace() (namespace Namespace)
- func (c *CommandExecutorResource) MustGetNamespaceName() (namsepaceName string)
- func (c *CommandExecutorResource) MustGetResourceAndTypeAndNamespaceAndClusterName() (resourceName string, resourceTypeName string, namespaceName string, ...)
- func (c *CommandExecutorResource) MustGetTypeName() (typeName string)
- func (c *CommandExecutorResource) MustSetCommandExecutor(commandExecutor commandexecutor.CommandExecutor)
- func (c *CommandExecutorResource) MustSetName(name string)
- func (c *CommandExecutorResource) MustSetNamespace(namespace Namespace)
- func (c *CommandExecutorResource) MustSetTypeName(typeName string)
- func (c *CommandExecutorResource) SetCommandExecutor(commandExecutor commandexecutor.CommandExecutor) (err error)
- func (c *CommandExecutorResource) SetName(name string) (err error)
- func (c *CommandExecutorResource) SetNamespace(namespace Namespace) (err error)
- func (c *CommandExecutorResource) SetTypeName(typeName string) (err error)
- type CommandExecutorRole
- func (c *CommandExecutorRole) GetName() (name string, err error)
- func (c *CommandExecutorRole) GetNamespace() (namespace Namespace, err error)
- func (c *CommandExecutorRole) MustGetName() (name string)
- func (c *CommandExecutorRole) MustGetNamespace() (namespace Namespace)
- func (c *CommandExecutorRole) MustSetName(name string)
- func (c *CommandExecutorRole) MustSetNamespace(namespace Namespace)
- func (c *CommandExecutorRole) SetName(name string) (err error)
- func (c *CommandExecutorRole) SetNamespace(namespace Namespace) (err error)
- type CreateRoleOptions
- func (c *CreateRoleOptions) GetName() (name string, err error)
- func (c *CreateRoleOptions) GetResorces() (resorces []string, err error)
- func (c *CreateRoleOptions) GetVerbose() (verbose bool)
- func (c *CreateRoleOptions) GetVerbs() (verbs []string, err error)
- func (c *CreateRoleOptions) MustGetName() (name string)
- func (c *CreateRoleOptions) MustGetResorces() (resorces []string)
- func (c *CreateRoleOptions) MustGetVerbs() (verbs []string)
- func (c *CreateRoleOptions) MustSetName(name string)
- func (c *CreateRoleOptions) MustSetResorces(resorces []string)
- func (c *CreateRoleOptions) MustSetVerbs(verbs []string)
- func (c *CreateRoleOptions) SetName(name string) (err error)
- func (c *CreateRoleOptions) SetResorces(resorces []string) (err error)
- func (c *CreateRoleOptions) SetVerbose(verbose bool)
- func (c *CreateRoleOptions) SetVerbs(verbs []string) (err error)
- type KubectlContext
- func (k *KubectlContext) GetCluster() (cluster string, err error)
- func (k *KubectlContext) GetName() (name string, err error)
- func (k *KubectlContext) MustGetCluster() (cluster string)
- func (k *KubectlContext) MustGetName() (name string)
- func (k *KubectlContext) MustSetCluster(cluster string)
- func (k *KubectlContext) MustSetName(name string)
- func (k *KubectlContext) SetCluster(cluster string) (err error)
- func (k *KubectlContext) SetName(name string) (err error)
- type KubernetesCluster
- func GetCommandExecutorKubernetsByName(commandExecutor commandexecutor.CommandExecutor, clusterName string) (kubernetes KubernetesCluster, err error)
- func GetLocalCommandExecutorKubernetesByName(clusterName string) (kubernetes KubernetesCluster, err error)
- func MustGetCommandExecutorKubernetsByName(commandExecutor commandexecutor.CommandExecutor, clusterName string) (kubernetes KubernetesCluster)
- func MustGetLocalCommandExecutorKubernetesByName(clusterName string) (kubernetes KubernetesCluster)
- type KubernetesControlplaneHost
- func GetKubernetesControlplaneByHost(host hosts.Host) (kubernetesControlplaneHost *KubernetesControlplaneHost, err error)
- func GetKubernetesControlplaneByHostname(hostname string) (kubernetesControlplaneHost *KubernetesControlplaneHost, err error)
- func MustGetKubernetesControlplaneByHost(host hosts.Host) (kubernetesControlplaneHost *KubernetesControlplaneHost)
- func MustGetKubernetesControlplaneByHostname(hostname string) (kubernetesControlplaneHost *KubernetesControlplaneHost)
- func NewKubernetesControlplaneHost() (kubernetesControlplaneHost *KubernetesControlplaneHost)
- func (k *KubernetesControlplaneHost) CheckIsKubernetesControlplane(verbose bool) (isKubernetesControlplane bool, err error)
- func (k *KubernetesControlplaneHost) GetJoinCommandAsString(verbose bool) (joinCommand string, err error)
- func (k *KubernetesControlplaneHost) GetJoinCommandAsStringSlice(verbose bool) (joinCommand []string, err error)
- func (k *KubernetesControlplaneHost) IsKubernetesControlplane(verbose bool) (isKubernetesControlplane bool, err error)
- func (k *KubernetesControlplaneHost) MustCheckIsKubernetesControlplane(verbose bool) (isKubernetesControlplane bool)
- func (k *KubernetesControlplaneHost) MustGetJoinCommandAsString(verbose bool) (joinCommand string)
- func (k *KubernetesControlplaneHost) MustGetJoinCommandAsStringSlice(verbose bool) (joinCommand []string)
- func (k *KubernetesControlplaneHost) MustIsKubernetesControlplane(verbose bool) (isKubernetesControlplane bool)
- type KubernetesNodeHost
- func GetKubernetesNodeByHost(host hosts.Host) (kubernetesNodeHost *KubernetesNodeHost, err error)
- func GetKubernetesNodeByHostname(hostname string) (kubernetesNodeHost *KubernetesNodeHost, err error)
- func MustGetKubernetesNodeByHost(host hosts.Host) (kubernetesNodeHost *KubernetesNodeHost)
- func MustGetKubernetesNodeByHostname(hostname string) (kubernetesNodeHost *KubernetesNodeHost)
- func NewKubernetesNodeHost() (kubernetesNodeHost *KubernetesNodeHost)
- func (k *KubernetesNodeHost) CheckIsKubernetesNode(verbose bool) (isKubernetesNode bool, err error)
- func (k *KubernetesNodeHost) IsKubernetesNode(verbose bool) (isKubernetesNode bool, err error)
- func (k *KubernetesNodeHost) MustCheckIsKubernetesNode(verbose bool) (isKubernetesNode bool)
- func (k *KubernetesNodeHost) MustIsKubernetesNode(verbose bool) (isKubernetesNode bool)
- type Namespace
- type Resource
- type ResourceYamlEntry
- type Role
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsInClusterAuthenticationAvailable ¶ added in v0.305.0
func MustSortResourcesYaml ¶
Same as SortResourcesYaml but panics on any error.
func SortResourcesYaml ¶
Sort resources in given multi yaml string. Resources are sorted by:
- Namespace
- Resource name
- Kind
Types ¶
type CommandExecutorKubernetes ¶
type CommandExecutorKubernetes struct {
// contains filtered or unexported fields
}
func NewCommandExecutorKubernetes ¶
func NewCommandExecutorKubernetes() (c *CommandExecutorKubernetes)
func (*CommandExecutorKubernetes) CreateNamespaceByName ¶
func (c *CommandExecutorKubernetes) CreateNamespaceByName(name string, verbose bool) (createdNamespace Namespace, err error)
func (*CommandExecutorKubernetes) DeleteNamespaceByName ¶
func (c *CommandExecutorKubernetes) DeleteNamespaceByName(name string, verbose bool) (err error)
func (*CommandExecutorKubernetes) GetCachedContextName ¶
func (c *CommandExecutorKubernetes) GetCachedContextName() (cachedContextName string, err error)
func (*CommandExecutorKubernetes) GetCachedKubectlContext ¶
func (c *CommandExecutorKubernetes) GetCachedKubectlContext(verbose bool) (context string, err error)
func (*CommandExecutorKubernetes) GetCommandExecutor ¶
func (c *CommandExecutorKubernetes) GetCommandExecutor() (commandExecutor commandexecutor.CommandExecutor, err error)
func (*CommandExecutorKubernetes) GetKubectlContext ¶
func (c *CommandExecutorKubernetes) GetKubectlContext(verbose bool) (context string, err error)
func (*CommandExecutorKubernetes) GetKubectlContexts ¶
func (c *CommandExecutorKubernetes) GetKubectlContexts() (contexts []KubectlContext, err error)
func (*CommandExecutorKubernetes) GetName ¶
func (c *CommandExecutorKubernetes) GetName() (name string, err error)
Returns the kubernetes cluster name
func (*CommandExecutorKubernetes) GetNamespaceByName ¶
func (c *CommandExecutorKubernetes) GetNamespaceByName(name string) (namespace Namespace, err error)
func (*CommandExecutorKubernetes) GetResourceByNames ¶
func (*CommandExecutorKubernetes) ListNamespaceNames ¶
func (c *CommandExecutorKubernetes) ListNamespaceNames(verbose bool) (namespaceNames []string, err error)
func (*CommandExecutorKubernetes) ListNamespaces ¶
func (c *CommandExecutorKubernetes) ListNamespaces(verbose bool) (namespaces []Namespace, err error)
func (*CommandExecutorKubernetes) ListResourceNames ¶
func (c *CommandExecutorKubernetes) ListResourceNames(options *parameteroptions.ListKubernetesResourcesOptions) (resourceNames []string, err error)
func (*CommandExecutorKubernetes) ListResources ¶
func (c *CommandExecutorKubernetes) ListResources(options *parameteroptions.ListKubernetesResourcesOptions) (resources []Resource, err error)
func (*CommandExecutorKubernetes) MustCreateNamespaceByName ¶
func (c *CommandExecutorKubernetes) MustCreateNamespaceByName(name string, verbose bool) (createdNamespace Namespace)
func (*CommandExecutorKubernetes) MustDeleteNamespaceByName ¶
func (c *CommandExecutorKubernetes) MustDeleteNamespaceByName(name string, verbose bool)
func (*CommandExecutorKubernetes) MustGetCachedContextName ¶
func (c *CommandExecutorKubernetes) MustGetCachedContextName() (cachedContextName string)
func (*CommandExecutorKubernetes) MustGetCachedKubectlContext ¶
func (c *CommandExecutorKubernetes) MustGetCachedKubectlContext(verbose bool) (context string)
func (*CommandExecutorKubernetes) MustGetCommandExecutor ¶
func (c *CommandExecutorKubernetes) MustGetCommandExecutor() (commandExecutor commandexecutor.CommandExecutor)
func (*CommandExecutorKubernetes) MustGetKubectlContext ¶
func (c *CommandExecutorKubernetes) MustGetKubectlContext(verbose bool) (context string)
func (*CommandExecutorKubernetes) MustGetKubectlContexts ¶
func (c *CommandExecutorKubernetes) MustGetKubectlContexts() (contexts []KubectlContext)
func (*CommandExecutorKubernetes) MustGetName ¶
func (c *CommandExecutorKubernetes) MustGetName() (name string)
func (*CommandExecutorKubernetes) MustGetNamespaceByName ¶
func (c *CommandExecutorKubernetes) MustGetNamespaceByName(name string) (namespace Namespace)
func (*CommandExecutorKubernetes) MustGetResourceByNames ¶
func (c *CommandExecutorKubernetes) MustGetResourceByNames(resourceName string, resourceType string, namespaceName string) (resource Resource)
func (*CommandExecutorKubernetes) MustListNamespaceNames ¶
func (c *CommandExecutorKubernetes) MustListNamespaceNames(verbose bool) (namespaceNames []string)
func (*CommandExecutorKubernetes) MustListNamespaces ¶
func (c *CommandExecutorKubernetes) MustListNamespaces(verbose bool) (namespaces []Namespace)
func (*CommandExecutorKubernetes) MustListResourceNames ¶
func (c *CommandExecutorKubernetes) MustListResourceNames(options *parameteroptions.ListKubernetesResourcesOptions) (resourceNames []string)
func (*CommandExecutorKubernetes) MustListResources ¶
func (c *CommandExecutorKubernetes) MustListResources(options *parameteroptions.ListKubernetesResourcesOptions) (resources []Resource)
func (*CommandExecutorKubernetes) MustNamespaceByNameExists ¶
func (c *CommandExecutorKubernetes) MustNamespaceByNameExists(name string, verbose bool) (exists bool)
func (*CommandExecutorKubernetes) MustSetCachedContextName ¶
func (c *CommandExecutorKubernetes) MustSetCachedContextName(cachedContextName string)
func (*CommandExecutorKubernetes) MustSetCommandExecutor ¶
func (c *CommandExecutorKubernetes) MustSetCommandExecutor(commandExecutor commandexecutor.CommandExecutor)
func (*CommandExecutorKubernetes) MustSetName ¶
func (c *CommandExecutorKubernetes) MustSetName(name string)
func (*CommandExecutorKubernetes) NamespaceByNameExists ¶
func (c *CommandExecutorKubernetes) NamespaceByNameExists(name string, verbose bool) (exists bool, err error)
func (*CommandExecutorKubernetes) RunCommand ¶
func (c *CommandExecutorKubernetes) RunCommand(ctx context.Context, runCommandOptions *parameteroptions.RunCommandOptions) (commandOutput *commandexecutor.CommandOutput, err error)
func (*CommandExecutorKubernetes) RunCommandAndGetStdoutAsLines ¶
func (c *CommandExecutorKubernetes) RunCommandAndGetStdoutAsLines(ctx context.Context, runCommandOptions *parameteroptions.RunCommandOptions) (lines []string, err error)
func (*CommandExecutorKubernetes) SetCachedContextName ¶
func (c *CommandExecutorKubernetes) SetCachedContextName(cachedContextName string) (err error)
func (*CommandExecutorKubernetes) SetCommandExecutor ¶
func (c *CommandExecutorKubernetes) SetCommandExecutor(commandExecutor commandexecutor.CommandExecutor) (err error)
func (*CommandExecutorKubernetes) SetName ¶
func (c *CommandExecutorKubernetes) SetName(name string) (err error)
type CommandExecutorNamespace ¶
type CommandExecutorNamespace struct {
// contains filtered or unexported fields
}
func NewCommandExecutorNamespace ¶
func NewCommandExecutorNamespace() (c *CommandExecutorNamespace)
func (*CommandExecutorNamespace) Create ¶
func (c *CommandExecutorNamespace) Create(ctx context.Context) (err error)
func (*CommandExecutorNamespace) CreateRole ¶
func (c *CommandExecutorNamespace) CreateRole(createOptions *CreateRoleOptions) (createdRole Role, err error)
func (*CommandExecutorNamespace) DeleteRoleByName ¶
func (c *CommandExecutorNamespace) DeleteRoleByName(name string, verbose bool) (err error)
func (*CommandExecutorNamespace) GetCachedKubectlContext ¶
func (c *CommandExecutorNamespace) GetCachedKubectlContext(verbose bool) (context string, err error)
func (*CommandExecutorNamespace) GetClusterName ¶
func (c *CommandExecutorNamespace) GetClusterName() (clusterName string, err error)
func (*CommandExecutorNamespace) GetCommandExecutor ¶
func (c *CommandExecutorNamespace) GetCommandExecutor() (commandExecutor commandexecutor.CommandExecutor, err error)
func (*CommandExecutorNamespace) GetKubectlContext ¶
func (c *CommandExecutorNamespace) GetKubectlContext(ctx context.Context) (contextName string, err error)
func (*CommandExecutorNamespace) GetKubernetesCluster ¶
func (c *CommandExecutorNamespace) GetKubernetesCluster() (kubernetesCluster KubernetesCluster, err error)
func (*CommandExecutorNamespace) GetName ¶
func (c *CommandExecutorNamespace) GetName() (name string, err error)
func (*CommandExecutorNamespace) GetResourceByNames ¶
func (c *CommandExecutorNamespace) GetResourceByNames(resourceName string, resourceType string) (resource Resource, err error)
func (*CommandExecutorNamespace) GetRoleByName ¶
func (c *CommandExecutorNamespace) GetRoleByName(name string) (role Role, err error)
func (*CommandExecutorNamespace) ListRoleNames ¶
func (c *CommandExecutorNamespace) ListRoleNames(verbose bool) (roleNames []string, err error)
func (*CommandExecutorNamespace) MustDeleteRoleByName ¶
func (c *CommandExecutorNamespace) MustDeleteRoleByName(name string, verbose bool)
func (*CommandExecutorNamespace) MustGetCachedKubectlContext ¶
func (c *CommandExecutorNamespace) MustGetCachedKubectlContext(verbose bool) (context string)
func (*CommandExecutorNamespace) MustGetClusterName ¶
func (c *CommandExecutorNamespace) MustGetClusterName() (clusterName string)
func (*CommandExecutorNamespace) MustGetCommandExecutor ¶
func (c *CommandExecutorNamespace) MustGetCommandExecutor() (commandExecutor commandexecutor.CommandExecutor)
func (*CommandExecutorNamespace) MustGetKubernetesCluster ¶
func (c *CommandExecutorNamespace) MustGetKubernetesCluster() (kubernetesCluster KubernetesCluster)
func (*CommandExecutorNamespace) MustGetName ¶
func (c *CommandExecutorNamespace) MustGetName() (name string)
func (*CommandExecutorNamespace) MustGetResourceByNames ¶
func (c *CommandExecutorNamespace) MustGetResourceByNames(resourceName string, resourceType string) (resource Resource)
func (*CommandExecutorNamespace) MustGetRoleByName ¶
func (c *CommandExecutorNamespace) MustGetRoleByName(name string) (role Role)
func (*CommandExecutorNamespace) MustListRoleNames ¶
func (c *CommandExecutorNamespace) MustListRoleNames(verbose bool) (roleNames []string)
func (*CommandExecutorNamespace) MustRoleByNameExists ¶
func (c *CommandExecutorNamespace) MustRoleByNameExists(name string, verbose bool) (exists bool)
func (*CommandExecutorNamespace) MustSetKubernetesCluster ¶
func (c *CommandExecutorNamespace) MustSetKubernetesCluster(kubernetesCluster KubernetesCluster)
func (*CommandExecutorNamespace) MustSetName ¶
func (c *CommandExecutorNamespace) MustSetName(name string)
func (*CommandExecutorNamespace) RoleByNameExists ¶
func (c *CommandExecutorNamespace) RoleByNameExists(name string, verbose bool) (exists bool, err error)
func (*CommandExecutorNamespace) RunCommand ¶
func (c *CommandExecutorNamespace) RunCommand(ctx context.Context, runCommandOptions *parameteroptions.RunCommandOptions) (commandOutput *commandexecutor.CommandOutput, err error)
func (*CommandExecutorNamespace) RunCommandAndGetStdoutAsLines ¶
func (c *CommandExecutorNamespace) RunCommandAndGetStdoutAsLines(ctx context.Context, runCommandOptions *parameteroptions.RunCommandOptions) (lines []string, err error)
func (*CommandExecutorNamespace) SetKubernetesCluster ¶
func (c *CommandExecutorNamespace) SetKubernetesCluster(kubernetesCluster KubernetesCluster) (err error)
func (*CommandExecutorNamespace) SetName ¶
func (c *CommandExecutorNamespace) SetName(name string) (err error)
type CommandExecutorResource ¶
type CommandExecutorResource struct {
// contains filtered or unexported fields
}
func NewCommandExecutorResource ¶
func NewCommandExecutorResource() (c *CommandExecutorResource)
func (*CommandExecutorResource) CreateByYamlString ¶
func (c *CommandExecutorResource) CreateByYamlString(ctx context.Context, yamlString string) (err error)
func (*CommandExecutorResource) Delete ¶
func (c *CommandExecutorResource) Delete(ctx context.Context) (err error)
func (*CommandExecutorResource) EnsureNamespaceExists ¶
func (c *CommandExecutorResource) EnsureNamespaceExists(ctx context.Context) (err error)
func (*CommandExecutorResource) Exists ¶
func (c *CommandExecutorResource) Exists(ctx context.Context) (exists bool, err error)
func (*CommandExecutorResource) GetAsYamlString ¶
func (c *CommandExecutorResource) GetAsYamlString() (yamlString string, err error)
func (*CommandExecutorResource) GetClusterName ¶
func (c *CommandExecutorResource) GetClusterName() (clusterName string, err error)
func (*CommandExecutorResource) GetCommandExecutor ¶
func (c *CommandExecutorResource) GetCommandExecutor() (commandExecutor commandexecutor.CommandExecutor, err error)
func (*CommandExecutorResource) GetKubectlContext ¶
func (c *CommandExecutorResource) GetKubectlContext(ctx context.Context) (contextName string, err error)
func (*CommandExecutorResource) GetName ¶
func (c *CommandExecutorResource) GetName() (name string, err error)
func (*CommandExecutorResource) GetNamespace ¶
func (c *CommandExecutorResource) GetNamespace() (namespace Namespace, err error)
func (*CommandExecutorResource) GetNamespaceName ¶
func (c *CommandExecutorResource) GetNamespaceName() (namsepaceName string, err error)
func (*CommandExecutorResource) GetResourceAndTypeAndNamespaceAndClusterName ¶
func (*CommandExecutorResource) GetTypeName ¶
func (c *CommandExecutorResource) GetTypeName() (typeName string, err error)
func (*CommandExecutorResource) MustGetAsYamlString ¶
func (c *CommandExecutorResource) MustGetAsYamlString() (yamlString string)
func (*CommandExecutorResource) MustGetClusterName ¶
func (c *CommandExecutorResource) MustGetClusterName() (clusterName string)
func (*CommandExecutorResource) MustGetCommandExecutor ¶
func (c *CommandExecutorResource) MustGetCommandExecutor() (commandExecutor commandexecutor.CommandExecutor)
func (*CommandExecutorResource) MustGetName ¶
func (c *CommandExecutorResource) MustGetName() (name string)
func (*CommandExecutorResource) MustGetNamespace ¶
func (c *CommandExecutorResource) MustGetNamespace() (namespace Namespace)
func (*CommandExecutorResource) MustGetNamespaceName ¶
func (c *CommandExecutorResource) MustGetNamespaceName() (namsepaceName string)
func (*CommandExecutorResource) MustGetResourceAndTypeAndNamespaceAndClusterName ¶
func (c *CommandExecutorResource) MustGetResourceAndTypeAndNamespaceAndClusterName() (resourceName string, resourceTypeName string, namespaceName string, clusterName string)
func (*CommandExecutorResource) MustGetTypeName ¶
func (c *CommandExecutorResource) MustGetTypeName() (typeName string)
func (*CommandExecutorResource) MustSetCommandExecutor ¶
func (c *CommandExecutorResource) MustSetCommandExecutor(commandExecutor commandexecutor.CommandExecutor)
func (*CommandExecutorResource) MustSetName ¶
func (c *CommandExecutorResource) MustSetName(name string)
func (*CommandExecutorResource) MustSetNamespace ¶
func (c *CommandExecutorResource) MustSetNamespace(namespace Namespace)
func (*CommandExecutorResource) MustSetTypeName ¶
func (c *CommandExecutorResource) MustSetTypeName(typeName string)
func (*CommandExecutorResource) SetCommandExecutor ¶
func (c *CommandExecutorResource) SetCommandExecutor(commandExecutor commandexecutor.CommandExecutor) (err error)
func (*CommandExecutorResource) SetName ¶
func (c *CommandExecutorResource) SetName(name string) (err error)
func (*CommandExecutorResource) SetNamespace ¶
func (c *CommandExecutorResource) SetNamespace(namespace Namespace) (err error)
func (*CommandExecutorResource) SetTypeName ¶
func (c *CommandExecutorResource) SetTypeName(typeName string) (err error)
type CommandExecutorRole ¶
type CommandExecutorRole struct {
// contains filtered or unexported fields
}
func NewCommandExecutorRole ¶
func NewCommandExecutorRole() (c *CommandExecutorRole)
func (*CommandExecutorRole) GetName ¶
func (c *CommandExecutorRole) GetName() (name string, err error)
func (*CommandExecutorRole) GetNamespace ¶
func (c *CommandExecutorRole) GetNamespace() (namespace Namespace, err error)
func (*CommandExecutorRole) MustGetName ¶
func (c *CommandExecutorRole) MustGetName() (name string)
func (*CommandExecutorRole) MustGetNamespace ¶
func (c *CommandExecutorRole) MustGetNamespace() (namespace Namespace)
func (*CommandExecutorRole) MustSetName ¶
func (c *CommandExecutorRole) MustSetName(name string)
func (*CommandExecutorRole) MustSetNamespace ¶
func (c *CommandExecutorRole) MustSetNamespace(namespace Namespace)
func (*CommandExecutorRole) SetName ¶
func (c *CommandExecutorRole) SetName(name string) (err error)
func (*CommandExecutorRole) SetNamespace ¶
func (c *CommandExecutorRole) SetNamespace(namespace Namespace) (err error)
type CreateRoleOptions ¶
func NewCreateRoleOptions ¶
func NewCreateRoleOptions() (c *CreateRoleOptions)
func (*CreateRoleOptions) GetName ¶
func (c *CreateRoleOptions) GetName() (name string, err error)
func (*CreateRoleOptions) GetResorces ¶
func (c *CreateRoleOptions) GetResorces() (resorces []string, err error)
func (*CreateRoleOptions) GetVerbose ¶
func (c *CreateRoleOptions) GetVerbose() (verbose bool)
func (*CreateRoleOptions) GetVerbs ¶
func (c *CreateRoleOptions) GetVerbs() (verbs []string, err error)
func (*CreateRoleOptions) MustGetName ¶
func (c *CreateRoleOptions) MustGetName() (name string)
func (*CreateRoleOptions) MustGetResorces ¶
func (c *CreateRoleOptions) MustGetResorces() (resorces []string)
func (*CreateRoleOptions) MustGetVerbs ¶
func (c *CreateRoleOptions) MustGetVerbs() (verbs []string)
func (*CreateRoleOptions) MustSetName ¶
func (c *CreateRoleOptions) MustSetName(name string)
func (*CreateRoleOptions) MustSetResorces ¶
func (c *CreateRoleOptions) MustSetResorces(resorces []string)
func (*CreateRoleOptions) MustSetVerbs ¶
func (c *CreateRoleOptions) MustSetVerbs(verbs []string)
func (*CreateRoleOptions) SetName ¶
func (c *CreateRoleOptions) SetName(name string) (err error)
func (*CreateRoleOptions) SetResorces ¶
func (c *CreateRoleOptions) SetResorces(resorces []string) (err error)
func (*CreateRoleOptions) SetVerbose ¶
func (c *CreateRoleOptions) SetVerbose(verbose bool)
func (*CreateRoleOptions) SetVerbs ¶
func (c *CreateRoleOptions) SetVerbs(verbs []string) (err error)
type KubectlContext ¶
type KubectlContext struct {
// contains filtered or unexported fields
}
func NewKubectlContext ¶
func NewKubectlContext() (k *KubectlContext)
func (*KubectlContext) GetCluster ¶
func (k *KubectlContext) GetCluster() (cluster string, err error)
func (*KubectlContext) GetName ¶
func (k *KubectlContext) GetName() (name string, err error)
func (*KubectlContext) MustGetCluster ¶
func (k *KubectlContext) MustGetCluster() (cluster string)
func (*KubectlContext) MustGetName ¶
func (k *KubectlContext) MustGetName() (name string)
func (*KubectlContext) MustSetCluster ¶
func (k *KubectlContext) MustSetCluster(cluster string)
func (*KubectlContext) MustSetName ¶
func (k *KubectlContext) MustSetName(name string)
func (*KubectlContext) SetCluster ¶
func (k *KubectlContext) SetCluster(cluster string) (err error)
func (*KubectlContext) SetName ¶
func (k *KubectlContext) SetName(name string) (err error)
type KubernetesCluster ¶
type KubernetesCluster interface { CreateNamespaceByName(namespaceName string, verbose bool) (createdNamespace Namespace, err error) DeleteNamespaceByName(namespaceName string, verbose bool) (err error) GetKubectlContext(verbose bool) (contextName string, err error) GetName() (name string, err error) GetNamespaceByName(name string) (namespace Namespace, err error) GetResourceByNames(resourceName string, resourceType string, namespaceName string) (resource Resource, err error) ListNamespaces(verbose bool) (namespaces []Namespace, err error) ListNamespaceNames(verbose bool) (namespaceNames []string, err error) ListResources(options *parameteroptions.ListKubernetesResourcesOptions) (resources []Resource, err error) ListResourceNames(options *parameteroptions.ListKubernetesResourcesOptions) (resourceNames []string, err error) MustNamespaceByNameExists(namespaceName string, verbose bool) (exist bool) MustDeleteNamespaceByName(namespaceName string, verbose bool) MustCreateNamespaceByName(namespaceName string, verbose bool) (createdNamespace Namespace) MustGetKubectlContext(verbose bool) (contextName string) MustGetName() (name string) MustGetNamespaceByName(name string) (namespace Namespace) MustGetResourceByNames(resourceName string, resourceType string, namespaceName string) (resource Resource) MustListNamespaces(verbose bool) (namespaces []Namespace) MustListNamespaceNames(verbose bool) (namespaceNames []string) MustListResources(options *parameteroptions.ListKubernetesResourcesOptions) (resources []Resource) MustListResourceNames(options *parameteroptions.ListKubernetesResourcesOptions) (resourceNames []string) NamespaceByNameExists(namespaceName string, verbose bool) (exist bool, err error) }
func GetCommandExecutorKubernetsByName ¶
func GetCommandExecutorKubernetsByName(commandExecutor commandexecutor.CommandExecutor, clusterName string) (kubernetes KubernetesCluster, err error)
func GetLocalCommandExecutorKubernetesByName ¶
func GetLocalCommandExecutorKubernetesByName(clusterName string) (kubernetes KubernetesCluster, err error)
func MustGetCommandExecutorKubernetsByName ¶
func MustGetCommandExecutorKubernetsByName(commandExecutor commandexecutor.CommandExecutor, clusterName string) (kubernetes KubernetesCluster)
func MustGetLocalCommandExecutorKubernetesByName ¶
func MustGetLocalCommandExecutorKubernetesByName(clusterName string) (kubernetes KubernetesCluster)
type KubernetesControlplaneHost ¶
func GetKubernetesControlplaneByHost ¶
func GetKubernetesControlplaneByHost(host hosts.Host) (kubernetesControlplaneHost *KubernetesControlplaneHost, err error)
func GetKubernetesControlplaneByHostname ¶
func GetKubernetesControlplaneByHostname(hostname string) (kubernetesControlplaneHost *KubernetesControlplaneHost, err error)
func MustGetKubernetesControlplaneByHost ¶
func MustGetKubernetesControlplaneByHost(host hosts.Host) (kubernetesControlplaneHost *KubernetesControlplaneHost)
func MustGetKubernetesControlplaneByHostname ¶
func MustGetKubernetesControlplaneByHostname(hostname string) (kubernetesControlplaneHost *KubernetesControlplaneHost)
func NewKubernetesControlplaneHost ¶
func NewKubernetesControlplaneHost() (kubernetesControlplaneHost *KubernetesControlplaneHost)
func (*KubernetesControlplaneHost) CheckIsKubernetesControlplane ¶
func (k *KubernetesControlplaneHost) CheckIsKubernetesControlplane(verbose bool) (isKubernetesControlplane bool, err error)
func (*KubernetesControlplaneHost) GetJoinCommandAsString ¶
func (k *KubernetesControlplaneHost) GetJoinCommandAsString(verbose bool) (joinCommand string, err error)
func (*KubernetesControlplaneHost) GetJoinCommandAsStringSlice ¶
func (k *KubernetesControlplaneHost) GetJoinCommandAsStringSlice(verbose bool) (joinCommand []string, err error)
func (*KubernetesControlplaneHost) IsKubernetesControlplane ¶
func (k *KubernetesControlplaneHost) IsKubernetesControlplane(verbose bool) (isKubernetesControlplane bool, err error)
func (*KubernetesControlplaneHost) MustCheckIsKubernetesControlplane ¶
func (k *KubernetesControlplaneHost) MustCheckIsKubernetesControlplane(verbose bool) (isKubernetesControlplane bool)
func (*KubernetesControlplaneHost) MustGetJoinCommandAsString ¶
func (k *KubernetesControlplaneHost) MustGetJoinCommandAsString(verbose bool) (joinCommand string)
func (*KubernetesControlplaneHost) MustGetJoinCommandAsStringSlice ¶
func (k *KubernetesControlplaneHost) MustGetJoinCommandAsStringSlice(verbose bool) (joinCommand []string)
func (*KubernetesControlplaneHost) MustIsKubernetesControlplane ¶
func (k *KubernetesControlplaneHost) MustIsKubernetesControlplane(verbose bool) (isKubernetesControlplane bool)
type KubernetesNodeHost ¶
func GetKubernetesNodeByHost ¶
func GetKubernetesNodeByHost(host hosts.Host) (kubernetesNodeHost *KubernetesNodeHost, err error)
func GetKubernetesNodeByHostname ¶
func GetKubernetesNodeByHostname(hostname string) (kubernetesNodeHost *KubernetesNodeHost, err error)
func MustGetKubernetesNodeByHost ¶
func MustGetKubernetesNodeByHost(host hosts.Host) (kubernetesNodeHost *KubernetesNodeHost)
func MustGetKubernetesNodeByHostname ¶
func MustGetKubernetesNodeByHostname(hostname string) (kubernetesNodeHost *KubernetesNodeHost)
func NewKubernetesNodeHost ¶
func NewKubernetesNodeHost() (kubernetesNodeHost *KubernetesNodeHost)
func (*KubernetesNodeHost) CheckIsKubernetesNode ¶
func (k *KubernetesNodeHost) CheckIsKubernetesNode(verbose bool) (isKubernetesNode bool, err error)
func (*KubernetesNodeHost) IsKubernetesNode ¶
func (k *KubernetesNodeHost) IsKubernetesNode(verbose bool) (isKubernetesNode bool, err error)
func (*KubernetesNodeHost) MustCheckIsKubernetesNode ¶
func (k *KubernetesNodeHost) MustCheckIsKubernetesNode(verbose bool) (isKubernetesNode bool)
func (*KubernetesNodeHost) MustIsKubernetesNode ¶
func (k *KubernetesNodeHost) MustIsKubernetesNode(verbose bool) (isKubernetesNode bool)
type Namespace ¶
type Namespace interface { Create(ctx context.Context) (err error) CreateRole(createOptions *CreateRoleOptions) (createdRole Role, err error) DeleteRoleByName(name string, verbose bool) (err error) GetClusterName() (clusterName string, err error) GetKubectlContext(ctx context.Context) (contextName string, err error) GetName() (name string, err error) GetResourceByNames(resourceName string, resourceType string) (resource Resource, err error) GetRoleByName(name string) (role Role, err error) ListRoleNames(verbose bool) (roleNames []string, err error) RoleByNameExists(name string, verbose bool) (exists bool, err error) }
type Resource ¶
type Resource interface { CreateByYamlString(ctx context.Context, roleYaml string) (err error) Delete(ctx context.Context) (err error) Exists(ctx context.Context) (exists bool, err error) GetAsYamlString() (yamlString string, err error) }
a generic representation of a kubernetes resource like a pod, ingress, role...
func GetCommandExecutorResource ¶
func GetCommandExecutorResource(commandExectutor commandexecutor.CommandExecutor, namespace Namespace, resourceName string, resourceType string) (resource Resource, err error)
func MustGetCommandExecutorResource ¶
func MustGetCommandExecutorResource(commandExectutor commandexecutor.CommandExecutor, namespace Namespace, resourceName string, resourceType string) (resource Resource)
type ResourceYamlEntry ¶
type ResourceYamlEntry struct {
Content string
}
func UnmarshalResourceYaml ¶
func UnmarshalResourceYaml(resourceYaml string) (resources []*ResourceYamlEntry, err error)
func (*ResourceYamlEntry) Kind ¶
func (r *ResourceYamlEntry) Kind() (name string)
func (*ResourceYamlEntry) Name ¶
func (r *ResourceYamlEntry) Name() (name string)
func (*ResourceYamlEntry) Namespace ¶
func (r *ResourceYamlEntry) Namespace() (namespace string)
func (*ResourceYamlEntry) Validate ¶
func (r *ResourceYamlEntry) Validate() (err error)
Source Files
¶
Click to show internal directories.
Click to hide internal directories.