Documentation
¶
Overview ¶
Package paramtype maps between the provider-neutral domain.ValueType and the AWS SSM Parameter Store type names ("String", "SecureString", "StringList") used in CLI output and in the --type flag. It keeps the SSM-specific display and parsing concerns in the param CLI layer so the usecases carry no AWS type.
Index ¶
Constants ¶
const ( String = "String" SecureString = "SecureString" StringList = "StringList" )
SSM parameter type names as displayed by the CLI and accepted by --type.
Variables ¶
This section is empty.
Functions ¶
func Display ¶
Display maps a domain.ValueType to its SSM type name for output. It preserves the historical byte-for-byte rendering:
- domain.ValueTypePlaintext -> "String"
- domain.ValueTypeSecret -> "SecureString"
- domain.ValueTypeList -> "StringList"
func Options ¶
func Options() []string
Options returns the SSM parameter type display names in their canonical order. It is the single source of truth for the set of selectable parameter types (e.g. the GUI type dropdown), so callers never hardcode the list.
func Parse ¶
Parse maps an SSM --type flag value to a domain.ValueType. Unknown values map to domain.ValueTypePlaintext (matching the historical default of "String"); callers should Validate first to reject typos (see Validate).
func Validate ¶ added in v1.6.1
Validate rejects a non-empty --type value that is not one of Options(). The empty string is allowed: it means the flag was not set, so the default ("String") applies. Callers MUST validate before Parse, because Parse maps any unknown value to plaintext — so a typo like "securestring" or "SecureSting" would otherwise silently store a value the user meant to encrypt as plaintext.
Types ¶
This section is empty.