ssmparameterresolver

package
v0.0.0-...-f6ab670 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2024 License: Apache-2.0 Imports: 7 Imported by: 8

Documentation

Overview

Package ssmparameterresolver provides helper methods to detect, validate and extract parameter store parameter references.

Package ssmparameterresolver provides helper methods to detect, validate and extract parameter store parameter references.

Package ssmparameterresolver provides helper methods to detect, validate and extract parameter store parameter references.

Package ssmparameterresolver provides helper methods to detect, validate and extract parameter store parameter references.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExtractParametersFromText

func ExtractParametersFromText(
	service ISsmParameterService,
	log log.T,
	input string,
	options ResolveOptions) (map[string]SsmParameterInfo, error)

ExtractParametersFromText takes text document and resolves all parameters in it according to ResolveOptions. It will return a map of (parameter references) to SsmParameterInfo.

func ResolveParameterReferenceList

func ResolveParameterReferenceList(
	service ISsmParameterService,
	log log.T,
	parameterReferences []string,
	options ResolveOptions) (map[string]SsmParameterInfo, error)

ResolveParameterReferenceList takes a list of SSM parameter references, resolves them according to ResolveOptions and returns a map of (parameter references) to SsmParameterInfo.

func ResolveParametersInText

func ResolveParametersInText(
	service ISsmParameterService,
	log log.T,
	input string,
	options ResolveOptions) (string, error)

ResolveParametersInText takes text document, resolves all parameters in it according to ResolveOptions and returns resolved document.

func TextContainsSecureSsmParameters

func TextContainsSecureSsmParameters(input string) bool

TextContainsSsmParameters determines whether a given text contains a pattern for secure SSM parameters

func TextContainsSsmParameters

func TextContainsSsmParameters(input string) bool

TextContainsSsmParameters determines whether a given text contains a pattern for SSM parameters

Types

type ISsmParameterResolverBridge

type ISsmParameterResolverBridge interface {
	IsValidParameterStoreReference(value string) bool
	GetParameterFromSsmParameterStore(log log.T, parameter string) (string, error)
}

ISsmParameterResolverBridge defines methods for validating and resolving parameter store parameter references through the ssm parameter store service

func NewSsmParameterResolverBridge

func NewSsmParameterResolverBridge(ssmParameterService ISsmParameterService) ISsmParameterResolverBridge

NewSsmParameterResolverBridge creates a new ssm parameter resolver bridge object

type ISsmParameterService

type ISsmParameterService interface {
	// contains filtered or unexported methods
}

ISsmParameterService interface represents SSM Parameter service API.

func NewService

func NewService(context context.T) (service ISsmParameterService)

NewService creates an instance of the SsmParameterService.

type ResolveOptions

type ResolveOptions struct {
	IgnoreSecureParameters bool
}

ResolveOptions structure represents a set of options for the parameter resolution. At this time it has only one flag IgnoreSecureParameters if IgnoreSecureParameters == true the parameters prefixed with ssm-secure: will not be resolved.

type SsmParameterInfo

type SsmParameterInfo struct {
	Name  string
	Type  string
	Value string
}

SsmParameterInfo structure represents a resolved SSM Parameter.

type SsmParameterService

type SsmParameterService struct {
	ISsmParameterService
	// contains filtered or unexported fields
}

SsmParameterService structure represents an SSM parameter service and implements ISsmParameterService interface.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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