Documentation
¶
Index ¶
- func ColorHelpPrinter(options kong.HelpOptions, ctx *kong.Context) error
- func RunAuthLogin(ctx context.Context, globals *Globals, out io.Writer) error
- func RunAuthLogout(interactive, yes bool, out io.Writer) error
- func RunAuthStatus(ctx context.Context, token string, globals *Globals, out io.Writer) error
- func RunConfigApply(ctx context.Context, globals *Globals, ...) error
- func RunConfigDiff(ctx context.Context, globals *Globals, ...) error
- func RunConfigDiffWithOpts(ctx context.Context, globals *Globals, ...) error
- func RunConfigGet(ctx context.Context, globals *Globals, ...) error
- func RunConfigInit(ctx context.Context, dir, workspace, project, environment string, ...) error
- func RunConfigValidate(globals *Globals, configDir string, configFile string, out io.Writer) error
- func RunConfigValidateScoped(globals *Globals, configDir string, configFile string, path string, ...) error
- func RunDeploy(ctx context.Context, globals *Globals, environmentID string, ...) error
- func RunDeployDryRun(globals *Globals, action, environmentID string, targets []serviceTarget, ...) error
- func RunDeploymentAction(ctx context.Context, globals *Globals, environmentID string, ...) error
- func RunEnvironmentList(ctx context.Context, globals *Globals, projectID string, ...) error
- func RunLogsEnvironment(globals *Globals, environmentID string, lines *int, entries []railway.LogEntry, ...) error
- func RunLogsServices(ctx context.Context, globals *Globals, environmentID string, ...) error
- func RunOpen(ctx context.Context, globals *Globals, projectID, environmentID string, ...) error
- func RunProjectList(ctx context.Context, globals *Globals, workspace string, lister projectLister, ...) error
- func RunStatus(ctx context.Context, globals *Globals, environmentID string, ...) error
- func RunWorkspaceList(ctx context.Context, globals *Globals, lister workspaceLister, out io.Writer) error
- type AdoptCmd
- type ApiFlags
- type ApplyCmd
- type ApplyOpts
- type AuthCmd
- type AuthLoginCmd
- type AuthLogoutCmd
- type AuthStatusCmd
- type CLI
- type CompletionCmd
- type ConfigFileFlags
- type DeployCmd
- type DeployOutput
- type DeployResult
- type DeploymentActionOutput
- type DeploymentActionResult
- type DiffChangeOut
- type DiffCmd
- type DiffOpts
- type DiffOutput
- type DiffSectionOut
- type EnvironmentFlags
- type EnvironmentListCmd
- type Globals
- type ListCmd
- type LogEntryOut
- type LogsCmd
- type LogsOutput
- type LogsResult
- type MergeFlags
- type NewCmd
- type NewEnvironmentCmd
- type NewProjectCmd
- type NewServiceCmd
- type OpenCmd
- type OpenOutput
- type ProjectFlags
- type ProjectListCmd
- type PromptFlags
- type RedeployCmd
- type RestartCmd
- type RollbackCmd
- type ServiceFlags
- type ShowCmd
- type StatusCmd
- type StatusDomain
- type StatusItem
- type StatusOutput
- type StatusVolume
- type StopCmd
- type ValidateCmd
- type WorkspaceFlags
- type WorkspaceListCmd
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ColorHelpPrinter ¶
func ColorHelpPrinter(options kong.HelpOptions, ctx *kong.Context) error
ColorHelpPrinter is a kong.HelpPrinter that outputs colored help text.
func RunAuthLogin ¶ added in v0.2.0
RunAuthLogin is the testable core of `auth login`.
func RunAuthLogout ¶ added in v0.2.0
RunAuthLogout is the testable core of `auth logout`.
func RunAuthStatus ¶ added in v0.2.0
RunAuthStatus is the testable core of `auth status`.
func RunConfigApply ¶
func RunConfigApply(ctx context.Context, globals *Globals, workspace, project, environment, configDir string, configFile string, service string, opts ApplyOpts, fetcher app.ConfigFetcher, applier apply.Applier, out io.Writer) error
RunConfigApply is the testable core of `config apply`.
func RunConfigDiff ¶
func RunConfigDiff(ctx context.Context, globals *Globals, workspace, project, environment, configDir string, configFile string, service string, showSecrets bool, fetcher app.ConfigFetcher, out io.Writer) error
RunConfigDiff is the testable core of `config diff`. Legacy: always includes creates, updates, and deletes.
func RunConfigDiffWithOpts ¶ added in v0.2.0
func RunConfigDiffWithOpts(ctx context.Context, globals *Globals, workspace, project, environment, configDir string, configFile string, service string, opts DiffOpts, fetcher app.ConfigFetcher, out io.Writer) error
RunConfigDiffWithOpts is the full-featured diff entrypoint.
func RunConfigGet ¶
func RunConfigGet(ctx context.Context, globals *Globals, workspace, project, environment, path string, full bool, service string, showSecrets bool, fetcher app.ConfigFetcher, out io.Writer) error
RunConfigGet is the testable core of `show` (formerly `config get`).
func RunConfigInit ¶
func RunConfigInit(ctx context.Context, dir, workspace, project, environment string, resolver initResolver, interactive, dryRun, yes bool, out io.Writer) error
RunConfigInit is the testable core of `config init`.
func RunConfigValidate ¶ added in v0.2.0
RunConfigValidate is the testable core of `config validate`.
func RunConfigValidateScoped ¶ added in v0.2.0
func RunConfigValidateScoped(globals *Globals, configDir string, configFile string, path string, out io.Writer) error
RunConfigValidateScoped is a scoped variant of RunConfigValidate.
func RunDeploy ¶ added in v0.2.0
func RunDeploy(ctx context.Context, globals *Globals, environmentID string, targets []serviceTarget, deployFn func(ctx context.Context, environmentID, serviceID string) (string, error), out, errOut io.Writer) error
RunDeploy is the testable core of `deploy`.
func RunDeployDryRun ¶ added in v0.2.0
func RunDeployDryRun(globals *Globals, action, environmentID string, targets []serviceTarget, out io.Writer) error
RunDeployDryRun previews what a deploy/redeploy/restart/rollback/stop would do without actually triggering anything.
func RunDeploymentAction ¶ added in v0.2.0
func RunDeploymentAction( ctx context.Context, globals *Globals, environmentID string, targets []serviceTarget, actionName string, listLatest func(ctx context.Context, environmentID, serviceID string) ([]railway.DeploymentInfo, error), action func(ctx context.Context, deploymentID string) (string, error), out, errOut io.Writer, ) error
RunDeploymentAction is the testable core of deployment lifecycle commands.
func RunEnvironmentList ¶
func RunEnvironmentList(ctx context.Context, globals *Globals, projectID string, lister environmentLister, out io.Writer) error
RunEnvironmentList is the testable core of `environment list`.
func RunLogsEnvironment ¶ added in v0.2.0
func RunLogsServices ¶ added in v0.2.0
func RunLogsServices( ctx context.Context, globals *Globals, environmentID string, targets []serviceTarget, build bool, lines *int, listLatest func(ctx context.Context, environmentID, serviceID string) ([]railway.DeploymentInfo, error), fetchLogs func(ctx context.Context, deploymentID string, build bool) ([]railway.LogEntry, error), out, errOut io.Writer, ) error
func RunOpen ¶ added in v0.2.0
func RunOpen(ctx context.Context, globals *Globals, projectID, environmentID string, printOnly bool, openFn func(string) error, out, errOut io.Writer) error
RunOpen is the testable core of `open`.
func RunProjectList ¶
func RunProjectList(ctx context.Context, globals *Globals, workspace string, lister projectLister, out io.Writer) error
RunProjectList is the testable core of `project list`.
func RunStatus ¶ added in v0.2.0
func RunStatus(ctx context.Context, globals *Globals, environmentID string, targets []serviceTarget, live *config.LiveConfig, listLatest func(ctx context.Context, environmentID, serviceID string) ([]railway.DeploymentInfo, error), out, errOut io.Writer) error
RunStatus is the testable core of `status`.
Types ¶
type AdoptCmd ¶ added in v0.2.0
type AdoptCmd struct {
ServiceFlags `kong:"embed"`
MergeFlags `kong:"embed"`
PromptFlags `kong:"embed"`
ConfigFileFlags `kong:"embed"`
DryRun bool `help:"Force preview of mutations." name:"dry-run" env:"FAT_CONTROLLER_DRY_RUN"`
ShowSecrets bool `help:"Show secret values instead of masking." name:"show-secrets" env:"FAT_CONTROLLER_SHOW_SECRETS"`
Path string `arg:"" optional:"" help:"Dot-path to scope adoption (e.g. api)."`
}
AdoptCmd implements the `adopt` command.
type ApiFlags ¶ added in v0.2.0
type ApiFlags struct {
Token string `` /* 150-byte string literal not displayed */
Timeout time.Duration `help:"API request timeout." default:"30s" env:"FAT_CONTROLLER_API_TIMEOUT"`
}
ApiFlags is embedded by commands that make API calls. It provides --token and --timeout. It is the base of the resolution hierarchy.
func (*ApiFlags) TimeoutContext ¶ added in v0.2.0
TimeoutContext returns a context with the configured timeout applied. If Timeout is zero (or negative), it returns ctx and a no-op cancel func so callers always get a valid cancel to defer. A nil parent is treated as context.Background() for safety in tests.
type ApplyCmd ¶ added in v0.2.0
type ApplyCmd struct {
ServiceFlags `kong:"embed"`
MergeFlags `kong:"embed"`
PromptFlags `kong:"embed"`
ConfigFileFlags `kong:"embed"`
DryRun bool `help:"Force preview of mutations." name:"dry-run" env:"FAT_CONTROLLER_DRY_RUN"`
ShowSecrets bool `help:"Show secret values instead of masking." name:"show-secrets" env:"FAT_CONTROLLER_SHOW_SECRETS"`
SkipDeploys bool `help:"Don't trigger redeployments." name:"skip-deploys" env:"FAT_CONTROLLER_DEPLOY"`
FailFast bool `help:"Stop on first error during apply." name:"fail-fast" env:"FAT_CONTROLLER_FAIL_FAST"`
Path string `arg:"" optional:"" help:"Dot-path to scope apply (e.g. api, variables)."`
}
ApplyCmd implements the top-level `apply` command.
type ApplyOpts ¶ added in v0.2.0
ApplyOpts holds command-specific options for RunConfigApply / runConfigApplyWithPair.
type AuthCmd ¶
type AuthCmd struct {
Login AuthLoginCmd `cmd:"" help:"Log in to Railway via browser-based OAuth."`
Logout AuthLogoutCmd `cmd:"" help:"Clear stored credentials."`
Status AuthStatusCmd `cmd:"" help:"Show current authentication status."`
}
AuthCmd is the `auth` command group.
type AuthLoginCmd ¶
type AuthLoginCmd struct {
ApiFlags `kong:"embed"`
}
AuthLoginCmd implements `auth login`.
func (*AuthLoginCmd) Run ¶
func (c *AuthLoginCmd) Run(globals *Globals) error
type AuthLogoutCmd ¶
type AuthLogoutCmd struct {
PromptFlags `kong:"embed"`
}
AuthLogoutCmd implements `auth logout`.
func (*AuthLogoutCmd) Run ¶
func (c *AuthLogoutCmd) Run(globals *Globals) error
type AuthStatusCmd ¶
type AuthStatusCmd struct {
ApiFlags `kong:"embed"`
}
AuthStatusCmd implements `auth status`.
func (*AuthStatusCmd) Run ¶
func (c *AuthStatusCmd) Run(globals *Globals) error
type CLI ¶
type CLI struct {
Globals `kong:"embed"`
Version kong.VersionFlag `help:"Print version." short:"V"`
// Core declarative commands
Adopt AdoptCmd `cmd:"" help:"Pull live Railway state into config."`
Diff DiffCmd `cmd:"" help:"Compare config against live Railway state."`
Apply ApplyCmd `cmd:"" help:"Push config changes to Railway."`
Validate ValidateCmd `cmd:"" help:"Check config for errors (offline)."`
Show ShowCmd `cmd:"" help:"Display live Railway state."`
New NewCmd `cmd:"" help:"Scaffold config entries."`
// Discovery
List ListCmd `cmd:"" help:"List Railway entities."`
// Imperative commands
Deploy DeployCmd `cmd:"" help:"Trigger a deployment for services."`
Redeploy RedeployCmd `cmd:"" help:"Redeploy services from current image."`
Restart RestartCmd `cmd:"" help:"Restart running deployments."`
Rollback RollbackCmd `cmd:"" help:"Roll back services to previous deployment."`
Stop StopCmd `cmd:"" help:"Cancel running deployments."`
// Operational
Logs LogsCmd `cmd:"" help:"Show service logs."`
Status StatusCmd `cmd:"" help:"Show deployment status."`
Open OpenCmd `cmd:"" help:"Open Railway dashboard in browser."`
// Auth
Auth AuthCmd `cmd:"" help:"Manage authentication."`
// Utility
Completion CompletionCmd `cmd:"" help:"Generate shell completions." hidden:""`
}
CLI is the root struct for the kong CLI parser. Global flags come from the embedded Globals; subcommand groups are nested structs.
type CompletionCmd ¶ added in v0.2.0
type CompletionCmd struct {
Shell string `arg:"" help:"The name of the shell you are using" enum:"bash,zsh,fish," default:""`
Code bool `short:"c" help:"Generate the initialization code"`
}
CompletionCmd wraps kong-completion's Completion type. We define our own struct rather than embedding the library type directly so that its -c short flag (on Code) doesn't conflict with any global short flags. Since we renamed the global --config flag from -c to -f, Code can keep -c.
func (*CompletionCmd) Help ¶ added in v0.2.0
func (c *CompletionCmd) Help() string
Help returns extended help text for the completion command.
type ConfigFileFlags ¶ added in v0.2.0
type ConfigFileFlags struct {
ConfigFile string `` /* 133-byte string literal not displayed */
}
ConfigFileFlags are embedded by commands that read config files (diff, apply, validate, adopt).
type DeployCmd ¶ added in v0.2.0
type DeployCmd struct {
EnvironmentFlags `kong:"embed"`
PromptFlags `kong:"embed"`
DryRun bool `help:"Preview what would be deployed without triggering." name:"dry-run" env:"FAT_CONTROLLER_DRY_RUN"`
Services []string `arg:"" optional:"" help:"Services to deploy (default: all)."`
}
DeployCmd implements the `deploy` command.
type DeployOutput ¶ added in v0.2.0
type DeployOutput struct {
Action string `json:"action" toml:"action"`
EnvironmentID string `json:"environment_id" toml:"environment_id"`
Results []DeployResult `json:"results" toml:"results"`
}
type DeployResult ¶ added in v0.2.0
type DeploymentActionOutput ¶ added in v0.2.0
type DeploymentActionOutput struct {
Action string `json:"action" toml:"action"`
EnvironmentID string `json:"environment_id" toml:"environment_id"`
Results []DeploymentActionResult `json:"results" toml:"results"`
}
type DeploymentActionResult ¶ added in v0.2.0
type DeploymentActionResult struct {
Service string `json:"service" toml:"service"`
ServiceID string `json:"service_id" toml:"service_id"`
DeploymentID string `json:"deployment_id,omitempty" toml:"deployment_id"`
NewDeploymentID string `json:"new_deployment_id,omitempty" toml:"new_deployment_id"`
Error string `json:"error,omitempty" toml:"error"`
}
type DiffChangeOut ¶ added in v0.2.0
type DiffCmd ¶ added in v0.2.0
type DiffCmd struct {
ServiceFlags `kong:"embed"`
MergeFlags `kong:"embed"`
ConfigFileFlags `kong:"embed"`
ShowSecrets bool `help:"Show secret values instead of masking." name:"show-secrets" env:"FAT_CONTROLLER_SHOW_SECRETS"`
Path string `arg:"" optional:"" help:"Dot-path to scope diff (e.g. api, api.variables)."`
}
DiffCmd implements the top-level `diff` command.
type DiffOpts ¶ added in v0.2.0
type DiffOpts struct {
ShowSecrets bool
DiffOptions diff.Options
Path string // dot-path to scope diff (e.g. "api", "api.variables")
}
DiffOpts holds options for RunConfigDiffWithOpts.
type DiffOutput ¶ added in v0.2.0
type DiffOutput struct {
Empty bool `json:"empty" toml:"empty"`
Services map[string]*DiffSectionOut `json:"services,omitempty" toml:"services"`
}
type DiffSectionOut ¶ added in v0.2.0
type DiffSectionOut struct {
Variables []DiffChangeOut `json:"variables,omitempty" toml:"variables"`
Settings []DiffChangeOut `json:"settings,omitempty" toml:"settings"`
SubResources []DiffChangeOut `json:"sub_resources,omitempty" toml:"sub_resources"`
}
type EnvironmentFlags ¶ added in v0.2.0
type EnvironmentFlags struct {
ProjectFlags `kong:"embed"`
Environment string `help:"Environment name." env:"FAT_CONTROLLER_ENVIRONMENT"`
}
EnvironmentFlags is embedded by commands that need --workspace + --project + --environment.
type EnvironmentListCmd ¶
type EnvironmentListCmd struct {
ProjectFlags `kong:"embed"`
}
func (*EnvironmentListCmd) Run ¶
func (c *EnvironmentListCmd) Run(globals *Globals) error
Run implements `environment list`. Requires --project flag (or env var) to know which project to list environments for.
type Globals ¶
type Globals struct {
Output string `` /* 130-byte string literal not displayed */
JSON bool `help:"Output as JSON (shorthand for --output=json)." name:"json"`
TOML bool `help:"Output as TOML (shorthand for --output=toml)." name:"toml"`
Raw bool `help:"Output bare value, no formatting (shorthand for --output=raw)." name:"raw"`
Color string `help:"Color mode: auto, always, never." enum:"auto,always,never" default:"auto" env:"FAT_CONTROLLER_OUTPUT_COLOR"`
Verbose int `help:"Increase log verbosity. Repeat for more detail (-v = debug, -vv = trace)." short:"v" type:"counter"`
Quiet int `help:"Decrease log verbosity. Repeat for less output (-q = warn, -qq = error only)." short:"q" type:"counter"`
EnvFile string `help:"Env file path for variable interpolation." name:"env-file" env:"FAT_CONTROLLER_ENV_FILE"`
// BaseCtx is the root context for all commands. Set by main() with
// signal.NotifyContext so that SIGINT/SIGTERM cancels in-flight work.
// Commands use this as the parent for TimeoutContext.
BaseCtx context.Context `kong:"-"`
}
Globals holds values that are available to every command's Run() method. Kong tags are here so CLI can embed Globals directly. Command-specific flags live in mixin structs (ApiFlags, ConfigFileFlags, and the resolution hierarchy ApiFlags → WorkspaceFlags → ProjectFlags → EnvironmentFlags → ServiceFlags) or directly on command structs — not here.
func (*Globals) Logger ¶ added in v0.2.0
Logger returns a slog.Logger configured for the current verbosity level. Output goes to stderr with no timestamps for clean CLI output.
func (*Globals) ResolveOutputFormat ¶ added in v0.2.0
func (g *Globals) ResolveOutputFormat()
ResolveOutputFormat applies --json/--toml/--raw shorthand flags to the Output field. Shorthands take precedence over --output when set.
type ListCmd ¶ added in v0.2.0
type ListCmd struct {
ServiceFlags `kong:"embed"`
Type string `` /* 237-byte string literal not displayed */
}
ListCmd implements the unified `list` command.
type LogEntryOut ¶ added in v0.2.0
type LogsCmd ¶ added in v0.2.0
type LogsCmd struct {
EnvironmentFlags `kong:"embed"`
Services []string `arg:"" optional:"" help:"Services to show logs for."`
Build bool `help:"Show build logs." short:"b"`
Deploy bool `help:"Show deploy logs (default when services specified)." short:"d"`
Lines *int `help:"Number of lines to fetch." short:"n"`
Since string `help:"Start time: relative (5m, 2h) or ISO 8601."`
Until string `help:"End time: relative or ISO 8601."`
Filter string `help:"Filter expression." short:"f"`
}
LogsCmd implements the `logs` command.
type LogsOutput ¶ added in v0.2.0
type LogsOutput struct {
EnvironmentID string `json:"environment_id" toml:"environment_id"`
Results []LogsResult `json:"results" toml:"results"`
}
type LogsResult ¶ added in v0.2.0
type LogsResult struct {
Scope string `json:"scope" toml:"scope"`
Service string `json:"service,omitempty" toml:"service"`
ServiceID string `json:"service_id,omitempty" toml:"service_id"`
Lines *int `json:"lines,omitempty" toml:"lines"`
Build bool `json:"build" toml:"build"`
DeploymentID string `json:"deployment_id,omitempty" toml:"deployment_id"`
Entries []LogEntryOut `json:"entries,omitempty" toml:"entries"`
Error string `json:"error,omitempty" toml:"error"`
}
type MergeFlags ¶ added in v0.2.0
type MergeFlags struct {
Create bool `help:"Add entities that exist in source but not target." negatable:"" default:"true" env:"FAT_CONTROLLER_ALLOW_CREATE"`
Update bool `help:"Overwrite entities that exist in both." negatable:"" default:"true" env:"FAT_CONTROLLER_ALLOW_UPDATE"`
Delete bool `help:"Remove entities that exist in target but not source." negatable:"" default:"false" env:"FAT_CONTROLLER_ALLOW_DELETE"`
}
MergeFlags controls what a merge operation does.
type NewCmd ¶ added in v0.2.0
type NewCmd struct {
Project NewProjectCmd `cmd:"" help:"Create a new project."`
Environment NewEnvironmentCmd `cmd:"" help:"Create a new environment."`
Service NewServiceCmd `cmd:"" help:"Add a service to config."`
}
NewCmd implements the `new` command group.
type NewEnvironmentCmd ¶ added in v0.2.0
type NewEnvironmentCmd struct {
ProjectFlags `kong:"embed"`
PromptFlags `kong:"embed"`
Name string `arg:"" optional:"" help:"Environment name."`
}
NewEnvironmentCmd implements `new environment`.
func (*NewEnvironmentCmd) Run ¶ added in v0.2.0
func (c *NewEnvironmentCmd) Run(globals *Globals) error
Run implements `new environment`.
type NewProjectCmd ¶ added in v0.2.0
type NewProjectCmd struct {
WorkspaceFlags `kong:"embed"`
PromptFlags `kong:"embed"`
Name string `arg:"" optional:"" help:"Project name."`
}
NewProjectCmd implements `new project`.
func (*NewProjectCmd) Run ¶ added in v0.2.0
func (c *NewProjectCmd) Run(globals *Globals) error
Run implements `new project`.
type NewServiceCmd ¶ added in v0.2.0
type NewServiceCmd struct {
EnvironmentFlags `kong:"embed"`
PromptFlags `kong:"embed"`
Name string `arg:"" optional:"" help:"Service name."`
Database string `help:"Database type to pre-fill (e.g. postgres, redis, mysql)." name:"database"`
Repo string `help:"GitHub repo (org/name) for source." name:"repo"`
Image string `help:"Docker image for source." name:"image"`
}
NewServiceCmd implements `new service`.
func (*NewServiceCmd) Run ¶ added in v0.2.0
func (c *NewServiceCmd) Run(globals *Globals) error
Run implements `new service`.
type OpenCmd ¶ added in v0.2.0
type OpenCmd struct {
EnvironmentFlags `kong:"embed"`
Print bool `help:"Print URL instead of opening browser." short:"p"`
}
OpenCmd implements the `open` command.
type OpenOutput ¶ added in v0.2.0
type ProjectFlags ¶ added in v0.2.0
type ProjectFlags struct {
WorkspaceFlags `kong:"embed"`
Project string `help:"Project ID or name." env:"FAT_CONTROLLER_PROJECT"`
}
ProjectFlags is embedded by commands that need --workspace + --project.
type ProjectListCmd ¶
type ProjectListCmd struct {
WorkspaceFlags `kong:"embed"`
}
func (*ProjectListCmd) Run ¶
func (c *ProjectListCmd) Run(globals *Globals) error
Run implements `project list`.
type PromptFlags ¶ added in v0.2.0
type PromptFlags struct {
Ask bool `help:"Prompt for all parameters." short:"a" xor:"prompt"`
Yes bool `help:"Skip all confirmation prompts." short:"y" xor:"prompt" env:"FAT_CONTROLLER_YES"`
}
PromptFlags controls interactive prompting behavior.
func (*PromptFlags) PromptMode ¶ added in v0.2.0
func (f *PromptFlags) PromptMode() string
PromptMode returns the effective prompt mode.
type RedeployCmd ¶ added in v0.2.0
type RedeployCmd struct {
EnvironmentFlags `kong:"embed"`
PromptFlags `kong:"embed"`
DryRun bool `help:"Preview what would be redeployed without triggering." name:"dry-run" env:"FAT_CONTROLLER_DRY_RUN"`
Services []string `arg:"" optional:"" help:"Services to redeploy (default: all)."`
}
RedeployCmd implements the `redeploy` command.
func (*RedeployCmd) Run ¶ added in v0.2.0
func (c *RedeployCmd) Run(globals *Globals) error
type RestartCmd ¶ added in v0.2.0
type RestartCmd struct {
EnvironmentFlags `kong:"embed"`
PromptFlags `kong:"embed"`
DryRun bool `help:"Preview what would be restarted without triggering." name:"dry-run" env:"FAT_CONTROLLER_DRY_RUN"`
Services []string `arg:"" optional:"" help:"Services to restart (default: all)."`
}
RestartCmd implements the `restart` command.
func (*RestartCmd) Run ¶ added in v0.2.0
func (c *RestartCmd) Run(globals *Globals) error
type RollbackCmd ¶ added in v0.2.0
type RollbackCmd struct {
EnvironmentFlags `kong:"embed"`
PromptFlags `kong:"embed"`
DryRun bool `help:"Preview what would be rolled back without triggering." name:"dry-run" env:"FAT_CONTROLLER_DRY_RUN"`
Services []string `arg:"" optional:"" help:"Services to roll back (default: all)."`
}
RollbackCmd implements the `rollback` command.
func (*RollbackCmd) Run ¶ added in v0.2.0
func (c *RollbackCmd) Run(globals *Globals) error
type ServiceFlags ¶ added in v0.2.0
type ServiceFlags struct {
EnvironmentFlags `kong:"embed"`
Service string `help:"Scope to a single service." env:"FAT_CONTROLLER_SERVICE"`
}
ServiceFlags is embedded by commands that need the full resolution chain (--workspace + --project + --environment + --service).
type ShowCmd ¶ added in v0.2.0
type ShowCmd struct {
ServiceFlags `kong:"embed"`
ShowSecrets bool `help:"Show secret values instead of masking." name:"show-secrets" env:"FAT_CONTROLLER_SHOW_SECRETS"`
Full bool `help:"Include IDs and read-only fields."`
Path string `arg:"" optional:"" help:"Dot-path to show (e.g. api, api.variables.PORT, workspace, project)."`
}
ShowCmd implements the `show` command.
type StatusCmd ¶ added in v0.2.0
type StatusCmd struct {
EnvironmentFlags `kong:"embed"`
Services []string `arg:"" optional:"" help:"Services to check (default: all)."`
}
StatusCmd implements the `status` command.
type StatusDomain ¶ added in v0.2.0
type StatusItem ¶ added in v0.2.0
type StatusItem struct {
Service string `json:"service" toml:"service"`
ServiceID string `json:"service_id" toml:"service_id"`
Status string `json:"status" toml:"status"`
DeploymentID string `json:"deployment_id,omitempty" toml:"deployment_id"`
CreatedAt string `json:"created_at,omitempty" toml:"created_at"`
Domains []StatusDomain `json:"domains,omitempty" toml:"domains"`
Volumes []StatusVolume `json:"volumes,omitempty" toml:"volumes"`
TCPProxies int `json:"tcp_proxies,omitempty" toml:"tcp_proxies"`
Network bool `json:"network,omitempty" toml:"network"`
Healthcheck string `json:"healthcheck,omitempty" toml:"healthcheck"`
Error string `json:"error,omitempty" toml:"error"`
}
type StatusOutput ¶ added in v0.2.0
type StatusOutput struct {
EnvironmentID string `json:"environment_id" toml:"environment_id"`
Statuses []StatusItem `json:"statuses" toml:"statuses"`
}
type StatusVolume ¶ added in v0.2.0
type StopCmd ¶ added in v0.2.0
type StopCmd struct {
EnvironmentFlags `kong:"embed"`
PromptFlags `kong:"embed"`
DryRun bool `help:"Preview what would be stopped without triggering." name:"dry-run" env:"FAT_CONTROLLER_DRY_RUN"`
Services []string `arg:"" optional:"" help:"Services to stop (default: all)."`
}
StopCmd implements the `stop` command.
type ValidateCmd ¶ added in v0.2.0
type ValidateCmd struct {
ConfigFileFlags `kong:"embed"`
Path string `arg:"" optional:"" help:"Dot-path to scope validation (e.g. api)."`
}
ValidateCmd implements the top-level `validate` command.
func (*ValidateCmd) Run ¶ added in v0.2.0
func (c *ValidateCmd) Run(globals *Globals) error
Run implements `validate`.
type WorkspaceFlags ¶ added in v0.2.0
type WorkspaceFlags struct {
ApiFlags `kong:"embed"`
Workspace string `help:"Workspace ID or name." env:"FAT_CONTROLLER_WORKSPACE"`
}
WorkspaceFlags is embedded by commands that need --workspace only.
type WorkspaceListCmd ¶
type WorkspaceListCmd struct {
ApiFlags `kong:"embed"`
}
func (*WorkspaceListCmd) Run ¶
func (c *WorkspaceListCmd) Run(globals *Globals) error
Run implements `workspace list`.
Source Files
¶
- adopt.go
- apply_cmd.go
- auth.go
- cli.go
- client.go
- completion.go
- config_apply.go
- config_get.go
- config_init.go
- deploy.go
- deployment_actions.go
- diff_cmd.go
- environment_list.go
- help.go
- list.go
- logs.go
- new.go
- open.go
- project_list.go
- service_target.go
- show.go
- status.go
- structured_output.go
- validate_cmd.go
- warnings.go
- workspace_list.go