package states
import (
am "github.com/pancsta/asyncmachine-go/pkg/machine"
ss "github.com/pancsta/asyncmachine-go/pkg/states"
. "github.com/pancsta/asyncmachine-go/pkg/states/global"
)
type CviewStatesDef struct {
*am .StatesBase
CviewErrScreen string
CviewScreenInitialized string
CviewRunning string
CviewScreenReplacing string
CviewSuspending string
CviewResuming string
CviewStopping string
CviewStopped string
}
type AppStatesDef struct {
*am .StatesBase
*CviewStatesDef
*ss .BasicStatesDef
}
var CviewSchema = am .Schema {
ssA .CviewErrScreen : {
Multi : true ,
Add : S {Exception },
Require : S {Exception },
},
ssA .CviewScreenInitialized : {
Require : S {ssA .Start },
},
ssA .CviewRunning : {
Require : S {ssA .CviewScreenInitialized },
},
ssA .CviewScreenReplacing : {
Require : S {ssA .Start },
Multi : true ,
},
ssA .CviewSuspending : {
Require : S {ssA .Start },
},
ssA .CviewResuming : {
Require : S {ssA .Start },
},
ssA .CviewStopping : {
Remove : S {ssA .Start , ssA .CviewScreenInitialized , ssA .CviewRunning ,
ssA .CviewScreenReplacing , ssA .CviewSuspending },
},
ssA .CviewStopped : {
Remove : S {ssA .Start },
},
}
var AppSchema = ss .BasicSchema .Merge (CviewSchema )
var (
ssA = am .NewStates (AppStatesDef {})
AppStates = ssA
)
The pages are generated with Golds v0.8.7 . (GOOS=linux GOARCH=amd64)
Golds is a Go 101 project developed by Tapir Liu .
PR and bug reports are welcome and can be submitted to the issue list .
Please follow @zigo_101 (reachable from the left QR code) to get the latest news of Golds .