ui

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2026 License: BSD-3-Clause Imports: 48 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run added in v0.7.0

func Run() error

Run starts the Yoga UI. It must be called from the main goroutine.

Types

type App added in v0.7.0

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

func BuildApp added in v0.7.0

func BuildApp() *App

func (*App) Body added in v0.7.0

func (a *App) Body(c *ui.Ctx) ui.View

func (*App) Close added in v0.7.0

func (a *App) Close()

func (*App) OnKey added in v0.7.0

func (a *App) OnKey(_ *ui.Ctx, k input.KeyEvent) bool

type Catalog added in v0.7.0

type Catalog struct {
	Collections  []*domain.Collection
	Requests     []*domain.Request
	Environments []*domain.Environment
	Workspaces   []*domain.Workspace
	TestCases    []*domain.TestCase

	ActiveEnvID       string
	ActiveWorkspaceID string
	// contains filtered or unexported fields
}

Catalog holds list identity for sidebars. Open documents live on containers, not here.

func (*Catalog) ActiveEnvironment added in v0.7.0

func (c *Catalog) ActiveEnvironment() *domain.Environment

func (*Catalog) ActiveWorkspace added in v0.7.0

func (c *Catalog) ActiveWorkspace() *domain.Workspace

func (*Catalog) AllCollections added in v0.7.0

func (c *Catalog) AllCollections() []*domain.Collection

func (*Catalog) AllEnvironments added in v0.8.0

func (c *Catalog) AllEnvironments() []*domain.Environment

func (*Catalog) AllRequests added in v0.8.0

func (c *Catalog) AllRequests() []*domain.Request

AllRequests returns standalone requests and those in collections, with the collection set on the latter. Test runs look requests up here.

func (*Catalog) AllTestCases added in v0.8.0

func (c *Catalog) AllTestCases() []*domain.TestCase

func (*Catalog) CollectionByID added in v0.7.0

func (c *Catalog) CollectionByID(id string) *domain.Collection

func (*Catalog) DrainSkipped added in v0.7.0

func (c *Catalog) DrainSkipped() []repository.SkippedFile

DrainSkipped returns the files left out of loads since the last call. Each problem is returned once, however often the catalog reloads.

func (*Catalog) EnvironmentByID added in v0.7.0

func (c *Catalog) EnvironmentByID(id string) *domain.Environment

func (*Catalog) Load added in v0.7.0

func (c *Catalog) Load() error

func (*Catalog) ReplaceEnvironment added in v0.7.0

func (c *Catalog) ReplaceEnvironment(env *domain.Environment)

func (*Catalog) RequestByID added in v0.7.0

func (c *Catalog) RequestByID(id string) *domain.Request

func (*Catalog) SetActiveEnv added in v0.7.0

func (c *Catalog) SetActiveEnv(id string) error

func (*Catalog) SetActiveWorkspace added in v0.7.0

func (c *Catalog) SetActiveWorkspace(ws *domain.Workspace) error

func (*Catalog) StandaloneRequests added in v0.7.0

func (c *Catalog) StandaloneRequests() []*domain.Request

func (*Catalog) TestCaseByID added in v0.8.0

func (c *Catalog) TestCaseByID(id string) *domain.TestCase

func (*Catalog) WorkspaceByID added in v0.7.0

func (c *Catalog) WorkspaceByID(id string) *domain.Workspace

type ConsolePanel added in v0.7.0

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

ConsolePanel shows application logs in a bottom push drawer.

func (*ConsolePanel) Hide added in v0.7.0

func (p *ConsolePanel) Hide()

func (*ConsolePanel) IsVisible added in v0.7.0

func (p *ConsolePanel) IsVisible() bool

func (*ConsolePanel) Layout added in v0.7.0

func (p *ConsolePanel) Layout(c *ui.Ctx) ui.View

Layout keeps a compact header fixed above the log view, so only the logs scroll. Text search is the editor's own Cmd+F.

func (*ConsolePanel) Show added in v0.7.0

func (p *ConsolePanel) Show()

func (*ConsolePanel) Toggle added in v0.7.0

func (p *ConsolePanel) Toggle()

func (*ConsolePanel) Wrap added in v0.7.0

func (p *ConsolePanel) Wrap(c *ui.Ctx, content ui.View) ui.View

Wrap hosts the page area in a bottom push drawer so the console is available on every page while the nav rail stays put.

type NotificationHistory added in v0.7.0

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

NotificationHistory retains recent notifications for the panel.

func (*NotificationHistory) Add added in v0.7.0

func (n *NotificationHistory) Add(text string, kind ui.ToastVariant)

func (*NotificationHistory) Layout added in v0.7.0

func (n *NotificationHistory) Layout(c *ui.Ctx) ui.View

type Workspace added in v0.7.0

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

Workspace is the unified tab strip for requests, collections, and environments.

func (*Workspace) Activate added in v0.7.0

func (w *Workspace) Activate(i int)

Activate makes tab i the active tab.

func (*Workspace) Active added in v0.7.0

func (w *Workspace) Active() container.Container

func (*Workspace) CloseAll added in v0.7.0

func (w *Workspace) CloseAll()

func (*Workspace) CloseByID added in v0.7.0

func (w *Workspace) CloseByID(id string)

func (*Workspace) HasDirty added in v0.7.0

func (w *Workspace) HasDirty() bool

func (*Workspace) Layout added in v0.7.0

func (w *Workspace) Layout(c *ui.Ctx) ui.View

func (*Workspace) OpenCollection added in v0.7.0

func (w *Workspace) OpenCollection(col *domain.Collection)

func (*Workspace) OpenEnv added in v0.7.0

func (w *Workspace) OpenEnv(env *domain.Environment)

func (*Workspace) OpenIDs added in v0.12.0

func (w *Workspace) OpenIDs() (ids []string, active string)

OpenIDs lists the IDs of the items open in tabs, in tab order, and the active one's.

func (*Workspace) OpenRequest added in v0.7.0

func (w *Workspace) OpenRequest(req *domain.Request)

func (*Workspace) OpenTestCase added in v0.8.0

func (w *Workspace) OpenTestCase(tc *domain.TestCase)

func (*Workspace) SaveActive added in v0.7.0

func (w *Workspace) SaveActive()

func (*Workspace) SendActive added in v0.7.0

func (w *Workspace) SendActive()

func (*Workspace) Step added in v0.7.0

func (w *Workspace) Step(delta int)

Step moves the active tab by delta, wrapping around the ends.

Directories

Path Synopsis
env
testcase
Package testcase is the editor of a test case: its steps, variables and settings, as a form or as YAML, with the results of its last run.
Package testcase is the editor of a test case: its steps, variables and settings, as a form or as YAML, with the results of its last run.
websocket
Package websocket is the editor for WebSocket requests: a connection the user opens, sends messages on, and watches.
Package websocket is the editor for WebSocket requests: a connection the user opens, sends messages on, and watches.
Package cookieui is the dialog for viewing and editing environment cookie jars.
Package cookieui is the dialog for viewing and editing environment cookie jars.
Package langsrv decides which language servers Chapar runs, and when.
Package langsrv decides which language servers Chapar runs, and when.
Package scriptsrv owns the scripting executor that runs pre/post-request scripts: it starts, stops and restarts it, and reports its state.
Package scriptsrv owns the scripting executor that runs pre/post-request scripts: it starts, stops and restarts it, and reports its state.
Package secretui holds the dialogs that set up, unlock and show the key that encrypts secret environment values.
Package secretui holds the dialogs that set up, unlock and show the key that encrypts secret environment values.
Package vars offers the template variables an input can complete, and paints the placeholders that name them.
Package vars offers the template variables an input can complete, and paints the placeholders that name them.

Jump to

Keyboard shortcuts

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