summaryrefslogtreecommitdiff
path: root/data/datasource.go
diff options
context:
space:
mode:
authorMarcel Beck <marcel@beck.im>2019-05-12 23:04:53 +0200
committerDave Henderson <dhenderson@gmail.com>2019-05-12 17:04:52 -0400
commit6e5b686043c47603eb3137d0f5ff8ffe72446219 (patch)
tree58ae939f10926856e1b4befc133fff46443067e9 /data/datasource.go
parentf930c79988fa1e293ba4a1a78394391f4f6adf89 (diff)
AWS Secrets Manager (#549)
* feat: Add AWS Secrets Manager Github Issue: #544 * chore: Fix golangci lint with "skip tests" * docs: Use the correct SecretString Name in aws+secretsmanager docs * refactor: Rename aws secretsmanager to aws asm ASM is a shurtcut for aws secretsmanager. * fix: Revert renaming of DummyParamGetter in SMP * refactor: Rename AWS asm to AWS sm * refactor: AWS SM returns SecureString instead of Object * docs: Adjust aws+sm docs to reflect latest changes
Diffstat (limited to 'data/datasource.go')
-rw-r--r--data/datasource.go20
1 files changed, 11 insertions, 9 deletions
diff --git a/data/datasource.go b/data/datasource.go
index fa0a9804..40795e09 100644
--- a/data/datasource.go
+++ b/data/datasource.go
@@ -45,6 +45,7 @@ func (d *Data) registerReaders() {
d.sourceReaders = make(map[string]func(*Source, ...string) ([]byte, error))
d.sourceReaders["aws+smp"] = readAWSSMP
+ d.sourceReaders["aws+sm"] = readAWSSecretsManager
d.sourceReaders["boltdb"] = readBoltDB
d.sourceReaders["consul"] = readConsul
d.sourceReaders["consul+http"] = readConsul
@@ -119,15 +120,16 @@ func NewData(datasourceArgs, headerArgs []string) (*Data, error) {
// Source - a data source
type Source struct {
- Alias string
- URL *url.URL
- mediaType string
- fs afero.Fs // used for file: URLs, nil otherwise
- hc *http.Client // used for http[s]: URLs, nil otherwise
- vc *vault.Vault // used for vault: URLs, nil otherwise
- kv *libkv.LibKV // used for consul:, etcd:, zookeeper: & boltdb: URLs, nil otherwise
- asmpg awssmpGetter // used for aws+smp:, nil otherwise
- header http.Header // used for http[s]: URLs, nil otherwise
+ Alias string
+ URL *url.URL
+ mediaType string
+ fs afero.Fs // used for file: URLs, nil otherwise
+ hc *http.Client // used for http[s]: URLs, nil otherwise
+ vc *vault.Vault // used for vault: URLs, nil otherwise
+ kv *libkv.LibKV // used for consul:, etcd:, zookeeper: & boltdb: URLs, nil otherwise
+ asmpg awssmpGetter // used for aws+smp:, nil otherwise
+ awsSecretsManager awsSecretsManagerGetter // used for aws+sm, nil otherwise
+ header http.Header // used for http[s]: URLs, nil otherwise
}
func (s *Source) inherit(parent *Source) {