Documentation ¶
Overview ¶
Package dbus provides a helper function for creating new D-Bus client.
Index ¶
- type Client
- type Connection
- type Connector
- type MockConnection
- func (m *MockConnection) AddMatchSignal(matchOptions ...godbus.MatchOption) error
- func (m *MockConnection) Auth(authMethods []godbus.Auth) error
- func (m *MockConnection) Close() error
- func (m *MockConnection) Hello() error
- func (m *MockConnection) Object(dest string, path godbus.ObjectPath) godbus.BusObject
- func (m *MockConnection) Signal(ch chan<- *godbus.Signal)
- type MockObject
- func (m *MockObject) AddMatchSignal(iface, member string, options ...godbus.MatchOption) *godbus.Call
- func (m *MockObject) Call(method string, flags godbus.Flags, args ...interface{}) *godbus.Call
- func (m *MockObject) CallWithContext(ctx context.Context, method string, flags godbus.Flags, args ...interface{}) *godbus.Call
- func (m *MockObject) Destination() string
- func (m *MockObject) GetProperty(p string) (godbus.Variant, error)
- func (m *MockObject) Go(method string, flags godbus.Flags, ch chan *godbus.Call, args ...interface{}) *godbus.Call
- func (m *MockObject) GoWithContext(ctx context.Context, method string, flags godbus.Flags, ch chan *godbus.Call, ...) *godbus.Call
- func (m *MockObject) Path() godbus.ObjectPath
- func (m *MockObject) RemoveMatchSignal(iface, member string, options ...godbus.MatchOption) *godbus.Call
- func (m *MockObject) SetProperty(p string, v interface{}) error
- func (m *MockObject) StoreProperty(p string, value interface{}) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client interface { AddMatchSignal(matchOptions ...godbus.MatchOption) error Signal(ch chan<- *godbus.Signal) Object(dest string, path godbus.ObjectPath) godbus.BusObject Close() error }
Client is an interface describing capabilities of internal D-Bus client.
type Connection ¶
Connection is an interface describing how much functionality we need from object providing D-Bus connection.
func SystemPrivateConnector ¶
func SystemPrivateConnector() (Connection, error)
SystemPrivateConnector is a standard connector using system bus.
type Connector ¶
type Connector func() (Connection, error)
Connector is a constructor function providing D-Bus connection.
type MockConnection ¶
type MockConnection struct { AuthF func(authMethods []godbus.Auth) error HelloF func() error CloseF func() error AddMatchSignalF func(...godbus.MatchOption) error SignalF func(chan<- *godbus.Signal) ObjectF func(string, godbus.ObjectPath) godbus.BusObject }
MockConnection is a test helper for mocking godbus.Conn.
func (*MockConnection) AddMatchSignal ¶
func (m *MockConnection) AddMatchSignal(matchOptions ...godbus.MatchOption) error
AddMatchSignal ...
func (*MockConnection) Auth ¶
func (m *MockConnection) Auth(authMethods []godbus.Auth) error
Auth ...
func (*MockConnection) Object ¶
func (m *MockConnection) Object(dest string, path godbus.ObjectPath) godbus.BusObject
Object ...
func (*MockConnection) Signal ¶
func (m *MockConnection) Signal(ch chan<- *godbus.Signal)
Signal ...
type MockObject ¶
type MockObject struct { CallWithContextF func(context.Context, string, godbus.Flags, ...interface{}) *godbus.Call CallF func(string, godbus.Flags, ...interface{}) *godbus.Call }
MockObject is a mock of godbus.BusObject.
func (*MockObject) AddMatchSignal ¶
func (m *MockObject) AddMatchSignal(iface, member string, options ...godbus.MatchOption) *godbus.Call
AddMatchSignal ...
func (*MockObject) CallWithContext ¶
func (m *MockObject) CallWithContext( ctx context.Context, method string, flags godbus.Flags, args ...interface{}, ) *godbus.Call
CallWithContext ...
func (*MockObject) GetProperty ¶
func (m *MockObject) GetProperty(p string) (godbus.Variant, error)
GetProperty ...
func (*MockObject) Go ¶
func (m *MockObject) Go(method string, flags godbus.Flags, ch chan *godbus.Call, args ...interface{}) *godbus.Call
Go ...
func (*MockObject) GoWithContext ¶
func (m *MockObject) GoWithContext( ctx context.Context, method string, flags godbus.Flags, ch chan *godbus.Call, args ...interface{}, ) *godbus.Call
GoWithContext ...
func (*MockObject) RemoveMatchSignal ¶
func (m *MockObject) RemoveMatchSignal(iface, member string, options ...godbus.MatchOption) *godbus.Call
RemoveMatchSignal ...
func (*MockObject) SetProperty ¶
func (m *MockObject) SetProperty(p string, v interface{}) error
SetProperty ...
func (*MockObject) StoreProperty ¶
func (m *MockObject) StoreProperty(p string, value interface{}) error
StoreProperty ...