service

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2022 License: MIT Imports: 28 Imported by: 0

Documentation

Overview

secret service implementation according to: http://standards.freedesktop.org/secret-service

create, update dbus objects and interfaces

secret service implementation according to: http://standards.freedesktop.org/secret-service

secret service implementation according to: http://standards.freedesktop.org/secret-service

secret service implementation according to: http://standards.freedesktop.org/secret-service

secret service implementation according to: http://standards.freedesktop.org/secret-service

secret service implementation according to: http://standards.freedesktop.org/secret-service

secret service implementation according to: http://standards.freedesktop.org/secret-service

secret service implementation according to: http://standards.freedesktop.org/secret-service

secret service implementation according to: http://standards.freedesktop.org/secret-service

secret service implementation according to: http://standards.freedesktop.org/secret-service

secret service implementation according to: http://standards.freedesktop.org/secret-service

secret service implementation according to: http://standards.freedesktop.org/secret-service

secret service implementation according to: http://standards.freedesktop.org/secret-service

secret service implementation according to: http://standards.freedesktop.org/secret-service

Index

Constants

This section is empty.

Variables

View Source
var PropsCollection *prop.Properties

Collection dbus properties

View Source
var PropsItem *prop.Properties
View Source
var PropsService *prop.Properties

Functions

func ApiErrorIsLocked

func ApiErrorIsLocked() *dbus.Error

OrgFreedesktopSecretErrorIsLocked "The object must be unlocked before this action can be carried out."

func ApiErrorNoSession

func ApiErrorNoSession() *dbus.Error

OrgFreedesktopSecretErrorNoSession "The session does not exist."

func ApiErrorNoSuchObject

func ApiErrorNoSuchObject() *dbus.Error

OrgFreedesktopSecretErrorNoSuchObject "No such item or collection exists."

func ApiErrorNotSupported

func ApiErrorNotSupported() *dbus.Error

OrgFreedesktopDBusErrorNotSupported "Service does not support a specific set of algorithms for encryption."

func CommandExists

func CommandExists(cmdName string) bool

CommandExists returns true if command exists on OS otherwise false

func DbusError

func DbusError(dbusError, message string) *dbus.Error

DbusError is the low-level dbus error function

func DbusErrorAccessDenied

func DbusErrorAccessDenied(message string) *dbus.Error

DbusErrorAccessDenied means the call/operation tried to access a resource it isn't allowed to

func DbusErrorAddressInUse

func DbusErrorAddressInUse(message string) *dbus.Error

DbusErrorAddressInUse means D-Bus address is already taken

func DbusErrorBadAddress

func DbusErrorBadAddress(message string) *dbus.Error

DbusErrorBadAddress means the given address is not valid

func DbusErrorCallFailed

func DbusErrorCallFailed(message string) *dbus.Error

DbusErrorCallFailed means the call has failed

func DbusErrorDisconnected

func DbusErrorDisconnected(message string) *dbus.Error

DbusErrorDisconnected means connection is closed

func DbusErrorInvalidArgs

func DbusErrorInvalidArgs(message string) *dbus.Error

DbusErrorInvalidArgs means the arguments passed to this call/operation are not valid

func DbusErrorInvalidSignature

func DbusErrorInvalidSignature(message string) *dbus.Error

DbusErrorInvalidSignature means the type signature is not valid or compatible

func DbusErrorLimitsExceeded

func DbusErrorLimitsExceeded(message string) *dbus.Error

DbusErrorLimitsExceeded means the limits allocated to this process/call/connection exceeded the pre-defined

func DbusErrorNoMemory

func DbusErrorNoMemory(message string) *dbus.Error

DbusErrorNoMemory means system is out of memory

func DbusErrorNoNetwork

func DbusErrorNoNetwork(message string) *dbus.Error

DbusErrorNoNetwork means network is not available

func DbusErrorNoReply

func DbusErrorNoReply(message string) *dbus.Error

DbusErrorNoReply means the called method did not reply within the specified timeout

func DbusErrorNoServer

func DbusErrorNoServer(message string) *dbus.Error

DbusErrorNoServer means server is not listening on the address

func DbusErrorNotSupported

func DbusErrorNotSupported(message string) *dbus.Error

DbusErrorNotSupported means the call/operation is not supported

func DbusErrorPropertyReadOnly

func DbusErrorPropertyReadOnly(message string) *dbus.Error

DbusErrorPropertyReadOnly means the property set failed because the property is read-only

func DbusErrorServiceUnknown

func DbusErrorServiceUnknown(message string) *dbus.Error

DbusErrorServiceUnknown means the called service is not known

func DbusErrorTimeout

func DbusErrorTimeout(message string) *dbus.Error

DbusErrorTimeout means operation has timed out

func DbusErrorUnknownInterface

func DbusErrorUnknownInterface(message string) *dbus.Error

DbusErrorUnknownInterface means the interface is not known in this object

func DbusErrorUnknownMethod

func DbusErrorUnknownMethod(message string) *dbus.Error

DbusErrorUnknownMethod means the method called was not found in this object/interface with the given parameters

func DbusErrorUnknownObject

func DbusErrorUnknownObject(message string) *dbus.Error

DbusErrorUnknownObject means the object path points to an object that does not exist

func DbusErrorUnknownProperty

func DbusErrorUnknownProperty(message string) *dbus.Error

DbusErrorUnknownProperty means the property does not exist in this interface

func DefaultCollection

func DefaultCollection(parent *Service, locked bool, created uint64, modified uint64)

DefaultCollection create and initialize a new default collection at: '/org/freedesktop/secrets/aliases/default'

func Epoch

func Epoch() uint64

Epoch returns seconds from midnight 1/1/1970

func IsMapSubsetFullMatch

func IsMapSubsetFullMatch(mapSet map[string]string,
	mapSubset map[string]string, lock *sync.RWMutex) bool

IsMapSubsetFullMatch returns true if mapSubset is a full subset of mapSet otherwise false

func IsMapSubsetFullMatchGeneric

func IsMapSubsetFullMatchGeneric(mapSet interface{},
	mapSubset interface{}, lock *sync.RWMutex) bool

IsMapSubsetFullMatchGeneric returns true if mapSubset is a full subset of mapSet otherwise false

func IsMapSubsetSingleMatch

func IsMapSubsetSingleMatch(mapSet map[string]string,
	mapSubset map[string]string, lock *sync.RWMutex) bool

IsMapSubsetSingleMatch returns true if only one key/value of mapSubset exists in mapSet otherwise false

func Marshal

func Marshal(service *Service, dbFile string)

Marshal converts dbus objects to JSON

func MemUsageOS

func MemUsageOS() uint64

MemUsageOS returns memory usage on OS in MB

func Path2Name

func Path2Name(path string, name string) (string, string)

Path2Name takes a dbus path like /a/b/c/d and returns a dbus object name like a.b.c and last part d Example: path=/a/b/c/xyz, name=Foo -> (a.b.c.Foo, xyz)

func PersistData

func PersistData(ctx context.Context, service *Service)

PersistData makes dbus objects persistent to db as soon as they change

func RestoreData

func RestoreData(service *Service)

RestoreData reads database and restores dbus objects

func UUID

func UUID() string

UUID returns uuid without dashes

Types

type CliSession added in v0.2.0

type CliSession struct {
	// reference to parent (service)
	Parent *Service
	// symmetric key used or AES encryption/decryption. Needs IV as well
	SymmetricKey []byte // 16 bytes (128 bits)
}

func NewCliSession added in v0.2.0

func NewCliSession(parent *Service) *CliSession

type Collection

type Collection struct {
	// reference to parent (service)
	Parent *Service
	// Mutex for lock/unlock Items slice
	ItemsMutex *sync.RWMutex
	// Items map. key: Item dbus object path, value: Item object
	Items map[string]*Item
	// collection full dbus object path
	ObjectPath dbus.ObjectPath

	// Mutex for lock/unlock Properties map
	PropertiesMutex *sync.RWMutex
	// collection Properties map
	Properties map[string]dbus.Variant
	// dbus properties handle
	DbusProperties *prop.Properties
	// collection alias (friendly name)
	Alias string
	// Mutex to lock/unlock Locked status of collection
	LockMutex *sync.Mutex
	// collection Label
	Label string
	// true if collection is locked otherwise false
	Locked bool
	// Unix time collection created
	Created uint64
	// Unix time collection modified
	Modified uint64
	// inform parent data has happened
	SaveData SaveData

	// Temporary solution to data race in marshaling for db
	DataMutex *sync.RWMutex
	// contains filtered or unexported fields
}

Collection data structure collection consists of items

func NewCollection

func NewCollection(parent *Service) *Collection

NewCollection creates and initialize a new collection

func (*Collection) AddItem

func (collection *Collection) AddItem(item *Item, replace bool, saveData bool,
	locked bool, created uint64, modified uint64, inPlace bool) error

AddItem adds a new item to collection's items

func (*Collection) CreateItem

func (c *Collection) CreateItem(properties map[string]dbus.Variant,
	secretApi SecretApi, replace bool) (dbus.ObjectPath, dbus.ObjectPath, *dbus.Error)

creates an item (secret + lookup attributes + label) in a collection

func (*Collection) CreateMethodFromPath

func (collection *Collection) CreateMethodFromPath(method string) string

CreateMethodFromPath returns a.b.c.Foo when collection path is /a/b/c/xyz and passed method is 'Foo'

func (*Collection) Delete

func (c *Collection) Delete() (dbus.ObjectPath, *dbus.Error)

Delete removes the collection

func (*Collection) GetItemByPath

func (collection *Collection) GetItemByPath(itemPath dbus.ObjectPath) *Item

GetItemByPath returns the collection with given dbus object path, otherwise null

func (*Collection) GetProperty

func (collection *Collection) GetProperty(name string) (dbus.Variant, error)

GetProperty returns given dbus property value

func (*Collection) Lock

func (collection *Collection) Lock()

Lock locks a collection and updates dbus 'Locked' and 'Modified' properties

func (*Collection) RemoveItem

func (collection *Collection) RemoveItem(item *Item)

RemoveItem removes an item from collection's item map

func (*Collection) SearchItems

func (c *Collection) SearchItems(
	attributes map[string]string) ([]dbus.ObjectPath, *dbus.Error)

SearchItems Searches for items in this collection matching the lookup attributes

func (*Collection) SetProperties

func (collection *Collection) SetProperties(properties map[string]dbus.Variant)

SetProperties processes raw properties and sets collection.Properties

func (*Collection) SetProperty

func (collection *Collection) SetProperty(name string, value interface{})

SetProperty sets given dbus property name to given value

func (*Collection) SignalCollectionChanged

func (collection *Collection) SignalCollectionChanged()

SignalCollectionDeleted emits a signal that a collection has changed

func (*Collection) SignalCollectionCreated

func (collection *Collection) SignalCollectionCreated()

SignalCollectionCreated emits a signal that a new collection was created

func (*Collection) SignalCollectionDeleted

func (collection *Collection) SignalCollectionDeleted()

SignalCollectionDeleted emits a signal that a collection was deleted

func (*Collection) Unlock

func (collection *Collection) Unlock()

Unlock unlocks a collection and updates dbus 'Locked' and 'Modified' properties

func (*Collection) UpdateModified

func (collection *Collection) UpdateModified()

UpdateModified updated 'Modified' dbus property of this collection

func (*Collection) UpdatePropertyCollectionItems

func (collection *Collection) UpdatePropertyCollectionItems()

UpdatePropertyCollections updates dbus property of this collection's items

type Database

type Database struct {
	// Database version (used for backward compatibility)
	Version string `json:"version"`
	// TRUE if database is encrypted otherwise false
	Encrypted bool `json:"encrypted"`
	// All collections in this database
	Collections []DbCollection `json:"collections"`
}

func Unmarshal

func Unmarshal(dbFile string) *Database

Unmarshal converts JSON data into dbus objects

type DbCollection

type DbCollection struct {
	// Collection object path on dbus
	ObjectPath dbus.ObjectPath `json:"objectPath"`
	// All items in this collection
	Items []DbItem `json:"items"`
	// Collection properties
	Properties map[string]string `json:"properties"`
	// Collection Alias
	Alias string `json:"alias"`
	// Collection Label
	Label string `json:"label"`
	// Is collection locked?
	Locked bool `json:"locked"`
	// Collection creation time (epoch)
	Created uint64 `json:"created"`
	// Collection modification time (epoch)
	Modified uint64 `json:"modified"`
}

Collection's Parent is Database (root)

type DbItem

type DbItem struct {
	// Item parent (collection) object path
	Parent dbus.ObjectPath `json:"parent"`
	// Item object path on dbus
	ObjectPath dbus.ObjectPath `json:"objectPath"`
	// Item properties
	Properties map[string]string `json:"properties"`
	// Item secret (wrapper around SecretApi)
	Secret DbSecret `json:"secret"`
	// Item lookup attributes
	LookupAttributes map[string]string `json:"lookupAttributes"`
	// Item label
	Label string `json:"label"`
	// Is item locked?
	Locked bool `json:"locked"`
	// Item creation time (epoch)
	Created uint64 `json:"created"`
	// Item modification time (epoch)
	Modified uint64 `json:"modified"`
}

Item's Parent is Collection

type DbSecret

type DbSecret struct {
	// Secret parent (item)
	Parent dbus.ObjectPath `json:"parent"`
	// Secret without encryption
	SecretText string `json:"secretText"`
}

Secret's Parent is Item

type EncryptionAlgorithm

type EncryptionAlgorithm uint8

encryption algorithm type plain or Dh_ietf1024_sha256_aes128_cbc_pkcs7

const (
	// Plain algorithm (no encryption)
	Plain EncryptionAlgorithm = iota
	// Dh_ietf1024_sha256_aes128_cbc_pkcs7 algorithm
	Dh_ietf1024_sha256_aes128_cbc_pkcs7
)

type Item

type Item struct {
	// reference to parent (collection)
	Parent *Collection
	// item full dbus object path
	ObjectPath dbus.ObjectPath
	// Mutex for lock/unlock Properties map
	PropertiesMutex *sync.RWMutex
	// collection Properties map
	Properties map[string]dbus.Variant

	// dbus properties handle
	DbusProperties *prop.Properties
	// secret contained in this item
	Secret *Secret
	// Mutex for lock/unlock LookupAttributes slice
	LookupAttributesMutex *sync.RWMutex
	// LookupAttributes (name + value) contained in this item
	LookupAttributes map[string]string
	// label of this item
	Label string
	// Mutex to lock/unlock Locked status of item
	LockMutex *sync.Mutex
	// true if item is locked otherwise false
	Locked bool
	// Unix time item created
	Created uint64
	// Unix time item modified
	Modified uint64
	// inform parent data has happened
	SaveData SaveData

	// Temporary solution to data race in marshaling for db
	DataMutex *sync.RWMutex
	// contains filtered or unexported fields
}

Item data structure item = secret + lookup attributes + label

func NewItem

func NewItem(parent *Collection) *Item

create and initialize a new session

func (*Item) CreateMethodFromPath

func (i *Item) CreateMethodFromPath(method string) string

CreateMethodFromPath returns a.b.c.Foo when item path is /a/b/c/xyz and passed method is 'Foo'

func (*Item) Delete

func (item *Item) Delete() (dbus.ObjectPath, *dbus.Error)

Delete removes an item from a collection

func (*Item) GetLookupAttribute

func (i *Item) GetLookupAttribute(key string) string

GetLookupAttribute returns an attribute with given key otherwise null

func (*Item) GetProperty

func (item *Item) GetProperty(name string) (dbus.Variant, error)

GetProperty returns given dbus property value

func (*Item) GetSecret

func (item *Item) GetSecret(session dbus.ObjectPath) (*SecretApi, *dbus.Error)

GetSecret retrieves the secret for this item

func (*Item) Lock

func (item *Item) Lock()

Lock locks a collection and updates dbus 'Locked' and 'Modified' properties

func (*Item) SetProperties

func (item *Item) SetProperties(properties map[string]dbus.Variant)

SetProperties processes raw properties and sets collection.Properties

func (*Item) SetProperty

func (item *Item) SetProperty(name string, value interface{})

SetProperty sets given dbus property name to given value

func (*Item) SetSecret

func (item *Item) SetSecret(secretApi SecretApi) *dbus.Error

SetSecret sets the secret for this item

func (*Item) SignalItemChanged

func (item *Item) SignalItemChanged()

func (*Item) SignalItemCreated

func (item *Item) SignalItemCreated()

func (*Item) SignalItemDeleted

func (item *Item) SignalItemDeleted()

func (*Item) Unlock

func (item *Item) Unlock()

Unlock unlocks a collection and updates dbus 'Locked' and 'Modified' properties

func (*Item) UpdateModified

func (item *Item) UpdateModified()

UpdateModified updated 'Modified' dbus property of this collection

type PasswordFile added in v0.2.0

type PasswordFile struct {
	// Password file version
	Version string `yaml:"version"`
	// Password hash: sha512(salt+password)
	PasswordHash string `yaml:"passwordHash"`
}

type Prompt

type Prompt struct {
	// reference to parent
	Parent *Service
	// prompt full dbus object path
	ObjectPath dbus.ObjectPath
	// client applications can use the window-id to
	// display the prompt attached to their application window
	WindowId string
}

Prompt data structure

func NewPrompt

func NewPrompt(parent *Service) *Prompt

create and initialize a new collection

func (*Prompt) Dismiss

func (prompt *Prompt) Dismiss() *dbus.Error

Dismiss dismisses the prompt

func (*Prompt) Prompt

func (prompt *Prompt) Prompt(windowId string) *dbus.Error

perform the prompt. A prompt necessary to complete an operation windowId: Platform specific window handle to use for showing the prompt

func (*Prompt) SignalPromptCompleted

func (prompt *Prompt) SignalPromptCompleted(dismissed bool, result dbus.Variant)

type SaveData

type SaveData func()

SaveData is a function used by a child to inform parent of a change in data

type Secret

type Secret struct {
	// reference to parent (item)
	Parent *Item
	// Unencrypted secret
	PlainSecret string
	// Secret type needed by API
	SecretApi *SecretApi
	// inform parent data has happened
	SaveData SaveData

	// Temporary solution to data race in marshaling for db
	DataMutex *sync.RWMutex
}

Secret data structure

func NewSecret

func NewSecret(parent *Item) *Secret

NewSecret returns a new instance of Secret

type SecretApi

type SecretApi struct {
	// The session full dbus object path that was used to encode the secret
	Session dbus.ObjectPath
	// Algorithm dependent parameters for secret value encoding
	Parameters []byte
	// Possibly encoded secret value
	Value []byte
	//The content type of the secret i.e. 'text/plain; charset=utf8'
	ContentType string
}

Secret data structure needed bu API

type SecretMap

type SecretMap map[dbus.ObjectPath]Secret

A mapping from object-paths to Secret structs

type SecretService added in v0.2.0

type SecretService struct {
	// reference to parent (service)
	Parent *Service
	// session (public key negotiation)
	Session *SecretServiceCLiSession
}

CLI interface data structure

func NewSecretService added in v0.2.0

func NewSecretService(parent *Service) *SecretService

type SecretServiceCLiSession added in v0.2.0

type SecretServiceCLiSession struct {
	// symmetric key used or AES encryption/decryption. Needs IV as well
	SymmetricKey []byte // 16 bytes (128 bits)
}

session (public key negotiation)

type Service

type Service struct {
	// dbus session connection
	Connection *dbus.Conn

	Config *ServiceConfig
	// SecretService session
	SecretService *SecretService
	// Mutex for lock/unlock Sessions map
	SessionsMutex *sync.RWMutex
	// Cli Session
	CliSession *CliSession // TODO: REMOVE ME
	// sessions map. key: session dbus object path, value: session object
	Sessions map[string]*Session
	// Mutex for lock/unlock Collections map
	CollectionsMutex *sync.RWMutex
	// Collections map. key: Collection dbus object path, value: Collection object
	Collections map[string]*Collection
	// inform parent data has happened
	// SaveData SaveData
	// Channel to signal saving data to db
	SaveSignalChan chan struct{}
	// inform service is up and ready
	ServiceReadyChan chan struct{}
	// inform service is shutdown
	ServiceShutdownChan chan struct{}
	// inform database has loaded
	DbLoadedChan chan struct{}
}

secretservice data structure

func New

func New() *Service

create and initialize a new instance of service

func (*Service) AddCollection

func (s *Service) AddCollection(collection *Collection,
	locked bool, created uint64, modified uint64, saveData bool)

add a new collection to service's collection map

func (*Service) AddSession

func (s *Service) AddSession(session *Session)

add a new session to service's session map

func (*Service) Command added in v0.2.0

func (service *Service) Command(command string, params string) (string, *dbus.Error)

Command receives a command from CLI and runs it on daemon side

func (*Service) CreateCollection

func (service *Service) CreateCollection(properties map[string]dbus.Variant,
	alias string) (dbus.ObjectPath, dbus.ObjectPath, *dbus.Error)

CreateCollection creates a collection which can hold multiple items

func (*Service) GetCollectionByAlias

func (s *Service) GetCollectionByAlias(alias string) *Collection

GetCollectionByAlias finds and return a collection by it's alias name otherwise return nil

func (*Service) GetCollectionByPath

func (service *Service) GetCollectionByPath(collectionPath dbus.ObjectPath) *Collection

func (*Service) GetItemByPath

func (service *Service) GetItemByPath(itemPath dbus.ObjectPath) *Item

func (*Service) GetSecrets

func (service *Service) GetSecrets(items []dbus.ObjectPath,
	session dbus.ObjectPath) (map[dbus.ObjectPath]SecretApi, *dbus.Error)

GetSecrets retrieves multiple secrets from different items

func (*Service) GetSessionByPath

func (service *Service) GetSessionByPath(sessionPath dbus.ObjectPath) *Session

GetSessionByPath returns session with given objectpath

func (*Service) HasCollection

func (s *Service) HasCollection(collectionPath dbus.ObjectPath) bool

HasCollection returns true if collection exists otherwise false

func (*Service) HasSession

func (s *Service) HasSession(sessionPath dbus.ObjectPath) bool

HasSession returns true if session exists otherwise false

func (*Service) Lock

func (service *Service) Lock(
	objects []dbus.ObjectPath) ([]dbus.ObjectPath, dbus.ObjectPath, *dbus.Error)

Lock locks the specified objects (collections, items)

func (*Service) OpenSession

func (service *Service) OpenSession(algorithm string,
	input dbus.Variant) (dbus.Variant, dbus.ObjectPath, *dbus.Error)

OpenSession opens a unique session for the caller application further communication encryption/decryption relies on the related session

func (*Service) ReadAlias

func (service *Service) ReadAlias(name string) (dbus.ObjectPath, *dbus.Error)

returns the collection with the given alias

func (*Service) ReadPasswordFile added in v0.2.0

func (service *Service) ReadPasswordFile() string

ReadPasswordFile returns contents of 'password.yaml' file if exists otherwise empty string

func (*Service) RemoveCollection

func (s *Service) RemoveCollection(collection *Collection)

remove a collection from service's collection map

func (*Service) RemoveSession

func (s *Service) RemoveSession(session *Session)

remove a session from service's session map

func (*Service) SaveData

func (s *Service) SaveData()

send signal to save database

func (*Service) SearchItems

func (service *Service) SearchItems(
	attributes map[string]string) ([]dbus.ObjectPath, []dbus.ObjectPath, *dbus.Error)

SearchItems finds items inside all collection. A collection consists of many items: item = secret + lookup attributes + label

func (*Service) SetAlias

func (service *Service) SetAlias(name string, collection dbus.ObjectPath) *dbus.Error

set an alias for a collection

func (*Service) Start

func (service *Service) Start(ctx context.Context)

start secretserviced

func (*Service) Unlock

func (service *Service) Unlock(
	objects []dbus.ObjectPath) ([]dbus.ObjectPath, dbus.ObjectPath, *dbus.Error)

Unlock unlocks the specified objects (collections, items)

func (*Service) UpdatePropertyCollections

func (s *Service) UpdatePropertyCollections()

UpdatePropertyCollections updates dbus properties of Service

func (*Service) WritePasswordFile added in v0.2.0

func (service *Service) WritePasswordFile(passwordHash string) error

WritePasswordFile writes 'password.yaml' file or returns error

type ServiceConfig added in v0.2.0

type ServiceConfig struct {
	// Service home path
	Home string
	// encrypt database
	EncryptDatabase bool
	// allow database to be exported without encryption
	AllowDbExport bool
}

type Session

type Session struct {
	// reference to parent (service)
	Parent *Service
	// session full dbus object path
	ObjectPath dbus.ObjectPath
	// encryption algorithm type
	EncryptionAlgorithm EncryptionAlgorithm
	// symmetric key used or AES encryption/decryption. Needs IV as well
	SymmetricKey []byte // 16 bytes (128 bits)

}

Session data structure

func NewSession

func NewSession(parent *Service) *Session

create and initialize a new session

func (*Session) Close

func (s *Session) Close() *dbus.Error

closes a session and removes its object from dbus

func (*Session) CreateMethodFromPath

func (s *Session) CreateMethodFromPath(method string) string

CreateMethodFromPath returns a.b.c.Foo when session path is /a/b/c/xyz and passed method is 'Foo'

Jump to

Keyboard shortcuts

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