MCPcopy Index your code
hub / github.com/docker/docker-agent / NewPassProvider

Function NewPassProvider

pkg/environment/pass.go:21–27  ·  view source on GitHub ↗

NewPassProvider creates a new PassProvider instance. It verifies that `pass` is available and stores the resolved absolute path.

()

Source from the content-addressed store, hash-verified

19// NewPassProvider creates a new PassProvider instance.
20// It verifies that `pass` is available and stores the resolved absolute path.
21func NewPassProvider() (*PassProvider, error) {
22 path, err := lookupBinary("pass", PassNotAvailableError{})
23 if err != nil {
24 return nil, err
25 }
26 return &PassProvider{binaryPath: path}, nil
27}
28
29// Get retrieves the value of a secret by its name using the `pass` CLI.
30// The name corresponds to the path in the `pass` store.

Callers 1

NewDefaultProviderFunction · 0.85

Calls 1

lookupBinaryFunction · 0.85

Tested by

no test coverage detected