Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultKeyRewriter ¶ added in v0.0.2
DefaultKeyRewriter can be used to remove the "https://", "http://" prefix and any trailing forward-slash "/". Additionally it will replace colons ":" in an IP address with "-port-".
Example:
https://mydomain.com/key -> mydomain.com/key http://182.31.42.33:8455/key -> 182.31.42.33-port-8455/key https://io.docker.com/access-token/ -> io.docker.com/access-token
Types ¶
type KeyRewriter ¶
KeyRewriter provides a credential-helper credential username and ID (a server URL). The server URL can consist of an http or https prefix and may end with a trailing forward-slash.
For example:
{
"ServerURL": "http://127.0.0.1/test",
"Username": "bob"
}
Errors returned by a KeyRewriter will simply log and the current credential will be skipped when [GetSecrets] is called.
It is recommended to use DefaultKeyRewriter for credential-helper credentials when writing custom rules in your KeyRewriter.
type Options ¶
type Options func(*credentialHelperStore)
func WithKeyRewriter ¶
func WithKeyRewriter(rewriter KeyRewriter) Options
func WithShellProgramFunc ¶
func WithShellProgramFunc(f client.ProgramFunc) Options
Click to show internal directories.
Click to hide internal directories.