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.
14 lines
364 B
14 lines
364 B
|
2 months ago
|
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)
|
||
|
|
}
|