state

package
v0.0.0-...-540bb61 Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2023 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChangeNotPossible

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

ChangeNotPossible exception is returned when State transition is not possible

func (ChangeNotPossible) Error

func (c ChangeNotPossible) Error() string

type Map

type Map map[State][]State

Map of the States and possible transitions

func (Map) Exists

func (m Map) Exists(state State) error

Exists checks if State is defined in transitions

func (Map) Transit

func (m Map) Transit(from, to State) error

Transit checks if change from one State to another is possible with current defined transitions

type NotFound

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

NotFound exception is returned when State is not defined in current transition map

func (NotFound) Error

func (s NotFound) Error() string

type State

type State string

State holds state string representation

Jump to

Keyboard shortcuts

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