cli

package
v0.0.0-...-5ce2981 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2022 License: MIT Imports: 17 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

New creates a new instance of terminal

func Restore

func Restore()

Restore puts back the terminal state to a "normal" state

func SetRaw

func SetRaw() bytes.Buffer

SetRaw changes the terminal state to "raw" mode

func StartInterruptHandler

func StartInterruptHandler()

StartInterruptHandler enforces that program interruptions such as Ctrl-C (SIGINT) are handled properly, cleaning up whatever needs to be cleaned up before exiting

Types

type TerminalUI

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

TerminalUI is the user interface implementation when using the Command Line Interface

func (*TerminalUI) Confirm

func (term *TerminalUI) Confirm(message string, defaultAnswer bool) bool

Confirm asks the user for confirmation

func (*TerminalUI) MuteDesktopNotifications

func (term *TerminalUI) MuteDesktopNotifications(muted bool)

MuteDesktopNotifications allows preventing desktop Notification popups from being displayed. Used for test automation at the moment. Could be turned into a feature later if there is need for it.

func (*TerminalUI) NotifyRoleEnding

func (term *TerminalUI) NotifyRoleEnding(r role.Role)

NotifyRoleEnding tells the user that TCR engine is ending the provided role

func (*TerminalUI) NotifyRoleStarting

func (term *TerminalUI) NotifyRoleStarting(r role.Role)

NotifyRoleStarting tells the user that TCR engine is starting with the provided role

func (*TerminalUI) ReportError

func (term *TerminalUI) ReportError(emphasis bool, a ...interface{})

ReportError reports error messages

func (*TerminalUI) ReportInfo

func (*TerminalUI) ReportInfo(_ bool, a ...interface{})

ReportInfo reports info messages

func (*TerminalUI) ReportSimple

func (*TerminalUI) ReportSimple(_ bool, a ...interface{})

ReportSimple reports simple messages

func (*TerminalUI) ReportSuccess

func (term *TerminalUI) ReportSuccess(emphasis bool, a ...interface{})

ReportSuccess reports success messages

func (*TerminalUI) ReportTimer

func (term *TerminalUI) ReportTimer(emphasis bool, a ...interface{})

ReportTimer reports timer messages

func (*TerminalUI) ReportTitle

func (*TerminalUI) ReportTitle(_ bool, a ...interface{})

ReportTitle reports title messages

func (*TerminalUI) ReportWarning

func (term *TerminalUI) ReportWarning(emphasis bool, a ...interface{})

ReportWarning reports warning messages

func (*TerminalUI) ShowRunningMode

func (term *TerminalUI) ShowRunningMode(mode runmode.RunMode)

ShowRunningMode shows the current running mode

func (*TerminalUI) ShowSessionInfo

func (term *TerminalUI) ShowSessionInfo()

ShowSessionInfo shows main information related to the current TCR session

func (*TerminalUI) Start

func (term *TerminalUI) Start()

Start runs the terminal session

func (*TerminalUI) StartReporting

func (term *TerminalUI) StartReporting()

StartReporting tells the terminal to start reporting information

func (*TerminalUI) StopReporting

func (term *TerminalUI) StopReporting()

StopReporting tells the terminal to stop reporting information

Jump to

Keyboard shortcuts

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