ss

package
Version: v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2021 License: MIT Imports: 3 Imported by: 5

Documentation

Index

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.

func NewSecret

func NewSecret(session dbus.ObjectPath, secret string) Secret

NewSecret initializes a new Secret.

type SecretService

type SecretService struct {
	*dbus.Conn
	// contains filtered or unexported fields
}

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 interface{}) ([]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.

Jump to

Keyboard shortcuts

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