context

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type InstalledPkgMessage

type InstalledPkgMessage struct {
	App spec.App
	Err error
}

InstallPkgMessage is the message sent when a package is installed.

type ProgramContext

type ProgramContext struct {
	ScreenHeight      int
	ScreenWidth       int
	MainContentWidth  int
	MainContentHeight int
	StartTask         func(task Task) tea.Cmd
	// contains filtered or unexported fields
}

ProgramContext is the context for the program.

func NewProgramContext

func NewProgramContext() *ProgramContext

NewProgramContext creates a new ProgramContext with default values.

func WithContext

func WithContext(ctx context.Context) *ProgramContext

WithContext creates a new ProgramContext with the given context.

func (*ProgramContext) Context

func (c *ProgramContext) Context() context.Context

Context returns the context for the program.

func (*ProgramContext) SetContext

func (c *ProgramContext) SetContext(ctx context.Context)

SetContext sets the context for the program.

type State

type State = int

State is the state of a task.

const (
	TaskStart State = iota
	TaskFinished
	TaskError
)

type Task

type Task struct {
	ID           string
	StartText    string
	FinishedText string
	State        State
	Error        error
	StartTime    time.Time
	FinishedTime *time.Time
}

Task is a task to be executed.

Jump to

Keyboard shortcuts

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