Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Args ¶ added in v0.18.4
type Args struct {
StatesFile *StatesParams `arg:"subcommand:states-file" help:"Generate state schema files"`
Grafana *GrafanaParams `arg:"subcommand:grafana" help:"Generate Grafana dashboards"`
Version bool `arg:"-v,--version" help:"Print version and exit"`
}
Args is the top-level args struct for am-gen.
func (Args) Description ¶ added in v0.18.4
TODO dedicated descriptions
type GrafanaParams ¶
type GrafanaParams struct {
Ids string `arg:"-i,--ids,required" help:"Machine IDs (comma separated)"`
GrafanaUrl string `arg:"-g,--grafana-url" help:"Grafana URL to sync. Requires GRAFANA_TOKEN in CWD/.env"`
Folder string `arg:"-f,--folder" help:"Dashboard folder (optional, requires --grafana-url)"`
Name string `arg:"-n,--name,required" help:"Dashboard name"`
Source string `arg:"-s,--source,required" help:"$source variable (service_name or job)"`
Token string `arg:"-"`
}
GrafanaParams are params for the grafana subcommand.
type StatesParams ¶ added in v0.18.6
type StatesParams struct {
// Version - print version
Version bool
// States - State names to generate. Eg: State1,State2
States string `arg:"-s,--states,required" help:"State names to generate. Eg: State1,State2"`
// Inherit - Inherit from built-in states machines (comma separated):
// - basic,connected
// - rpc/statesrc
// - node/worker
Inherit string `arg:"-i,--inherit" help:"Inherit from built-in state-machines: basic,connected,rpc/statesrc,node/worker"`
// Groups - Groups to generate. Eg: Group1,Group2
Groups string `arg:"-g,--groups" help:"Groups to generate. Eg: Group1,Group2"`
// Name - Name of the state machine.
Name string `arg:"-n,--name,required" help:"Name of the state machine. Eg: MyMach"`
// Force - Overwrite existing files.
Force bool `arg:"-f,--force" help:"Override output file (if any)"`
// Utils - Generate states_utils.go in CWD. Overrides files.
Utils bool `arg:"-u,--utils" default:"true" help:"Generate states_utils.go in CWD. Overrides files."`
}
StatesParams are params for the states-file subcommand.
Click to show internal directories.
Click to hide internal directories.