Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client communicates with Vault
func (Client) Get ¶
func (c Client) Get(path string, keyMap []SecretKeyMapEntry, fetcher VaultResponseFetcher) (map[string]interface{}, error)
Get gets required
type SecretKeyMapEntry ¶
type SecretKeyMapEntry struct {
VaultKey string `yaml:"vaultKey" validate:"required"`
LocalKey string `yaml:"localKey" validate:"required"`
}
SecretKeyMapEntry represents details about one KEY:VALUE secret pair VaultKey represent name of the key under data are stored in Vault LocalKey represents name of the local key e.g. KEY becomes results['KEY']
type VaultFetcher ¶
type VaultFetcher struct{}
VaultFetcher implements VaultResponseFetcher
func (VaultFetcher) Fetch ¶
func (VaultFetcher) Fetch(token string, url string) (*VaultResponse, error)
Fetch wrapt resty GET request
type VaultResponse ¶
type VaultResponse struct {
RequestID string `json:"request_id"`
LeaseID string `json:"lease_id"`
Renewable bool `json:"renewable"`
LeaseDuration int `json:"lease_duration"`
Data VaultResponseData `json:"data"`
Errors []string `json:"errors"`
}
VaultResponse represents the actual Vault response
type VaultResponseData ¶
type VaultResponseData struct {
Data map[string]interface{} `json:"data"`
}
VaultResponseData represents the actual secrets stored in Vault
type VaultResponseFetcher ¶
type VaultResponseFetcher interface {
Fetch(token string, url string) (*VaultResponse, error)
}
VaultResponseFetcher is an interface which wraps http library
Click to show internal directories.
Click to hide internal directories.