base

package
v0.5.3 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2022 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Quit

func Quit(_ *gocui.Gui, _ *gocui.View) error

func SetView

func SetView(g *gocui.Gui, v *gocui.View) error

Types

type Controller

type Controller struct {
	sync.Mutex
	Cui          *gocui.Gui
	DockerClient *dockerClient.Client
	Views        map[string]widgets.Widget
	LayoutFunc   func(g *gocui.Gui) error
	HelpFunc     func(g *gocui.Gui, v *gocui.View) error
	Tab          widgets.Tab
	Config       *config.Config

	ActiveCancel context.CancelFunc
}

func (*Controller) ClearStatus

func (c *Controller) ClearStatus()

func (*Controller) ConfigureGlobalKeyBindings

func (c *Controller) ConfigureGlobalKeyBindings() error

func (*Controller) RefreshView

func (c *Controller) RefreshView(viewName string)

func (*Controller) SetKeyBinding

func (c *Controller) SetKeyBinding(viewName string, key interface{}, mod gocui.Modifier, handler func(*gocui.Gui, *gocui.View) error) error

func (*Controller) SetManager

func (c *Controller) SetManager()

func (*Controller) UpdateStatus

func (c *Controller) UpdateStatus(status string)

type ControllerView

type ControllerView interface {
	CreateWidgets(manager Manager) error
	Initialise() error
	Tab() widgets.Tab
}

type Manager

type Manager interface {
	AddViews(views ...gocui.Manager)
}

Jump to

Keyboard shortcuts

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