Help us shape the future of Go! Take the 2026 Go Developer Survey

app

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2026 License: GPL-3.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type App

type App struct {
	UpdatedTo string // set on successful self-update; read by main after p.Run()
	// contains filtered or unexported fields
}

App is the root bubbletea model.

func NewApp

func NewApp(cfg AppConfig) App

NewApp creates the root application model.

func (App) Init

func (a App) Init() tea.Cmd

func (App) Update

func (a App) Update(msg tea.Msg) (tea.Model, tea.Cmd)

Update is the Bubble Tea entry point. It routes messages through four progressively-narrower stages: (1) monitor consumes its own poll/tick messages; (2) any open modal dialog claims key events while visible; (3) tea framework messages (focus/blur/resize/key) take their typed branches; (4) everything else is forwarded to handleTypedMessage and its per-concern handler methods.

func (App) View

func (a App) View() string

type AppConfig added in v0.4.0

type AppConfig struct {
	// Theme
	Theme              theme.Theme
	BaseTheme          theme.Theme
	ThemeID            theme.ThemeID
	ColorblindnessType theme.ColorblindnessType

	// Input
	Keys KeyMap

	// Infrastructure
	Client      jmodel.JenkinsClient
	Store       *cache.Store
	DiskStoreFn func(serverURL string) *cache.DiskStore

	// User identity
	Username     string
	FriendlyName string
	GitUsernames []string

	// Timing
	RefreshInterval     time.Duration
	SlowRefreshInterval time.Duration

	// UI components (pre-constructed by the composition root)
	Header     component.Header
	Breadcrumb component.Breadcrumb
	StatusBar  component.StatusBar

	// Navigation
	InitialView view.View

	// Feature flags
	Debug         bool
	SponsorKey    string
	Notifications bool
	MaxLogLines   int
	LogLevel      string

	// Context management
	Contexts           []config.ContextConfig
	CurrentContextName string
	AddContextFn       func(config.ContextConfig) error
	DeleteContextFn    func(string) error
	SetContextFn       func(string) error

	// Persistence callbacks
	SaveColorblindnessFn func(theme.ColorblindnessType) error
	SaveThemeFn          func(string) error
	SavePrefsFn          func(notifications bool, gitUsernames []string, refreshInterval, slowInterval time.Duration, maxLogLines int, logLevel string, textArtifactExtensions []string) error
	// SaveLastViewFn records the Jenkins view last opened in a context, and
	// LastViewFn reads it back — together they make the views list resume
	// where the user left off, per context.
	SaveLastViewFn func(contextName, viewName string) error
	LastViewFn     func(contextName string) string
}

AppConfig holds all constructor parameters for NewApp. Using a struct instead of a long positional argument list makes call sites readable and allows new fields to be added without touching every caller.

type KeyMap

type KeyMap struct {
	Up            key.Binding
	Down          key.Binding
	Enter         key.Binding
	Back          key.Binding
	Quit          key.Binding
	Command       key.Binding
	Search        key.Binding
	Log           key.Binding
	Mine          key.Binding
	RunningBuilds key.Binding
}

KeyMap defines all key bindings for the application.

func DefaultKeyMap

func DefaultKeyMap() KeyMap

DefaultKeyMap returns the default key bindings.

Directories

Path Synopsis
Package dto holds the wire-format data-transfer types shared by the CLI (`-o json`/`yaml`) and the MCP server.
Package dto holds the wire-format data-transfer types shared by the CLI (`-o json`/`yaml`) and the MCP server.
Package engine hosts Jenking's headless stateful background work: it polls the Jenkins controller and keeps the shared buildregistry (and, in a later slice, the dashboard sampler) live.
Package engine hosts Jenking's headless stateful background work: it polls the Jenkins controller and keeps the shared buildregistry (and, in a later slice, the dashboard sampler) live.
Package logscore assigns per-character importance scores to a log line and a single aggregate score for the whole line.
Package logscore assigns per-character importance scores to a log line and a single aggregate score for the whole line.
Package mcp exposes Jenking's headless usecase layer as a Model Context Protocol server (stdio transport).
Package mcp exposes Jenking's headless usecase layer as a Model Context Protocol server (stdio transport).
Package usecase holds headless orchestration for Jenking's verbs: target resolution plus the fetch/mutate logic, expressed over the jmodel.JenkinsClient port and the cache store, returning domain (jmodel) types.
Package usecase holds headless orchestration for Jenking's verbs: target resolution plus the fetch/mutate logic, expressed over the jmodel.JenkinsClient port and the cache store, returning domain (jmodel) types.

Jump to

Keyboard shortcuts

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