osxkeychain

package
v2.36.15 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 28, 2024 License: MIT Imports: 6 Imported by: 0

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))
)

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

func SetServer added in v2.28.1

func SetServer(k keychain.Item, s string)

SetServer sets the server 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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL