package secretservice
import "github.com/keybase/go-keychain/secretservice"
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 NewService() (*SecretService, error)
- func (s *SecretService) CloseSession(session *Session)
- func (s *SecretService) CreateItem(collection dbus.ObjectPath, properties map[string]dbus.Variant, secret Secret, replaceBehavior ReplaceBehavior) (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 ¶
const DefaultCollection dbus.ObjectPath = "/org/freedesktop/secrets/aliases/default"
DefaultCollection need not necessarily exist in the user's keyring.
DefaultSessionOpenTimeout
const NilFlags = 0
NilFlags
const NullPrompt = "/"
NullPrompt
const ReplaceBehaviorDoNotReplace = 0
ReplaceBehaviorDoNotReplace
const ReplaceBehaviorReplace = 1
ReplaceBehaviorReplace
const SecretServiceInterface = "org.freedesktop.secrets"
SecretServiceInterface
const SecretServiceObjectPath dbus.ObjectPath = "/org/freedesktop/secrets"
SecretServiceObjectPath
Functions ¶
func NewSecretProperties ¶
NewSecretProperties
Types ¶
type Attributes ¶
Attributes
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
func (PromptDismissedError) Error ¶
func (p PromptDismissedError) Error() string
Error
type ReplaceBehavior ¶
type ReplaceBehavior int
ReplaceBehavior
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 NewService ¶
func NewService() (*SecretService, error)
NewService
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) Obj ¶
func (s *SecretService) Obj(path dbus.ObjectPath) dbus.BusObject
Obj
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)
SearchCollection
func (*SecretService) ServiceObj ¶
func (s *SecretService) ServiceObj() dbus.BusObject
ServiceObj
func (*SecretService) SetSessionOpenTimeout ¶
func (s *SecretService) SetSessionOpenTimeout(d time.Duration)
SetSessionOpenTimeout
func (*SecretService) Unlock ¶
func (s *SecretService) Unlock(items []dbus.ObjectPath) (err error)
Unlock
type Session ¶
type Session struct { Mode AuthenticationMode Path dbus.ObjectPath Public *big.Int Private *big.Int AESKey []byte }
Session
func (*Session) NewSecret ¶
NewSecret
Source Files ¶
dh_ietf1024_sha256_aes128_cbc_pkcs7.go secretservice.go
- Version
- v0.0.1 (latest)
- Published
- Feb 27, 2025
- Platform
- darwin/amd64
- Imports
- 12 packages
- Last checked
- 2 days ago –
Tools for package owners.