37 lines
667 B
Go
37 lines
667 B
Go
package internal
|
|
|
|
import (
|
|
`context`
|
|
`sync`
|
|
|
|
`github.com/hashicorp/vault-client-go`
|
|
`r00t2.io/gosecret`
|
|
`r00t2.io/goutils/multierr`
|
|
)
|
|
|
|
type (
|
|
Client struct {
|
|
lastIdx int
|
|
vtok string
|
|
vaddr string
|
|
scollNm string
|
|
vmnt string
|
|
errsDone chan bool
|
|
errChan chan error
|
|
vc *vault.Client
|
|
wg sync.WaitGroup
|
|
ctx context.Context
|
|
ssvc *gosecret.Service
|
|
scoll *gosecret.Collection
|
|
mErr *multierr.MultiError
|
|
inSS map[string]wrappedSsSecret
|
|
inVault map[string]map[string]interface{}
|
|
}
|
|
wrappedSsSecret struct {
|
|
id int
|
|
strippedNm string
|
|
nm string
|
|
secret *gosecret.Item
|
|
}
|
|
)
|