contexts

package
v1.13.0-rc8 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2026 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

View Source
const ViewName = "contexts"

Variables

This section is empty.

Functions

func GetContextsHelpContent

func GetContextsHelpContent() []helpview.HelpCategory

GetContextsHelpContent returns categorized help for the contexts view

func LoadCertFilesCmd

func LoadCertFilesCmd(dirPath string) tea.Cmd

LoadCertFilesCmd loads all files from a directory for cert file selection

func LoadFilesCmd

func LoadFilesCmd(dirPath string) tea.Cmd

LoadFilesCmd loads context archive files and directories from a path for browsing

func StartTickerCmd

func StartTickerCmd() tea.Cmd

StartTickerCmd starts the periodic refresh ticker

Types

type ContextChangedNotification

type ContextChangedNotification struct {
	PreviousContext string
}

ContextChangedNotification is sent to notify the app that the Docker context has changed and should navigate to stacks view

type ContextCreatedMsg

type ContextCreatedMsg struct {
	ContextName string
	Success     bool
	Error       error
}

type ContextDeletedMsg

type ContextDeletedMsg struct {
	ContextName string
	Success     bool
	Error       error
}

type ContextExportedMsg

type ContextExportedMsg struct {
	ContextName string
	FilePath    string
	Success     bool
	Error       error
}

type ContextImportedMsg

type ContextImportedMsg struct {
	ContextName string
	Success     bool
	Error       error
}

type ContextSwitchedMsg

type ContextSwitchedMsg struct {
	ContextName string
	Success     bool
	Error       error
}

type ContextUpdatedMsg

type ContextUpdatedMsg struct {
	ContextName string
	Success     bool
	Error       error
}

type ContextsLoadedMsg

type ContextsLoadedMsg struct {
	Contexts []docker.ContextInfo
	Error    error
}

type FilesLoadedMsg

type FilesLoadedMsg struct {
	Path  string
	Files []string
	Error error
}

FilesLoadedMsg contains the list of context archive files in a directory

type Model

type Model struct {
	Visible bool

	List filterlist.FilterableList[docker.ContextInfo]
	// contains filtered or unexported fields
}

func New

func New() *Model

func (*Model) ApplySearchQuery

func (m *Model) ApplySearchQuery(query string)

ApplySearchQuery sets the filter query and applies it.

func (*Model) CapturesInput

func (m *Model) CapturesInput() bool

CapturesInput reports whether the view is currently capturing all keyboard input.

func (*Model) ClearSearchQuery

func (m *Model) ClearSearchQuery()

ClearSearchQuery clears the filter query and resets the view.

func (*Model) FrameContent

func (m *Model) FrameContent() string

func (*Model) FrameFooter

func (m *Model) FrameFooter() string

func (*Model) FrameHeader

func (m *Model) FrameHeader() string

func (*Model) FrameTitle

func (m *Model) FrameTitle() string

func (*Model) GetContexts

func (m *Model) GetContexts() []docker.ContextInfo

func (*Model) GetCursor

func (m *Model) GetCursor() int

func (*Model) GetError

func (m *Model) GetError() string

func (*Model) GetSelectedContext

func (m *Model) GetSelectedContext() (docker.ContextInfo, bool)

func (*Model) GetSuccess

func (m *Model) GetSuccess() string

func (*Model) HasActiveFilter

func (m *Model) HasActiveFilter() bool

HasActiveFilter reports whether a filter query is active.

func (*Model) HasErrors

func (m *Model) HasErrors() bool

func (*Model) Init

func (m *Model) Init() tea.Cmd

Init initializes the model (part of View interface)

func (*Model) IsLoading

func (m *Model) IsLoading() bool

func (*Model) IsSearching

func (m *Model) IsSearching() bool

IsSearching reports whether the list is currently in search mode.

func (*Model) IsSwitchPending

func (m *Model) IsSwitchPending() bool

func (*Model) MoveCursor

func (m *Model) MoveCursor(delta int)

func (*Model) Name

func (m *Model) Name() string

Name returns the view name (part of View interface)

func (*Model) OnEnter

func (m *Model) OnEnter() tea.Cmd

OnEnter is called when the view becomes active

func (*Model) OnExit

func (m *Model) OnExit() tea.Cmd

OnExit is called when the view is exited

func (*Model) SetContexts

func (m *Model) SetContexts(contexts []docker.ContextInfo)

func (*Model) SetError

func (m *Model) SetError(err string)

func (*Model) SetLoading

func (m *Model) SetLoading(loading bool)

func (*Model) SetSize

func (m *Model) SetSize(width, height int)

func (*Model) SetSuccess

func (m *Model) SetSuccess(msg string)

func (*Model) SetSwitchPending

func (m *Model) SetSwitchPending(pending bool)

func (*Model) ShortHelpItems

func (m *Model) ShortHelpItems() []helpbar.HelpEntry

func (*Model) Update

func (m *Model) Update(msg tea.Msg) tea.Cmd

func (*Model) View

func (m *Model) View() string

type RefreshTickMsg

type RefreshTickMsg time.Time

type SortField

type SortField int
const (
	SortByName SortField = iota
	SortByStatus
	SortByDescription
	SortByEndpoint
)

Jump to

Keyboard shortcuts

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