aws

package
v0.0.0-...-a61ee44 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2022 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultPathTranslation = "_"
	PathTranslationFalse   = "False"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AWSConfig

type AWSConfig struct {
	PrefixFilter string

	TagKeyFilters   []string
	TagValueFilters []string

	Region          string
	PathTranslation string
}

type AWSSecretsManagerProvider

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

func NewAWSSecretsManagerProvider

func NewAWSSecretsManagerProvider(region string, zl *zap.Logger) (*AWSSecretsManagerProvider, error)

func (*AWSSecretsManagerProvider) FetchAllSecrets

func (p *AWSSecretsManagerProvider) FetchAllSecrets(secretNamePrefix string, tagKeyFilters []string, tagValueFilters []string) ([]*secrets.Secret, error)

func (*AWSSecretsManagerProvider) FetchSecrets

func (p *AWSSecretsManagerProvider) FetchSecrets(secretObjs []*AwsSecretObject) ([]*secrets.Secret, error)

func (*AWSSecretsManagerProvider) Region

func (p *AWSSecretsManagerProvider) Region() string

type AwsSecretObject

type AwsSecretObject struct {
	ObjectName    string
	ObjectVersion string
	//ObjectType    string // - currently we will only support the secretsmanager object type
	//objectAlias
	ObjectVersionLabel string // object version stage, default to latest if empty
}

type ListSecretFetcher

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

func NewListSecretFetcher

func NewListSecretFetcher(
	provider *AWSSecretsManagerProvider,
	prefixFilter string,
	tagKeyFilters []string,
	tagValueFilters []string,
	zl *zap.Logger) *ListSecretFetcher

func (*ListSecretFetcher) Fetch

func (lsf *ListSecretFetcher) Fetch() ([]*secrets.Secret, error)

type ManifestSecretsFetcher

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

func NewManifestSecretFetcher

func NewManifestSecretFetcher(provider *AWSSecretsManagerProvider, manifest *SecretManifest, zl *zap.Logger) *ManifestSecretsFetcher

func (*ManifestSecretsFetcher) Fetch

func (msf *ManifestSecretsFetcher) Fetch() ([]*secrets.Secret, error)

type SecretManifest

type SecretManifest struct {
	Provider      string
	SecretObjects []*AwsSecretObject
	Region        string

	//An optional field to specify a substitution character to use when the path separator character (slash on Linux) is used in the file name.
	// If a Secret or parameter name contains the path separator failures will occur when the provider tries to create a mounted file using the name.
	// When not specified the underscore character is used, thus My/Path/Secret will be mounted as My_Path_Secret. This pathTranslation value can either be the string "False" or a single character string. When set to "False", no character substitution is performed.
	//TOOD: validate that this is a single charactr or "False"
	PathTranslation string //An optional field to specify a substitution character to use when the path separator character (slash on Linux) is used in the file name.
}

Our manifest strucutre:

Jump to

Keyboard shortcuts

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