Documentation ¶
Index ¶
- type Secret
- type SecretService
- func (s *SecretService) CheckCollectionPath(path dbus.ObjectPath) error
- func (s *SecretService) Close(session dbus.BusObject) error
- func (s *SecretService) CreateCollection(label string) (dbus.BusObject, error)
- func (s *SecretService) CreateItem(collection dbus.BusObject, label string, attributes map[string]string, ...) error
- func (s *SecretService) Delete(itemPath dbus.ObjectPath) error
- func (s *SecretService) GetCollection(name string) dbus.BusObject
- func (s *SecretService) GetLoginCollection() dbus.BusObject
- func (s *SecretService) GetSecret(itemPath dbus.ObjectPath, session dbus.ObjectPath) (*Secret, error)
- func (s *SecretService) OpenSession() (dbus.BusObject, error)
- func (s *SecretService) SearchItems(collection dbus.BusObject, search any) ([]dbus.ObjectPath, error)
- func (s *SecretService) Unlock(collection dbus.ObjectPath) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Secret ¶
type Secret struct { Session dbus.ObjectPath Parameters []byte Value []byte ContentType string `dbus:"content_type"` }
Secret defines a org.freedesk.Secret.Item secret struct.
type SecretService ¶
SecretService is an interface for the Secret Service dbus API.
func NewSecretService ¶
func NewSecretService() (*SecretService, error)
NewSecretService inializes a new SecretService object.
func (*SecretService) CheckCollectionPath ¶
func (s *SecretService) CheckCollectionPath(path dbus.ObjectPath) error
CheckCollectionPath accepts dbus path and returns nil if the path is found in the collection interface (and can be used).
func (*SecretService) Close ¶
func (s *SecretService) Close(session dbus.BusObject) error
Close closes a secret service dbus session.
func (*SecretService) CreateCollection ¶
func (s *SecretService) CreateCollection(label string) (dbus.BusObject, error)
CreateCollection with the supplied label.
func (*SecretService) CreateItem ¶
func (s *SecretService) CreateItem(collection dbus.BusObject, label string, attributes map[string]string, secret Secret) error
CreateItem creates an item in a collection, with label, attributes and a related secret.
func (*SecretService) Delete ¶
func (s *SecretService) Delete(itemPath dbus.ObjectPath) error
Delete deletes an item from the collection.
func (*SecretService) GetCollection ¶
func (s *SecretService) GetCollection(name string) dbus.BusObject
GetCollection returns a collection from a name.
func (*SecretService) GetLoginCollection ¶
func (s *SecretService) GetLoginCollection() dbus.BusObject
GetLoginCollection decides and returns the dbus collection to be used for login.
func (*SecretService) GetSecret ¶
func (s *SecretService) GetSecret(itemPath dbus.ObjectPath, session dbus.ObjectPath) (*Secret, error)
GetSecret gets secret from an item in a given session.
func (*SecretService) OpenSession ¶
func (s *SecretService) OpenSession() (dbus.BusObject, error)
OpenSession opens a secret service session.
func (*SecretService) SearchItems ¶
func (s *SecretService) SearchItems(collection dbus.BusObject, search any) ([]dbus.ObjectPath, error)
SearchItems returns a list of items matching the search object.
func (*SecretService) Unlock ¶
func (s *SecretService) Unlock(collection dbus.ObjectPath) error
Unlock unlocks a collection.