paramversion

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: 10 Imported by: 0

Documentation

Overview

Package paramversion provides version resolution for AWS Systems Manager Parameter Store.

Index

Constants

This section is empty.

Variables

View Source
var ErrInvalidVersion = errors.New("# must be followed by a version number")

ErrInvalidVersion is returned when # is not followed by a version number.

Functions

func GetParameterWithVersion

func GetParameterWithVersion(ctx context.Context, client Client, spec *Spec) (*paramapi.ParameterHistory, error)

GetParameterWithVersion retrieves a parameter with version/shift support. SecureString values are always decrypted.

func ParseDiffArgs

func ParseDiffArgs(args []string) (*Spec, *Spec, error)

ParseDiffArgs parses diff command arguments for SSM Parameter Store parameters. This is a convenience wrapper around diff.ParseArgs with SSM Parameter Store-specific settings.

Types

type AbsoluteSpec

type AbsoluteSpec struct {
	Version *int64 // Explicit version number (#VERSION)
}

AbsoluteSpec represents the absolute version specifier for SSM Parameter Store.

type Client

Client is the interface for GetParameterWithVersion.

type Spec

type Spec = version.Spec[AbsoluteSpec]

Spec represents a parsed SSM Parameter Store parameter version specification.

Grammar: <name>[#<N>]<shift>*

  • #<N> optional version number (0 or 1)
  • <shift> ~ or ~<N>, repeatable (0 or more, cumulative)

Examples: /my/param, /my/param#3, /my/param~1, /my/param#5~2, /my/param~~.

func Parse

func Parse(input string) (*Spec, error)

Parse parses an SSM Parameter Store version specification string.

Grammar: <name>[#<N>]<shift>*

Shift syntax (Git-like, repeatable):

  • ~ go back 1 version
  • ~N go back N versions (e.g., ~2)
  • ~~ go back 2 versions (same as ~1~1)
  • ~1~2 cumulative: go back 3 versions

Jump to

Keyboard shortcuts

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