asm

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: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewTagParser

func NewTagParser() parser.TagParser

NewTagParser creates a new AWS parameter store tag parser.

Types

type AsmTag

type AsmTag interface {
	parser.StructTag
	Prefix() string
	Name() string
	Tags() map[string]string
	FqName() string
	Secure() bool
	Description() string
	DefaultAccountKey() bool
	IsLocalKey() bool
	GetKeyName() string
	StringKey() string
	VersionStage() string
	VersionID() string
}

AsmTag is a generic interface

type AsmTagStruct

type AsmTagStruct struct {
	// Extend StructTagImpl
	parser.StructTagImpl
}

AsmTagStruct is for AWS secets manager

func ToAsmTag

func ToAsmTag(generictag *parser.StructNode) (*AsmTagStruct, bool)

ToAsmTag converts a StructTag into the AsmTag struct If fails, it return false.

func (*AsmTagStruct) DefaultAccountKey

func (t *AsmTagStruct) DefaultAccountKey() bool

DefaultAccountKey is for determine if the backing key is the account default KMS key

func (*AsmTagStruct) Description

func (t *AsmTagStruct) Description() string

Description returns a description describing the parameter (if any).

func (*AsmTagStruct) FqName

func (t *AsmTagStruct) FqName() string

FqName is the full name including prefix

func (*AsmTagStruct) GetKeyName

func (t *AsmTagStruct) GetKeyName() string

GetKeyName gets the keyname without namespaces for local, full for arn and default for such

func (*AsmTagStruct) IsLocalKey

func (t *AsmTagStruct) IsLocalKey() bool

IsLocalKey returns true if the real arn to the key is registered in the encoder / decoder

func (*AsmTagStruct) Name

func (t *AsmTagStruct) Name() string

Name returns the short name of the field

func (*AsmTagStruct) Prefix

func (t *AsmTagStruct) Prefix() string

Prefix returns the prefix if any

func (*AsmTagStruct) Secure

func (t *AsmTagStruct) Secure() bool

Secure returns true if this entry is backed by a encryption key

func (*AsmTagStruct) StringKey

func (t *AsmTagStruct) StringKey() string

StringKey is the name of the element in the JSON payload in value where secrets manager shall generate it's password into. This is done in creation time. The complete secret string is then encrypted. If this is nil, no generation is wanted. This is not used by the ssm go implementation. Instead this is for cloud formation that have the ability to generate a password upon deployment.

func (*AsmTagStruct) Tag

func (t *AsmTagStruct) Tag() map[string]string

Tag is set of name values that is part of the Tags for the parameter

func (*AsmTagStruct) VersionID

func (t *AsmTagStruct) VersionID() string

VersionID specifies the unique identifier of the version of the secret.

func (*AsmTagStruct) VersionStage

func (t *AsmTagStruct) VersionStage() string

VersionStage specifies the secret version that you want to retrieve by the staging label attached to the version. If no versionStage or versionID is specified AWSCURRENT as versionStage is used

type ParamTier

type ParamTier string

ParamTier specifies the parameter tier such as std, adv, or intelligent.

type Serializer

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

Serializer handles the secrets manager communication

func New

func New(service string) (*Serializer, error)

New creates a repository using the default configuration.

func NewFromConfig

func NewFromConfig(config aws.Config, service string) *Serializer

NewFromConfig creates a repository using a existing configuration

func (*Serializer) Delete added in v0.6.0

func (p *Serializer) Delete(
	node *parser.StructNode,
	filter *support.FieldFilters) (map[string]support.FullNameField, error)

Delete will delete the paths found in nodes.

func (*Serializer) DeleteTree added in v0.6.0

func (p *Serializer) DeleteTree(prefixes ...string) error

DeleteTree will delete all secrets that have a certain prefix. Since it is possible to specify many _prefixes_ this is able to delete several trees.

func (*Serializer) Get

Get parameters from the secrets manager and populates the node graph with values. Any fields that was not able to be set is reported in the FullNameField string map. FullNameField do not include those fields filtered out in exclusion filter.

func (*Serializer) Upsert

Upsert creates or updates a secret.

Jump to

Keyboard shortcuts

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