states

package
v0.0.0-...-69341d4 Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2020 License: MIT Imports: 4 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type KeyPressEvent

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

KeyPressEvent represents an keyboard entered event

func NewKeyPressEvent

func NewKeyPressEvent(text string) *KeyPressEvent

NewKeyPressEvent constructor

func (*KeyPressEvent) ID

func (kpe *KeyPressEvent) ID() string

ID returns the event's id

type S0State

type S0State struct {
	hsm.BaseState
}

S0State represents State S0

func NewS0State

func NewS0State(logger *zap.Logger) *S0State

NewS0State constructor

func (*S0State) EventHandler

func (s *S0State) EventHandler(event hsm.Event) hsm.Transition

EventHandler returns a transition associated with the event or NilTransition if the event is not handled

func (*S0State) OnEnter

func (s *S0State) OnEnter(event hsm.Event) hsm.State

OnEnter enters this state

func (*S0State) OnExit

func (s *S0State) OnExit(event hsm.Event) hsm.State

OnExit enters this state

type S11State

type S11State struct {
	hsm.BaseState
}

S11State represents State S11

func NewS11State

func NewS11State(logger *zap.Logger, parentState *S1State) *S11State

NewS11State constructor

func (*S11State) EventHandler

func (s *S11State) EventHandler(event hsm.Event) hsm.Transition

EventHandler returns a transition associated with the event or NilTransition if the event is not handled

func (*S11State) OnEnter

func (s *S11State) OnEnter(event hsm.Event) hsm.State

OnEnter enters this state

func (*S11State) OnExit

func (s *S11State) OnExit(event hsm.Event) hsm.State

OnExit enters this state

type S1State

type S1State struct {
	hsm.BaseState
}

S1State represents State S1

func NewS1State

func NewS1State(logger *zap.Logger, parentState hsm.State) *S1State

NewS1State constructor

func (*S1State) EventHandler

func (s *S1State) EventHandler(event hsm.Event) hsm.Transition

EventHandler returns a transition associated with the event or NilTransition if the event is not handled

func (*S1State) OnEnter

func (s *S1State) OnEnter(event hsm.Event) hsm.State

OnEnter enters this state

func (*S1State) OnExit

func (s *S1State) OnExit(event hsm.Event) hsm.State

OnExit enters this state

type S211State

type S211State struct {
	hsm.BaseState
}

S211State represents State S211

func NewS211State

func NewS211State(logger *zap.Logger, parentState hsm.State) *S211State

NewS211State constructor

func (*S211State) EventHandler

func (s *S211State) EventHandler(event hsm.Event) hsm.Transition

EventHandler returns a transition associated with the event or NilTransition if the event is not handled

func (*S211State) OnEnter

func (s *S211State) OnEnter(event hsm.Event) hsm.State

OnEnter enters this state

func (*S211State) OnExit

func (s *S211State) OnExit(event hsm.Event) hsm.State

OnExit enters this state

type S21State

type S21State struct {
	hsm.BaseState
}

S21State represents State S21

func NewS21State

func NewS21State(logger *zap.Logger, parentState hsm.State) *S21State

NewS21State constructor

func (*S21State) EventHandler

func (s *S21State) EventHandler(event hsm.Event) hsm.Transition

EventHandler returns a transition associated with the event or NilTransition if the event is not handled

func (*S21State) OnEnter

func (s *S21State) OnEnter(event hsm.Event) hsm.State

OnEnter enters this state

func (*S21State) OnExit

func (s *S21State) OnExit(event hsm.Event) hsm.State

OnExit enters this state

type S2State

type S2State struct {
	hsm.BaseState
}

S2State represents State S2

func NewS2State

func NewS2State(logger *zap.Logger, parentState hsm.State) *S2State

NewS2State constructor

func (*S2State) EventHandler

func (s *S2State) EventHandler(event hsm.Event) hsm.Transition

EventHandler returns a transition associated with the event or NilTransition if the event is not handled

func (*S2State) OnEnter

func (s *S2State) OnEnter(event hsm.Event) hsm.State

OnEnter enters this state

func (*S2State) OnExit

func (s *S2State) OnExit(event hsm.Event) hsm.State

OnExit exits this state

Jump to

Keyboard shortcuts

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