cli

package
v0.74.4 Latest Latest
Warning

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

Go to latest
Published: May 1, 2024 License: Apache-2.0 Imports: 27 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var OnError = func(code int) {
	os.Exit(code)
}

OnError exit system with os.Exit with supplied code.

Functions

func DefaultFilter

func DefaultFilter() map[string]bool

DefaultFilter create default filter

func GetPath

func GetPath(candidates *model.Activities, runner *Runner, fullPath bool) string

GetPath returns hierarchical path to the latest Activity

func WildcardFilter

func WildcardFilter() map[string]bool

WildcardFilter

Types

type Asserted

type Asserted interface {
	Assertion() []*assertly.Validation
}

Asserted represent validation response

type Event added in v0.25.1

type Event struct {
	Description string
	Caller      string
	TagID       string
	Index       string
	Events      []msg.Event
	Validation  []*assertly.Validation
	PassedCount int
	FailedCount int
	// contains filtered or unexported fields
}

Event represents an tagged event

func (*Event) AddEvent added in v0.25.1

func (e *Event) AddEvent(event msg.Event)

AddEvent add provided event

type Events added in v0.25.1

type Events struct {
	*model.Activities
	// contains filtered or unexported fields
}

Events represents tags

func NewEventTags added in v0.25.1

func NewEventTags() *Events

NewEventTags returns new events

func (*Events) AddTag added in v0.25.1

func (r *Events) AddTag(event *Event)

AddTag adds reporting tag

func (*Events) EventTag added in v0.25.1

func (r *Events) EventTag() *Event

Event returns an event tag

func (*Events) Push added in v0.25.1

func (r *Events) Push(activity *model.Activity)

Push Events

func (*Events) TemplateEvent added in v0.25.1

func (r *Events) TemplateEvent(context *endly.Context, candidateTagID string) *Event

type MessageGroup added in v0.25.1

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

func (*MessageGroup) EnableIfMatched added in v0.25.1

func (g *MessageGroup) EnableIfMatched(message *msg.Message) bool

EnableIfMatched enable group if matched or first message, returns true if previous group matched

func (*MessageGroup) Reset added in v0.25.1

func (g *MessageGroup) Reset()

func (*MessageGroup) Set added in v0.25.1

func (g *MessageGroup) Set(message *msg.Message)

type Renderer

type Renderer struct {
	ErrorColor string
	// contains filtered or unexported fields
}

Renderer represents a renderer

func NewRenderer

func NewRenderer(writer io.Writer, minColumns int) *Renderer

NewRenderer creates a new renderer

func (*Renderer) ColorText

func (r *Renderer) ColorText(text string, textColors ...string) string

ColorText returns text with ANCI color

func (*Renderer) Columns

func (r *Renderer) Columns() int

Columns reutnrs terminal column count

func (*Renderer) Print

func (r *Renderer) Print(message string)

Print prints supplied message

func (*Renderer) PrintTable

func (r *Renderer) PrintTable(caption string, headers []string, data [][]string, maxSize int)

PrintTable prints supplied table data

func (*Renderer) Printf

func (r *Renderer) Printf(text string, args ...interface{})

Printf formats and print supplied text with arguments

func (*Renderer) Println

func (r *Renderer) Println(text string)

Println returns formatted text with arguments

func (*Renderer) Sprintf

func (r *Renderer) Sprintf(text string, args ...interface{}) string

Sprintf returns formatted text with arguments

type ReportSummaryEvent

type ReportSummaryEvent struct {
	ElapsedMs      int
	TotalTagPassed int
	TotalTagFailed int
	Error          bool
}

ReportSummaryEvent represents event xUnitSummary

type Runner

type Runner struct {
	*Style
	*Renderer
	*Events
	// contains filtered or unexported fields
}

Testing represents command line runner

func New

func New() *Runner

New creates a new command line runner

func (*Runner) AsListener

func (r *Runner) AsListener() msg.Listener

func (*Runner) Run

func (r *Runner) Run(request *workflow.RunRequest) (err error)

Run run Caller for the supplied run request and runner options.

type Style added in v0.25.1

type Style struct {
	MessageStyleColor  map[int]string
	InputColor         string
	OutputColor        string
	TagColor           string
	InverseTag         bool
	ServiceActionColor string
	PathColor          string
	SuccessColor       string
	ErrorColor         string
}

func NewStyle added in v0.25.1

func NewStyle() *Style

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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