Documentation
¶
Overview ¶
Package keystore provides an interface to the GNOME Keyring via the Secret Service D-Bus API using native D-Bus communication.
Index ¶
- Constants
- Variables
- type Attributes
- type Item
- type Items
- type Keystore
- func (k *Keystore) Close() error
- func (k Keystore) Delete(keyID string) error
- func (k Keystore) List() ([]string, error)
- func (k Keystore) Lookup(keyID string) (string, error)
- func (k *Keystore) Obj(path dbus.ObjectPath) dbus.BusObject
- func (k *Keystore) Signal() chan *dbus.Signal
- func (k Keystore) Store(secretKey string) (string, error)
- type Prompt
- type Secret
- type Secrets
- type Session
- type SessionAlgo
Constants ¶
View Source
const ( // AttributeKeyApplication is the attribute that identity the type of keys // in the keystore. AttributeKeyApplication = "age-plugin-keystore" // AttributeKeyID is the attribute name used to identify keys. AttributeKeyID = "age-keystore-id" // D-Bus constants for Secret Service API SecretServiceName = "org.freedesktop.secrets" ObjectPathService = "/org/freedesktop/secrets" ObjectPathDefaultCollection = "/org/freedesktop/secrets/aliases/default" // D-Bus constants for Secret Service Errors SecretErrorIsLocked = "org.freedesktop.Secret.Error.IsLocked" )
Variables ¶
View Source
var ErrKeyNotFound = errors.New("key not found in keystore")
ErrKeyNotFound is returned when a key is not found in the keystore.
View Source
var ErrSecretEmpty = errors.New("Secret is empty")
Functions ¶
This section is empty.
Types ¶
type Attributes ¶ added in v1.2.0
type Item ¶ added in v1.2.0
type Item dbus.ObjectPath
type Items ¶ added in v1.2.0
type Items []dbus.ObjectPath
type Keystore ¶ added in v1.2.0
type Keystore struct {
// contains filtered or unexported fields
}
func (Keystore) Delete ¶ added in v1.2.0
Delete removes a secret key from the keyring. Returns ErrKeyNotFound if the key does not exist.
type Prompt ¶ added in v1.2.0
type Prompt dbus.ObjectPath
type Secret ¶ added in v1.2.0
type Secret struct {
Session dbus.ObjectPath
Parameters []byte
Value []byte
ContentType string
}
Secret represents the Secret structure used by the Secret Service API.
type Secrets ¶ added in v1.2.0
type Secrets map[dbus.ObjectPath]Secret
type Session ¶ added in v1.2.0
type Session struct {
Path dbus.ObjectPath
// contains filtered or unexported fields
}
type SessionAlgo ¶ added in v1.2.0
type SessionAlgo string
const ( SessionAlgoPlain SessionAlgo = "plain" SessionAlgoDH SessionAlgo = "dh-ietf1024-sha256-aes128-cbc-pkcs7" )
Session Algo modes used when opening sessions
Click to show internal directories.
Click to hide internal directories.