diff

package
v0.7.6 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

Package diff provides the Secrets Manager diff command for comparing secret versions.

The diff command supports multiple argument formats:

  • Full Spec: Both arguments include name and version (e.g., secret:AWSPREVIOUS secret:AWSCURRENT)
  • Full Spec single: One full spec compared against AWSCURRENT (e.g., secret:AWSPREVIOUS)
  • Mixed: First arg with version, second is specifier only (e.g., secret:AWSPREVIOUS ':AWSCURRENT')
  • Partial Spec: Name followed by specifiers (e.g., secret ':AWSPREVIOUS' ':AWSCURRENT')

When comparing identical versions, a warning and hints are displayed instead of empty diff.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Command

func Command() *cli.Command

Command returns the diff command.

Types

type JSONOutput

type JSONOutput struct {
	OldName      string `json:"oldName"`
	OldVersionID string `json:"oldVersionId"`
	OldValue     string `json:"oldValue"`
	NewName      string `json:"newName"`
	NewVersionID string `json:"newVersionId"`
	NewValue     string `json:"newValue"`
	Identical    bool   `json:"identical"`
	Diff         string `json:"diff,omitempty"`
}

JSONOutput represents the JSON output structure for the diff command.

type Options

type Options struct {
	Spec1     *secretversion.Spec
	Spec2     *secretversion.Spec
	ParseJSON bool
	NoPager   bool
	Output    output.Format
}

Options holds the options for the diff command.

type Runner

type Runner struct {
	UseCase *secret.DiffUseCase
	Stdout  io.Writer
	Stderr  io.Writer
}

Runner executes the diff command.

func (*Runner) Run

func (r *Runner) Run(ctx context.Context, opts Options) error

Run executes the diff command.

Jump to

Keyboard shortcuts

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