Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Event ¶
type Event struct { Name string // contains filtered or unexported fields }
func (*Event) To ¶
func (event *Event) To(name string) *EventTransition
type EventTransition ¶
type EventTransition struct {
// contains filtered or unexported fields
}
func (*EventTransition) After ¶
func (transition *EventTransition) After(fc func(value interface{}, tx *gorm.DB) error) *EventTransition
func (*EventTransition) Before ¶
func (transition *EventTransition) Before(fc func(value interface{}, tx *gorm.DB) error) *EventTransition
func (*EventTransition) From ¶
func (transition *EventTransition) From(states ...string) *EventTransition
type State ¶
type State struct { Name string // contains filtered or unexported fields }
type StateChangeLog ¶
type StateMachine ¶
type StateMachine struct {
// contains filtered or unexported fields
}
func New ¶
func New(value interface{}) *StateMachine
func (*StateMachine) Event ¶
func (sm *StateMachine) Event(name string) *Event
func (*StateMachine) Initial ¶
func (sm *StateMachine) Initial(name string) *StateMachine
func (*StateMachine) State ¶
func (sm *StateMachine) State(name string) *State
type Transition ¶
type Transition struct { State string StateChangeLogs []StateChangeLog `sql:"-"` }
func (Transition) GetState ¶
func (transition Transition) GetState() string
func (*Transition) SetState ¶
func (transition *Transition) SetState(name string)
Click to show internal directories.
Click to hide internal directories.