tower

package
v0.6.5 Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2025 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

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
}

type ExecMsg

type ExecMsg func(Commands) tea.Cmd

type FlightListView

type FlightListView struct {
	tea.Model
}

func MakeFlightListView

func MakeFlightListView(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 GetRevisionResult

type GetRevisionResult []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 Nav struct {
	Model func(tea.WindowSizeMsg) tea.Model
	Cmd   tea.Cmd
	Desc  string
}

type ReadyResource

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

type ResourceRef

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

type RevisionView

type RevisionView struct {
	tea.Model
}

func MakeRevisionView

func MakeRevisionView(dim tea.WindowSizeMsg, flight unstructured.Unstructured) RevisionView

func (RevisionView) Update

func (view RevisionView) 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
	ToRows  func([]T) []table.Row
	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
	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