fsm

package
v0.0.0-...-dad94d2 Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FSM

type FSM interface {
	List() ([]*Item, error)
	Get(string) (*Item, error)
	Add(Item) (*primitive.ObjectID, error)
	Update(Item) (*Item, error)
	Delete(string) error
}

type Item

type Item struct {
	FSM         fsm.Export
	Id          primitive.ObjectID `bson:"_id,omitempty" json:"_id"`
	Description string
	Name        string
	UI          map[string]UI
}

type PublicFSM

type PublicFSM struct {
	// current is the state that the FSM is currently in.
	State fsm.State

	// transitions maps events and source states to destination statef.
	Transitions fsm.TransitionRuleSet

	Events map[fsm.State]fsm.State
}

type UI

type UI struct {
	X    int
	Y    int
	TYPE string // in, out, inOut
}

Jump to

Keyboard shortcuts

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