Documentation
¶
Index ¶
- Variables
- func Call(provider, specPath string) (string, error)
- func CallInteractiveMode(provider string, secrets secretsyml.SecretsMap) (chan Result, chan error, func())
- func GetAllProviders(providerDir string) ([]string, error)
- func GetDefaultPath() (string, error)
- func Resolve(providerArg string) (string, error)
- type Result
Constants ¶
This section is empty.
Variables ¶
var ErrInteractiveModeNotSupported = errors.New("interactive mode not supported")
ErrInteractiveModeNotSupported is returned when a provider does not support interactive mode
Functions ¶
func Call ¶
Call shells out to a provider and return its output If call succeeds, stdout is returned with no error If call fails, "" is return with error containing stderr
func CallInteractiveMode ¶
func CallInteractiveMode(provider string, secrets secretsyml.SecretsMap) (chan Result, chan error, func())
CallInteractiveMode calls a provider without passing any arguments. It then constantly fetches secrets from its stdout. It returns a channel of results, a channel of errors and a cleanup function.
func GetAllProviders ¶
GetAllProviders creates slice of all file names in the default path
func GetDefaultPath ¶
Types ¶
type Result ¶
type Result struct {
Key string // The secret's identifier (environment variable name or alias).
Value string // The resolved secret content returned by the provider.
Error error // Non-nil when the provider failed to fetch this secret.
}
Result is the outcome of fetching a single secret from the provider. It pairs the resolved Value with the Key used to request it, plus an Error for failed fetches. The Error field is needed here (but absent from filetemplates.Secret) because callers inspect it for retry and ignore logic before secrets reach the template-rendering stage.