component

package
v1.2.5-alpha-2 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2024 License: LGPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithBorder

func WithBorder(box IBox)

func WithShutdownOnChecked

func WithShutdownOnChecked(box StatusCollection)

Types

type IBox

type IBox interface {
	GetHeight() int
	GetWidth() int
	SetStyle(style *lipgloss.Style)
}

type Option

type Option = func(box IBox)

type Status

type Status int32
const (
	PENDING Status = iota
	SUCCESS
	FAILED
)

type StatusCollection

type StatusCollection struct {
	Style             lipgloss.Style
	Spinner           spinner.Model
	Statuses          []*StatusObject
	ShutdownOnChecked bool
	ShutdownChan      chan bool
	// contains filtered or unexported fields
}

func NewStatusCollection

func NewStatusCollection(statuses []*StatusObject, options ...Option) *StatusCollection

func (*StatusCollection) GetHeight

func (s *StatusCollection) GetHeight() int

func (*StatusCollection) GetWidth

func (s *StatusCollection) GetWidth() int

func (*StatusCollection) Init

func (s *StatusCollection) Init() tea.Cmd

func (*StatusCollection) IsAllChecked

func (s *StatusCollection) IsAllChecked() bool

func (*StatusCollection) SetStyle

func (s *StatusCollection) SetStyle(style *lipgloss.Style)

func (*StatusCollection) Shutdown

func (s *StatusCollection) Shutdown()

func (*StatusCollection) Update

func (s *StatusCollection) Update(msg tea.Msg) (tea.Model, tea.Cmd)

func (*StatusCollection) View

func (s *StatusCollection) View() string

type StatusObject

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

func CreateNewStatus

func CreateNewStatus(statusName string, checkFunc func(*StatusObject)) *StatusObject

func (*StatusObject) AutoSetStatus

func (s *StatusObject) AutoSetStatus()

func (*StatusObject) GetStatus

func (s *StatusObject) GetStatus() Status

func (*StatusObject) GetStatusMessage

func (s *StatusObject) GetStatusMessage(spinnerModel *spinner.Model) string

func (*StatusObject) SetStatus

func (s *StatusObject) SetStatus(status Status)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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