Documentation
¶
Index ¶
- func FormatResourceType(resourceType string) string
- func GetDescribeContent(ctx context.Context, client *k8s.Client, ...) (string, error)
- type ConfirmView
- func (v *ConfirmView) Init() tea.Cmd
- func (v *ConfirmView) IsCompleted() bool
- func (v *ConfirmView) IsConfirmed() bool
- func (v *ConfirmView) SetCancelText(text string)
- func (v *ConfirmView) SetConfirmText(text string)
- func (v *ConfirmView) SetSize(width, height int)
- func (v *ConfirmView) Update(msg tea.Msg) (tea.Model, tea.Cmd)
- func (v *ConfirmView) View() string
- type ContextInfoMsg
- type ContextView
- func (v *ContextView) GetSelectedContexts() []string
- func (v *ContextView) Init() tea.Cmd
- func (v *ContextView) IsLoading() bool
- func (v *ContextView) SetContextLoading(contextName string, loading bool)
- func (v *ContextView) SetLoading(loading bool)
- func (v *ContextView) SetSize(width, height int)
- func (v *ContextView) Update(msg tea.Msg) (tea.Model, tea.Cmd)
- func (v *ContextView) View() string
- type DataView
- type DescribeView
- type ErrorMsg
- type GenericResourceView
- func (v *GenericResourceView) GetSelectedResource() *unstructured.Unstructured
- func (v *GenericResourceView) Init() tea.Cmd
- func (v *GenericResourceView) RefreshResources(ctx context.Context) error
- func (v *GenericResourceView) SetFilter(filter string)
- func (v *GenericResourceView) SetResourceType(resourceType string) error
- func (v *GenericResourceView) SetSort(column int, ascending bool)
- func (v *GenericResourceView) Update(msg tea.Msg) (tea.Model, tea.Cmd)
- func (v *GenericResourceView) View() string
- type HelpView
- type LogView
- func (v *LogView) Init() tea.Cmd
- func (v *LogView) IsSearchMode() bool
- func (v *LogView) SetSize(width, height int)
- func (v *LogView) StartStreaming(ctx context.Context, client *k8s.Client, state *core.State, ...) tea.Cmd
- func (v *LogView) StopStreaming() tea.Cmd
- func (v *LogView) Update(msg tea.Msg) (tea.Model, tea.Cmd)
- func (v *LogView) View() string
- type NamespaceView
- func (v *NamespaceView) GetSelectedNamespace() string
- func (v *NamespaceView) Init() tea.Cmd
- func (v *NamespaceView) SetLoading(loading bool, message string)
- func (v *NamespaceView) SetNamespaces(namespaces []v1.Namespace)
- func (v *NamespaceView) SetSize(width, height int)
- func (v *NamespaceView) Update(msg tea.Msg) (tea.Model, tea.Cmd)
- func (v *NamespaceView) View() string
- type RefreshCompleteMsg
- type ResourceSelectedMsg
- type ResourceSelectorCancelledMsg
- type ResourceSelectorView
- func (v *ResourceSelectorView) Close()
- func (v *ResourceSelectorView) GetSelectedOption() dropdown.Option
- func (v *ResourceSelectorView) Init() tea.Cmd
- func (v *ResourceSelectorView) IsOpen() bool
- func (v *ResourceSelectorView) Open()
- func (v *ResourceSelectorView) SetCurrentResourceType(resourceType core.ResourceType)
- func (v *ResourceSelectorView) SetSize(width, height int)
- func (v *ResourceSelectorView) Update(msg tea.Msg) (tea.Model, tea.Cmd)
- func (v *ResourceSelectorView) View() string
- type ResourceUpdateMsg
- type ResourceView
- func (v *ResourceView) DeleteSelected() tea.Cmd
- func (rv *ResourceView) DisableNewComponents()
- func (rv *ResourceView) EnableNewComponents()
- func (v *ResourceView) GetSelectedResourceContext() string
- func (v *ResourceView) GetSelectedResourceName() string
- func (v *ResourceView) Init() tea.Cmd
- func (rv *ResourceView) IsUsingNewComponents() bool
- func (v *ResourceView) RefreshResources() tea.Cmd
- func (v *ResourceView) SetCompactMode(compact bool)
- func (v *ResourceView) SetSelectedRow(row int)
- func (v *ResourceView) SetSize(width, height int)
- func (v *ResourceView) SetTestData(headers []string, rows [][]string)
- func (rv *ResourceView) TryUpdateWithNewComponents(resources []interface{}) bool
- func (v *ResourceView) Update(msg tea.Msg) (tea.Model, tea.Cmd)
- func (v *ResourceView) View() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FormatResourceType ¶
FormatResourceType formats the resource type for display
Types ¶
type ConfirmView ¶
type ConfirmView struct {
// contains filtered or unexported fields
}
ConfirmView displays a confirmation dialog
func NewConfirmView ¶
func NewConfirmView(title, message string) *ConfirmView
NewConfirmView creates a new confirmation dialog
func (*ConfirmView) IsCompleted ¶
func (v *ConfirmView) IsCompleted() bool
IsCompleted returns whether the dialog has been completed (user made a choice)
func (*ConfirmView) IsConfirmed ¶
func (v *ConfirmView) IsConfirmed() bool
IsConfirmed returns whether the user confirmed the action
func (*ConfirmView) SetCancelText ¶
func (v *ConfirmView) SetCancelText(text string)
SetCancelText sets custom cancel button text
func (*ConfirmView) SetConfirmText ¶
func (v *ConfirmView) SetConfirmText(text string)
SetConfirmText sets custom confirm button text
func (*ConfirmView) SetSize ¶
func (v *ConfirmView) SetSize(width, height int)
SetSize updates the view size
type ContextInfoMsg ¶
type ContextInfoMsg struct {
ContextName string
}
ContextInfoMsg is sent when context info should be displayed
type ContextView ¶
type ContextView struct {
SearchMode bool
// contains filtered or unexported fields
}
ContextView displays available Kubernetes contexts for selection
func NewContextView ¶
func NewContextView(contexts []string, currentContexts []string) *ContextView
NewContextView creates a new context selector view
func (*ContextView) GetSelectedContexts ¶
func (v *ContextView) GetSelectedContexts() []string
GetSelectedContexts returns the selected context names
func (*ContextView) IsLoading ¶
func (v *ContextView) IsLoading() bool
IsLoading returns whether the view is in loading state
func (*ContextView) SetContextLoading ¶
func (v *ContextView) SetContextLoading(contextName string, loading bool)
SetContextLoading sets the loading state for a specific context
func (*ContextView) SetLoading ¶
func (v *ContextView) SetLoading(loading bool)
SetLoading sets the loading state for the entire view
func (*ContextView) SetSize ¶
func (v *ContextView) SetSize(width, height int)
SetSize updates the view size
type DataView ¶
type DataView struct {
// contains filtered or unexported fields
}
DataView displays ConfigMap or Secret data
func NewConfigMapView ¶
NewConfigMapView creates a view for a ConfigMap
func NewSecretView ¶
NewSecretView creates a view for a Secret
type DescribeView ¶
type DescribeView struct {
// contains filtered or unexported fields
}
DescribeView displays the kubectl describe output for a resource
func NewDescribeView ¶
func NewDescribeView(resourceType, resourceName, namespace, context string) *DescribeView
NewDescribeView creates a new describe view for a resource
func (*DescribeView) LoadDescribeWithClient ¶
LoadDescribeWithClient loads the describe output using a real K8s client
func (*DescribeView) SetSize ¶
func (v *DescribeView) SetSize(width, height int)
SetSize updates the view size
type GenericResourceView ¶
type GenericResourceView struct {
// contains filtered or unexported fields
}
GenericResourceView is a generic view that uses the template-driven configuration system
func NewGenericResourceView ¶
func NewGenericResourceView(state *core.State, registry *resource.Registry, engine *template.Engine, dynamicClient dynamic.Interface) (*GenericResourceView, error)
NewGenericResourceView creates a new generic resource view
func (*GenericResourceView) GetSelectedResource ¶
func (v *GenericResourceView) GetSelectedResource() *unstructured.Unstructured
GetSelectedResource returns the currently selected resource
func (*GenericResourceView) Init ¶
func (v *GenericResourceView) Init() tea.Cmd
Init initializes the view
func (*GenericResourceView) RefreshResources ¶
func (v *GenericResourceView) RefreshResources(ctx context.Context) error
RefreshResources fetches resources using the dynamic client
func (*GenericResourceView) SetFilter ¶
func (v *GenericResourceView) SetFilter(filter string)
SetFilter sets the filter text
func (*GenericResourceView) SetResourceType ¶
func (v *GenericResourceView) SetResourceType(resourceType string) error
SetResourceType sets the current resource type
func (*GenericResourceView) SetSort ¶
func (v *GenericResourceView) SetSort(column int, ascending bool)
SetSort sets the sort column and direction
func (*GenericResourceView) View ¶
func (v *GenericResourceView) View() string
View renders the view
type HelpView ¶
type HelpView struct {
// contains filtered or unexported fields
}
HelpView displays help information
func (*HelpView) SetContext ¶
SetContext sets the help context (resource or logs)
func (*HelpView) SetModeHelp ¶
func (v *HelpView) SetModeHelp(mode interface{})
SetModeHelp sets help content from a screen mode
type LogView ¶
type LogView struct {
// contains filtered or unexported fields
}
LogView displays logs from pods
func (*LogView) IsSearchMode ¶
IsSearchMode returns true if the log view is in search mode
func (*LogView) StartStreaming ¶
func (v *LogView) StartStreaming(ctx context.Context, client *k8s.Client, state *core.State, selectedResourceName string) tea.Cmd
StartStreaming starts streaming logs for the selected resource
func (*LogView) StopStreaming ¶
StopStreaming stops streaming logs
type NamespaceView ¶
type NamespaceView struct {
// contains filtered or unexported fields
}
NamespaceView displays a list of namespaces for selection
func NewNamespaceView ¶
func NewNamespaceView(namespaces []v1.Namespace, currentNamespace string) *NamespaceView
NewNamespaceView creates a new namespace selector view
func NewNamespaceViewWithLoading ¶
func NewNamespaceViewWithLoading(currentNamespace string, loadingMessage string) *NamespaceView
NewNamespaceViewWithLoading creates a new namespace selector view in loading state
func (*NamespaceView) GetSelectedNamespace ¶
func (v *NamespaceView) GetSelectedNamespace() string
GetSelectedNamespace returns the selected namespace name
func (*NamespaceView) SetLoading ¶
func (v *NamespaceView) SetLoading(loading bool, message string)
SetLoading sets the loading state
func (*NamespaceView) SetNamespaces ¶
func (v *NamespaceView) SetNamespaces(namespaces []v1.Namespace)
SetNamespaces updates the namespaces and clears loading state
func (*NamespaceView) SetSize ¶
func (v *NamespaceView) SetSize(width, height int)
SetSize updates the view size
func (*NamespaceView) View ¶
func (v *NamespaceView) View() string
View renders the namespace selector
type RefreshCompleteMsg ¶
type RefreshCompleteMsg struct{}
type ResourceSelectedMsg ¶
type ResourceSelectedMsg struct {
ResourceType core.ResourceType
}
ResourceSelectedMsg is sent when a resource type is selected
type ResourceSelectorCancelledMsg ¶
type ResourceSelectorCancelledMsg struct{}
ResourceSelectorCancelledMsg is sent when the selector is cancelled
type ResourceSelectorView ¶
type ResourceSelectorView struct {
// contains filtered or unexported fields
}
ResourceSelectorView provides a dropdown for selecting resource types
func NewResourceSelectorView ¶
func NewResourceSelectorView() *ResourceSelectorView
NewResourceSelectorView creates a new resource selector view
func (*ResourceSelectorView) Close ¶
func (v *ResourceSelectorView) Close()
Close closes the dropdown
func (*ResourceSelectorView) GetSelectedOption ¶
func (v *ResourceSelectorView) GetSelectedOption() dropdown.Option
GetSelectedOption returns the currently selected option
func (*ResourceSelectorView) Init ¶
func (v *ResourceSelectorView) Init() tea.Cmd
Init initializes the view
func (*ResourceSelectorView) IsOpen ¶
func (v *ResourceSelectorView) IsOpen() bool
IsOpen returns whether the dropdown is open
func (*ResourceSelectorView) SetCurrentResourceType ¶
func (v *ResourceSelectorView) SetCurrentResourceType(resourceType core.ResourceType)
SetCurrentResourceType sets the currently selected resource type
func (*ResourceSelectorView) SetSize ¶
func (v *ResourceSelectorView) SetSize(width, height int)
SetSize sets the view dimensions (screen size for centering)
func (*ResourceSelectorView) View ¶
func (v *ResourceSelectorView) View() string
View renders the view
type ResourceUpdateMsg ¶
type ResourceUpdateMsg struct {
ResourceType string
}
type ResourceView ¶
type ResourceView struct {
// contains filtered or unexported fields
}
ResourceView displays a list of Kubernetes resources
func NewResourceView ¶
func NewResourceView(state *core.State, k8sClient *k8s.Client) *ResourceView
NewResourceView creates a new resource view
func NewResourceViewWithMultiContext ¶
func NewResourceViewWithMultiContext(state *core.State, multiClient *k8s.MultiContextClient) *ResourceView
NewResourceViewWithMultiContext creates a new resource view with multi-context support
func (*ResourceView) DeleteSelected ¶
func (v *ResourceView) DeleteSelected() tea.Cmd
DeleteSelected deletes the selected resource(s)
func (*ResourceView) DisableNewComponents ¶
func (rv *ResourceView) DisableNewComponents()
DisableNewComponents disables the new refactored components, falling back to legacy rendering
func (*ResourceView) EnableNewComponents ¶
func (rv *ResourceView) EnableNewComponents()
EnableNewComponents enables the new refactored components for rendering
func (*ResourceView) GetSelectedResourceContext ¶
func (v *ResourceView) GetSelectedResourceContext() string
GetSelectedResourceContext returns the context of the currently selected resource (multi-context mode)
func (*ResourceView) GetSelectedResourceName ¶
func (v *ResourceView) GetSelectedResourceName() string
GetSelectedResourceName returns the name of the currently selected resource
func (*ResourceView) IsUsingNewComponents ¶
func (rv *ResourceView) IsUsingNewComponents() bool
IsUsingNewComponents returns whether new components are currently enabled
func (*ResourceView) RefreshResources ¶
func (v *ResourceView) RefreshResources() tea.Cmd
RefreshResources fetches and updates the resource list
func (*ResourceView) SetCompactMode ¶
func (v *ResourceView) SetCompactMode(compact bool)
SetCompactMode enables/disables compact mode for split view
func (*ResourceView) SetSelectedRow ¶
func (v *ResourceView) SetSelectedRow(row int)
SetSelectedRow sets the selected row index (for testing purposes)
func (*ResourceView) SetSize ¶
func (v *ResourceView) SetSize(width, height int)
SetSize updates the view size
func (*ResourceView) SetTestData ¶
func (v *ResourceView) SetTestData(headers []string, rows [][]string)
SetTestData sets test data for the ResourceView (for testing purposes)
func (*ResourceView) TryUpdateWithNewComponents ¶
func (rv *ResourceView) TryUpdateWithNewComponents(resources []interface{}) bool
TryUpdateWithNewComponents attempts to update the table using new components Returns true if successful, false if it falls back to legacy methods