paramversion

package
v1.8.0 Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package paramversion provides version spec parsing for AWS Systems Manager Parameter Store (name#VERSION~SHIFT).

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 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 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