Documentation
¶
Index ¶
- Variables
- func GetParams[T any](params *ParamsInterface) T
- func NewTtyWriter() *ttyWriter
- func SetParams[T any](params *ParamsInterface, t T)
- type Lines
- type ParamsInterface
- type Resolver
- type Runner
- type Task
- func (t *Task) Log() *zerolog.Logger
- func (t *Task) Msg(s string)
- func (t *Task) Progress(ctx context.Context, level int) Lines
- func (t *Task) Run(ctx context.Context, params *ParamsInterface) error
- func (t *Task) Setup(ctx context.Context) error
- func (t *Task) Spinner() string
- func (t *Task) Status() string
- type TaskState
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ProgressStyleTitle = aec.CyanF ProgressStyleMessage = aec.Color8BitF(aec.NewRGB8Bit(132, 132, 132)) ProgressStyleError = aec.RedF )
View Source
var SpinnerIcons = map[TaskState][]string{
TaskStateIdle: {" "},
TaskStateProgress: {"⠋", "⠙", "⠹", "⠸", "⠼", "⠴", "⠦", "⠧", "⠇", "⠏"},
TaskStateCompleted: {"✔"},
TaskStateError: {"✘"},
}
Functions ¶
func GetParams ¶
func GetParams[T any](params *ParamsInterface) T
func NewTtyWriter ¶
func NewTtyWriter() *ttyWriter
func SetParams ¶
func SetParams[T any](params *ParamsInterface, t T)
Types ¶
type ParamsInterface ¶
type ParamsInterface interface{}
type Runner ¶
type Runner struct {
// contains filtered or unexported fields
}
func (*Runner) NoProgress ¶
Click to show internal directories.
Click to hide internal directories.
