event

package
v0.19.0 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2020 License: Apache-2.0 Imports: 4 Imported by: 1

Documentation

Index

Constants

View Source
const (
	// StepType is a string type representation of step event
	StepType = "com.github.cardil.wathola.step"
	// FinishedType os a string type representation of finished event
	FinishedType = "com.github.cardil.wathola.finished"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ErrorStore

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

ErrorStore contains errors that was thrown

func NewErrorStore

func NewErrorStore() *ErrorStore

NewErrorStore creates a new error store

type Finished

type Finished struct {
	Count int
}

Finished is step call after verification finishes

func (Finished) Type

func (f Finished) Type() string

Type returns a type of a event

type FinishedStore

type FinishedStore interface {
	RegisterFinished(finished *Finished)
	State() State
	Thrown() []string
}

FinishedStore registers a finished event type

func NewFinishedStore

func NewFinishedStore(steps StepsStore, errors *ErrorStore) FinishedStore

NewFinishedStore creates FinishedStore

type State

type State int

State defines a state of event store

const (
	// Active == 1 (iota has been reset)
	Active State = 1 << iota
	// Success == 2
	Success State = 1 << iota
	// Failed == 4
	Failed State = 1 << iota
)

type Step

type Step struct {
	Number int
}

Step is a event call at each step of verification

func (Step) Type

func (s Step) Type() string

Type returns a type of a event

type StepsStore

type StepsStore interface {
	RegisterStep(step *Step)
	Count() int
}

StepsStore contains methods that register step event type

func NewStepsStore

func NewStepsStore(errors *ErrorStore) StepsStore

NewStepsStore creates StepsStore

type Typed

type Typed interface {
	Type() string
}

Typed says a type of an event

Jump to

Keyboard shortcuts

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