You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
13 lines
364 B
13 lines
364 B
package secretstore
|
|
|
|
// FileReader resolves the current atomic snapshot written by another process.
|
|
// It deliberately has no write methods and never falls back to stale secrets.
|
|
type FileReader struct{ Path string }
|
|
|
|
func (r FileReader) Get(key string) ([]byte, bool) {
|
|
store, err := Open(r.Path)
|
|
if err != nil {
|
|
return nil, false
|
|
}
|
|
return store.Get(key)
|
|
}
|
|
|