cli

package
v0.18.4 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2026 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 Args added in v0.18.4

type Args struct {
	StatesFile *SFParams      `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

func (Args) Description() string

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 SFParams

type SFParams 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."`
}

SFParams are params for the states-file subcommand.

Jump to

Keyboard shortcuts

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