runner

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 2, 2026 License: MIT Imports: 18 Imported by: 0

Documentation

Overview

Package runner provides shared runners and command builders for stage commands.

Package runner provides shared runners and command builders for stage commands.

Package runner provides shared runners and command builders for stage commands.

Package runner provides shared runners and command builders for stage commands.

Package runner provides shared runners and command builders for stage commands.

Package runner provides shared runners and command builders for stage commands.

Package runner provides shared runners and command builders for stage commands.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewAddCommand

func NewAddCommand(cfg CommandConfig) *cli.Command

NewAddCommand creates an add command with the given config.

func NewApplyCommand

func NewApplyCommand(cfg CommandConfig) *cli.Command

NewApplyCommand creates an apply command with the given config.

func NewDeleteCommand

func NewDeleteCommand(cfg CommandConfig) *cli.Command

NewDeleteCommand creates a delete command with the given config.

func NewDiffCommand

func NewDiffCommand(cfg CommandConfig) *cli.Command

NewDiffCommand creates a diff command with the given config.

func NewEditCommand

func NewEditCommand(cfg CommandConfig) *cli.Command

NewEditCommand creates an edit command with the given config.

func NewResetCommand

func NewResetCommand(cfg CommandConfig) *cli.Command

NewResetCommand creates a reset command with the given config.

func NewStatusCommand

func NewStatusCommand(cfg CommandConfig) *cli.Command

NewStatusCommand creates a status command with the given config.

Types

type AddOptions

type AddOptions struct {
	Name        string
	Value       string // Optional: if set, skip editor and use this value
	Description string
	Tags        map[string]string
}

AddOptions holds options for the add command.

type AddRunner

type AddRunner struct {
	Strategy   staging.Parser
	Store      *staging.Store
	Stdout     io.Writer
	Stderr     io.Writer
	OpenEditor editor.OpenFunc // Optional: defaults to editor.Open if nil
}

AddRunner executes add operations using a strategy.

func (*AddRunner) Run

func (r *AddRunner) Run(_ context.Context, opts AddOptions) error

Run executes the add command.

type ApplyOptions

type ApplyOptions struct {
	Name            string // Optional: apply only this item, otherwise apply all
	IgnoreConflicts bool   // Skip conflict detection and force apply
}

ApplyOptions holds options for the apply command.

type ApplyRunner

type ApplyRunner struct {
	Strategy staging.ApplyStrategy
	Store    *staging.Store
	Stdout   io.Writer
	Stderr   io.Writer
}

ApplyRunner executes apply operations using a strategy.

func (*ApplyRunner) Run

func (r *ApplyRunner) Run(ctx context.Context, opts ApplyOptions) error

Run executes the apply command.

type CommandConfig

type CommandConfig struct {
	// ServiceName is the service prefix for commands (e.g., "param", "secret").
	ServiceName string

	// ItemName is the item name for messages (e.g., "parameter", "secret").
	ItemName string

	// Factory creates a FullStrategy with an initialized AWS client.
	Factory staging.StrategyFactory

	// ParserFactory creates a Parser without AWS client (for status, parsing).
	ParserFactory staging.ParserFactory
}

CommandConfig holds service-specific configuration for building stage commands.

type DiffOptions

type DiffOptions struct {
	Name      string // Optional: diff only this item, otherwise diff all
	ParseJSON bool
	NoPager   bool
}

DiffOptions holds options for the diff command.

type DiffRunner

type DiffRunner struct {
	Strategy staging.DiffStrategy
	Store    *staging.Store
	Stdout   io.Writer
	Stderr   io.Writer
}

DiffRunner executes diff operations using a strategy.

func (*DiffRunner) Run

func (r *DiffRunner) Run(ctx context.Context, opts DiffOptions) error

Run executes the diff command.

type EditOptions

type EditOptions struct {
	Name        string
	Value       string // Optional: if set, skip editor and use this value
	Description string
	Tags        map[string]string
}

EditOptions holds options for the edit command.

type EditRunner

type EditRunner struct {
	Strategy   staging.EditStrategy
	Store      *staging.Store
	Stdout     io.Writer
	Stderr     io.Writer
	OpenEditor editor.OpenFunc // Optional: defaults to editor.Open if nil
}

EditRunner executes edit operations using a strategy.

func (*EditRunner) Run

func (r *EditRunner) Run(ctx context.Context, opts EditOptions) error

Run executes the edit command.

type ResetOptions

type ResetOptions struct {
	Spec string // Name with optional version spec
	All  bool   // Reset all staged items for this service
}

ResetOptions holds options for the reset command.

type ResetRunner

type ResetRunner struct {
	Parser  staging.Parser
	Fetcher VersionFetcher // Optional: required only for version restore operations
	Store   *staging.Store
	Stdout  io.Writer
	Stderr  io.Writer
}

ResetRunner executes reset operations using a strategy.

func (*ResetRunner) Run

func (r *ResetRunner) Run(ctx context.Context, opts ResetOptions) error

Run executes the reset command.

type StatusOptions

type StatusOptions struct {
	Name    string
	Verbose bool
}

StatusOptions holds options for the status command.

type StatusRunner

type StatusRunner struct {
	Strategy staging.ServiceStrategy
	Store    *staging.Store
	Stdout   io.Writer
	Stderr   io.Writer
}

StatusRunner executes status operations using a strategy.

func (*StatusRunner) Run

Run executes the status command.

type VersionFetcher

type VersionFetcher interface {
	// FetchVersion fetches the value for a specific version.
	FetchVersion(ctx context.Context, input string) (value string, versionLabel string, err error)
}

VersionFetcher fetches values for specific versions from AWS.

Jump to

Keyboard shortcuts

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