printer

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: May 4, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Identifier string = "printer"
)

Variables

View Source
var CreateFakePrinter = func() *fakePrinter {
	return &fakePrinter{}
}
View Source
var CreateFakePrinterPlainer = func() *fakePrinterPlainer {
	return &fakePrinterPlainer{}
}
View Source
var CreateFakePrinterSpinner = func() *fakePrinterSpinner {
	return &fakePrinterSpinner{}
}

Functions

This section is empty.

Types

type CommandFolderItemStatusTemplate

type CommandFolderItemStatusTemplate struct {
	Name                     string
	IsValid                  bool
	MissingInstructionFile   bool
	InvalidInstructionFormat bool
}

func (*CommandFolderItemStatusTemplate) CheckValidity

func (as *CommandFolderItemStatusTemplate) CheckValidity() bool

type ConfigViewTemplateItem

type ConfigViewTemplateItem struct {
	ConfigFilePath string
	ConfigText     string
}

type Printer

type Printer interface {
	PrintAnchorBanner()
	PrintAnchorVersion(version string)
	PrintCommandFolderItemStatus(commandFolderItemsStatus []*CommandFolderItemStatusTemplate)
	PrintConfiguration(cfgFilePath string, cfgText string)
	PrintMissingCommand(name string)
	PrintMissingInstructions()
	PrintEmptyLines(count int)
	PrintSuccess(message string)
	PrintWarning(message string)
	PrintError(message string)

	PrepareRunActionPlainer(actionId string) PrinterPlainer
	PrepareRunActionSpinner(actionId string, scriptOutputPath string) PrinterSpinner
	PrepareReadRemoteHeadCommitHashSpinner(url string, branch string) PrinterSpinner
	PrepareCloneRepositorySpinner(url string, branch string) PrinterSpinner
	PrepareResetToRevisionSpinner(revision string) PrinterSpinner
}

func New

func New(noAnchorOutput bool) Printer

type PrinterPlainer

type PrinterPlainer interface {
	Start()
	StopOnSuccess()
	StopOnFailure(err error)
}

func NewNoOpPlainer added in v0.8.0

func NewNoOpPlainer() PrinterPlainer

func NewPlainer

func NewPlainer(runMsg string, successMsg string, failureMsg string) PrinterPlainer

type PrinterSpinner

type PrinterSpinner interface {
	Spin()
	StopOnSuccess()
	StopOnSuccessWithCustomMessage(message string)
	StopOnFailure(err error)
	StopOnFailureWithCustomMessage(message string)
}

func NewNoOpSpinner added in v0.8.0

func NewNoOpSpinner() PrinterSpinner

func NewSpinner

func NewSpinner(runMsg string, successMsg string, failureMsgFormat string) PrinterSpinner

Jump to

Keyboard shortcuts

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