Documentation
¶
Index ¶
- func NewSimpleRow(id string, cells []string, enabled bool) *simpleRow
- type App
- type Client
- type Color
- type Command
- type CommandBuilder
- type CommandExecutor
- type Config
- type ConfigAccessor
- type ConfigUpdateFunc
- type ConfigUpdater
- type Configurable
- type Container
- type ExecErr
- type FocusManager
- type KubernetesRow
- type ListView
- type ListViewStyler
- type MaxSizeWidget
- type MenuItem
- type MenuListView
- type NamespaceAccessor
- type OpAdded
- type OpClear
- type OpDeleted
- type OpInitFinished
- type OpInitStart
- type OpModified
- type OpSetColumns
- type Operation
- type Popup
- type Resource
- type ResourceContainer
- type ResourceListView
- type ResourceMap
- type ResourceMenu
- type ResourceProvider
- type Row
- type RowProvider
- type RowWithAge
- type Screen
- type ScreenHandler
- type StatusReporter
- type StylableWidget
- type Style
- type ThemeComponent
- type ThemeManager
- type View
- type Widget
- type Workspace
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewSimpleRow ¶
Types ¶
type Client ¶
type Client interface {
NewRequest(resource *Resource) (*rest.Request, error)
Get(ctx context.Context, resource *Resource, namespace string, name string, out runtime.Object) error
Delete(ctx context.Context, resource *Resource, namespace string, name string) error
List(ctx context.Context, resource *Resource, namespace string, out runtime.Object) error
ListAsTable(ctx context.Context, resource *Resource, namespace string) (*metav1.Table, error)
WatchAsTable(ctx context.Context, resource *Resource, namespace string) (watch.Interface, error)
}
type CommandBuilder ¶
type CommandBuilder interface {
Describe(namespace string, resType string, resName string) *Command
Edit(namespace string, resType string, resName string) *Command
PortForward(namespace string, pod string, port int32) *Command
Exec(namespace string, pod string, container string, command string) *Command
Logs(namespace string, pod string, container string, previous bool, follow bool) *Command
Pager() []*Command
LogPager() []*Command
}
type CommandExecutor ¶
type ConfigAccessor ¶
type ConfigAccessor func() Config
type ConfigUpdateFunc ¶
type ConfigUpdater ¶
type ConfigUpdater interface {
UpdateConfig(updateFunc ConfigUpdateFunc) error
}
type Configurable ¶
type Container ¶
type Container interface {
Client() Client
Config() Config
ResourceProvider() ResourceProvider
CommandBuilder() CommandBuilder
CommandExecutor() CommandExecutor
Screen() Screen
StatusReporter() StatusReporter
ConfigUpdater() ConfigUpdater
Register(Configurable)
}
type FocusManager ¶
type FocusManager interface {
HandleEvent(e tcell.Event, useStack bool) bool
// Returns root widget which presents on top of focus stack
Root() Widget
// Put widget to focus stack
Focus(widget Widget)
// Remove focus from focused widget and reduce focus stack if not on root widget
Blur()
// Returns currently focused widget
Current() Widget
// Returns stack size
StackSize() int
}
type KubernetesRow ¶
type KubernetesRow struct {
// contains filtered or unexported fields
}
func NewKubernetesRow ¶
func NewKubernetesRow(row metav1.TableRow, withNamespace bool) (*KubernetesRow, error)
func (KubernetesRow) Age ¶
func (k KubernetesRow) Age() time.Duration
func (KubernetesRow) Cells ¶
func (k KubernetesRow) Cells() []string
func (KubernetesRow) Enabled ¶
func (k KubernetesRow) Enabled() bool
func (KubernetesRow) Id ¶
func (k KubernetesRow) Id() string
func (KubernetesRow) Metadata ¶
func (k KubernetesRow) Metadata() *metav1.PartialObjectMetadata
type ListView ¶
type ListView interface {
MaxSizeWidget
SelectedRow() Row
SelectedRowId() string
SelectId(id string)
}
type ListViewStyler ¶
type MaxSizeWidget ¶
type MenuListView ¶
type NamespaceAccessor ¶
type NamespaceAccessor interface {
CurrentNamespace() string
}
type OpInitFinished ¶
type OpInitFinished struct{}
func (OpInitFinished) Operation ¶
func (o OpInitFinished) Operation()
type OpInitStart ¶
type OpInitStart struct{}
func (OpInitStart) Operation ¶
func (o OpInitStart) Operation()
type OpModified ¶
type OpModified struct {
Row Row
}
func (OpModified) Operation ¶
func (o OpModified) Operation()
type OpSetColumns ¶
type OpSetColumns struct {
Columns []string
}
func (OpSetColumns) Operation ¶
func (o OpSetColumns) Operation()
type Popup ¶
type Popup interface {
MaxSizeWidget
Reposition(view View)
}
type Resource ¶
type Resource struct {
Namespaced bool
Resource string
Gk schema.GroupKind
Gvk schema.GroupVersionKind
Verbs []string
}
func (Resource) GroupVersion ¶
func (r Resource) GroupVersion() schema.GroupVersion
func (Resource) GroupVersionKind ¶
func (r Resource) GroupVersionKind() schema.GroupVersionKind
func (Resource) GroupVersionResource ¶
func (r Resource) GroupVersionResource() schema.GroupVersionResource
type ResourceContainer ¶
type ResourceContainer interface {
NamespaceAccessor
Status() StatusReporter
Client() Client
ResourceProvider() ResourceProvider
CommandBuilder() CommandBuilder
CommandExecutor() CommandExecutor
ScreenHandler() ScreenHandler
}
type ResourceListView ¶
type ResourceMap ¶
type ResourceMenu ¶
type ResourceMenu interface {
MenuListView
}
type ResourceProvider ¶
type ResourceProvider interface {
Resources() (ResourceMap, error)
}
type RowProvider ¶
type RowProvider chan []Operation
type RowWithAge ¶
type Screen ¶
type Screen interface {
ScreenHandler
Widget
Init(status StatusReporter, theme ThemeManager)
SetWorkspace(workspace Workspace)
Workspace() Workspace
View() View
}
type ScreenHandler ¶
type ScreenHandler interface {
Status() StatusReporter
UpdateScreen()
Resize()
Theme() ThemeManager
}
type StatusReporter ¶
type StylableWidget ¶
type ThemeComponent ¶
type ThemeManager ¶
type ThemeManager interface {
Configurable
GetStyle(name string) Style
NextTheme()
PrevTheme()
}
type Workspace ¶
type Workspace interface {
Widget
ResourceContainer
ConfigUpdater
Init() error
ShowPopup(title string, widget MaxSizeWidget)
FocusManager() FocusManager
Theme() ThemeManager
}
Click to show internal directories.
Click to hide internal directories.