NewKeyringWithService creates a Keyring Backend that stores credentials under the specified service name. Generally, DefaultServiceName should be provided as the service name except in tests which may need parameterization to avoid conflicting keyring use.
(serviceName string)
| 112 | // specified service name. Generally, DefaultServiceName should be provided as the service |
| 113 | // name except in tests which may need parameterization to avoid conflicting keyring use. |
| 114 | func NewKeyringWithService(serviceName string) Keyring { |
| 115 | return Keyring{ |
| 116 | provider: operatingSystemKeyring{}, |
| 117 | serviceName: serviceName, |
| 118 | } |
| 119 | } |
| 120 | |
| 121 | func (o Keyring) Read(serverURL *url.URL) (string, error) { |
| 122 | host, err := normalizeHost(serverURL) |
no outgoing calls