report

package
v0.7.3 Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2022 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AsmParameterDetails

type AsmParameterDetails struct {
	// StringKey is the name of the json key where the Secrets Manager shall genereate it's secret into.
	// This is for template driven secrets where a JSON payload is set into the SecretString
	StringKey string `json:"strkey"`
}

AsmParameterDetails specifies Secrets Manager secret specifics

type Parameter

type Parameter struct {
	// Type specifies the parameter type
	Type ParameterType `json:"type"`
	// Name specifies the fully qualified name of the parameter
	Name string `json:"fqname"`
	// KeyID, if set it is a ARN to a key ID to be used when encrypting / decrypting th key
	KeyID string `json:"keyid"`
	// Description describes the key
	Description string `json:"description"`
	// Tags is a key value that are applied to a parameter or secret
	Tags map[string]string `json:"tags"`
	// Details is an optional property to specify details that is exclusive for the ParameterType
	// the ParameterStore do have PsmParameterDetails as mandatory.
	Details interface{} `json:"details"`
	// Value the value of this parameter
	Value string `json:"value"`
	// The type of the value. For example PMS has String|StringList|SecureString.
	ValueType string `json:"valuetype"`
}

Parameter specifies a parameter configuration

type ParameterType

type ParameterType string

ParameterType specifies if a parameter is a secrets maanger or parameter store parameter

const (
	// SecretsManager specifies that a parameter is a secrets manager parameter
	SecretsManager ParameterType = "secrets-manager"
	// ParameterStore specifies that a parameter is a parameter store parameter
	ParameterStore ParameterType = "parameter-store"
)

type PmsParameterDetails

type PmsParameterDetails struct {
	// Pattern is a regexp to validate against (optional)
	Pattern string `json:"pattern"`
	// Tier specifies the tier for the parameter
	Tier types.ParameterTier `json:"tier"`
}

PmsParameterDetails describes the details for a parameter store parameter

type Report

type Report struct {
	Parameters []Parameter `json:"parameters"`
}

Report contains the complete report

type Reporter

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

Reporter is the type to produce report of the configuration

func New

func New() *Reporter

New creates a new Reporter with ssm.ParameterTierStandard

func NewWithTier

func NewWithTier(tier types.ParameterTier) *Reporter

NewWithTier creates a new Reporter with specified tier

func (*Reporter) RenderReport

func (r *Reporter) RenderReport(node *parser.StructNode,
	filter *support.FieldFilters, value bool) (*Report, string, error)

RenderReport renders a JSON report based on the node tree and filters

Jump to

Keyboard shortcuts

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