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

app

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2026 License: GPL-3.0 Imports: 24 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
}

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 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.

Jump to

Keyboard shortcuts

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