Documentation ¶
Index ¶
- Constants
- func NewSecretProperties(label string, attributes map[string]string) map[string]dbus.Variant
- type Attributes
- type AuthenticationMode
- type PromptCompletedResult
- type PromptDismissedError
- type ReplaceBehavior
- type Secret
- type SecretService
- func (s *SecretService) CloseSession(session *Session)
- func (s *SecretService) CreateItem(collection dbus.ObjectPath, properties map[string]dbus.Variant, secret Secret, ...) (item dbus.ObjectPath, err error)
- func (s *SecretService) DeleteItem(item dbus.ObjectPath) (err error)
- func (s *SecretService) GetAttributes(item dbus.ObjectPath) (attributes Attributes, err error)
- func (s *SecretService) GetSecret(item dbus.ObjectPath, session Session) (secretPlaintext []byte, err error)
- func (s *SecretService) LockItems(items []dbus.ObjectPath) (err error)
- func (s *SecretService) Obj(path dbus.ObjectPath) dbus.BusObject
- func (s *SecretService) OpenSession(mode AuthenticationMode) (session *Session, err error)
- func (s *SecretService) PromptAndWait(prompt dbus.ObjectPath) (paths *dbus.Variant, err error)
- func (s *SecretService) SearchCollection(collection dbus.ObjectPath, attributes Attributes) (items []dbus.ObjectPath, err error)
- func (s *SecretService) ServiceObj() dbus.BusObject
- func (s *SecretService) SetSessionOpenTimeout(d time.Duration)
- func (s *SecretService) Unlock(items []dbus.ObjectPath) (err error)
- type Session
Constants ¶
View Source
const DefaultCollection dbus.ObjectPath = "/org/freedesktop/secrets/aliases/default"
DefaultCollection need not necessarily exist in the user's keyring.
View Source
const DefaultSessionOpenTimeout = 10 * time.Second
DefaultSessionOpenTimeout
View Source
const NilFlags = 0
NilFlags
View Source
const NullPrompt = "/"
NullPrompt
View Source
const ReplaceBehaviorDoNotReplace = 0
ReplaceBehaviorDoNotReplace
View Source
const ReplaceBehaviorReplace = 1
ReplaceBehaviorReplace
View Source
const SecretServiceInterface = "org.freedesktop.secrets"
SecretServiceInterface
View Source
const SecretServiceObjectPath dbus.ObjectPath = "/org/freedesktop/secrets"
SecretServiceObjectPath
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AuthenticationMode ¶
type AuthenticationMode string
AuthenticationMode
const AuthenticationDHAES AuthenticationMode = "dh-ietf1024-sha256-aes128-cbc-pkcs7"
AuthenticationDHAES
const AuthenticationInsecurePlain AuthenticationMode = "plain"
AuthenticationInsecurePlain
type PromptCompletedResult ¶
PromptCompletedResult
type PromptDismissedError ¶
type PromptDismissedError struct {
// contains filtered or unexported fields
}
PromptDismissedError
type Secret ¶
type Secret struct { Session dbus.ObjectPath Parameters []byte Value []byte ContentType string }
Secret
type SecretService ¶
type SecretService struct {
// contains filtered or unexported fields
}
SecretService
func (*SecretService) CloseSession ¶
func (s *SecretService) CloseSession(session *Session)
CloseSession
func (*SecretService) CreateItem ¶
func (s *SecretService) CreateItem(collection dbus.ObjectPath, properties map[string]dbus.Variant, secret Secret, replaceBehavior ReplaceBehavior) (item dbus.ObjectPath, err error)
CreateItem
func (*SecretService) DeleteItem ¶
func (s *SecretService) DeleteItem(item dbus.ObjectPath) (err error)
DeleteItem
func (*SecretService) GetAttributes ¶
func (s *SecretService) GetAttributes(item dbus.ObjectPath) (attributes Attributes, err error)
GetAttributes
func (*SecretService) GetSecret ¶
func (s *SecretService) GetSecret(item dbus.ObjectPath, session Session) (secretPlaintext []byte, err error)
GetSecret
func (*SecretService) LockItems ¶
func (s *SecretService) LockItems(items []dbus.ObjectPath) (err error)
LockItems
func (*SecretService) OpenSession ¶
func (s *SecretService) OpenSession(mode AuthenticationMode) (session *Session, err error)
OpenSession
func (*SecretService) PromptAndWait ¶
func (s *SecretService) PromptAndWait(prompt dbus.ObjectPath) (paths *dbus.Variant, err error)
PromptAndWait is NOT thread-safe.
func (*SecretService) SearchCollection ¶
func (s *SecretService) SearchCollection(collection dbus.ObjectPath, attributes Attributes) (items []dbus.ObjectPath, err error)
SearchColleciton
func (*SecretService) SetSessionOpenTimeout ¶
func (s *SecretService) SetSessionOpenTimeout(d time.Duration)
SetSessionOpenTimeout
func (*SecretService) Unlock ¶
func (s *SecretService) Unlock(items []dbus.ObjectPath) (err error)
Unlock
Click to show internal directories.
Click to hide internal directories.