tower

package
v0.10.10 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2025 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetupDebugFile added in v0.6.6

func SetupDebugFile(dst string) (err error)

Types

type ATCDashboard

type ATCDashboard struct {
	Content tea.Model
	Commands
}

func (ATCDashboard) Init

func (dashboard ATCDashboard) Init() tea.Cmd

func (ATCDashboard) Update

func (dashboard ATCDashboard) Update(msg tea.Msg) (tea.Model, tea.Cmd)

func (ATCDashboard) View

func (dashboard ATCDashboard) View() string

type AirwayListView

type AirwayListView struct {
	tea.Model
}

func MakeAirwayListView

func MakeAirwayListView(dim tea.WindowSizeMsg) AirwayListView

func (AirwayListView) Update

func (view AirwayListView) Update(msg tea.Msg) (tea.Model, tea.Cmd)

func (AirwayListView) View

func (view AirwayListView) View() string

type Commands

type Commands struct {
	GetAirwayList        tea.Cmd
	GetResourceYaml      func(ref ResourceRef) tea.Cmd
	GetFlightList        func(gk schema.GroupKind) tea.Cmd
	GetRevisionResources func(name, ns string) tea.Cmd
	ResetClientMapper    tea.Cmd
}

type ExecMsg

type ExecMsg func(Commands) tea.Cmd

type FlightListView

type FlightListView struct {
	tea.Model
}

func MakeFlightListView

func MakeFlightListView(title string, refresh *RefreshConfig, dim tea.WindowSizeMsg) FlightListView

func (FlightListView) Update

func (view FlightListView) Update(msg tea.Msg) (tea.Model, tea.Cmd)

func (FlightListView) View

func (view FlightListView) View() string

type GetAirwayListResult

type GetAirwayListResult []v1alpha1.Airway

type GetFlightListResult

type GetFlightListResult *unstructured.UnstructuredList

type GetResourcesResult added in v0.6.7

type GetResourcesResult []ReadyResource
type Header struct {
	Width int
}

func (Header) Init

func (h Header) Init() tea.Cmd

func (Header) Update

func (h Header) Update(tea.Msg) (tea.Model, tea.Cmd)

Update implements tea.Model.

func (Header) View

func (h Header) View() string

View implements tea.Model.

type HeaderActionItem

type HeaderActionItem struct {
	Key         string
	Description string
}

type HeaderActionItems

type HeaderActionItems []HeaderActionItem

func (HeaderActionItems) String

func (items HeaderActionItems) String() string

type MakeResourcesViewParams added in v0.6.7

type MakeResourcesViewParams struct {
	Dim    tea.WindowSizeMsg
	Flight unstructured.Unstructured
	Prev   PrevRef
}
type Nav struct {
	Model func(tea.WindowSizeMsg) tea.Model
	Cmd   tea.Cmd
	Desc  string
}

type PrevRef added in v0.6.7

type PrevRef struct {
	Title   string
	Refresh *RefreshConfig
}

type ReadyResource

type ReadyResource struct {
	Ready *bool
	*unstructured.Unstructured
}

type RefreshConfig added in v0.6.7

type RefreshConfig struct {
	Func     func() tea.Msg
	Interval time.Duration
}

type ResourceRef

type ResourceRef struct {
	Name      string
	Namespace string
	GK        schema.GroupKind
}

type ResourcesView added in v0.6.7

type ResourcesView struct {
	tea.Model
}

func MakeResourcesView added in v0.6.7

func MakeResourcesView(params MakeResourcesViewParams) ResourcesView

func (ResourcesView) Update added in v0.6.7

func (view ResourcesView) Update(msg tea.Msg) (tea.Model, tea.Cmd)

type TableDataMsg

type TableDataMsg[T any] []T

type TableView

type TableView[T any] struct {
	Err     error
	Dim     tea.WindowSizeMsg
	Search  textinput.Model
	Table   table.Model
	Data    []T
	Columns []string
	Title   string
	ToRows  func([]T) []table.Row
	Refresh *RefreshConfig
	Back    *Nav
	Forward func(T) Nav
	Yaml    func(T) Nav
}

func (TableView[T]) Init

func (view TableView[T]) Init() tea.Cmd

func (TableView[T]) Update

func (view TableView[T]) Update(msg tea.Msg) (tea.Model, tea.Cmd)

func (TableView[T]) View

func (view TableView[T]) View() string

type YamlResult

type YamlResult string

type YamlView

type YamlView struct {
	Resource          ResourceRef
	Loaded            bool
	Viewport          viewport.Model
	Search            textinput.Model
	Err               error
	Dim               tea.WindowSizeMsg
	Back              Nav
	Text              string
	WithManagedFields bool
}

func (YamlView) Init

func (view YamlView) Init() tea.Cmd

func (YamlView) Update

func (view YamlView) Update(msg tea.Msg) (tea.Model, tea.Cmd)

func (YamlView) View

func (view YamlView) View() string

Jump to

Keyboard shortcuts

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