app

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2021 License: Apache-2.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

View Source
const (
	NamespaceXOffset           = 0
	NamespaceErrorXOffset      = 2
	NamespaceMessageXOffset    = 2
	PodGroupXOffset            = 1
	PodXOffset                 = 2
	ContainerXOffset           = 4
	ColumnSpacing              = 2
	NameColumnDefaultWidth     = 25 + ColumnSpacing
	ReadyColumnDefaultWidth    = 5 + ColumnSpacing
	StatusColumnDefaultWidth   = 6 + ColumnSpacing
	RestartsColumnDefaultWidth = 8 + ColumnSpacing
	AgeColumnDefaultWidth      = 3 + ColumnSpacing
	MainFrameStartY            = 4 //Excluding header line.
	FooterFrameHeight          = 4 //Including divider line.
)
View Source
const (
	PopupItemXOffset = 2
	PopupItemYOffset = 2
)

Variables

This section is empty.

Functions

func CurrentContextName added in v0.12.0

func CurrentContextName() (string, error)

Types

type App

type App struct {
	// contains filtered or unexported fields
}

func NewApp

func NewApp(context string, namespace string, settings map[string]interface{}) (App, error)

func NewAppFromGroup

func NewAppFromGroup(group Group, settings map[string]interface{}) (App, error)

func (*App) Run

func (app *App) Run()

type Client

type Client struct {
	// contains filtered or unexported fields
}

func NewK8ClientSets

func NewK8ClientSets(contexts map[string]struct{}) (Client, error)

type ClipboardShortcut added in v0.11.0

type ClipboardShortcut struct {
	// contains filtered or unexported fields
}

type Container

type Container struct {
	// contains filtered or unexported fields
}

func (Container) DisplayName

func (c Container) DisplayName() string

func (Container) Expanded

func (c Container) Expanded(b bool)

func (Container) IsExpanded

func (c Container) IsExpanded() bool

func (Container) Type

func (c Container) Type() Type

type FooterFrame

type FooterFrame struct {
	// contains filtered or unexported fields
}

func NewFooterFrame

func NewFooterFrame(s tcell.Screen) *FooterFrame

type Group

type Group struct {
	Id       int       `json:"id"`
	Name     string    `json:"name"`
	NsGroups []NsGroup `json:"nsGroups"`
}

type Gui

type Gui struct {
	// contains filtered or unexported fields
}

func NewGui

func NewGui(s tcell.Screen, name string) Gui

type GuiItemInfo added in v0.11.0

type GuiItemInfo struct {
	Context   string
	Namespace string
	Group     string
	Pod       string
	Container string
	// contains filtered or unexported fields
}

type InfoFrame

type InfoFrame struct {
	sync.Mutex
	// contains filtered or unexported fields
}

func NewInfoFrame

func NewInfoFrame(winWidth, winHeight int) *InfoFrame

type Item

type Item interface {
	Type() Type
	Expanded(b bool)
	IsExpanded() bool
}

type Namespace

type Namespace struct {
	// contains filtered or unexported fields
}

func (*Namespace) DisplayName

func (n *Namespace) DisplayName() string

func (*Namespace) Expanded

func (n *Namespace) Expanded(b bool)

func (*Namespace) IsExpanded

func (n *Namespace) IsExpanded() bool

func (*Namespace) Type

func (n *Namespace) Type() Type

type NamespaceError

type NamespaceError struct {
	// contains filtered or unexported fields
}

func (NamespaceError) Expanded

func (nse NamespaceError) Expanded(b bool)

func (NamespaceError) IsExpanded

func (nse NamespaceError) IsExpanded() bool

func (NamespaceError) Type

func (nse NamespaceError) Type() Type

type NamespaceMessage

type NamespaceMessage struct {
	// contains filtered or unexported fields
}

func (NamespaceMessage) Expanded

func (nsm NamespaceMessage) Expanded(b bool)

func (NamespaceMessage) IsExpanded

func (nsm NamespaceMessage) IsExpanded() bool

func (NamespaceMessage) Type

func (nsm NamespaceMessage) Type() Type

type NsGroup

type NsGroup struct {
	Context    string   `json:"context"`
	Namespaces []string `json:"namespaces"`
}

type Pod

type Pod struct {
	// contains filtered or unexported fields
}

func (*Pod) Expanded

func (p *Pod) Expanded(b bool)

func (*Pod) IsExpanded

func (p *Pod) IsExpanded() bool

func (*Pod) ReadyString

func (p *Pod) ReadyString() string

func (*Pod) Type

func (p *Pod) Type() Type

type PodGroup added in v0.10.0

type PodGroup struct {
	// contains filtered or unexported fields
}

func (*PodGroup) Expanded added in v0.10.0

func (pg *PodGroup) Expanded(b bool)

func (*PodGroup) IsExpanded added in v0.10.0

func (pg *PodGroup) IsExpanded() bool

func (*PodGroup) Type added in v0.10.0

func (pg *PodGroup) Type() Type

type PodListResult

type PodListResult struct {
	v1.PodList
	// contains filtered or unexported fields
}

type PopupFrame added in v0.10.0

type PopupFrame struct {
	// contains filtered or unexported fields
}

func NewPopupFrame added in v0.10.0

func NewPopupFrame(s tcell.Screen, title string, items []string, callback func(string)) *PopupFrame

type StringItem

type StringItem struct {
	// contains filtered or unexported fields
}

func (*StringItem) Draw

func (i *StringItem) Draw(s tcell.Screen)

func (*StringItem) DrawS

func (i *StringItem) DrawS(s tcell.Screen, style tcell.Style)

func (*StringItem) Len

func (i *StringItem) Len(s tcell.Screen) int

func (*StringItem) Update

func (i *StringItem) Update(s tcell.Screen, newValue string)

func (*StringItem) UpdateS

func (i *StringItem) UpdateS(s tcell.Screen, newValue string, style tcell.Style)

type Type

type Type int
const (
	TypeNamespace Type = iota + 1
	TypePodGroup
	TypePod
	TypeContainer
	TypeNamespaceError
	TypeNamespaceMessage
)

func (Type) String added in v0.11.0

func (t Type) String() string

Jump to

Keyboard shortcuts

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