ssm

package
v0.0.1-alpha.21 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2026 License: MIT Imports: 17 Imported by: 0

Documentation

Overview

Package ssm provides emulation of AWS Systems Manager Parameter Store. See docs/services/ssm.md for the support matrix.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

type Handler struct {
	// contains filtered or unexported fields
}

Handler holds SSM handler dependencies.

func (*Handler) AddTagsToResource

func (h *Handler) AddTagsToResource(w http.ResponseWriter, r *http.Request)

AddTagsToResource adds tags to a parameter.

func (*Handler) DeleteParameter

func (h *Handler) DeleteParameter(w http.ResponseWriter, r *http.Request)

DeleteParameter deletes a single parameter.

func (*Handler) DeleteParameters

func (h *Handler) DeleteParameters(w http.ResponseWriter, r *http.Request)

DeleteParameters deletes multiple parameters.

func (*Handler) DescribeParameters

func (h *Handler) DescribeParameters(w http.ResponseWriter, r *http.Request)

DescribeParameters returns parameter metadata with optional filters.

func (*Handler) GetParameter

func (h *Handler) GetParameter(w http.ResponseWriter, r *http.Request)

GetParameter returns the latest version of a parameter.

func (*Handler) GetParameterHistory

func (h *Handler) GetParameterHistory(w http.ResponseWriter, r *http.Request)

GetParameterHistory returns all versions of a parameter.

func (*Handler) GetParameters

func (h *Handler) GetParameters(w http.ResponseWriter, r *http.Request)

GetParameters returns the latest version of multiple parameters.

func (*Handler) GetParametersByPath

func (h *Handler) GetParametersByPath(w http.ResponseWriter, r *http.Request)

GetParametersByPath returns parameters matching a path prefix.

func (*Handler) ListTagsForResource

func (h *Handler) ListTagsForResource(w http.ResponseWriter, r *http.Request)

ListTagsForResource returns tags associated with a parameter.

func (*Handler) PutParameter

func (h *Handler) PutParameter(w http.ResponseWriter, r *http.Request)

PutParameter creates or overwrites a parameter.

type ParameterRecord

type ParameterRecord struct {
	Name        string
	Description string
	Tags        map[string]string
	Versions    []ParameterVersion // index 0 = version 1
}

ParameterRecord holds the full parameter history and associated metadata.

func (*ParameterRecord) Latest

func (p *ParameterRecord) Latest() *ParameterVersion

Latest returns the most recent ParameterVersion, or nil if none.

func (*ParameterRecord) Version

func (p *ParameterRecord) Version() int64

Version returns the latest version number (1-based).

type ParameterVersion

type ParameterVersion struct {
	Value     string
	Type      string
	Labels    []string
	CreatedAt time.Time
}

ParameterVersion represents a single version of a parameter.

type Service

type Service struct {
	// contains filtered or unexported fields
}

Service implements router.Service and router.TargetDispatcher for SSM.

func New

func New(cfg *config.Config, store state.Store, logger *zap.Logger, clk clock.Clock) *Service

New returns a configured SSM Service.

func (*Service) Dispatch

func (s *Service) Dispatch(w http.ResponseWriter, r *http.Request)

Dispatch satisfies router.TargetDispatcher. Routes requests by X-Amz-Target suffix.

func (*Service) InitBus

func (s *Service) InitBus(bus *events.Bus)

InitBus wires the event bus for parameter lifecycle events.

func (*Service) Name

func (s *Service) Name() string

Name satisfies router.Service.

func (*Service) Operations

func (s *Service) Operations() []op.Operation

Operations implements router.ProtocolService.

func (*Service) RegisterRoutes

func (s *Service) RegisterRoutes(_ chi.Router)

RegisterRoutes satisfies router.Service. SSM has no path-routed endpoints.

func (*Service) SupportedProtocols

func (s *Service) SupportedProtocols() []codec.Codec

SupportedProtocols implements router.ProtocolService.

func (*Service) TargetPrefix

func (s *Service) TargetPrefix() string

TargetPrefix satisfies router.TargetDispatcher.

type Store

type Store struct {
	// contains filtered or unexported fields
}

Store wraps state.Store with SSM-specific helpers.

func (*Store) Delete

func (st *Store) Delete(ctx context.Context, name string) error

Delete removes a parameter by name. No-op if not found.

func (*Store) Get

func (st *Store) Get(ctx context.Context, name string) (*ParameterRecord, error)

Get retrieves a ParameterRecord by name. Returns nil, nil if not found.

func (*Store) Put

func (st *Store) Put(ctx context.Context, p *ParameterRecord) error

Put saves (creates or replaces) a ParameterRecord.

func (*Store) Scan

func (st *Store) Scan(ctx context.Context, namePrefix string) ([]*ParameterRecord, error)

Scan returns all ParameterRecords. If namePrefix is non-empty, only parameters whose names start with namePrefix are returned.

Jump to

Keyboard shortcuts

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