printer

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2020 License: Apache-2.0 Imports: 45 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	JobCols = component.NewTableCols("Name", "Labels", "Completions", "Successful", "Age")
)

Functions

func AddHandlers

func AddHandlers(p Handler) error

AddHandlers adds print handlers to a printer.

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(_ 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(_ context.Context, list *rbacv1.ClusterRoleList, options Options) (component.Component, error)

ClusterRoleListHandler is a printFunc that prints cluster roles

func CombineResourceGroup

func CombineResourceGroup(resource, group []string) string

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(_ context.Context, list *corev1.ConfigMapList, opts Options) (component.Component, error)

ConfigMapListHandler is a printFunc that prints ConfigMaps

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 *unstructured.Unstructured, namespace string, options Options) (component.Component, error)

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 CustomResourceListHandler

func CustomResourceListHandler(crdObject *unstructured.Unstructured, resources *unstructured.UnstructuredList, version string, linkGenerator link.Interface) (component.Component, error)

CustomResourceListHandler prints a list of custom resources with optional custom columns.

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(_ 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(_ context.Context, list *appsv1.DeploymentList, opts Options) (component.Component, error)

DeploymentListHandler is a printFunc that lists deployments

func EventHandler

func EventHandler(ctx context.Context, event *corev1.Event, opts Options) (component.Component, error)

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(_ 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(_ 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(_ 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 NamespaceHandler(ctx context.Context, namespace *corev1.Namespace, options Options) (component.Component, error)

func NamespaceListHandler

func NamespaceListHandler(_ context.Context, list *corev1.NamespaceList, options Options) (component.Component, error)

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(_ 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

func PodHandler(ctx context.Context, pod *corev1.Pod, options Options) (component.Component, error)

PodHandler is a printFunc that prints Pods

func PodListHandler

func PodListHandler(_ context.Context, list *corev1.PodList, opts Options) (component.Component, error)

PodListHandler is a printFunc that prints pods

func PrintEvents

func PrintEvents(list *corev1.EventList, opts Options) (component.Component, error)

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(_ 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(_ context.Context, list *corev1.ServiceAccountList, options Options) (component.Component, error)

ServiceAccountListHandler is a printFunc that prints service accounts

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(_ 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(_ context.Context, list *appsv1.StatefulSetList, options Options) (component.Component, error)

StatefulSetListHandler is a printFunc that list stateful sets

func ValidatePrintHandlerFunc

func ValidatePrintHandlerFunc(printFunc reflect.Value) error

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 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

func (*ClusterRoleBindingConfiguration) Create

Create creates a clusterrolebinding configuration summary

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

func (*ClusterRoleConfiguration) Create

func (c *ClusterRoleConfiguration) Create(options Options) (*component.Summary, error)

Create creates a clusterrole configuration summary

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

func (*ConfigMapConfiguration) Create

func (c *ConfigMapConfiguration) Create(options Options) (*component.Summary, error)

Create a configmap configuration summary

type ContainerConfiguration

type ContainerConfiguration struct {
	// contains filtered or unexported fields
}

ContainerConfiguration generates container configuration.

func NewContainerConfiguration

NewContainerConfiguration creates an instance of ContainerConfiguration.

func (*ContainerConfiguration) Create

func (cc *ContainerConfiguration) Create() (*component.Summary, error)

Create creates a deployment configuration summary.

type ContainerConfigurationOption added in v0.12.0

type ContainerConfigurationOption func(*ContainerConfiguration)

ContainerConfigurationOption

func IsInit added in v0.12.0

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

func (*CronJobConfiguration) Create

func (cc *CronJobConfiguration) Create() (*component.Summary, error)

Create creates a cronjob configuration summary

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

func (*DaemonSetConfiguration) Create

func (dc *DaemonSetConfiguration) Create() (*component.Summary, error)

Create generates a daemonset configuration summary

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.

func (*DeploymentConfiguration) Create

Create creates a deployment configuration summary.

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

func (*HorizontalPodAutoscalerConfiguration) Create

Create creates a horizontalpodautoscaler configuration sumamry

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

func (*IngressConfiguration) Create

func (i *IngressConfiguration) Create(options Options) (*component.Summary, error)

Create creates an ingress configuration summary

type ItemDescriptor

type ItemDescriptor struct {
	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

func (*JobConfiguration) Create

func (j *JobConfiguration) Create(option Options) (*component.Summary, error)

Create creates a job configuration summary

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

func (*JobTemplateHeader) Create

func (jth *JobTemplateHeader) Create() (*component.Labels, error)

Create creates a label component

type Metadata

type Metadata struct {
	// contains filtered or unexported fields
}

Metadata represents object metadata.

func NewMetadata

func NewMetadata(object runtime.Object, l link.Interface) (*Metadata, error)

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

func (*NamespaceResourceLimits) Create

func (n *NamespaceResourceLimits) Create(ctx context.Context, options Options) (*component.Table, error)

Create creates a namespace limit component.

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

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

func (*NamespaceStatus) Create

func (n *NamespaceStatus) Create(options Options) (*component.Summary, error)

Create creates a namespace configuration summary

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

func (*NetworkPolicyConfiguration) Create added in v0.12.0

Create creates a networkPolicy configuration summary

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

func (*NodeConfiguration) Create

func (n *NodeConfiguration) Create(options Options) (*component.Summary, error)

Create creates a node configuration summary

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 NewObject

func NewObject(object runtime.Object, options ...ObjectOpts) *Object

NewObject creates an instance of Object.

func (*Object) AddButton

func (o *Object) AddButton(name string, payload action.Payload, buttonOptions ...component.ButtonOption)

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

func (o *Object) RegisterConfig(summary *component.Summary)

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

func (o *Object) RegisterSummary(summary *component.Summary)

RegisterSummary registers a summary view for an object.

func (*Object) ToComponent

func (o *Object) ToComponent(ctx context.Context, options Options) (component.Component, error)

ToComponent converts Object to a view.

type ObjectInterface

type ObjectInterface interface {
	AddButton(name string, payload action.Payload, buttonOptions ...component.ButtonOption)
}

ObjectInterface is an interface for printing an object.

type ObjectOpts

type ObjectOpts func(o *Object)

ObjectOpts are options for configuration Object.

type ObjectPrinterFunc

type ObjectPrinterFunc func() (component.Component, error)

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 Options

type Options struct {
	DisableLabels bool
	DashConfig    config.Dash
	Link          link.Interface
}

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

func (*PersistentVolumeClaimConfiguration) Create

Create creates a persistentvolumeclaim configuration summary

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

func (*PersistentVolumeConfiguration) Create added in v0.11.0

func (pvc *PersistentVolumeConfiguration) Create(options Options) (*component.Summary, error)

Create the Configuration Summary component for a 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

func (*PersistentVolumeStatus) Create added in v0.11.0

func (pvs *PersistentVolumeStatus) Create(ctx context.Context, options Options) (*component.Summary, error)

Create the Status Summary component for a 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.

func (*PodConfiguration) Create

func (p *PodConfiguration) Create(options Options) (*component.Summary, error)

Create creates a pod configuration summary.

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, pluginPrinter plugin.ManagerInterface) (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

func (*ReplicaSetConfiguration) Create

func (rc *ReplicaSetConfiguration) Create(options Options) (*component.Summary, error)

Create generates a replicaset configuration summary

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

func (*ReplicaSetStatus) Create

func (replicaSetStatus *ReplicaSetStatus) Create() (*component.Quadrant, error)

Create generates a replicaset status quadrant

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

func (*ReplicationControllerConfiguration) Create

Create generates a replicationcontroller configuration summary

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

func (*ReplicationControllerStatus) Create

Create generates a replicaset status quadrant

type Resource

type Resource struct {
	// contains filtered or unexported fields
}

Resource prints runtime objects.

func NewResource

func NewResource(dashConfig config.Dash) *Resource

NewResource creates an instance of ResourcePrinter.

func (*Resource) Handler

func (p *Resource) Handler(printFunc interface{}) error

Handler adds a printer handler. See ValidatePrintHandlerFunc for required method signature.

func (*Resource) Print

func (p *Resource) Print(ctx context.Context, object runtime.Object, pluginPrinter plugin.ManagerInterface) (component.Component, error)

Print prints a runtime object. If not handler can be found for the type, it will print using `DefaultPrintFunc`.

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

func (*RoleBindingConfiguration) Create

Create creates a rolebinding configuration summary

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

func (*RoleConfiguration) Create

func (r *RoleConfiguration) Create(options Options) (*component.Summary, error)

Create creates a role configuration summary

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

func (*SecretConfiguration) Create

func (s *SecretConfiguration) Create(options Options) (*component.Summary, error)

Create creates a secret configuration summary

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

func (*ServiceAccountConfiguration) Create

Create creates a service account configuration summary

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

func (*ServiceAccountPolicyRules) Create

Create generates a service account policy rule table

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

func (*ServiceConfiguration) Create

func (sc *ServiceConfiguration) Create(ctx context.Context, options Options) (*component.Summary, error)

Create generates a service configuration summary

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

func (*StatefulSetConfiguration) Create

func (sc *StatefulSetConfiguration) Create(options Options) (*component.Summary, error)

Create generates a statefulset configuration summary

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

func (*StatefulSetStatus) Create

func (statefulSetStatus *StatefulSetStatus) Create() (*component.Quadrant, error)

Create generates a statefulset status quadrant

Directories

Path Synopsis
Package fake is a generated GoMock package.
Package fake is a generated GoMock package.

Jump to

Keyboard shortcuts

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