{"modulePath":"github.com/beacon-stack/pilot","version":"v0.1.0","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package command\n\nPackage command implements a Pilot notification plugin that executes a user-provided script from /config/scripts/ on each event. The event payload is passed as JSON on stdin and key fields are set as environment variables.\n\n## Variables\n\n```go\nvar ScriptsDir = \"/config/scripts\" //nolint:gochecknoglobals // injectable for tests\n\n```\nScriptsDir is the directory from which scripts are resolved. Package-level var so tests can override it.\n\n## Types\n\n```go\ntype Config struct {\n\tScriptName string `json:\"script_name\"`\n\tTimeout    int    `json:\"timeout,omitempty\"` // seconds; default 30\n}\n```\nConfig holds the user-supplied settings for a command notifier.\n\n```go\ntype Notifier struct {\n\t// contains filtered or unexported fields\n}\n```\nNotifier is a command notifier plugin instance.\n\n```go\nfunc New(cfg Config) *Notifier\n```\nNew creates a new Notifier from the given config.\n\n```go\nfunc (*Notifier) Name() string\n```\n\n```go\nfunc (n *Notifier) Notify(ctx context.Context, event plugin.NotificationEvent) error\n```\nNotify executes the configured script with event data.\n\n```go\nfunc (n *Notifier) Test(_ context.Context) error\n```\nTest verifies the script file exists and is executable.\n\n","path":"github.com/beacon-stack/pilot/plugins/notifications/command","name":"command","synopsis":"Package command implements a Pilot notification plugin that executes a user-provided script from /config/scripts/ on each event.","isRedistributable":true}
