Documentation ¶
Index ¶
- Constants
- Variables
- func AddHandlers(p Handler) error
- func BreakdownRule(rule rbacv1.PolicyRule) []rbacv1.PolicyRule
- func ClusterRoleBindingHandler(ctx context.Context, clusterRoleBinding *rbacv1.ClusterRoleBinding, ...) (component.Component, error)
- func ClusterRoleBindingListHandler(ctx context.Context, clusterRoleBindingList *rbacv1.ClusterRoleBindingList, ...) (component.Component, error)
- func ClusterRoleHandler(ctx context.Context, clusterRole *rbacv1.ClusterRole, options Options) (component.Component, error)
- func ClusterRoleListHandler(ctx context.Context, list *rbacv1.ClusterRoleList, options Options) (component.Component, error)
- func CombineResourceGroup(resource, group []string) string
- func ConfigMapHandler(ctx context.Context, cm *corev1.ConfigMap, options Options) (component.Component, error)
- func ConfigMapListHandler(ctx context.Context, list *corev1.ConfigMapList, opts Options) (component.Component, error)
- func CreateCRDConditionsTable(crd *apiextv1.CustomResourceDefinition) (*component.Table, error)
- func CreateCustomResourceList(crdObject *unstructured.Unstructured, resources *unstructured.UnstructuredList, ...) (component.Component, error)
- func CronJobHandler(ctx context.Context, cronJob *batchv1beta1.CronJob, options Options) (component.Component, error)
- func CronJobListHandler(ctx context.Context, list *batchv1beta1.CronJobList, opts Options) (component.Component, error)
- func CustomResourceDefinitionHandler(ctx context.Context, crd *apiextv1.CustomResourceDefinition, options Options) (component.Component, error)
- func CustomResourceDefinitionListHandler(ctx context.Context, list *apiextv1.CustomResourceDefinitionList, opts Options) (component.Component, error)
- func CustomResourceDefinitionVersionList(ctx context.Context, crd *unstructured.Unstructured, namespace string, ...) (component.Component, error)
- func CustomResourceHandler(ctx context.Context, crd, cr *unstructured.Unstructured, options Options) (component.Component, error)
- func DaemonSetHandler(ctx context.Context, daemonSet *appsv1.DaemonSet, options Options) (component.Component, error)
- func DaemonSetListHandler(ctx context.Context, list *appsv1.DaemonSetList, opts Options) (component.Component, error)
- func DefaultPrintFunc(_ context.Context, object runtime.Object, _ Options) (component.Component, error)
- func DeploymentHandler(ctx context.Context, deployment *appsv1.Deployment, options Options) (component.Component, error)
- func DeploymentListHandler(ctx context.Context, list *appsv1.DeploymentList, opts Options) (component.Component, error)
- func EventHandler(ctx context.Context, event *corev1.Event, opts Options) (component.Component, error)
- func EventListHandler(ctx context.Context, list *corev1.EventList, opts Options) (component.Component, error)
- func HorizontalPodAutoscalerHandler(ctx context.Context, ...) (component.Component, error)
- func HorizontalPodAutoscalerListHandler(ctx context.Context, list *autoscalingv1.HorizontalPodAutoscalerList, ...) (component.Component, error)
- func IngressHandler(ctx context.Context, ingress *extv1beta1.Ingress, options Options) (component.Component, error)
- func IngressListHandler(ctx context.Context, list *extv1beta1.IngressList, options Options) (component.Component, error)
- func JobHandler(ctx context.Context, job *batchv1.Job, options Options) (component.Component, error)
- func JobListHandler(ctx context.Context, list *batchv1.JobList, opts Options) (component.Component, error)
- func MetadataHandler(object runtime.Object, linkGenerator link.Interface) (*component.FlexLayout, error)
- func NamespaceHandler(ctx context.Context, namespace *corev1.Namespace, options Options) (component.Component, error)
- func NamespaceListHandler(ctx context.Context, list *corev1.NamespaceList, options Options) (component.Component, error)
- func NetworkPolicyHandler(ctx context.Context, networkPolicy *networkingv1.NetworkPolicy, ...) (component.Component, error)
- func NetworkPolicyListHandler(ctx context.Context, list *networkingv1.NetworkPolicyList, options Options) (component.Component, error)
- func NodeHandler(ctx context.Context, node *corev1.Node, options Options) (component.Component, error)
- func NodeListHandler(ctx context.Context, list *corev1.NodeList, options Options) (component.Component, error)
- func ObjectReferencePath(or corev1.ObjectReference) (string, error)
- func PersistentVolumeClaimHandler(ctx context.Context, persistentVolumeClaim *corev1.PersistentVolumeClaim, ...) (component.Component, error)
- func PersistentVolumeClaimListHandler(ctx context.Context, list *corev1.PersistentVolumeClaimList, options Options) (component.Component, error)
- func PersistentVolumeHandler(ctx context.Context, pv *corev1.PersistentVolume, options Options) (component.Component, error)
- func PersistentVolumeListHandler(ctx context.Context, list *corev1.PersistentVolumeList, options Options) (component.Component, error)
- func PodHandler(ctx context.Context, pod *corev1.Pod, options Options) (component.Component, error)
- func PodListHandler(ctx context.Context, list *corev1.PodList, opts Options) (component.Component, error)
- func PrintEvents(list *corev1.EventList, opts Options) (component.Component, error)
- func ReplicaSetHandler(ctx context.Context, replicaSet *appsv1.ReplicaSet, options Options) (component.Component, error)
- func ReplicaSetListHandler(ctx context.Context, list *appsv1.ReplicaSetList, opts Options) (component.Component, error)
- func ReplicationControllerHandler(ctx context.Context, rc *corev1.ReplicationController, options Options) (component.Component, error)
- func ReplicationControllerListHandler(ctx context.Context, list *corev1.ReplicationControllerList, options Options) (component.Component, error)
- func RoleBindingHandler(ctx context.Context, roleBinding *rbacv1.RoleBinding, options Options) (component.Component, error)
- func RoleBindingListHandler(ctx context.Context, roleBindingList *rbacv1.RoleBindingList, opts Options) (component.Component, error)
- func RoleHandler(ctx context.Context, role *rbacv1.Role, options Options) (component.Component, error)
- func RoleListHandler(ctx context.Context, roleList *rbacv1.RoleList, options Options) (component.Component, error)
- func SecretHandler(ctx context.Context, secret *corev1.Secret, options Options) (component.Component, error)
- func SecretListHandler(ctx context.Context, list *corev1.SecretList, options Options) (component.Component, error)
- func ServiceAccountHandler(ctx context.Context, serviceAccount *corev1.ServiceAccount, options Options) (component.Component, error)
- func ServiceAccountListHandler(ctx context.Context, list *corev1.ServiceAccountList, options Options) (component.Component, error)
- func ServiceAccountSecrets(ctx context.Context, account *corev1.ServiceAccount, options Options) (*component.Table, error)
- func ServiceHandler(ctx context.Context, service *corev1.Service, options Options) (component.Component, error)
- func ServiceListHandler(ctx context.Context, list *corev1.ServiceList, options Options) (component.Component, error)
- func StatefulSetHandler(ctx context.Context, statefulSet *appsv1.StatefulSet, options Options) (component.Component, error)
- func StatefulSetListHandler(ctx context.Context, list *appsv1.StatefulSetList, options Options) (component.Component, error)
- func ValidatePrintHandlerFunc(printFunc reflect.Value) error
- type CRDSummaryFunc
- type ClusterRoleBindingConfiguration
- type ClusterRoleConfiguration
- type ConfigMapConfiguration
- type ContainerConfiguration
- type ContainerConfigurationOption
- type CronJobConfiguration
- type CustomResourceDefinitionSummary
- type CustomResourceDefinitionSummaryOption
- type DaemonSetConfiguration
- type DefaultObjectFactory
- type DeploymentConfiguration
- type Handler
- type HorizontalPodAutoscalerConfiguration
- type IngressConfiguration
- type ItemDescriptor
- type JobConfiguration
- type JobTemplate
- type JobTemplateHeader
- type Metadata
- type NamespaceResourceLimits
- type NamespaceResourceQuotas
- type NamespaceStatus
- type NetworkPolicyConfiguration
- type NodeConfiguration
- type Object
- func (o *Object) AddButton(name string, payload action.Payload, buttonOptions ...component.ButtonOption)
- func (o *Object) EnableEvents()
- func (o *Object) EnableJobTemplate(templateSpec batchv1beta1.JobTemplateSpec)
- func (o *Object) EnablePodTemplate(templateSpec corev1.PodTemplateSpec)
- func (o *Object) RegisterConfig(summary *component.Summary)
- func (o *Object) RegisterItems(items ...ItemDescriptor)
- func (o *Object) RegisterSummary(summary *component.Summary)
- func (o *Object) ToComponent(ctx context.Context, options Options) (component.Component, error)
- type ObjectFactory
- type ObjectInterface
- type ObjectOpts
- type ObjectPrinterFunc
- type ObjectPrinterLayoutFunc
- type ObjectTable
- func (ol *ObjectTable) AddFilters(filters map[string]component.TableFilter)
- func (ol *ObjectTable) AddRowForObject(ctx context.Context, object runtime.Object, row component.TableRow) error
- func (ol *ObjectTable) SetSortOrder(name string, reverse bool)
- func (ol *ObjectTable) ToComponent() (component.Component, error)
- type Options
- type PersistentVolumeClaimConfiguration
- type PersistentVolumeConfiguration
- type PersistentVolumeStatus
- type PodConfiguration
- type PodTemplate
- type PodTemplateHeader
- type Printer
- type ReplicaSetConfiguration
- type ReplicaSetStatus
- type ReplicationControllerConfiguration
- type ReplicationControllerStatus
- type Resource
- type RoleBindingConfiguration
- type RoleConfiguration
- type SecretConfiguration
- type ServiceAccountConfiguration
- type ServiceAccountPolicyRules
- type ServiceConfiguration
- type StatefulSetConfiguration
- type StatefulSetStatus
Constants ¶
const ServiceAccountSecretPlaceholder = "No secrets"
ServiceAccountSecretPlaceholder is the table placeholder for service account secrets.
Variables ¶
var ( // CRDConditionsColumns are columns for a crd conditions table. CRDConditionsColumns = component.NewTableCols("Type", "Status", "Last Transition Time", "Message", "Reason") )
var (
JobCols = component.NewTableCols("Name", "Labels", "Completions", "Successful", "Age")
)
var ServiceAccountSecretCols = component.NewTableCols("Name", "Type")
ServiceAccountSecretCols are columns for a service account secrets table.
Functions ¶
func BreakdownRule ¶
func BreakdownRule(rule rbacv1.PolicyRule) []rbacv1.PolicyRule
BreakdownRule takes a rule and builds an equivalent list of rules that each have at most one verb, one resource, and one resource name
func ClusterRoleBindingHandler ¶
func ClusterRoleBindingHandler(ctx context.Context, clusterRoleBinding *rbacv1.ClusterRoleBinding, options Options) (component.Component, error)
ClusterRoleBindingHandler is a printFunc that prints a ClusterRoleBinding
func ClusterRoleBindingListHandler ¶
func ClusterRoleBindingListHandler(ctx context.Context, clusterRoleBindingList *rbacv1.ClusterRoleBindingList, options Options) (component.Component, error)
ClusterRoleBindingListHandler is a printFunc that prints ClusterRoldBindings
func ClusterRoleHandler ¶
func ClusterRoleHandler(ctx context.Context, clusterRole *rbacv1.ClusterRole, options Options) (component.Component, error)
ClusterRoleHandler is a printFunc that prints a cluster role
func ClusterRoleListHandler ¶
func ClusterRoleListHandler(ctx context.Context, list *rbacv1.ClusterRoleList, options Options) (component.Component, error)
ClusterRoleListHandler is a printFunc that prints cluster roles
func CombineResourceGroup ¶
func ConfigMapHandler ¶
func ConfigMapHandler(ctx context.Context, cm *corev1.ConfigMap, options Options) (component.Component, error)
ConfigMapHandler is a printFunc that prints a ConfigMap
func ConfigMapListHandler ¶
func ConfigMapListHandler(ctx context.Context, list *corev1.ConfigMapList, opts Options) (component.Component, error)
ConfigMapListHandler is a printFunc that prints ConfigMaps
func CreateCRDConditionsTable ¶ added in v0.14.0
func CreateCRDConditionsTable(crd *apiextv1.CustomResourceDefinition) (*component.Table, error)
CreateCRDConditionsTable creates a crd conditions table.
func CreateCustomResourceList ¶ added in v0.14.0
func CreateCustomResourceList(crdObject *unstructured.Unstructured, resources *unstructured.UnstructuredList, version string, linkGenerator link.Interface) (component.Component, error)
CreateCustomResourceList prints a list of custom resources as a table with optional custom columns.
func CronJobHandler ¶
func CronJobHandler(ctx context.Context, cronJob *batchv1beta1.CronJob, options Options) (component.Component, error)
CronJobHandler is a printFunc that prints a CronJob
func CronJobListHandler ¶
func CronJobListHandler(ctx context.Context, list *batchv1beta1.CronJobList, opts Options) (component.Component, error)
CronJobListHandler is a printFunc that lists cronjobs
func CustomResourceDefinitionHandler ¶ added in v0.10.0
func CustomResourceDefinitionHandler( ctx context.Context, crd *apiextv1.CustomResourceDefinition, options Options) (component.Component, error)
CustomResourceDefinitionHandler is a print func that prints a custom resource definition.
func CustomResourceDefinitionListHandler ¶ added in v0.14.0
func CustomResourceDefinitionListHandler( ctx context.Context, list *apiextv1.CustomResourceDefinitionList, opts Options) (component.Component, error)
CustomResourceDefinitionListHandler is a printFunc that lists custom resource definitions.
func CustomResourceDefinitionVersionList ¶ added in v0.14.0
func CustomResourceDefinitionVersionList( ctx context.Context, crd *unstructured.Unstructured, namespace string, options Options) (component.Component, error)
CustomResourceDefinitionVersionList lists crd versions.
func CustomResourceHandler ¶
func CustomResourceHandler(ctx context.Context, crd, cr *unstructured.Unstructured, options Options) (component.Component, error)
CustomResourceHandler prints custom resource objects. If the object has columns specified, it will print those columns as well.
func DaemonSetHandler ¶
func DaemonSetHandler(ctx context.Context, daemonSet *appsv1.DaemonSet, options Options) (component.Component, error)
DaemonSetHandler is a printFunc that prints a daemon set
func DaemonSetListHandler ¶
func DaemonSetListHandler(ctx context.Context, list *appsv1.DaemonSetList, opts Options) (component.Component, error)
DaemonSetListHandler is a printFunc that lists daemon sets
func DefaultPrintFunc ¶
func DefaultPrintFunc(_ context.Context, object runtime.Object, _ Options) (component.Component, error)
DefaultPrintFunc is a default object printer. It prints Kubernetes resource lists with three columns: name, labels, age. Returns nil if the object should not be printed.
func DeploymentHandler ¶
func DeploymentHandler(ctx context.Context, deployment *appsv1.Deployment, options Options) (component.Component, error)
DeploymentHandler is a printFunc that prints a Deployments.
func DeploymentListHandler ¶
func DeploymentListHandler(ctx context.Context, list *appsv1.DeploymentList, opts Options) (component.Component, error)
DeploymentListHandler is a printFunc that lists deployments
func EventHandler ¶
func EventListHandler ¶
func EventListHandler(ctx context.Context, list *corev1.EventList, opts Options) (component.Component, error)
EventListHandler is a printFunc that lists events.
func HorizontalPodAutoscalerHandler ¶
func HorizontalPodAutoscalerHandler(ctx context.Context, horizontalPodAutoscaler *autoscalingv1.HorizontalPodAutoscaler, options Options) (component.Component, error)
HorizontalPodAutoscalerHandler is a printFunc that prints a HorizontalPodAutoscaler
func HorizontalPodAutoscalerListHandler ¶
func HorizontalPodAutoscalerListHandler(ctx context.Context, list *autoscalingv1.HorizontalPodAutoscalerList, options Options) (component.Component, error)
HorizontalPodAutoscalerListHandler is a printFunc that lists horizontal pod autoscalers
func IngressHandler ¶
func IngressHandler(ctx context.Context, ingress *extv1beta1.Ingress, options Options) (component.Component, error)
IngressHandler is a printFunc that prints an Ingress
func IngressListHandler ¶
func IngressListHandler(ctx context.Context, list *extv1beta1.IngressList, options Options) (component.Component, error)
IngressListHandler is a printFunc that prints ingresses
func JobHandler ¶
func JobHandler(ctx context.Context, job *batchv1.Job, options Options) (component.Component, error)
JobHandler printers a job.
func JobListHandler ¶
func JobListHandler(ctx context.Context, list *batchv1.JobList, opts Options) (component.Component, error)
JobListHandler prints a job list.
func MetadataHandler ¶ added in v0.10.0
func MetadataHandler(object runtime.Object, linkGenerator link.Interface) (*component.FlexLayout, error)
MetadataHandler converts object metadata to a flex layout containing object metadata.
func NamespaceHandler ¶
func NamespaceListHandler ¶
func NetworkPolicyHandler ¶ added in v0.12.0
func NetworkPolicyHandler(ctx context.Context, networkPolicy *networkingv1.NetworkPolicy, options Options) (component.Component, error)
NetworkPolicyHandler is a printFunc that prints NetworkPolicies
func NetworkPolicyListHandler ¶ added in v0.12.0
func NetworkPolicyListHandler(ctx context.Context, list *networkingv1.NetworkPolicyList, options Options) (component.Component, error)
NetworkPolicyListHandler is a printFunc that prints network policies
func NodeHandler ¶
func NodeHandler(ctx context.Context, node *corev1.Node, options Options) (component.Component, error)
NodeHandler is a printFunc that prints nodes
func NodeListHandler ¶
func NodeListHandler(ctx context.Context, list *corev1.NodeList, options Options) (component.Component, error)
NodeListHandler is a printFunc that prints nodes
func ObjectReferencePath ¶
func ObjectReferencePath(or corev1.ObjectReference) (string, error)
ObjectReferencePath returns the overview path for an object reference. Currently, this does not support custom resources.
func PersistentVolumeClaimHandler ¶
func PersistentVolumeClaimHandler(ctx context.Context, persistentVolumeClaim *corev1.PersistentVolumeClaim, options Options) (component.Component, error)
PersistentVolumeClaimHandler is a printFunc that prints a PersistentVolumeClaim
func PersistentVolumeClaimListHandler ¶
func PersistentVolumeClaimListHandler(ctx context.Context, list *corev1.PersistentVolumeClaimList, options Options) (component.Component, error)
PersistentVolumeClaimListHandler is a printFunc that prints persistentvolumeclaims
func PersistentVolumeHandler ¶ added in v0.11.0
func PersistentVolumeHandler(ctx context.Context, pv *corev1.PersistentVolume, options Options) (component.Component, error)
PersistentVolumeHandler is a printFunc that creates a component to display a single Persistent Volume
func PersistentVolumeListHandler ¶ added in v0.11.0
func PersistentVolumeListHandler(ctx context.Context, list *corev1.PersistentVolumeList, options Options) (component.Component, error)
PersistentVolumeListHandler is a printFunc that creates a component to display multiple Persistent Volumes
func PodHandler ¶
PodHandler is a printFunc that prints Pods
func PodListHandler ¶
func PodListHandler(ctx context.Context, list *corev1.PodList, opts Options) (component.Component, error)
PodListHandler is a printFunc that prints pods
func PrintEvents ¶
PrintEvents collects events for a resource
func ReplicaSetHandler ¶
func ReplicaSetHandler(ctx context.Context, replicaSet *appsv1.ReplicaSet, options Options) (component.Component, error)
ReplicaSetHandler is a printFunc that prints a ReplicaSets.
func ReplicaSetListHandler ¶
func ReplicaSetListHandler(ctx context.Context, list *appsv1.ReplicaSetList, opts Options) (component.Component, error)
ReplicaSetListHandler is a printFunc that lists deployments
func ReplicationControllerHandler ¶
func ReplicationControllerHandler(ctx context.Context, rc *corev1.ReplicationController, options Options) (component.Component, error)
ReplicationControllerHandler is a printFunc that prints a ReplicationController
func ReplicationControllerListHandler ¶
func ReplicationControllerListHandler(ctx context.Context, list *corev1.ReplicationControllerList, options Options) (component.Component, error)
ReplicationControllerListHandler is a printFunc that lists ReplicationControllers
func RoleBindingHandler ¶
func RoleBindingHandler(ctx context.Context, roleBinding *rbacv1.RoleBinding, options Options) (component.Component, error)
RoleBindingHandler is a printfunc that prints a RoleBinding
func RoleBindingListHandler ¶
func RoleBindingListHandler(ctx context.Context, roleBindingList *rbacv1.RoleBindingList, opts Options) (component.Component, error)
RoleBindingListHandler is a printFunc that prints RoleBindings
func RoleHandler ¶
func RoleHandler(ctx context.Context, role *rbacv1.Role, options Options) (component.Component, error)
RoleHandler is a printFunc that prints roles
func RoleListHandler ¶
func RoleListHandler(ctx context.Context, roleList *rbacv1.RoleList, options Options) (component.Component, error)
RoleListHandler is a printFunc that prints roles
func SecretHandler ¶
func SecretHandler(ctx context.Context, secret *corev1.Secret, options Options) (component.Component, error)
SecretHandler is a printFunc for printing a secret summary.
func SecretListHandler ¶
func SecretListHandler(ctx context.Context, list *corev1.SecretList, options Options) (component.Component, error)
SecretListHandler is a printFunc that lists secrets.
func ServiceAccountHandler ¶
func ServiceAccountHandler(ctx context.Context, serviceAccount *corev1.ServiceAccount, options Options) (component.Component, error)
ServiceAccountHandler is a printFunc that prints ServiceAccounts
func ServiceAccountListHandler ¶
func ServiceAccountListHandler(ctx context.Context, list *corev1.ServiceAccountList, options Options) (component.Component, error)
ServiceAccountListHandler is a printFunc that prints service accounts
func ServiceAccountSecrets ¶ added in v0.13.0
func ServiceAccountSecrets( ctx context.Context, account *corev1.ServiceAccount, options Options) (*component.Table, error)
ServiceAccountSecrets generates a service account secrets table. It will return a nil table if there are no secrets.
func ServiceHandler ¶
func ServiceHandler(ctx context.Context, service *corev1.Service, options Options) (component.Component, error)
ServiceHandler is a printFunc that prints a Services.
func ServiceListHandler ¶
func ServiceListHandler(ctx context.Context, list *corev1.ServiceList, options Options) (component.Component, error)
ServiceListHandler is a printFunc that lists services
func StatefulSetHandler ¶
func StatefulSetHandler(ctx context.Context, statefulSet *appsv1.StatefulSet, options Options) (component.Component, error)
StatefulSetHandler is a printFunc that prints a StatefulSet
func StatefulSetListHandler ¶
func StatefulSetListHandler(ctx context.Context, list *appsv1.StatefulSetList, options Options) (component.Component, error)
StatefulSetListHandler is a printFunc that list stateful sets
func ValidatePrintHandlerFunc ¶
ValidatePrintHandlerFunc validates print handler signature. printFunc is the function that will be called to print an object. printFunc must be of the following type:
func printFunc(ctx context.Context, object ObjectType, options Options) (component.Component, error)
where:
ObjectType is the type of object that will be printed
Types ¶
type CRDSummaryFunc ¶ added in v0.14.0
type ClusterRoleBindingConfiguration ¶
type ClusterRoleBindingConfiguration struct {
// contains filtered or unexported fields
}
ClusterRoleBindingConfiguration generates a clusterrolebinding configuration
func NewClusterRoleBindingConfiguration ¶
func NewClusterRoleBindingConfiguration(clusterRoleBinding *rbacv1.ClusterRoleBinding) *ClusterRoleBindingConfiguration
NewClusterRoleBindingConfiguration creates an instance of ClusterRoleBindingConfiguration
type ClusterRoleConfiguration ¶
type ClusterRoleConfiguration struct {
// contains filtered or unexported fields
}
ClusterRoleConfiguration generates a clusterrole configuration
func NewClusterRoleConfiguration ¶
func NewClusterRoleConfiguration(clusterRole *rbacv1.ClusterRole) *ClusterRoleConfiguration
NewClusterRoleConfiguration creates an instance of ClusterRoleConfiguration
type ConfigMapConfiguration ¶
type ConfigMapConfiguration struct {
// contains filtered or unexported fields
}
ConfigMapConfiguration generates config map configuration
func NewConfigMapConfiguration ¶
func NewConfigMapConfiguration(cm *corev1.ConfigMap) *ConfigMapConfiguration
NewConfigMapConfiguration creates an instance of ConfigMapConfiguration
type ContainerConfiguration ¶
type ContainerConfiguration struct {
// contains filtered or unexported fields
}
ContainerConfiguration generates container configuration.
func NewContainerConfiguration ¶
func NewContainerConfiguration(ctx context.Context, parent runtime.Object, c *corev1.Container, pfs portforward.PortForwarder, opts ...ContainerConfigurationOption) *ContainerConfiguration
NewContainerConfiguration creates an instance of ContainerConfiguration.
type ContainerConfigurationOption ¶ added in v0.12.0
type ContainerConfigurationOption func(*ContainerConfiguration)
ContainerConfigurationOption
func IsInit ¶ added in v0.12.0
func IsInit(b bool) ContainerConfigurationOption
func WithActions ¶ added in v0.12.0
func WithActions(actions ...containerActionFunc) ContainerConfigurationOption
func WithPrintOptions ¶ added in v0.12.0
func WithPrintOptions(options Options) ContainerConfigurationOption
type CronJobConfiguration ¶
type CronJobConfiguration struct {
// contains filtered or unexported fields
}
CronJobConfiguration generates cronjob configuration
func NewCronJobConfiguration ¶
func NewCronJobConfiguration(c *batchv1beta1.CronJob) *CronJobConfiguration
NewCronJobConfiguration creates an instance of CronJobConfiguration
type CustomResourceDefinitionSummary ¶ added in v0.14.0
type CustomResourceDefinitionSummary struct {
// contains filtered or unexported fields
}
CustomResourceDefinitionSummary creates a crd summary.
func NewCustomResourceDefinitionSummary ¶ added in v0.14.0
func NewCustomResourceDefinitionSummary( crd *apiextv1.CustomResourceDefinition, object ObjectInterface, options ...CustomResourceDefinitionSummaryOption) *CustomResourceDefinitionSummary
NewCustomResourceDefinitionSummary creates an instance of CustomResourceDefinitionSummary.
func (*CustomResourceDefinitionSummary) BuildConfig ¶ added in v0.14.0
func (h *CustomResourceDefinitionSummary) BuildConfig() error
BuildConfig adds configuration data for a crd to the summary.
func (*CustomResourceDefinitionSummary) BuildItems ¶ added in v0.14.0
func (h *CustomResourceDefinitionSummary) BuildItems(options Options) error
BuildItems adds additional items to the crd summary.
type CustomResourceDefinitionSummaryOption ¶ added in v0.14.0
type CustomResourceDefinitionSummaryOption func(s *CustomResourceDefinitionSummary)
CustomResourceDefinitionSummaryOption is an option for configuring CustomResourceDefinitionSummary.
func CustomResourceDefinitionSummaryItems ¶ added in v0.14.0
func CustomResourceDefinitionSummaryItems(funcs ...CRDSummaryFunc) CustomResourceDefinitionSummaryOption
type DaemonSetConfiguration ¶
type DaemonSetConfiguration struct {
// contains filtered or unexported fields
}
DaemonSetConfiguration generates a daemonset configuration
func NewDaemonSetConfiguration ¶
func NewDaemonSetConfiguration(ds *appsv1.DaemonSet) *DaemonSetConfiguration
NewDaemonSetConfiguration creates an instance of DaemonSetConfiguration
type DefaultObjectFactory ¶ added in v0.14.0
type DefaultObjectFactory struct {
// contains filtered or unexported fields
}
func NewDefaultObjectFactory ¶ added in v0.14.0
func NewDefaultObjectFactory() *DefaultObjectFactory
type DeploymentConfiguration ¶
type DeploymentConfiguration struct {
// contains filtered or unexported fields
}
DeploymentConfiguration generates deployment configuration.
func NewDeploymentConfiguration ¶
func NewDeploymentConfiguration(d *appsv1.Deployment) *DeploymentConfiguration
NewDeploymentConfiguration creates an instance of DeploymentConfiguration.
type Handler ¶
type Handler interface {
Handler(printFunc interface{}) error
}
Handler configures handlers for a printer.
type HorizontalPodAutoscalerConfiguration ¶
type HorizontalPodAutoscalerConfiguration struct {
// contains filtered or unexported fields
}
HorizontalPodAutoscalerConfiguration generates a horizontalpodautoscaler configuration
func NewHorizontalPodAutoscalerConfiguration ¶
func NewHorizontalPodAutoscalerConfiguration(hpa *autoscalingv1.HorizontalPodAutoscaler) *HorizontalPodAutoscalerConfiguration
NewHorizontalPodAutoscalerConfiguration creates an instance of HorizontalPodAutoscalerConfiguration
type IngressConfiguration ¶
type IngressConfiguration struct {
// contains filtered or unexported fields
}
IngressConfiguration generates an ingress configuration
func NewIngressConfiguration ¶
func NewIngressConfiguration(ingress *extv1beta1.Ingress) *IngressConfiguration
NewIngressConfiguration creates an instance of Ingressconfiguration
type ItemDescriptor ¶
type ItemDescriptor struct { Component component.Component Func ObjectPrinterFunc Width int }
ItemDescriptor describes a func to print a view and its width.
type JobConfiguration ¶
type JobConfiguration struct {
// contains filtered or unexported fields
}
JobConfiguration generates a job configuration
func NewJobConfiguration ¶
func NewJobConfiguration(job *batchv1.Job) *JobConfiguration
NewJobConfiguration creates an instance of JobConfiguration
type JobTemplate ¶
type JobTemplate struct {
// contains filtered or unexported fields
}
func NewJobTemplate ¶
func NewJobTemplate(ctx context.Context, parent runtime.Object, jobTemplateSpec batchv1beta1.JobTemplateSpec) *JobTemplate
func (*JobTemplate) AddToFlexLayout ¶
func (jt *JobTemplate) AddToFlexLayout(fl *flexlayout.FlexLayout, options Options) error
type JobTemplateHeader ¶
type JobTemplateHeader struct {
// contains filtered or unexported fields
}
JobTemplateHeader creates a job template header
func NewJobTemplateHeader ¶
func NewJobTemplateHeader(labels map[string]string) *JobTemplateHeader
NewJobTemplateHeader creates an instance of JobTemplateHeader
type Metadata ¶
type Metadata struct {
// contains filtered or unexported fields
}
Metadata represents object metadata.
func NewMetadata ¶
NewMetadata creates an instance of Metadata.
func (*Metadata) AddToFlexLayout ¶
func (m *Metadata) AddToFlexLayout(fl *flexlayout.FlexLayout) error
AddToFlexLayout adds metadata to a flex layout.
type NamespaceResourceLimits ¶
type NamespaceResourceLimits struct {
// contains filtered or unexported fields
}
NamespaceResourceLimits creates a namespace resource limit component.
func NewNamespaceResourceLimits ¶
func NewNamespaceResourceLimits(namespace *corev1.Namespace) *NamespaceResourceLimits
type NamespaceResourceQuotas ¶
type NamespaceResourceQuotas struct {
// contains filtered or unexported fields
}
NamespaceResourceQuotas creates a namespace resource quota component.
func NewNamespaceResourceQuotas ¶
func NewNamespaceResourceQuotas(namespace *corev1.Namespace) *NamespaceResourceQuotas
func (*NamespaceResourceQuotas) Create ¶
func (n *NamespaceResourceQuotas) Create(ctx context.Context, options Options) (*component.FlexLayout, error)
type NamespaceStatus ¶
type NamespaceStatus struct {
// contains filtered or unexported fields
}
NamespaceStatus creates a namespace status component.
func NewNamespaceStatus ¶
func NewNamespaceStatus(namespace *corev1.Namespace) *NamespaceStatus
NewNamespaceStatus creates an instance of NamespaceStatus
type NetworkPolicyConfiguration ¶ added in v0.12.0
type NetworkPolicyConfiguration struct {
// contains filtered or unexported fields
}
NetworkPolicyConfiguration generates networkPolicy configuration
func NewNetworkPolicyConfiguration ¶ added in v0.12.0
func NewNetworkPolicyConfiguration(n *networkingv1.NetworkPolicy) *NetworkPolicyConfiguration
NewNetworkPolicyConfiguration creates an instance of NetworkPolicyConfiguration
type NodeConfiguration ¶
type NodeConfiguration struct {
// contains filtered or unexported fields
}
NodeConfiguration generates a node configuration
func NewNodeConfiguration ¶
func NewNodeConfiguration(node *corev1.Node) *NodeConfiguration
NewNodeConfiguration creates an instance of NodeConfiguration
type Object ¶
type Object struct { PodTemplateGen func(context.Context, runtime.Object, corev1.PodTemplateSpec, *flexlayout.FlexLayout, Options) error JobTemplateGen func(context.Context, runtime.Object, batchv1beta1.JobTemplateSpec, *flexlayout.FlexLayout, Options) error EventsGen func(ctx context.Context, object runtime.Object, fl *flexlayout.FlexLayout, options Options) error // contains filtered or unexported fields }
Object prints an object.
func CustomResourceDefinitionObjectFactory ¶ added in v0.14.0
CustomResourceDefinitionObjectFactory is an object factory that describes a crd summary.
func NewObject ¶
func NewObject(object runtime.Object, options ...ObjectOpts) *Object
NewObject creates an instance of Object.
func (*Object) EnableEvents ¶
func (o *Object) EnableEvents()
EnableEvents enables the event view for the object.
func (*Object) EnableJobTemplate ¶
func (o *Object) EnableJobTemplate(templateSpec batchv1beta1.JobTemplateSpec)
EnableJobTemplate enables the job template view for the object.
func (*Object) EnablePodTemplate ¶
func (o *Object) EnablePodTemplate(templateSpec corev1.PodTemplateSpec)
EnablePodTemplate enables the pod template view for the object.
func (*Object) RegisterConfig ¶
RegisterConfig registers the config view for an object.
func (*Object) RegisterItems ¶
func (o *Object) RegisterItems(items ...ItemDescriptor)
RegisterItems registers one or more items to be printed in a section. Each call to RegisterItems will create a new section.
func (*Object) RegisterSummary ¶
RegisterSummary registers a summary view for an object.
type ObjectFactory ¶ added in v0.14.0
type ObjectInterface ¶
type ObjectInterface interface { // AddButton adds a button. AddButton(name string, payload action.Payload, buttonOptions ...component.ButtonOption) // EnableEvents enables showing events. EnableEvents() // EnableJobTemplate adds a job template. EnableJobTemplate(templateSpec batchv1beta1.JobTemplateSpec) // EnablePodTemplate adds a pod template. EnablePodTemplate(templateSpec corev1.PodTemplateSpec) // RegisterConfig registers a config summary component. RegisterConfig(summary *component.Summary) // RegisterItems registers items to be shown RegisterItems(items ...ItemDescriptor) // RegisterSummary registers a summary summary component. RegisterSummary(summary *component.Summary) }
ObjectInterface is an interface for printing an object.
type ObjectPrinterFunc ¶
ObjectPrinterFunc is a func that create a view.
type ObjectPrinterLayoutFunc ¶
type ObjectPrinterLayoutFunc func(*flexlayout.FlexLayout) error
ObjectPrinterLayoutFunc is a func that render a view in a flex layout.
type ObjectTable ¶ added in v0.13.0
type ObjectTable struct {
// contains filtered or unexported fields
}
ObjectTable is a helper for creating a table containing a list of objects.
func NewObjectTable ¶ added in v0.13.0
func NewObjectTable(title, placeholder string, cols []component.TableCol, objectStore store.Store) *ObjectTable
NewObjectTable creates an instance of ObjectTable.
func (*ObjectTable) AddFilters ¶ added in v0.13.0
func (ol *ObjectTable) AddFilters(filters map[string]component.TableFilter)
AddFilters adds filters to a set of table columns.
func (*ObjectTable) AddRowForObject ¶ added in v0.13.0
func (ol *ObjectTable) AddRowForObject(ctx context.Context, object runtime.Object, row component.TableRow) error
AddRowForObject adds a row for an object to the table.
func (*ObjectTable) SetSortOrder ¶ added in v0.13.0
func (ol *ObjectTable) SetSortOrder(name string, reverse bool)
SetSortOrder sets the sort order for the table.
func (*ObjectTable) ToComponent ¶ added in v0.13.0
func (ol *ObjectTable) ToComponent() (component.Component, error)
ToComponent converts the ObjectTable instance to a component.
type Options ¶
type Options struct { DisableLabels bool DashConfig config.Dash Link link.Interface ObjectFactory ObjectFactory }
Options provides options to a print handler
type PersistentVolumeClaimConfiguration ¶
type PersistentVolumeClaimConfiguration struct {
// contains filtered or unexported fields
}
PersistentVolumeClaimConfiguration generates a persistenvolumeclaim configuration
func NewPersistentVolumeClaimConfiguration ¶
func NewPersistentVolumeClaimConfiguration(pvc *corev1.PersistentVolumeClaim) *PersistentVolumeClaimConfiguration
NewPersistentVolumeClaimConfiguration creates an instance of PersistentVolumeClaimConfiguration
type PersistentVolumeConfiguration ¶ added in v0.11.0
type PersistentVolumeConfiguration struct {
// contains filtered or unexported fields
}
PersistentVolumeConfiguration is used to create the Persistent Volume's configuration component when displaying a single Persistent Volume
func NewPersistentVolumeConfiguration ¶ added in v0.11.0
func NewPersistentVolumeConfiguration(pv *corev1.PersistentVolume) *PersistentVolumeConfiguration
NewPersistentVolumeConfiguration creates a new PersistentVolumeConfiguration using the supplied Persistent Volume
type PersistentVolumeStatus ¶ added in v0.11.0
type PersistentVolumeStatus struct {
// contains filtered or unexported fields
}
PersistentVolumeStatus is used to create the Persistent Volume's status component when displaying a single Persistent Volume
func NewPersistentVolumeStatus ¶ added in v0.11.0
func NewPersistentVolumeStatus(pv *corev1.PersistentVolume) *PersistentVolumeStatus
NewPersistentVolumeStatus creates a new PersistentVolumeStatus using the supplied Persistent Volume
type PodConfiguration ¶
type PodConfiguration struct {
// contains filtered or unexported fields
}
PodConfiguration generates pod configuration.
func NewPodConfiguration ¶
func NewPodConfiguration(p *corev1.Pod) *PodConfiguration
NewPodConfiguration creates an instance of PodConfiguration.
type PodTemplate ¶
type PodTemplate struct {
// contains filtered or unexported fields
}
func NewPodTemplate ¶
func NewPodTemplate(parent runtime.Object, podTemplateSpec corev1.PodTemplateSpec) *PodTemplate
func (*PodTemplate) AddToFlexLayout ¶
func (pt *PodTemplate) AddToFlexLayout(ctx context.Context, fl *flexlayout.FlexLayout, options Options) error
type PodTemplateHeader ¶
type PodTemplateHeader struct {
// contains filtered or unexported fields
}
PodTemplateHeader creates a pod template header. It consists of a selectors component with title `Pod Template` and the associated match selectors.
func NewPodTemplateHeader ¶
func NewPodTemplateHeader(labels map[string]string) *PodTemplateHeader
NewPodTemplateHeader creates an instance of PodTemplateHeader.
func (*PodTemplateHeader) Create ¶
func (pth *PodTemplateHeader) Create() *component.Labels
Create creates a labels component.
type Printer ¶
type Printer interface { // Print prints a runtime object. Print(ctx context.Context, object runtime.Object) (component.Component, error) }
Printer is an interface for printing runtime objects.
type ReplicaSetConfiguration ¶
type ReplicaSetConfiguration struct {
// contains filtered or unexported fields
}
ReplicaSetConfiguration generates a replicaset configuration
func NewReplicaSetConfiguration ¶
func NewReplicaSetConfiguration(rs *appsv1.ReplicaSet) *ReplicaSetConfiguration
NewReplicaSetConfiguration creates an instance of ReplicaSetConfiguration
type ReplicaSetStatus ¶
type ReplicaSetStatus struct {
// contains filtered or unexported fields
}
ReplicaSetStatus generates a replicaset status
func NewReplicaSetStatus ¶
func NewReplicaSetStatus(ctx context.Context, replicaSet *appsv1.ReplicaSet, options Options) *ReplicaSetStatus
NewReplicaSetStatus creates an instance of ReplicaSetStatus
type ReplicationControllerConfiguration ¶
type ReplicationControllerConfiguration struct {
// contains filtered or unexported fields
}
ReplicationControllerConfiguration generates a replicationcontroller configuration
func NewReplicationControllerConfiguration ¶
func NewReplicationControllerConfiguration(rc *corev1.ReplicationController) *ReplicationControllerConfiguration
NewReplicationControllerConfiguration creates an instance of ReplicationControllerConfiguration
type ReplicationControllerStatus ¶
type ReplicationControllerStatus struct {
// contains filtered or unexported fields
}
ReplicationControllerStatus generates a replication controller status
func NewReplicationControllerStatus ¶
func NewReplicationControllerStatus(ctx context.Context, replicationController *corev1.ReplicationController, options Options) *ReplicationControllerStatus
NewReplicationControllerStatus creates an instance of ReplicationControllerStatus
type Resource ¶
type Resource struct {
// contains filtered or unexported fields
}
Resource prints runtime objects.
func NewResource ¶
NewResource creates an instance of ResourcePrinter.
type RoleBindingConfiguration ¶
type RoleBindingConfiguration struct {
// contains filtered or unexported fields
}
RoleBindingConfiguration generates a rolebinding configuration
func NewRoleBindingConfiguration ¶
func NewRoleBindingConfiguration(roleBinding *rbacv1.RoleBinding) *RoleBindingConfiguration
NewRoleBindingConfiguration creates an instance of RoleBindingConfiguration
type RoleConfiguration ¶
type RoleConfiguration struct {
// contains filtered or unexported fields
}
RoleConfiguration generates a role configuration
func NewRoleConfiguration ¶
func NewRoleConfiguration(role *rbacv1.Role) *RoleConfiguration
NewRoleConfiguration creates an instance of RoleConfiguration
type SecretConfiguration ¶
type SecretConfiguration struct {
// contains filtered or unexported fields
}
SecretConfiguration generates a secret configuration
func NewSecretConfiguration ¶
func NewSecretConfiguration(secret *corev1.Secret) *SecretConfiguration
NewSecretConfiguration creates an instance of SecretConfiguration
type ServiceAccountConfiguration ¶
type ServiceAccountConfiguration struct {
// contains filtered or unexported fields
}
ServiceAccountConfiguration generates a service account configuration
func NewServiceAccountConfiguration ¶
func NewServiceAccountConfiguration(ctx context.Context, serviceAccount *corev1.ServiceAccount, options Options) *ServiceAccountConfiguration
NewServiceAccountConfiguration creates an instance of ServiceAccountConfiguration
type ServiceAccountPolicyRules ¶
type ServiceAccountPolicyRules struct {
// contains filtered or unexported fields
}
ServiceAccountPolicyRules generates a service account policy rule
func NewServiceAccountPolicyRules ¶
func NewServiceAccountPolicyRules(ctx context.Context, serviceAccount *corev1.ServiceAccount, options Options) *ServiceAccountPolicyRules
NewServiceAccountPolicyRules creates an instance of ServiceAccountPolicyRules
type ServiceConfiguration ¶
type ServiceConfiguration struct {
// contains filtered or unexported fields
}
ServiceConfiguration generates a service configuration
func NewServiceConfiguration ¶
func NewServiceConfiguration(service *corev1.Service) *ServiceConfiguration
NewServiceConfiguration creates an instance of ServiceConfiguration
type StatefulSetConfiguration ¶
type StatefulSetConfiguration struct {
// contains filtered or unexported fields
}
StatefulSetConfiguration generates a statefulset configuration
func NewStatefulSetConfiguration ¶
func NewStatefulSetConfiguration(statefulSet *appsv1.StatefulSet) *StatefulSetConfiguration
NewStatefulSetConfiguration creates an instance of StatefulSetConfiguration
type StatefulSetStatus ¶
type StatefulSetStatus struct {
// contains filtered or unexported fields
}
StatefulSetStatus generates a statefulset status
func NewStatefulSetStatus ¶
func NewStatefulSetStatus(ctx context.Context, statefulSet *appsv1.StatefulSet, options Options) *StatefulSetStatus
NewStatefulSetStatus creates an instance of StatefulSetStatus
Source Files ¶
- affinity.go
- clusterrole.go
- clusterrolebinding.go
- configmap.go
- container.go
- cronjob.go
- customresource.go
- customresourcedefinition.go
- daemonset.go
- deployment.go
- event.go
- handler.go
- horizontalpodautoscaler.go
- ingress.go
- job.go
- job_template.go
- label_selector.go
- metadata.go
- namespace.go
- networkpolicy.go
- node.go
- object.go
- object_factory.go
- object_table.go
- path.go
- persistentvolume.go
- persistentvolumeclaim.go
- pod.go
- pod_template.go
- policyrules.go
- printer.go
- replicaset.go
- replicationcontroller.go
- role.go
- rolebinding.go
- secret.go
- selector.go
- service.go
- serviceaccount.go
- statefulset.go
- tolerations.go
- volume.go