func Erase(program ProgramFunc, serverURL string) error
Erase executes a program to remove the server credentials from the native store.
▹ Example
func Get(program ProgramFunc, serverURL string) (*credentials.Credentials, error)
Get executes an external program to get the credentials from a native store.
▹ Example
func List(program ProgramFunc) (map[string]string, error)
List executes a program to list server credentials in the native store.
func Store(program ProgramFunc, creds *credentials.Credentials) error
Store uses an external program to save credentials.
▹ Example
Program is an interface to execute external programs.
type Program interface { Output() ([]byte, error) Input(in io.Reader) }
ProgramFunc is a type of function that initializes programs based on arguments.
type ProgramFunc func(args ...string) Program
func NewShellProgramFunc(name string) ProgramFunc
NewShellProgramFunc creates programs that are executed in a Shell.
func NewShellProgramFuncWithEnv(name string, env *map[string]string) ProgramFunc
NewShellProgramFuncWithEnv creates programs that are executed in a Shell with environment variables
Shell invokes shell commands to talk with a remote credentials-helper.
type Shell struct {
// contains filtered or unexported fields
}
func (s *Shell) Input(in io.Reader)
Input sets the input to send to a remote credentials-helper.
func (s *Shell) Output() ([]byte, error)
Output returns responses from the remote credentials-helper.