Documentation ¶
Index ¶
- func NewTagParser() parser.TagParser
- type AsmTag
- type AsmTagStruct
- func (t *AsmTagStruct) DefaultAccountKey() bool
- func (t *AsmTagStruct) Description() string
- func (t *AsmTagStruct) FqName() string
- func (t *AsmTagStruct) GetKeyName() string
- func (t *AsmTagStruct) IsLocalKey() bool
- func (t *AsmTagStruct) Name() string
- func (t *AsmTagStruct) Prefix() string
- func (t *AsmTagStruct) Secure() bool
- func (t *AsmTagStruct) StringKey() string
- func (t *AsmTagStruct) Tag() map[string]string
- func (t *AsmTagStruct) VersionID() string
- func (t *AsmTagStruct) VersionStage() string
- type ParamTier
- type Serializer
- func (p *Serializer) Delete(node *parser.StructNode, filter *support.FieldFilters) (map[string]support.FullNameField, error)
- func (p *Serializer) DeleteTree(prefixes ...string) error
- func (p *Serializer) Get(node *parser.StructNode, filter *support.FieldFilters) (map[string]support.FullNameField, error)
- func (p *Serializer) Upsert(node *parser.StructNode, filter *support.FieldFilters) map[string]support.FullNameField
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewTagParser ¶
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 ¶
func (p *Serializer) Get(node *parser.StructNode, filter *support.FieldFilters) (map[string]support.FullNameField, error)
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 ¶
func (p *Serializer) Upsert(node *parser.StructNode, filter *support.FieldFilters) map[string]support.FullNameField
Upsert creates or updates a secret.