Documentation ¶
Rendered for darwin/amd64
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ServerKey is for kSecAttrServer ServerKey = attrKey(C.CFTypeRef(C.kSecAttrServer)) // ProtocolKey is for kSecAttrProtocol ProtocolKey = attrKey(C.CFTypeRef(C.kSecAttrProtocol)) // PortKey is for kSecAttrPort PortKey = attrKey(C.CFTypeRef(C.kSecAttrPort)) // PathKey is for kSecAttrPath PathKey = attrKey(C.CFTypeRef(C.kSecAttrPath)) )
View Source
var Protocols = map[string]string{ "https": CFStringToString(C.CFStringRef(C.kSecAttrProtocolHTTPS)), "http": CFStringToString(C.CFStringRef(C.kSecAttrProtocolHTTP)), "smtp": CFStringToString(C.CFStringRef(C.kSecAttrProtocolSMTP)), "pop3": CFStringToString(C.CFStringRef(C.kSecAttrProtocolPOP3)), "pop3s": CFStringToString(C.CFStringRef(C.kSecAttrProtocolPOP3S)), "socks": CFStringToString(C.CFStringRef(C.kSecAttrProtocolSOCKS)), "imap": CFStringToString(C.CFStringRef(C.kSecAttrProtocolIMAP)), "imaps": CFStringToString(C.CFStringRef(C.kSecAttrProtocolIMAPS)), "ldap": CFStringToString(C.CFStringRef(C.kSecAttrProtocolLDAP)), "ldaps": CFStringToString(C.CFStringRef(C.kSecAttrProtocolLDAPS)), "ssh": CFStringToString(C.CFStringRef(C.kSecAttrProtocolSSH)), "ftp": CFStringToString(C.CFStringRef(C.kSecAttrProtocolFTP)), "ftps": CFStringToString(C.CFStringRef(C.kSecAttrProtocolFTPS)), }
Protocols used to covert protocol to kSecAttrProtocol
Functions ¶
func CFStringToString ¶ added in v2.28.1
func CFStringToString(s C.CFStringRef) string
CFStringToString converts a CFStringRef to a string.
func SetPath ¶ added in v2.28.1
func SetPath(k keychain.Item, s string)
SetPath sets the Path attribute
func SetPort ¶ added in v2.28.1
func SetPort(k keychain.Item, s string)
SetPort sets the Port attribute
func SetProtocol ¶ added in v2.28.1
func SetProtocol(k keychain.Item, s string)
SetProtocol sets the Protocol attribute
Types ¶
type Osxkeychain ¶
type Osxkeychain struct{}
Osxkeychain handles secrets using the OS X Keychain as store.
func (Osxkeychain) Add ¶
func (h Osxkeychain) Add(creds *credentials.Credentials) error
Add adds new credentials to the keychain.
func (Osxkeychain) Delete ¶
func (h Osxkeychain) Delete(serverURL string) error
Delete removes credentials from the keychain.
func (Osxkeychain) Get ¶
func (h Osxkeychain) Get(serverURL string) (string, string, error)
Get returns the username and secret to use for a given registry server URL.
func (Osxkeychain) SupportsCredentialStorage ¶
func (Osxkeychain) SupportsCredentialStorage() bool
SupportsCredentialStorage returns true since storage is supported
Click to show internal directories.
Click to hide internal directories.