Documentation ¶
Index ¶
- Constants
- func NewEvent(value interface{}) *event
- func ReportError(err error) error
- type ErrorEvent
- type Event
- type Events
- type Listener
- type Message
- type OutputEvent
- type Repeated
- type RepeatedEvent
- type RepeatedReporter
- type Reporter
- type ResetError
- type RunnerInput
- type RunnerOutput
- type SleepEvent
- type StdoutEvent
- type Styled
Constants ¶
const ( MessageStyleGeneric = iota MessageStyleSuccess MessageStyleError MessageStyleInput MessageStyleOutput MessageStyleGroup )
Variables ¶
This section is empty.
Functions ¶
func ReportError ¶
Types ¶
type ErrorEvent ¶
type ErrorEvent struct {
Error string
}
ErrorEvent represents a Sleep
func NewErrorEvent ¶
func NewErrorEvent(message string) *ErrorEvent
NewErrorEvent creates a new error event
type Event ¶
type Event interface { Type() string Package() string Value() interface{} Timestamp() time.Time Init() Event SetLoggable(bool) IsLoggable() bool }
Represents a generic event
func NewEventWithInit ¶
NewEvent creates a new event
type Events ¶
type Events struct { Events []Event // contains filtered or unexported fields }
Events represents events
type OutputEvent ¶ added in v0.34.1
func NewOutputEvent ¶ added in v0.34.1
func NewOutputEvent(message string, tag string, value interface{}) *OutputEvent
func (*OutputEvent) Messages ¶ added in v0.34.1
func (e *OutputEvent) Messages() []*Message
type RepeatedEvent ¶ added in v0.29.0
type RepeatedEvent struct {
// contains filtered or unexported fields
}
RepeatedEvent represents a generic repeated message
func NewRepeatedEvent ¶ added in v0.29.0
func NewRepeatedEvent(message, tag string) *RepeatedEvent
NewSleepEvent create a new sleep event
func (*RepeatedEvent) Message ¶ added in v0.29.0
func (e *RepeatedEvent) Message(repeated *Repeated) *Message
type RepeatedReporter ¶
RepeatedReporter represents a reporter that overrides current line (with \r)
type Reporter ¶
type Reporter interface { //Returns zero or more messages Messages() []*Message }
Reporter represents a reporter that can report tag messages
type ResetError ¶ added in v0.40.0
type ResetError struct { }
type RunnerInput ¶
type RunnerInput interface {
IsInput() bool
}
RunnerInput represent event storing runner input data, this interface enables matching runner in/out with failed validation (CLI)
type RunnerOutput ¶
type RunnerOutput interface {
IsOutput() bool
}
RunnerOutput represent event storing runner output data,this interface enables matching runner in/out with failed validation(CLI)
type SleepEvent ¶
type SleepEvent struct {
SleepTimeMs int
}
SleepEvent represents a Sleep
func NewSleepEvent ¶
func NewSleepEvent(sleepTimeMs int) *SleepEvent
NewSleepEvent create a new sleep event
func (*SleepEvent) Message ¶
func (e *SleepEvent) Message(repeated *Repeated) *Message
type StdoutEvent ¶ added in v0.34.1
StdoutEvent represents an execution event end
func NewStdoutEvent ¶ added in v0.34.1
func NewStdoutEvent(info string, stdout string) *StdoutEvent
NewStdoutEvent crates a new execution start event value
func (*StdoutEvent) Messages ¶ added in v0.34.1
func (e *StdoutEvent) Messages() []*Message
Messages returns messages