mirror of
https://github.com/spf13/viper
synced 2024-12-22 11:37:02 +00:00
changed github.com/xordataexchange/crypt to github.com/bketelsen/crypt.
This commit is contained in:
parent
7ddaa61d67
commit
502400c0d9
5 changed files with 8 additions and 5 deletions
|
@ -400,7 +400,7 @@ in a Key/Value store such as etcd or Consul. These values take precedence over
|
|||
default values, but are overridden by configuration values retrieved from disk,
|
||||
flags, or environment variables.
|
||||
|
||||
Viper uses [crypt](https://github.com/xordataexchange/crypt) to retrieve
|
||||
Viper uses [crypt](https://github.com/bketelsen/crypt) to retrieve
|
||||
configuration from the K/V store, which means that you can store your
|
||||
configuration values encrypted and have them automatically decrypted if you have
|
||||
the correct gpg keyring. Encryption is optional.
|
||||
|
@ -412,7 +412,7 @@ independently of it.
|
|||
K/V store. `crypt` defaults to etcd on http://127.0.0.1:4001.
|
||||
|
||||
```bash
|
||||
$ go get github.com/xordataexchange/crypt/bin/crypt
|
||||
$ go get github.com/bketelsen/crypt/bin/crypt
|
||||
$ crypt set -plaintext /config/hugo.json /Users/hugo/settings/config.json
|
||||
```
|
||||
|
||||
|
|
3
go.mod
3
go.mod
|
@ -4,6 +4,7 @@ go 1.12
|
|||
|
||||
require (
|
||||
github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6 // indirect
|
||||
github.com/bketelsen/crypt v0.0.2
|
||||
github.com/coreos/bbolt v1.3.2 // indirect
|
||||
github.com/coreos/etcd v3.3.10+incompatible // indirect
|
||||
github.com/coreos/go-semver v0.2.0 // indirect
|
||||
|
@ -35,7 +36,7 @@ require (
|
|||
github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5 // indirect
|
||||
github.com/ugorji/go v1.1.4 // indirect
|
||||
github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2 // indirect
|
||||
github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77
|
||||
github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77 // indirect
|
||||
go.etcd.io/bbolt v1.3.2 // indirect
|
||||
go.uber.org/atomic v1.4.0 // indirect
|
||||
go.uber.org/multierr v1.1.0 // indirect
|
||||
|
|
2
go.sum
2
go.sum
|
@ -9,6 +9,8 @@ github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5
|
|||
github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q=
|
||||
github.com/beorn7/perks v1.0.0 h1:HWo1m869IqiPhD389kmkxeTalrjNbbJTC8LXupb+sl0=
|
||||
github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8=
|
||||
github.com/bketelsen/crypt v0.0.2 h1:DLaR79EdTGtaM+6I9L8pk+UWJJqLZZozG0BsjB6VCgU=
|
||||
github.com/bketelsen/crypt v0.0.2/go.mod h1:QoWTRmAOKpT3wAaYuPKutmL1eJqFHPUTt8EzaKE8zLc=
|
||||
github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc=
|
||||
github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw=
|
||||
github.com/coreos/bbolt v1.3.2 h1:wZwiHHUieZCquLkDL0B8UhzreNWsPHooDAG3q34zk0s=
|
||||
|
|
|
@ -13,7 +13,7 @@ import (
|
|||
|
||||
"github.com/spf13/viper"
|
||||
|
||||
crypt "github.com/xordataexchange/crypt/config"
|
||||
crypt "github.com/bketelsen/crypt/config"
|
||||
)
|
||||
|
||||
type remoteConfigProvider struct{}
|
||||
|
|
2
viper.go
2
viper.go
|
@ -513,7 +513,7 @@ func (v *Viper) AddRemoteProvider(provider, endpoint, path string) error {
|
|||
// To retrieve a config file called myapp.json from /configs/myapp.json
|
||||
// you should set path to /configs and set config name (SetConfigName()) to
|
||||
// "myapp"
|
||||
// Secure Remote Providers are implemented with github.com/xordataexchange/crypt
|
||||
// Secure Remote Providers are implemented with github.com/bketelsen/crypt
|
||||
func AddSecureRemoteProvider(provider, endpoint, path, secretkeyring string) error {
|
||||
return v.AddSecureRemoteProvider(provider, endpoint, path, secretkeyring)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue