Documentation ¶
Index ¶
- Constants
- Variables
- func AsPerc(p string) string
- func AsThousands(n int64) string
- func DefaultColorer(ns string, h Header, re RowEvent) tcell.Color
- func Happy(ns string, h Header, r Row) bool
- func IntToStr(p int) string
- func Less(asc bool, c1, c2 string) bool
- func Pad(s string, width int) string
- func PrintPerc(p int) string
- func ToContainerPorts(pp []v1.ContainerPort) string
- func ToContainerState(s v1.ContainerState) string
- func ToPorts(pp []v1.ServicePort) string
- func Truncate(str string, width int) string
- func UrlFor(host, path, port string) string
- type Alias
- type AliasRes
- type BenchCfg
- type BenchInfo
- type Benchmark
- type Builder
- type ClusterRole
- type ClusterRoleBinding
- type ColorerFunc
- type Container
- type ContainerRes
- type ContainerWithMetrics
- type Context
- type ContextNamer
- type CronJob
- type CustomResourceDefinition
- type DaemonSet
- type DecoratorFunc
- type DeltaRow
- type Deployment
- type Dir
- type DirRes
- type Endpoints
- type Event
- type Fields
- type FileRes
- type ForwardRes
- type Forwarder
- type Generic
- type Header
- func (h Header) Clone() Header
- func (h Header) Columns(wide bool) []string
- func (h Header) Customize(cols []string, wide bool) Header
- func (h Header) Diff(header Header) bool
- func (h Header) Dump()
- func (h Header) HasAge() bool
- func (h Header) IndexOf(colName string, includeWide bool) int
- func (h Header) IsAgeCol(col int) bool
- func (h Header) Labelize(cols []int, labelCol int, rr RowEvents) Header
- func (h Header) MapIndices(cols []string, wide bool) []int
- func (h Header) ValidColIndex() int
- type HeaderColumn
- type Helm
- type HelmRes
- type HorizontalPodAutoscaler
- type IdSorter
- type Ingress
- type Issue
- type Issues
- type Job
- type NamedContext
- type Namespace
- type NetworkPolicy
- type Node
- type NodeWithMetrics
- type OpenFaas
- type OpenFaasRes
- type Outcome
- type PersistentVolume
- type PersistentVolumeClaim
- type Pod
- type PodDisruptionBudget
- type PodWithMetrics
- type Policies
- type Policy
- type PolicyRes
- type Popeye
- type PortForward
- type Rbac
- type Reference
- type ReferenceRes
- type ReplicaSet
- type Report
- type ResEvent
- type Role
- type RoleBinding
- type Row
- type RowEvent
- type RowEventSorter
- type RowEvents
- func (r RowEvents) Clear() RowEvents
- func (r RowEvents) Clone() RowEvents
- func (r RowEvents) Customize(cols []int) RowEvents
- func (r RowEvents) Delete(id string) RowEvents
- func (r RowEvents) Diff(re RowEvents, ageCol int) bool
- func (r RowEvents) ExtractHeaderLabels(labelCol int) []string
- func (r RowEvents) FindIndex(id string) (int, bool)
- func (r RowEvents) Labelize(cols []int, labelCol int, labels []string) RowEvents
- func (r RowEvents) Sort(ns string, sortCol int, ageCol bool, asc bool)
- func (r RowEvents) Upsert(re RowEvent) RowEvents
- type RowSorter
- type Rows
- type RuleRes
- type Rules
- type ScreenDump
- type Section
- type Sections
- type Service
- type ServiceAccount
- type StatefulSet
- type StorageClass
- type StringSet
- type Subject
- type SubjectRes
- type Subjects
- type TableData
- func (t *TableData) Clear()
- func (t *TableData) Clone() TableData
- func (t *TableData) Customize(cols []string, wide bool) TableData
- func (t *TableData) Delete(newKeys map[string]struct{})
- func (t *TableData) Diff(table TableData) bool
- func (t *TableData) IndexOfHeader(h string) int
- func (t *TableData) Labelize(labels []string) TableData
- func (t *TableData) SetHeader(ns string, h Header)
- func (t *TableData) Update(rows Rows)
- type Tally
Constants ¶
const ( // Terminating represents a pod terminating status. Terminating = "Terminating" // Running represents a pod running status. Running = "Running" // Initialized represents a pod intialized status. Initialized = "Initialized" // Completed represents a pod completed status. Completed = "Completed" // ContainerCreating represents a pod container status. ContainerCreating = "ContainerCreating" // PodInitializing represents a pod initializing status. PodInitializing = "PodInitializing" // Pending represents a pod pending status. Pending = "Pending" // Blank represents no value. Blank = "" )
const ( // MissingValue indicates an unset value. MissingValue = "<none>" // NAValue indicates a value that does not pertain. NAValue = "n/a" // UnknownValue represents an unknown. UnknownValue = "<unknown>" // UnsetValue represent an unset value UnsetValue = "" // ZeroValue represents a zero value. ZeroValue = "0" )
const (
// NonResource represents a custom resource.
NonResource = "*"
)
Variables ¶
var ( // ModColor row modified color. ModColor tcell.Color // AddColor row added color. AddColor tcell.Color // PendingColor row added color. PendingColor tcell.Color // ErrColor row err color. ErrColor tcell.Color // StdColor row default color. StdColor tcell.Color // HighlightColor row highlight color. HighlightColor tcell.Color // KillColor row deleted color. KillColor tcell.Color // CompletedColor row completed color. CompletedColor tcell.Color )
var AgeDecorator = func(a string) string {
return toAgeHuman(a)
}
AgeDecorator represents a timestamped as human column.
Functions ¶
func AsThousands ¶ added in v0.17.4
AsThousands prints a number with thousand separator.
func DefaultColorer ¶
DefaultColorer set the default table row colors.
func ToContainerPorts ¶ added in v0.17.0
func ToContainerPorts(pp []v1.ContainerPort) string
ToContainerPorts returns container ports as a string.
func ToContainerState ¶ added in v0.17.0
func ToContainerState(s v1.ContainerState) string
ToContainerState returns container state as a string.
func ToPorts ¶ added in v0.17.0
func ToPorts(pp []v1.ServicePort) string
ToPorts returns service ports as a string.
Types ¶
type Alias ¶
type Alias struct{}
Alias renders a aliases to screen.
func (Alias) ColorerFunc ¶
func (Alias) ColorerFunc() ColorerFunc
ColorerFunc colors a resource row.
type AliasRes ¶
AliasRes represents an alias resource.
func (AliasRes) DeepCopyObject ¶
DeepCopyObject returns a container copy.
func (AliasRes) GetObjectKind ¶
func (AliasRes) GetObjectKind() schema.ObjectKind
GetObjectKind returns a schema object.
type BenchInfo ¶
BenchInfo represents benchmark run info.
func (BenchInfo) DeepCopyObject ¶
DeepCopyObject returns a container copy.
func (BenchInfo) GetObjectKind ¶
func (BenchInfo) GetObjectKind() schema.ObjectKind
GetObjectKind returns a schema object.
type Benchmark ¶
type Benchmark struct{}
Benchmark renders a benchmarks to screen.
func (Benchmark) ColorerFunc ¶
func (b Benchmark) ColorerFunc() ColorerFunc
ColorerFunc colors a resource row.
type Builder ¶ added in v0.19.0
type Builder struct {
Report Report `json:"popeye" yaml:"popeye"`
}
Builder represents a popeye report.
type ClusterRole ¶
type ClusterRole struct{}
ClusterRole renders a K8s ClusterRole to screen.
func (ClusterRole) ColorerFunc ¶
func (ClusterRole) ColorerFunc() ColorerFunc
ColorerFunc colors a resource row.
type ClusterRoleBinding ¶
type ClusterRoleBinding struct{}
ClusterRoleBinding renders a K8s ClusterRoleBinding to screen.
func (ClusterRoleBinding) ColorerFunc ¶
func (ClusterRoleBinding) ColorerFunc() ColorerFunc
ColorerFunc colors a resource row.
func (ClusterRoleBinding) Header ¶
func (ClusterRoleBinding) Header(string) Header
Header returns a header rbw.
type ColorerFunc ¶
ColorerFunc represents a resource row colorer.
type Container ¶
type Container struct{}
Container renders a K8s Container to screen.
func (Container) ColorerFunc ¶
func (c Container) ColorerFunc() ColorerFunc
ColorerFunc colors a resource row.
type ContainerRes ¶
type ContainerRes struct { Container *v1.Container Status *v1.ContainerStatus MX *mv1beta1.ContainerMetrics IsInit bool Age metav1.Time }
ContainerRes represents a container and its metrics.
func (ContainerRes) DeepCopyObject ¶
func (c ContainerRes) DeepCopyObject() runtime.Object
DeepCopyObject returns a container copy.
func (ContainerRes) GetObjectKind ¶
func (c ContainerRes) GetObjectKind() schema.ObjectKind
GetObjectKind returns a schema object.
type ContainerWithMetrics ¶
type ContainerWithMetrics interface { // Container returns the container Container() *v1.Container // ContainerStatus returns the current container status. ContainerStatus() *v1.ContainerStatus // Metrics returns the container metrics. Metrics() *mv1beta1.ContainerMetrics // Age returns the pod age. Age() metav1.Time // IsInit indicates a init container. IsInit() bool }
ContainerWithMetrics represents a container and it's metrics.
type Context ¶
type Context struct{}
Context renders a K8s ConfigMap to screen.
func (Context) ColorerFunc ¶
func (Context) ColorerFunc() ColorerFunc
ColorerFunc colors a resource row.
type ContextNamer ¶
ContextNamer represents a named context.
type CronJob ¶
type CronJob struct{}
CronJob renders a K8s CronJob to screen.
func (CronJob) ColorerFunc ¶
func (CronJob) ColorerFunc() ColorerFunc
ColorerFunc colors a resource row.
type CustomResourceDefinition ¶
type CustomResourceDefinition struct{}
CustomResourceDefinition renders a K8s CustomResourceDefinition to screen.
func (CustomResourceDefinition) ColorerFunc ¶
func (CustomResourceDefinition) ColorerFunc() ColorerFunc
ColorerFunc colors a resource row.
func (CustomResourceDefinition) Header ¶
func (CustomResourceDefinition) Header(string) Header
Header returns a header rbw.
type DaemonSet ¶
type DaemonSet struct{}
DaemonSet renders a K8s DaemonSet to screen.
func (DaemonSet) ColorerFunc ¶
func (d DaemonSet) ColorerFunc() ColorerFunc
ColorerFunc colors a resource row.
type DeltaRow ¶
type DeltaRow []string
DeltaRow represents a collection of row detlas between old and new row.
func NewDeltaRow ¶
NewDeltaRow computes the delta between 2 rows.
type Deployment ¶
type Deployment struct{}
Deployment renders a K8s Deployment to screen.
func (Deployment) ColorerFunc ¶
func (d Deployment) ColorerFunc() ColorerFunc
ColorerFunc colors a resource row.
type Dir ¶ added in v0.21.0
type Dir struct{}
Dir renders a directory entry to screen.
func (Dir) ColorerFunc ¶ added in v0.21.0
func (Dir) ColorerFunc() ColorerFunc
ColorerFunc colors a resource row.
type DirRes ¶ added in v0.21.0
DirRes represents an alias resource.
func (DirRes) DeepCopyObject ¶ added in v0.21.0
DeepCopyObject returns a container copy.
func (DirRes) GetObjectKind ¶ added in v0.21.0
func (DirRes) GetObjectKind() schema.ObjectKind
GetObjectKind returns a schema object.
type Endpoints ¶
type Endpoints struct{}
Endpoints renders a K8s Endpoints to screen.
func (Endpoints) ColorerFunc ¶
func (Endpoints) ColorerFunc() ColorerFunc
ColorerFunc colors a resource row.
type Event ¶
type Event struct{}
Event renders a K8s Event to screen.
func (Event) ColorerFunc ¶
func (e Event) ColorerFunc() ColorerFunc
ColorerFunc colors a resource row.
type Fields ¶
type Fields []string
Fields represents a collection of row fields.
type FileRes ¶
FileRes represents a file resource.
func (FileRes) DeepCopyObject ¶
DeepCopyObject returns a container copy.
func (FileRes) GetObjectKind ¶
func (c FileRes) GetObjectKind() schema.ObjectKind
GetObjectKind returns a schema object.
type ForwardRes ¶
ForwardRes represents a benchmark resource.
func (ForwardRes) DeepCopyObject ¶
func (f ForwardRes) DeepCopyObject() runtime.Object
DeepCopyObject returns a container copy.
func (ForwardRes) GetObjectKind ¶
func (f ForwardRes) GetObjectKind() schema.ObjectKind
GetObjectKind returns a schema object.
type Forwarder ¶
type Forwarder interface { // Path returns a resource FQN. Path() string // Container returns a container name. Container() string // Ports returns container exposed ports. Ports() []string // Active returns forwarder current state. Active() bool // Age returns forwarder age. Age() string }
Forwarder represents a port forwarder.
type Generic ¶
type Generic struct {
// contains filtered or unexported fields
}
Generic renders a generic resource to screen.
func (Generic) ColorerFunc ¶
func (Generic) ColorerFunc() ColorerFunc
ColorerFunc colors a resource row.
func (*Generic) SetTable ¶
func (g *Generic) SetTable(t *metav1beta1.Table)
SetTable sets the tabular resource.
type Header ¶
type Header []HeaderColumn
Header represents a table header.
func (Header) MapIndices ¶ added in v0.17.0
MapIndices returns a collection of mapped column indices based of the requested columns.
func (Header) ValidColIndex ¶ added in v0.17.0
ValidColIndex returns the valid col index or -1 if none.
type HeaderColumn ¶ added in v0.17.0
type HeaderColumn struct { Name string Align int Decorator DecoratorFunc Hide bool Wide bool MX bool Time bool }
HeaderColumn represent a table header
func (HeaderColumn) Clone ¶ added in v0.17.0
func (h HeaderColumn) Clone() HeaderColumn
Clone copies a header.
type Helm ¶ added in v0.19.3
type Helm struct{}
Helm renders a helm chart to screen.
func (Helm) ColorerFunc ¶ added in v0.19.3
func (Helm) ColorerFunc() ColorerFunc
ColorerFunc colors a resource row.
type HelmRes ¶ added in v0.19.3
HelmRes represents an helm chart resource.
func (HelmRes) DeepCopyObject ¶ added in v0.19.3
DeepCopyObject returns a container copy.
func (HelmRes) GetObjectKind ¶ added in v0.19.3
func (HelmRes) GetObjectKind() schema.ObjectKind
GetObjectKind returns a schema object.
type HorizontalPodAutoscaler ¶
type HorizontalPodAutoscaler struct{}
HorizontalPodAutoscaler renders a K8s HorizontalPodAutoscaler to screen.
func (HorizontalPodAutoscaler) ColorerFunc ¶
func (HorizontalPodAutoscaler) ColorerFunc() ColorerFunc
ColorerFunc colors a resource row.
func (HorizontalPodAutoscaler) Header ¶
func (HorizontalPodAutoscaler) Header(ns string) Header
Header returns a header row.
type Ingress ¶
type Ingress struct{}
Ingress renders a K8s Ingress to screen.
func (Ingress) ColorerFunc ¶
func (Ingress) ColorerFunc() ColorerFunc
ColorerFunc colors a resource row.
type Issue ¶ added in v0.19.0
type Issue struct { Group string `yaml:"group" json:"group"` GVR string `yaml:"gvr" json:"gvr"` Level config.Level `yaml:"level" json:"level"` Message string `yaml:"message" json:"message"` }
Issue represents a sanitization issue.
type Issues ¶ added in v0.19.0
type Issues []Issue
Issues represents a collection of issues.
func (Issues) CountSeverity ¶ added in v0.19.0
CountSeverity counts severity level instances
func (Issues) MaxSeverity ¶ added in v0.19.0
MaxSeverity gather the max severity in a collection of issues.
type NamedContext ¶
type NamedContext struct { Name string Context *api.Context Config ContextNamer }
NamedContext represents a named cluster context.
func NewNamedContext ¶
func NewNamedContext(c ContextNamer, n string, ctx *api.Context) *NamedContext
NewNamedContext returns a new named context.
func (*NamedContext) DeepCopyObject ¶
func (c *NamedContext) DeepCopyObject() runtime.Object
DeepCopyObject returns a container copy.
func (*NamedContext) GetObjectKind ¶
func (c *NamedContext) GetObjectKind() schema.ObjectKind
GetObjectKind returns a schema object.
func (*NamedContext) IsCurrentContext ¶
func (c *NamedContext) IsCurrentContext(n string) bool
IsCurrentContext return the active context name.
type Namespace ¶
type Namespace struct{}
Namespace renders a K8s Namespace to screen.
func (Namespace) ColorerFunc ¶
func (n Namespace) ColorerFunc() ColorerFunc
ColorerFunc colors a resource row.
type NetworkPolicy ¶
type NetworkPolicy struct{}
NetworkPolicy renders a K8s NetworkPolicy to screen.
func (NetworkPolicy) ColorerFunc ¶
func (NetworkPolicy) ColorerFunc() ColorerFunc
ColorerFunc colors a resource row.
func (NetworkPolicy) Header ¶
func (NetworkPolicy) Header(ns string) Header
Header returns a header row.
type Node ¶
type Node struct{}
Node renders a K8s Node to screen.
func (Node) ColorerFunc ¶
func (n Node) ColorerFunc() ColorerFunc
ColorerFunc colors a resource row.
type NodeWithMetrics ¶
type NodeWithMetrics struct { Raw *unstructured.Unstructured MX *mv1beta1.NodeMetrics Pods []*v1.Pod }
NodeWithMetrics represents a node with its associated metrics.
func (*NodeWithMetrics) DeepCopyObject ¶
func (n *NodeWithMetrics) DeepCopyObject() runtime.Object
DeepCopyObject returns a container copy.
func (*NodeWithMetrics) GetObjectKind ¶
func (n *NodeWithMetrics) GetObjectKind() schema.ObjectKind
GetObjectKind returns a schema object.
type OpenFaas ¶ added in v0.15.0
type OpenFaas struct{}
OpenFaas renders an openfaas function to screen.
func (OpenFaas) ColorerFunc ¶ added in v0.15.0
func (o OpenFaas) ColorerFunc() ColorerFunc
ColorerFunc colors a resource row.
type OpenFaasRes ¶ added in v0.15.0
type OpenFaasRes struct {
Function ofaas.FunctionStatus `json:"function"`
}
OpenFaasRes represents an openfaas function resource.
func (OpenFaasRes) DeepCopyObject ¶ added in v0.15.0
func (h OpenFaasRes) DeepCopyObject() runtime.Object
DeepCopyObject returns a container copy.
func (OpenFaasRes) GetObjectKind ¶ added in v0.15.0
func (OpenFaasRes) GetObjectKind() schema.ObjectKind
GetObjectKind returns a schema object.
type PersistentVolume ¶
type PersistentVolume struct{}
PersistentVolume renders a K8s PersistentVolume to screen.
func (PersistentVolume) ColorerFunc ¶
func (p PersistentVolume) ColorerFunc() ColorerFunc
ColorerFunc colors a resource row.
func (PersistentVolume) Header ¶
func (PersistentVolume) Header(string) Header
Header returns a header rbw.
type PersistentVolumeClaim ¶
type PersistentVolumeClaim struct{}
PersistentVolumeClaim renders a K8s PersistentVolumeClaim to screen.
func (PersistentVolumeClaim) ColorerFunc ¶
func (p PersistentVolumeClaim) ColorerFunc() ColorerFunc
ColorerFunc colors a resource row.
func (PersistentVolumeClaim) Header ¶
func (PersistentVolumeClaim) Header(ns string) Header
Header returns a header rbw.
type Pod ¶
type Pod struct{}
Pod renders a K8s Pod to screen.
type PodDisruptionBudget ¶
type PodDisruptionBudget struct{}
PodDisruptionBudget renders a K8s PodDisruptionBudget to screen.
func (PodDisruptionBudget) ColorerFunc ¶
func (p PodDisruptionBudget) ColorerFunc() ColorerFunc
ColorerFunc colors a resource row.
func (PodDisruptionBudget) Header ¶
func (PodDisruptionBudget) Header(ns string) Header
Header returns a header row.
type PodWithMetrics ¶
type PodWithMetrics struct { Raw *unstructured.Unstructured MX *mv1beta1.PodMetrics }
PodWithMetrics represents a pod and its metrics.
func (*PodWithMetrics) DeepCopyObject ¶
func (p *PodWithMetrics) DeepCopyObject() runtime.Object
DeepCopyObject returns a container copy.
func (*PodWithMetrics) GetObjectKind ¶
func (p *PodWithMetrics) GetObjectKind() schema.ObjectKind
GetObjectKind returns a schema object.
type Policy ¶
type Policy struct{}
Policy renders a rbac policy to screen.
func (Policy) ColorerFunc ¶
func (Policy) ColorerFunc() ColorerFunc
ColorerFunc colors a resource row.
type PolicyRes ¶
type PolicyRes struct {
Namespace, Binding string
Resource, Group string
ResourceName string
NonResourceURL string
Verbs []string
}
PolicyRes represents a rback policy rule.
func NewPolicyRes ¶
NewPolicyRes returns a new policy.
func (PolicyRes) DeepCopyObject ¶
DeepCopyObject returns a container copy.
func (PolicyRes) GetObjectKind ¶
func (p PolicyRes) GetObjectKind() schema.ObjectKind
GetObjectKind returns a schema object.
type Popeye ¶ added in v0.19.0
type Popeye struct{}
Popeye renders a sanitizer to screen.
func (Popeye) ColorerFunc ¶ added in v0.19.0
func (Popeye) ColorerFunc() ColorerFunc
ColorerFunc colors a resource row.
type PortForward ¶
type PortForward struct{}
PortForward renders a portforwards to screen.
func (PortForward) ColorerFunc ¶
func (PortForward) ColorerFunc() ColorerFunc
ColorerFunc colors a resource row.
func (PortForward) Header ¶
func (PortForward) Header(ns string) Header
Header returns a header row.
type Reference ¶ added in v0.20.0
type Reference struct{}
Reference renders a reference to screen.
func (Reference) ColorerFunc ¶ added in v0.20.0
func (Reference) ColorerFunc() ColorerFunc
ColorerFunc colors a resource row.
type ReferenceRes ¶ added in v0.20.0
ReferenceRes represents a reference resource.
func (ReferenceRes) DeepCopyObject ¶ added in v0.20.0
func (a ReferenceRes) DeepCopyObject() runtime.Object
DeepCopyObject returns a container copy.
func (ReferenceRes) GetObjectKind ¶ added in v0.20.0
func (ReferenceRes) GetObjectKind() schema.ObjectKind
GetObjectKind returns a schema object.
type ReplicaSet ¶
type ReplicaSet struct{}
ReplicaSet renders a K8s ReplicaSet to screen.
func (ReplicaSet) ColorerFunc ¶
func (r ReplicaSet) ColorerFunc() ColorerFunc
ColorerFunc colors a resource row.
type Report ¶ added in v0.19.0
type Report struct { Score int `json:"score" yaml:"score"` Grade string `json:"grade" yaml:"grade"` Sections Sections `json:"sanitizers,omitempty" yaml:"sanitizers,omitempty"` }
Report represents the output of a sanitization pass.
type ResEvent ¶
type ResEvent int
ResEvent represents a resource event.
const ( // EventUnchanged notifies listener resource has not changed. EventUnchanged ResEvent = 1 << iota // EventAdd notifies listener of a resource was added. EventAdd // EventUpdate notifies listener of a resource updated. EventUpdate // EventDelete notifies listener of a resource was deleted. EventDelete // EventClear the stack was reset. EventClear )
type RoleBinding ¶
type RoleBinding struct{}
RoleBinding renders a K8s RoleBinding to screen.
func (RoleBinding) ColorerFunc ¶
func (RoleBinding) ColorerFunc() ColorerFunc
ColorerFunc colors a resource row.
func (RoleBinding) Header ¶
func (RoleBinding) Header(ns string) Header
Header returns a header rbw.
type Row ¶
Row represents a colllection of columns.
type RowEvent ¶
RowEvent tracks resource instance events.
func NewRowEvent ¶
NewRowEvent returns a new row event.
func NewRowEventWithDeltas ¶ added in v0.19.3
NewRowEventWithDeltas returns a new row event with deltas.
func (RowEvent) Customize ¶ added in v0.17.0
Customize returns a new subset based on the given column indices.
func (RowEvent) ExtractHeaderLabels ¶ added in v0.19.3
ExtractHeaderLabels extract collection of fields into header.
type RowEventSorter ¶
RowEventSorter sorts row events by a given colon.
func (RowEventSorter) Len ¶
func (r RowEventSorter) Len() int
func (RowEventSorter) Less ¶
func (r RowEventSorter) Less(i, j int) bool
func (RowEventSorter) Swap ¶
func (r RowEventSorter) Swap(i, j int)
type RowEvents ¶
type RowEvents []RowEvent
RowEvents a collection of row events.
func (RowEvents) Customize ¶ added in v0.17.0
Customize returns custom row events based on columns layout.
func (RowEvents) ExtractHeaderLabels ¶ added in v0.19.3
ExtractHeaderLabels extract header labels.
type Rows ¶
type Rows []Row
Rows represents a collection of rows.
type RuleRes ¶
type RuleRes struct {
Resource, Group string
ResourceName string
NonResourceURL string
Verbs []string
}
RuleRes represents an rbac rule.
func NewRuleRes ¶
NewRuleRes returns a new rule.
func (RuleRes) DeepCopyObject ¶
DeepCopyObject returns a container copy.
func (RuleRes) GetObjectKind ¶
func (r RuleRes) GetObjectKind() schema.ObjectKind
GetObjectKind returns a schema object.
type ScreenDump ¶
type ScreenDump struct{}
ScreenDump renders a screendumps to screen.
func (ScreenDump) ColorerFunc ¶
func (ScreenDump) ColorerFunc() ColorerFunc
ColorerFunc colors a resource row.
type Section ¶ added in v0.19.0
type Section struct { Title string `json:"sanitizer" yaml:"sanitizer"` GVR string `yaml:"gvr" json:"gvr"` Tally *Tally `json:"tally" yaml:"tally"` Outcome Outcome `json:"issues,omitempty" yaml:"issues,omitempty"` }
Section represents a sanitizer pass
func (Section) DeepCopyObject ¶ added in v0.19.0
DeepCopyObject returns a container copy.
func (Section) GetObjectKind ¶ added in v0.19.0
func (Section) GetObjectKind() schema.ObjectKind
GetObjectKind returns a schema object.
func (Section) MaxSeverity ¶ added in v0.19.0
MaxSeverity gather the max severity in a collection of issues.
type Sections ¶ added in v0.19.0
type Sections []Section
Sections represents a collection of sections.
type Service ¶
type Service struct{}
Service renders a K8s Service to screen.
func (Service) ColorerFunc ¶
func (Service) ColorerFunc() ColorerFunc
ColorerFunc colors a resource row.
type ServiceAccount ¶
type ServiceAccount struct{}
ServiceAccount renders a K8s ServiceAccount to screen.
func (ServiceAccount) ColorerFunc ¶
func (ServiceAccount) ColorerFunc() ColorerFunc
ColorerFunc colors a resource row.
func (ServiceAccount) Header ¶
func (ServiceAccount) Header(ns string) Header
Header returns a header row.
type StatefulSet ¶
type StatefulSet struct{}
StatefulSet renders a K8s StatefulSet to screen.
func (StatefulSet) ColorerFunc ¶
func (s StatefulSet) ColorerFunc() ColorerFunc
ColorerFunc colors a resource row.
func (StatefulSet) Header ¶
func (StatefulSet) Header(ns string) Header
Header returns a header row.
type StorageClass ¶
type StorageClass struct{}
StorageClass renders a K8s StorageClass to screen.
func (StorageClass) ColorerFunc ¶
func (StorageClass) ColorerFunc() ColorerFunc
ColorerFunc colors a resource row.
func (StorageClass) Header ¶
func (StorageClass) Header(ns string) Header
Header returns a header row.
type StringSet ¶
type StringSet []string
StringSet represents a collection of unique strings.
type Subject ¶
type Subject struct{}
Subject renders a rbac to screen.
func (Subject) ColorerFunc ¶
func (Subject) ColorerFunc() ColorerFunc
ColorerFunc colors a resource row.
type SubjectRes ¶
type SubjectRes struct {
Name, Kind, FirstLocation string
}
SubjectRes represents a subject rule.
func (SubjectRes) DeepCopyObject ¶
func (s SubjectRes) DeepCopyObject() runtime.Object
DeepCopyObject returns a container copy.
func (SubjectRes) GetObjectKind ¶
func (SubjectRes) GetObjectKind() schema.ObjectKind
GetObjectKind returns a schema object.
type Subjects ¶
type Subjects []SubjectRes
Subjects represents a collection of RBAC policies.
func (Subjects) Upsert ¶
func (ss Subjects) Upsert(s SubjectRes) Subjects
Upsert adds a new subject.
type TableData ¶
TableData tracks a K8s resource for tabular display.
func (*TableData) Customize ¶ added in v0.17.0
Customize returns a new model with customized column layout.
func (*TableData) IndexOfHeader ¶ added in v0.21.0
IndexOfHeader return the index of the header.
Source Files ¶
- alias.go
- benchmark.go
- color.go
- container.go
- context.go
- cr.go
- crb.go
- crd.go
- cronjob.go
- delta.go
- dir.go
- dp.go
- ds.go
- ep.go
- ev.go
- generic.go
- header.go
- helm.go
- helpers.go
- hpa.go
- ing.go
- job.go
- node.go
- np.go
- ns.go
- ofaas.go
- pdb.go
- pod.go
- policy.go
- popeye.go
- portforward.go
- pv.go
- pvc.go
- rbac.go
- reference.go
- ro.go
- rob.go
- row.go
- row_event.go
- rs.go
- sa.go
- sc.go
- screen_dump.go
- sts.go
- subject.go
- svc.go
- table_data.go
- types.go